Isis Developer Reference
AbstractPlotTool.h
Go to the documentation of this file.
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:
89 void selectedWindowChanged();
90
91 private:
98 QPointer<QComboBox> m_selectWindowCombo;
99 };
100}
101
102#endif
Parent class for plotting tools which provides common functionality.
Definition AbstractPlotTool.h:43
void repaintViewports()
This method causes all of the viewports to be repainted.
Definition AbstractPlotTool.cpp:358
void removeWindow(QObject *)
When a user closes a window, we want to remove that window from our combo box for selecting the activ...
Definition AbstractPlotTool.cpp:199
PlotWindow * selectedWindow(bool createIfNeeded=true)
Get the 'active' plot window (the window selected by the user to contain new curves).
Definition AbstractPlotTool.cpp:252
virtual void paintViewport(MdiCubeViewport *vp, QPainter *painter)
This method allows each plot window to paint any information it wants onto the cube viewports.
Definition AbstractPlotTool.cpp:79
QWidget * createToolBarWidget(QStackedWidget *parent)
This provides the standard plot tool options, such as selecting an active plot window.
Definition AbstractPlotTool.cpp:101
QList< MdiCubeViewport * > viewportsToPlot()
Get a list of linked viewports that should be plotting when a new plot is requested.
Definition AbstractPlotTool.cpp:131
QList< PlotWindow * > plotWindows()
Get a list of all of the instantiated plot windows.
Definition AbstractPlotTool.cpp:153
virtual ~AbstractPlotTool()
Clean up the abstract plot tool.
Definition AbstractPlotTool.cpp:52
void showPlotWindow()
displays the plot window
Definition AbstractPlotTool.cpp:346
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.
Definition AbstractPlotTool.cpp:116
PlotWindow * addWindow()
This creates and initializes everything about a plot window.
Definition AbstractPlotTool.cpp:299
static CubePlotCurve * createCurve(QString name, QPen pen, PlotCurve::Units xUnits, PlotCurve::Units yUnits)
This is a helper method for children.
Definition AbstractPlotTool.cpp:229
AbstractPlotTool(QWidget *parent)
When you construct a plot tool, this initializes the common functionality between plot tools.
Definition AbstractPlotTool.cpp:32
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.
Definition CubePlotCurve.h:53
Cube display widget for certain Isis MDI applications.
Definition MdiCubeViewport.h:39
Units
These are all the possible units for the x or y data in a plot curve.
Definition PlotCurve.h:54
Definition PlotWindow.h:88
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