TelescopeControl.hpp   TelescopeControl.hpp 
skipping to change at line 90 skipping to change at line 90
virtual void deinit(); virtual void deinit();
virtual void update(double deltaTime); virtual void update(double deltaTime);
virtual void draw(StelCore * core); virtual void draw(StelCore * core);
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelObjectModule class // Methods defined in the StelObjectModule class
virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const; virtual QList<StelObjectP> searchAround(const Vec3d& v, double limit Fov, const StelCore* core) const;
virtual StelObjectP searchByNameI18n(const QString& nameI18n) const; virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
virtual StelObjectP searchByName(const QString& name) const; virtual StelObjectP searchByName(const QString& name) const;
virtual StelObjectP searchByID(const QString &id) const { return sea
rchByName(id); }
//! Find and return the list of at most maxNbItem objects auto-compl
eting the passed object name.
//! @param objPrefix the case insensitive first letters of the searc
hed object
//! @param maxNbItem the maximum number of returned object names
//! @param useStartOfWords the autofill mode for returned objects na
mes
//! @return a list of matching object name by order of relevance, or
an empty list if nothing match
virtual QStringList listMatchingObjects(const QString& objPrefix, in
t maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const;
// empty as its not celestial objects // empty as its not celestial objects
virtual QStringList listAllObjects(bool) const { return QStringList( ); } virtual QStringList listAllObjects(bool) const { return QStringList( ); }
virtual QString getName() const { return "Telescope Control"; } virtual QString getName() const { return "Telescope Control"; }
virtual QString getStelObjectType() const;
virtual bool configureGui(bool show = true); virtual bool configureGui(bool show = true);
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods specific to TelescopeControl // Methods specific to TelescopeControl
//! Send a J2000-goto-command to the specified telescope //! Send a J2000-goto-command to the specified telescope
//! @param telescopeNr the number of the telescope //! @param telescopeNr the number of the telescope
//! @param j2000Pos the direction in equatorial J2000 frame //! @param j2000Pos the direction in equatorial J2000 frame
void telescopeGoto(int telescopeNr, const Vec3d &j2000Pos); //! @param selectObject selected object (if any; Q_NULLPTR if move i
s not based on an object)
void telescopeGoto(int telescopeNr, const Vec3d &j2000Pos, StelObjec
tP selectObject = Q_NULLPTR);
//! Remove all currently registered telescopes //! Remove all currently registered telescopes
void deleteAllTelescopes(); void deleteAllTelescopes();
//! Safe access to the loaded list of telescope models //! Safe access to the loaded list of telescope models
const QHash<QString, DeviceModel>& getDeviceModels(); const QHash<QString, DeviceModel>& getDeviceModels();
//! Loads the module's configuration from the configuration file. //! Loads the module's configuration from the configuration file.
void loadConfiguration(); void loadConfiguration();
//! Saves the module's configuration to the configuration file. //! Saves the module's configuration to the configuration file.
void saveConfiguration(); void saveConfiguration();
//! Saves to telescopes.json a list of the parameters of the active telescope clients. //! Saves to telescopes.json a list of the parameters of the active telescope clients.
void saveTelescopes(); void saveTelescopes();
//! Loads from telescopes.json the parameters of telescope clients a nd initializes them. If there are already any initialized telescope clients , they are removed. //! Loads from telescopes.json the parameters of telescope clients a nd initializes them. If there are already any initialized telescope clients , they are removed.
void loadTelescopes(); void loadTelescopes();
//These are public, but not slots, because they don't use sufficient validation. Scripts shouldn't be able to add/remove telescopes, only to po int them. //These are public, but not slots, because they don't use sufficient validation. Scripts shouldn't be able to add/remove telescopes, only to po int them.
//! Adds a telescope description containing the given properties. DO ES NOT VALIDATE its parameters. If serverName is specified, portSerial shou ld be specified too. Call saveTelescopes() to write the modified configurat ion to disc. Call startTelescopeAtSlot() to start this telescope. //! Adds a telescope description containing the given properties. DO ES NOT VALIDATE its parameters. If serverName is specified, portSerial shou ld be specified too. Call saveTelescopes() to write the modified configurat ion to disc. Call startTelescopeAtSlot() to start this telescope.
//! @param portSerial must be a valid serial port name for the parti cular platform, e.g. "COM1" for Microsoft Windows of "/dev/ttyS0" for Linux //! @param portSerial must be a valid serial port name for the parti cular platform, e.g. "COM1" for Microsoft Windows of "/dev/ttyS0" for Linux
bool addTelescopeAtSlot(int slot, ConnectionType connectionType, QSt ring name, QString equinox, QString host = QString("localhost"), int portTC P = DEFAULT_TCP_PORT, int delay = DEFAULT_DELAY, bool connectAtStartup = fa lse, QList<double> circles = QList<double>(), QString serverName = QString( ), QString portSerial = QString()); bool addTelescopeAtSlot(int slot, ConnectionType connectionType, QSt ring name, QString equinox, QString host = QString("localhost"), int portTC P = DEFAULT_TCP_PORT, int delay = DEFAULT_DELAY, bool connectAtStartup = fa lse, QList<double> circles = QList<double>(), QString serverName = QString( ), QString portSerial = QString(), QString rts2Url = QString(), QString rts 2Username = QString(), QString rts2Password = QString());
//! Retrieves a telescope description. Returns false if the slot is empty. Returns empty serverName and portSerial if the description contains no server. //! Retrieves a telescope description. Returns false if the slot is empty. Returns empty serverName and portSerial if the description contains no server.
bool getTelescopeAtSlot(int slot, ConnectionType& connectionType, QS tring& name, QString& equinox, QString& host, int& portTCP, int& delay, boo l& connectAtStartup, QList<double>& circles, QString& serverName, QString& portSerial); bool getTelescopeAtSlot(int slot, ConnectionType& connectionType, QS tring& name, QString& equinox, QString& host, int& portTCP, int& delay, boo l& connectAtStartup, QList<double>& circles, QString& serverName, QString& portSerial, QString& rts2Url, QString& rts2Username, QString& rts2Password) ;
//! Removes info from the tree. Should it include stopTelescopeAtSlo t()? //! Removes info from the tree. Should it include stopTelescopeAtSlo t()?
bool removeTelescopeAtSlot(int slot); bool removeTelescopeAtSlot(int slot);
//! Starts a telescope at the given slot, getting its description wi th getTelescopeAtSlot(). Creates a TelescopeClient object and starts a serv er process if necessary. //! Starts a telescope at the given slot, getting its description wi th getTelescopeAtSlot(). Creates a TelescopeClient object and starts a serv er process if necessary.
bool startTelescopeAtSlot(int slot); bool startTelescopeAtSlot(int slot);
//! Stops the telescope at the given slot. Destroys the TelescopeCli ent object and terminates the server process if necessary. //! Stops the telescope at the given slot. Destroys the TelescopeCli ent object and terminates the server process if necessary.
bool stopTelescopeAtSlot(int slot); bool stopTelescopeAtSlot(int slot);
//! Stops all telescopes, but without removing them like deleteAllTe lescopes(). //! Stops all telescopes, but without removing them like deleteAllTe lescopes().
bool stopAllTelescopes(); bool stopAllTelescopes();
skipping to change at line 340 skipping to change at line 349
//! Start the telescope server defined for a given slot in a new QPr ocess //! Start the telescope server defined for a given slot in a new QPr ocess
//! @param slot the slot number //! @param slot the slot number
//! @param serverName the short form of the server name (e.g. "Dummy " for "TelescopeServerDummy") //! @param serverName the short form of the server name (e.g. "Dummy " for "TelescopeServerDummy")
//! @param tcpPort TCP slot the server should listen to //! @param tcpPort TCP slot the server should listen to
bool startServerAtSlot(int slot, QString serverName, int tcpPort, QS tring serialPort); bool startServerAtSlot(int slot, QString serverName, int tcpPort, QS tring serialPort);
//! Stop the telescope server at a given slot, terminating the proce ss //! Stop the telescope server at a given slot, terminating the proce ss
bool stopServerAtSlot(int slot); bool stopServerAtSlot(int slot);
//! A wrapper for TelescopeClient::create(). Used internally by load Telescopes() and startTelescopeAtSlot(). Does not perform any validation on its arguments. //! A wrapper for TelescopeClient::create(). Used internally by load Telescopes() and startTelescopeAtSlot(). Does not perform any validation on its arguments.
bool startClientAtSlot(int slot, ConnectionType connectionType, QStr ing name, QString equinox, QString host, int portTCP, int delay, QList<doub le> circles, QString serverName = QString(), QString portSerial = QString() ); bool startClientAtSlot(int slot, ConnectionType connectionType, QStr ing name, QString equinox, QString host, int portTCP, int delay, QList<doub le> circles, QString serverName = QString(), QString portSerial = QString() , QString rts2Url = QString(), QString rts2Username = QString(), QString rt s2Password = QString());
//! Returns true if the TelescopeClient at this slot has been stoppe d successfully or doesn't exist //! Returns true if the TelescopeClient at this slot has been stoppe d successfully or doesn't exist
bool stopClientAtSlot(int slot); bool stopClientAtSlot(int slot);
//! Compile a list of the executables in the /servers folder //! Compile a list of the executables in the /servers folder
void loadTelescopeServerExecutables(); void loadTelescopeServerExecutables();
//! Loads the list of supported telescope models. Calls loadTelescop eServerExecutables() internally. //! Loads the list of supported telescope models. Calls loadTelescop eServerExecutables() internally.
void loadDeviceModels(); void loadDeviceModels();
//! Copies the default device_models.json to the given destination //! Copies the default device_models.json to the given destination
//! @returns true if the file has been copied successfully //! @returns true if the file has been copied successfully
bool restoreDeviceModelsListTo(QString deviceModelsListPath); bool restoreDeviceModelsListTo(QString deviceModelsListPath);
void addLogAtSlot(int slot); void addLogAtSlot(int slot);
void logAtSlot(int slot); void logAtSlot(int slot);
void removeLogAtSlot(int slot); void removeLogAtSlot(int slot);
static void translations();
QString actionGroupId; QString actionGroupId;
QString moveToSelectedActionId; QString moveToSelectedActionId;
QString moveToCenterActionId; QString moveToCenterActionId;
}; };
#include <QObject> #include <QObject>
#include "StelPluginInterface.hpp" #include "StelPluginInterface.hpp"
//! This class is used by Qt to manage a plug-in interface //! This class is used by Qt to manage a plug-in interface
class TelescopeControlStelPluginInterface : public QObject, public StelPlug inInterface class TelescopeControlStelPluginInterface : public QObject, public StelPlug inInterface
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID StelPluginInterface_iid) Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
Q_INTERFACES(StelPluginInterface) Q_INTERFACES(StelPluginInterface)
public: public:
virtual StelModule* getStelModule() const; virtual StelModule* getStelModule() const;
virtual StelPluginInfo getPluginInfo() const; virtual StelPluginInfo getPluginInfo() const;
virtual QObjectList getExtensionList() const { return QObjectList(); }
}; };
#endif /*_TELESCOPE_CONTROL_HPP_*/ #endif /*_TELESCOPE_CONTROL_HPP_*/
 End of changes. 8 change blocks. 
4 lines changed or deleted 24 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/