20 #ifndef SYNCSERVEREVENTSENDERS_HPP_ 21 #define SYNCSERVEREVENTSENDERS_HPP_ 23 #include "SyncProtocol.hpp" 24 #include "SyncMessages.hpp" 74 virtual T constructMessage() = 0;
81 virtual void update() Q_DECL_OVERRIDE;
141 void sendStelPropChange(
StelProperty* prop,
const QVariant& val);
155 void update() Q_DECL_OVERRIDE;
169 void update() Q_DECL_OVERRIDE;
virtual void update() Q_DECL_OVERRIDE
If isDirty is true, broadcasts a message to all using constructMessage() and broadcastMessage, and resets isDirty.
Wrapper around a Q_PROPERTY (see the Qt property system for more information) of a specific object...
This class provides a semi-automatic event sender using a specific message type.
Base interface for the messages themselves, allowing to serialize/deserialize them.
virtual void newClientConnected(SyncRemotePeer &client) Q_DECL_OVERRIDE
Uses constructMessage() to send a message to the new client.
Handling the connection to a remote peer (i.e. all clients on the server, and the server on the clien...
Main class for Stellarium core processing.
bool isDirty
Free to use by sublasses. Recommendation: use to track if update() should broadcast a message...
Subclasses of this class notify clients of state changes.
virtual void update()
This is guaranteed to be called once per frame (usually after all other StelModules have been updated...
virtual void reactToStellariumEvent()
This may be used to react to Stellarium application events and queue a broadcast or store the changed...
StelCore * core
Direct access to StelCore.
void writeMessage(const SyncProtocol::SyncMessage &msg)
Sends a message to this peer.
virtual void newClientConnected(SyncRemotePeer &client)
This is automatically called by the SyncServer whenever a new client connects.
Manages the head movements and zoom operations.
Manages the registration of specific object properties with the StelProperty system.
Manage the selection and queries on one or more StelObjects.
void broadcastMessage(const SyncProtocol::SyncMessage &msg)
Subclasses can call this to broadcast a message to all valid connected clients.
Notifies clients of simulation time jumps and time scale changes.
Implements a server to which SyncClients can connect and receive state changes.