TelescopeClient.hpp   TelescopeClient.hpp 
skipping to change at line 70 skipping to change at line 70
//! TelescopeClient supports the following InfoStringGroup flags: //! TelescopeClient supports the following InfoStringGroup flags:
//! - Name //! - Name
//! - RaDecJ2000 //! - RaDecJ2000
//! - RaDec //! - RaDec
//! - PlainText //! - PlainText
//! @param core the StelCore object //! @param core the StelCore object
//! @param flags a set of InfoStringGroup items to include in the re turn value. //! @param flags a set of InfoStringGroup items to include in the re turn value.
//! @return a QString containing an HMTL encoded description of the Telescope. //! @return a QString containing an HMTL encoded description of the Telescope.
QString getInfoString(const StelCore* core, const InfoStringGroup& f lags) const; QString getInfoString(const StelCore* core, const InfoStringGroup& f lags) const;
QString getType(void) const {return "Telescope";} QString getType(void) const {return "Telescope";}
virtual double getAngularSize(const StelCore* core) const {Q_ASSERT( 0); return 0;} // TODO virtual double getAngularSize(const StelCore*) const {Q_ASSERT(0); r eturn 0;} // TODO
// Methods specific to telescope // Methods specific to telescope
virtual void telescopeGoto(const Vec3d &j2000Pos) = 0; virtual void telescopeGoto(const Vec3d &j2000Pos) = 0;
virtual bool isConnected(void) const = 0; virtual bool isConnected(void) const = 0;
virtual bool hasKnownPosition(void) const = 0; virtual bool hasKnownPosition(void) const = 0;
void addOcular(double fov) {if (fov>=0.0) oculars.push_back(fov);} void addOcular(double fov) {if (fov>=0.0) oculars.push_back(fov);}
const QList<double> &getOculars(void) const {return oculars;} const QList<double> &getOculars(void) const {return oculars;}
virtual bool prepareCommunication() {return false;} virtual bool prepareCommunication() {return false;}
virtual void performCommunication() {} virtual void performCommunication() {}
protected: protected:
TelescopeClient(const QString &name); TelescopeClient(const QString &name);
QString nameI18n; QString nameI18n;
const QString name; const QString name;
private: private:
virtual bool isInitialized(void) const {return true;} virtual bool isInitialized(void) const {return true;}
float getSelectPriority(const StelNavigator *nav) const {return -10. f;} float getSelectPriority(const StelNavigator*) const {return -10.f;}
private: private:
QList<double> oculars; // fov of the oculars QList<double> oculars; // fov of the oculars
}; };
//! Example Telescope class. A physical telescope does not exist. //! Example Telescope class. A physical telescope does not exist.
//! This can be used as a starting point for implementing a derived //! This can be used as a starting point for implementing a derived
//! Telescope class. //! Telescope class.
//! This class used to be called TelescopeDummy, but it had to be renamed //! This class used to be called TelescopeDummy, but it had to be renamed
//! in order to resolve a compiler/linker conflict with the identically nam ed //! in order to resolve a compiler/linker conflict with the identically nam ed
//! TelescopeDummy class in Stellarium's main code. //! TelescopeDummy class in Stellarium's main code.
class TelescopeClientDummy : public TelescopeClient class TelescopeClientDummy : public TelescopeClient
{ {
public: public:
TelescopeClientDummy(const QString &name, const QString &params) : T elescopeClient(name) TelescopeClientDummy(const QString &name, const QString &) : Telesco peClient(name)
{ {
desired_pos[0] = XYZ[0] = 1.0; desired_pos[0] = XYZ[0] = 1.0;
desired_pos[1] = XYZ[1] = 0.0; desired_pos[1] = XYZ[1] = 0.0;
desired_pos[2] = XYZ[2] = 0.0; desired_pos[2] = XYZ[2] = 0.0;
} }
~TelescopeClientDummy(void) {} ~TelescopeClientDummy(void) {}
bool isConnected(void) const bool isConnected(void) const
{ {
return true; return true;
} }
skipping to change at line 132 skipping to change at line 132
} }
void telescopeGoto(const Vec3d &j2000Pos) void telescopeGoto(const Vec3d &j2000Pos)
{ {
desired_pos = j2000Pos; desired_pos = j2000Pos;
desired_pos.normalize(); desired_pos.normalize();
} }
bool hasKnownPosition(void) const bool hasKnownPosition(void) const
{ {
return true; return true;
} }
Vec3d getJ2000EquatorialPos(const StelNavigator *nav=0) const Vec3d getJ2000EquatorialPos(const StelNavigator*) const
{ {
return XYZ; return XYZ;
} }
private: private:
Vec3d XYZ; // j2000 position Vec3d XYZ; // j2000 position
Vec3d desired_pos; Vec3d desired_pos;
}; };
//! A telescope's position at a given time. //! A telescope's position at a given time.
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 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/