Isis 3 Developer Reference
CubePlotCurve.h
Go to the documentation of this file.
1 #ifndef CubePlotCurve_h
2 #define CubePlotCurve_h
3 
27 #include <QObject>
28 #include <QPointer>
29 
30 // This is needed for the QVariant macro
31 #include <QMetaType>
32 
33 #include "PlotCurve.h"
34 
35 class QMimeData;
36 class QMouseEvent;
37 
38 namespace Isis {
39  class CubeViewport;
40 
68  class CubePlotCurve : public QObject, public PlotCurve {
69  Q_OBJECT
70 
71  public:
73  CubePlotCurve(const QByteArray &parentAndChildData);
74 
75  bool eventFilter(QObject *o, QEvent *e);
76  void paint(CubeViewport *vp, QPainter *painter);
78  virtual QWidget *legendItem() const;
79  QStringList sourceCube() const;
80 
81  void enableAutoRenaming(bool);
82  void copySource(const CubePlotCurve &other);
83  void setSource(CubeViewport *cvp, QList<QPoint> screenPoints,
84  int band = -1);
86  QList< QList<QPoint> > screenPoints, QList<int> band);
87 
88  signals:
93  void needsRepaint();
98  void removing();
99 
100  public slots:
102 
103  private:
104  QMimeData *createMimeData() const;
105  QByteArray toByteArray() const;
106  void mousePressEvent(QMouseEvent *e);
107 
108  void clearSource();
109  void addSource(CubeViewport *cvp, QList<QPoint> screenPoints,
110  int band = -1);
111 
112  private:
114  QPointer<QWidget> m_legendItem;
115 
117  QString m_originalName;
118 
123  bool m_renameAutomatically;
124 
126  QList<QList <QPointF> > m_pointList;
127 
129  QStringList m_sourceCube;
130  };
131 };
132 
135 
136 #endif
137 
bool eventFilter(QObject *o, QEvent *e)
This will start the drag & drop operation for these curves.
Definition: CubePlotCurve.cpp:131
QStringList sourceCube() const
This method returns the cube view port associated with the curve.
Definition: CubePlotCurve.cpp:227
void copySource(const CubePlotCurve &other)
This copies the source data from another CubePlotCurve.
Definition: CubePlotCurve.cpp:250
void setSource(CubeViewport *cvp, QList< QPoint > screenPoints, int band=-1)
Tell this plot curve from where its data originated.
Definition: CubePlotCurve.cpp:315
void needsRepaint()
This is emitted when the curve is modified in such a way that it would paint a viewport differently...
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:132
void updateLegendItemWidget(QWidget *legendItem)
This creates a legend item and overrides events from it.
Definition: CubePlotCurve.cpp:337
void enableAutoRenaming(bool)
This enables/disables the plot curve from changing it&#39;s title when the source data changes...
Definition: CubePlotCurve.cpp:239
This is a plot curve with information relating it to a particular cube or region of a cube...
Definition: CubePlotCurve.h:68
Definition: PlotCurve.h:44
QList< QList< QPointF > > sourceVertices() const
This method returns a list of points which are the vertices of the selected area (by the rubberband) ...
Definition: CubePlotCurve.cpp:205
Units xUnits() const
Get the units of the x-axis double data.
Definition: PlotCurve.cpp:76
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Q_DECLARE_METATYPE(Isis::CubePlotCurve *)
This allows CubePlotCurves to be stored inside of QVariants.
CubePlotCurve(Units xUnits, Units yUnits)
This constructs a CubePlotCurve...
Definition: CubePlotCurve.cpp:42
Units yUnits() const
Get the units of the y-axis double data.
Definition: PlotCurve.cpp:86
void removing()
This is emitted just before the cube plot curve is deleted.
Units
These are all the possible units for the x or y data in a plot curve.
Definition: PlotCurve.h:54
virtual QWidget * legendItem() const
This method is necessary for getting the correct (event filter altered) legend item.
Definition: CubePlotCurve.cpp:216
void paint(CubeViewport *vp, QPainter *painter)
Use information inside of the plot curve to paint onto a cube viewport.
Definition: CubePlotCurve.cpp:163