Isis 3 Programmer Reference
AbstractPlotTool.h
1 #ifndef AbstractPlotTool_h
2 #define AbstractPlotTool_h
3 
4 // this should be the only include in this file!
5 #include "Tool.h"
6 
7 // We need PlotCurve::Units
8 #include "PlotCurve.h"
9 
10 #include <QPointer>
11 
12 class QComboBox;
13 class QPen;
14 
15 namespace Isis {
16  class CubePlotCurve;
17  class PlotWindow;
18  class RubberBandComboBox;
19 
35  class AbstractPlotTool : public Tool {
36  Q_OBJECT
37 
38  public:
39  AbstractPlotTool(QWidget *parent);
40  virtual ~AbstractPlotTool();
41 
42  virtual void paintViewport(MdiCubeViewport *vp, QPainter *painter);
43 
44  public slots:
45  void removeWindow(QObject *);
47  void showPlotWindow();
48 
49  protected slots:
50  void repaintViewports();
51 
52  protected:
54  static CubePlotCurve *createCurve(QString name, QPen pen,
55  PlotCurve::Units xUnits, PlotCurve::Units yUnits);
56  QWidget *createToolBarWidget(QStackedWidget *parent);
57 
66  virtual PlotWindow *createWindow() = 0;
67  virtual void updateTool();
70 
77  virtual void detachCurves() = 0;
78  PlotWindow *selectedWindow(bool createIfNeeded = true);
79 
80  private slots:
81  void selectedWindowChanged();
82 
83  private:
90  QPointer<QComboBox> m_selectWindowCombo;
91  };
92 }
93 
94 #endif
95 
Cube display widget for certain Isis MDI applications.
virtual void detachCurves()=0
This will be called when the selected plot window changes.
QWidget * createToolBarWidget(QStackedWidget *parent)
This provides the standard plot tool options, such as selecting an active plot window.
void repaintViewports()
This method causes all of the viewports to be repainted.
virtual PlotWindow * createWindow()=0
This needs to be implemented by children to instantiate a plot window of the appropriate child class ...
virtual void updateTool()
This forwards all update calls to the plot windows.
QPointer< QComboBox > m_selectWindowCombo
This allows the user to select the active plot window.
This is a plot curve with information relating it to a particular cube or region of a cube...
Definition: CubePlotCurve.h:68
PlotWindow * addWindow()
This creates and initializes everything about a plot window.
virtual ~AbstractPlotTool()
Clean up the abstract plot tool.
static CubePlotCurve * createCurve(QString name, QPen pen, PlotCurve::Units xUnits, PlotCurve::Units yUnits)
This is a helper method for children.
void removeWindow(QObject *)
When a user closes a window, we want to remove that window from our combo box for selecting the activ...
virtual void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method allows each plot window to paint any information it wants onto the cube viewports...
PlotWindow * selectedWindow(bool createIfNeeded=true)
Get the &#39;active&#39; plot window (the window selected by the user to contain new curves).
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void showPlotWindow()
displays the plot window
Base class for the Qisis tools.
Definition: Tool.h:81
QList< MdiCubeViewport * > viewportsToPlot()
Get a list of linked viewports that should be plotting when a new plot is requested.
AbstractPlotTool(QWidget *parent)
When you construct a plot tool, this initializes the common functionality between plot tools...
Parent class for plotting tools which provides common functionality.
QList< PlotWindow * > plotWindows()
Get a list of all of the instantiated plot windows.
void selectedWindowChanged()
This method is called when the window where new curves are placed is changed by the user...
Units
These are all the possible units for the x or y data in a plot curve.
Definition: PlotCurve.h:54