Isis 3 Programmer Reference
AbstractPlotTool.h
1#ifndef AbstractPlotTool_h
2#define AbstractPlotTool_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12// this should be the only include in this file!
13#include "Tool.h"
14
15// We need PlotCurve::Units
16#include "PlotCurve.h"
17
18#include <QPointer>
19
20class QComboBox;
21class QPen;
22
23namespace Isis {
24 class CubePlotCurve;
25 class PlotWindow;
26 class RubberBandComboBox;
27
43 class AbstractPlotTool : public Tool {
44 Q_OBJECT
45
46 public:
48 virtual ~AbstractPlotTool();
49
50 virtual void paintViewport(MdiCubeViewport *vp, QPainter *painter);
51
52 public slots:
53 void removeWindow(QObject *);
55 void showPlotWindow();
56
57 protected slots:
58 void repaintViewports();
59
60 protected:
62 static CubePlotCurve *createCurve(QString name, QPen pen,
63 PlotCurve::Units xUnits, PlotCurve::Units yUnits);
64 QWidget *createToolBarWidget(QStackedWidget *parent);
65
74 virtual PlotWindow *createWindow() = 0;
75 virtual void updateTool();
76 QList<MdiCubeViewport *> viewportsToPlot();
77 QList<PlotWindow *> plotWindows();
78
85 virtual void detachCurves() = 0;
86 PlotWindow *selectedWindow(bool createIfNeeded = true);
87
88 private slots:
90
91 private:
98 QPointer<QComboBox> m_selectWindowCombo;
99 };
100}
101
102#endif
Parent class for plotting tools which provides common functionality.
void repaintViewports()
This method causes all of the viewports to be repainted.
void removeWindow(QObject *)
When a user closes a window, we want to remove that window from our combo box for selecting the activ...
QPointer< QComboBox > m_selectWindowCombo
This allows the user to select the active plot window.
PlotWindow * selectedWindow(bool createIfNeeded=true)
Get the 'active' plot window (the window selected by the user to contain new curves).
virtual void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method allows each plot window to paint any information it wants onto the cube viewports.
void selectedWindowChanged()
This method is called when the window where new curves are placed is changed by the user.
QWidget * createToolBarWidget(QStackedWidget *parent)
This provides the standard plot tool options, such as selecting an active plot window.
QList< MdiCubeViewport * > viewportsToPlot()
Get a list of linked viewports that should be plotting when a new plot is requested.
QList< PlotWindow * > plotWindows()
Get a list of all of the instantiated plot windows.
virtual ~AbstractPlotTool()
Clean up the abstract plot tool.
void showPlotWindow()
displays the plot window
virtual void detachCurves()=0
This will be called when the selected plot window changes.
virtual void updateTool()
This forwards all update calls to the plot windows.
PlotWindow * addWindow()
This creates and initializes everything about a plot window.
static CubePlotCurve * createCurve(QString name, QPen pen, PlotCurve::Units xUnits, PlotCurve::Units yUnits)
This is a helper method for children.
AbstractPlotTool(QWidget *parent)
When you construct a plot tool, this initializes the common functionality between plot tools.
virtual PlotWindow * createWindow()=0
This needs to be implemented by children to instantiate a plot window of the appropriate child class ...
This is a plot curve with information relating it to a particular cube or region of a cube.
Cube display widget for certain Isis MDI applications.
Units
These are all the possible units for the x or y data in a plot curve.
Definition PlotCurve.h:54
Base class for the Qisis tools.
Definition Tool.h:67
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16