USGS

Isis 3.0 Object Programmers' Reference

Home

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