USGS

Isis 3.0 Developer's Reference (API)

Home

AbstractPlotTool.h

Go to the documentation of this file.
00001 #ifndef AbstractPlotTool_h
00002 #define AbstractPlotTool_h
00003 
00004 // this should be the only include in this file!
00005 #include "Tool.h"
00006 
00007 // We need PlotCurve::Units
00008 #include "PlotCurve.h"
00009 
00010 #include <QPointer>
00011 
00012 class QComboBox;
00013 class QPen;
00014 
00015 namespace Isis {
00016   class CubePlotCurve;
00017   class PlotWindow;
00018   class RubberBandComboBox;
00019 
00035   class AbstractPlotTool : public Tool {
00036       Q_OBJECT
00037 
00038     public:
00039       AbstractPlotTool(QWidget *parent);
00040       virtual ~AbstractPlotTool();
00041 
00042       virtual void paintViewport(MdiCubeViewport *vp, QPainter *painter);
00043 
00044     public slots:
00045       void removeWindow(QObject *);
00046       void repaintViewports(CubePlotCurve *);
00047       void showPlotWindow();
00048 
00049     protected slots:
00050       void repaintViewports();
00051 
00052     protected:
00053       PlotWindow *addWindow();
00054       static CubePlotCurve *createCurve(QString name, QPen pen,
00055           PlotCurve::Units xUnits, PlotCurve::Units yUnits);
00056       QWidget *createToolBarWidget(QStackedWidget *parent);
00057 
00066       virtual PlotWindow *createWindow() = 0;
00067       virtual void updateTool();
00068       QList<MdiCubeViewport *> viewportsToPlot();
00069       QList<PlotWindow *> plotWindows();
00070 
00077       virtual void detachCurves() = 0;
00078       PlotWindow *selectedWindow(bool createIfNeeded = true);
00079 
00080     private slots:
00081       void selectedWindowChanged();
00082 
00083     private:
00090       QPointer<QComboBox> m_selectWindowCombo;
00091   };
00092 }
00093 
00094 #endif
00095