20 #ifndef REMOTECONTROL_HPP_ 21 #define REMOTECONTROL_HPP_ 26 #include "VecMath.hpp" 27 #include "StelModule.hpp" 28 #include "StelFader.hpp" 29 #include "StelCore.hpp" 50 NOTIFY flagEnabledChanged)
55 NOTIFY flagAutoStartChanged)
59 READ getFlagUsePassword
61 NOTIFY flagUsePasswordChanged)
69 virtual void update(
double deltaTime);
72 virtual void handleKeys(QKeyEvent* event){
event->setAccepted(
false);}
79 bool getFlagEnabled()
const {
return enabled;}
80 bool getFlagAutoStart()
const {
return autoStart; }
81 bool getFlagUsePassword()
const {
return usePassword; }
83 QString getPassword()
const {
return password; }
84 int getPort()
const {
return port; }
129 void flagEnabledChanged(
bool val);
130 void flagAutoStartChanged(
bool val);
131 void flagUsePasswordChanged(
bool val);
133 void portChanged(
int val);
134 void passwordChanged(
const QString& val);
164 #include "StelPluginInterface.hpp" 171 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
virtual void init()
Initialize itself.
void setFlagUsePassword(bool b)
If true, the password from setPassword() is required for all web requests.
void setPort(const int port)
Sets the port where the server listens.
Define the interface to implement when creating a plugin.
void setFlagEnabled(bool b)
Starts/stops the web server.
Main class for Stellarium core processing.
void restoreDefaultSettings()
Restore the plug-in's settings to the default state.
bool usePassword
If true, the password set with setPassword() is required for all requests.
Main class of the RemoteControl plug-in, implementing the StelModule interface.
void stopServer()
Stops the HTTP server gracefully.
virtual double getCallOrder(StelModuleActionName actionName) const
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
void saveSettings()
Save the plug-in's settings to the configuration file.
This is the main request handler for the remote control plugin, receiving and dispatching the HTTP re...
virtual void update(double deltaTime)
Update the module with respect to the time.
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
bool autoStart
If true, the server is automatically started when init() is called.
void setPassword(const QString &password)
Sets the password that is optionally enabled with setFlagUsePassword().
void startServer()
Starts the HTTP server using the current settings and begins handling requests.
void loadSettings()
Load the plug-in's settings from the configuration file.
StelModuleActionName
Define the possible action for which an order is defined.
virtual void handleKeys(QKeyEvent *event)
Handle key events.
Listens for incoming TCP connections and and passes all incoming HTTP requests to your implementation...
This class defines the plugin interface with the main Stellarium program.
virtual bool configureGui(bool show=true)
Detect or show the configuration GUI elements for the module.
Main window of the Angle Measure plug-in.
void setFlagAutoStart(bool b)
If true, the server is automatically started when init() is called.
bool enabled
Determines if the web server is running, and can be used to start/stop the server.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.