• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

PlotMoveableMarker.h

Go to the documentation of this file.
00001 #ifndef PLOT_MOVEABLE_MARKER_H
00002 #define PLOT_MOVEABLE_MARKER_H
00003 
00004 #include <QObject>
00005 #include <QCursor>
00006 
00007 #include <qwt_plot_marker.h>
00008 
00009 class Plot;
00010 
00011 class PlotMoveableMarker : public QObject, public QwtPlotMarker
00012 {
00013   Q_OBJECT
00014 
00015   //=====================================================================================
00016   // Enums
00017   //=====================================================================================
00018   public:
00019     enum MovementDirection { Horizontal, Vertical, HorizontalAndVertical };
00020 
00021   //=====================================================================================
00022   // Constructors and destructor
00023   //=====================================================================================
00024   public:
00025     PlotMoveableMarker( MovementDirection movementDirection, QObject* parent = NULL );
00026     virtual ~PlotMoveableMarker();
00027 
00028   //=====================================================================================
00029   // Signals
00030   //=====================================================================================
00031   signals:
00032     void moved();
00033     void released();
00034 
00035   //=====================================================================================
00036   // Slots
00037   //=====================================================================================
00038 
00039   //=====================================================================================
00040   // Methods
00041   //=====================================================================================
00042   public:
00043     MovementDirection movementDirection() const { return m_movementDirection; }
00044     virtual bool eventFilter( QObject* object, QEvent* event );
00045     void attach ( Plot* plot );
00046     virtual int rtti() const;
00047 
00048   //=====================================================================================
00049   // Members
00050   //=====================================================================================
00051   private:
00052     MovementDirection m_movementDirection;
00053     Plot*             m_plot;
00054     bool              m_mousePressed;
00055     bool              m_onTarget;
00056     QCursor           m_storedCursor;
00057 };
00058 
00059 #endif

Generated on Tue Aug 24 2010 15:58:55 for Smartlet by  doxygen 1.7.1