StelMovementMgr.hpp   StelMovementMgr.hpp 
skipping to change at line 32 skipping to change at line 32
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
//! @class StelMovementMgr //! @class StelMovementMgr
//! Manages the head movements and zoom operations. //! Manages the head movements and zoom operations.
class StelMovementMgr : public StelModule class StelMovementMgr : public StelModule
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool equatorialMount
READ getEquatorialMount
WRITE setEquatorialMount)
Q_PROPERTY(bool tracking
READ getFlagTracking
WRITE setFlagTracking)
public: public:
//! Possible mount modes defining the reference frame in which head movements occur. //! Possible mount modes defining the reference frame in which head movements occur.
enum MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGal actic}; enum MountMode { MountAltAzimuthal, MountEquinoxEquatorial, MountGal actic};
StelMovementMgr(StelCore* core); StelMovementMgr(StelCore* core);
virtual ~StelMovementMgr(); virtual ~StelMovementMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
skipping to change at line 56 skipping to change at line 61
//! - Enabling/disabling the zoom keys //! - Enabling/disabling the zoom keys
//! - Enabling/disabling the mouse zoom //! - Enabling/disabling the mouse zoom
//! - Enabling/disabling the mouse movement //! - Enabling/disabling the mouse movement
//! - Sets the zoom and movement speeds //! - Sets the zoom and movement speeds
//! - Sets the auto-zoom duration and mode. //! - Sets the auto-zoom duration and mode.
virtual void init(); virtual void init();
//! Update time-dependent things (does nothing). //! Update time-dependent things (does nothing).
virtual void update(double) {;} virtual void update(double) {;}
//! Implement required draw function. Does nothing. //! Implement required draw function. Does nothing.
virtual void draw(StelCore*, class StelRenderer*) {;} virtual void draw(StelCore*) {;}
//! Handle keyboard events. //! Handle keyboard events.
virtual void handleKeys(QKeyEvent* event); virtual void handleKeys(QKeyEvent* event);
//! Handle mouse movement events. //! Handle mouse movement events.
virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b); virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b);
//! Handle mouse wheel events. //! Handle mouse wheel events.
virtual void handleMouseWheel(class QWheelEvent* event); virtual void handleMouseWheel(class QWheelEvent* event);
//! Handle mouse click events. //! Handle mouse click events.
virtual void handleMouseClicks(class QMouseEvent* event); virtual void handleMouseClicks(class QMouseEvent* event);
//! Handle pinch gesture.
virtual bool handlePinch(qreal scale, bool started);
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods specific to StelMovementMgr // Methods specific to StelMovementMgr
//! Increment/decrement smoothly the vision field and position. //! Increment/decrement smoothly the vision field and position.
void updateMotion(double deltaTime); void updateMotion(double deltaTime);
// These are hopefully temporary. // These are hopefully temporary.
bool getHasDragged() const {return hasDragged;} bool getHasDragged() const {return hasDragged;}
skipping to change at line 197 skipping to change at line 204
void turnUp(bool); void turnUp(bool);
void turnDown(bool); void turnDown(bool);
void moveSlow(bool b) {flagMoveSlow=b;} void moveSlow(bool b) {flagMoveSlow=b;}
void zoomIn(bool); void zoomIn(bool);
void zoomOut(bool); void zoomOut(bool);
//! Set current mount type defining the reference frame in which hea d movements occur. //! Set current mount type defining the reference frame in which hea d movements occur.
void setMountMode(MountMode m); void setMountMode(MountMode m);
//! Get current mount type defining the reference frame in which hea d movements occur. //! Get current mount type defining the reference frame in which hea d movements occur.
MountMode getMountMode(void) const {return mountMode;} MountMode getMountMode(void) const {return mountMode;}
bool getEquatorialMount(void) const {return mountMode == MountEquino xEquatorial;}
void setDragTimeMode(bool b) {dragTimeMode=b;} void setDragTimeMode(bool b) {dragTimeMode=b;}
bool getDragTimeMode() const {return dragTimeMode;} bool getDragTimeMode() const {return dragTimeMode;}
private slots: private slots:
//! Called when the selected object changes. //! Called when the selected object changes.
void selectedObjectChange(StelModule::StelModuleSelectAction action) ; void selectedObjectChange(StelModule::StelModuleSelectAction action) ;
//! Return the initial value of intensity of art of constellations.
double getInitConstellationIntensity() const {return initConstellati
onIntensity;}
//! Set the initial value of intensity of art of constellations.
void setInitConstellationIntensity(double v) {initConstellationInten
sity=v;}
private: private:
Vec3d j2000ToMountFrame(const Vec3d& v) const; Vec3d j2000ToMountFrame(const Vec3d& v) const;
Vec3d mountFrameToJ2000(const Vec3d& v) const; Vec3d mountFrameToJ2000(const Vec3d& v) const;
double currentFov; // The current FOV in degree double currentFov; // The current FOV in degree
double initFov; // The FOV at startup double initFov; // The FOV at startup
double minFov; // Minimum FOV in degree double minFov; // Minimum FOV in degree
double maxFov; // Maximum FOV in degree double maxFov; // Maximum FOV in degree
double initConstellationIntensity; // The initial constellation ar t intensity (level at startup)
void setFov(double f) void setFov(double f)
{ {
currentFov = f; currentFov = f;
if (f>maxFov) if (f>maxFov)
currentFov = maxFov; currentFov = maxFov;
if (f<minFov) if (f<minFov)
currentFov = minFov; currentFov = minFov;
changeConstellationArtIntensity();
} }
void changeFov(double deltaFov); void changeFov(double deltaFov);
void changeConstellationArtIntensity();
void updateVisionVector(double deltaTime); void updateVisionVector(double deltaTime);
void updateAutoZoom(double deltaTime); // Update autoZoom if activat ed void updateAutoZoom(double deltaTime); // Update autoZoom if activat ed
//! Make the first screen position correspond to the second (useful for mouse dragging) //! Make the first screen position correspond to the second (useful for mouse dragging)
void dragView(int x1, int y1, int x2, int y2); void dragView(int x1, int y1, int x2, int y2);
StelCore* core; // The core on which the movement are appli ed StelCore* core; // The core on which the movement are appli ed
class StelObjectMgr* objectMgr; class StelObjectMgr* objectMgr;
bool flagLockEquPos; // Define if the equatorial position is loc ked bool flagLockEquPos; // Define if the equatorial position is loc ked
 End of changes. 8 change blocks. 
2 lines changed or deleted 21 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/