Isis 3 Programmer 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 
124 
127 
130  };
131 };
132 
135 
136 #endif
137 
bool eventFilter(QObject *o, QEvent *e)
This will start the drag & drop operation for these curves.
QStringList sourceCube() const
This method returns the cube view port associated with the curve.
QStringList m_sourceCube
The cube that the data is coming from.
void copySource(const CubePlotCurve &other)
This copies the source data from another CubePlotCurve.
void setSource(CubeViewport *cvp, QList< QPoint > screenPoints, int band=-1)
Tell this plot curve from where its data originated.
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
QPointer< QWidget > m_legendItem
This is the widget legend item associated with this curve.
void updateLegendItemWidget(QWidget *legendItem)
This creates a legend item and overrides events from it.
void enableAutoRenaming(bool)
This enables/disables the plot curve from changing it&#39;s title when the source data changes...
QString m_originalName
This is the curve&#39;s name before any automatic renaming happened.
QMimeData * createMimeData() const
This converts the plot curve into a binary, clipboard-compatible storage format (QMimeData).
This is a plot curve with information relating it to a particular cube or region of a cube...
Definition: CubePlotCurve.h:68
QList< QList< QPointF > > sourceVertices() const
This method returns a list of points which are the vertices of the selected area (by the rubberband) ...
Units xUnits() const
Get the units of the x-axis double data.
Definition: PlotCurve.cpp:76
void mousePressEvent(QMouseEvent *e)
Handle various events on the legend item.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool m_renameAutomatically
This indicates if we are allowed to modify the title of this curve when the source (origin) data chan...
Q_DECLARE_METATYPE(Isis::CubePlotCurve *)
This allows CubePlotCurves to be stored inside of QVariants.
QList< QList< QPointF > > m_pointList
List of vertices in sample,line coordinates from the rubber band.
CubePlotCurve(Units xUnits, Units yUnits)
This constructs a CubePlotCurve...
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
QByteArray toByteArray() const
Serialize this plot curve into a binary byte array.
virtual QWidget * legendItem() const
This method is necessary for getting the correct (event filter altered) legend item.
void paint(CubeViewport *vp, QPainter *painter)
Use information inside of the plot curve to paint onto a cube viewport.