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 
20 class QComboBox;
21 class QPen;
22 
23 namespace Isis {
24  class CubePlotCurve;
25  class PlotWindow;
26  class RubberBandComboBox;
27 
43  class AbstractPlotTool : public Tool {
44  Q_OBJECT
45 
46  public:
47  AbstractPlotTool(QWidget *parent);
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();
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
Isis::AbstractPlotTool::addWindow
PlotWindow * addWindow()
This creates and initializes everything about a plot window.
Definition: AbstractPlotTool.cpp:303
Isis::AbstractPlotTool::updateTool
virtual void updateTool()
This forwards all update calls to the plot windows.
Definition: AbstractPlotTool.cpp:118
CubePlotCurve.h
Isis::PlotWindow::showWindow
void showWindow()
Shows the plot window, and raises it to the front of any overlapping sibling widgets.
Definition: PlotWindow.cpp:185
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::Cube::fileName
virtual QString fileName() const
Returns the opened cube's filename.
Definition: Cube.cpp:1563
Cube.h
MdiCubeViewport.h
Isis::AbstractPlotTool::createCurve
static CubePlotCurve * createCurve(QString name, QPen pen, PlotCurve::Units xUnits, PlotCurve::Units yUnits)
This is a helper method for children.
Definition: AbstractPlotTool.cpp:233
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::AbstractPlotTool::~AbstractPlotTool
virtual ~AbstractPlotTool()
Clean up the abstract plot tool.
Definition: AbstractPlotTool.cpp:54
Isis::AbstractPlotTool::removeWindow
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:203
Isis::CubePlotCurve
This is a plot curve with information relating it to a particular cube or region of a cube.
Definition: CubePlotCurve.h:53
Isis::Tool::cubeViewportList
CubeViewportList * cubeViewportList() const
Return the list of cubeviewports.
Definition: Tool.cpp:390
Isis::Tool
Base class for the Qisis tools.
Definition: Tool.h:67
Isis::PlotCurve::setPen
void setPen(const QPen &pen)
Sets the plot pen to the passed-in pen.
Definition: PlotCurve.cpp:340
Isis::AbstractPlotTool::paintViewport
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:81
Tool.h
Isis::AbstractPlotTool::viewportsToPlot
QList< MdiCubeViewport * > viewportsToPlot()
Get a list of linked viewports that should be plotting when a new plot is requested.
Definition: AbstractPlotTool.cpp:133
Isis::AbstractPlotTool::selectedWindow
PlotWindow * selectedWindow(bool createIfNeeded=true)
Get the 'active' plot window (the window selected by the user to contain new curves).
Definition: AbstractPlotTool.cpp:256
PlotWindow.h
Isis::PlotCurve::Units
Units
These are all the possible units for the x or y data in a plot curve.
Definition: PlotCurve.h:54
Isis::PlotWindow::update
virtual void update(MdiCubeViewport *activeViewport)
This is provided to allow children to react to tool updates.
Definition: PlotWindow.cpp:197
AbstractPlotTool.h
Isis::AbstractPlotTool::showPlotWindow
void showPlotWindow()
displays the plot window
Definition: AbstractPlotTool.cpp:350
Isis::AbstractPlotTool::plotWindows
QList< PlotWindow * > plotWindows()
Get a list of all of the instantiated plot windows.
Definition: AbstractPlotTool.cpp:155
QComboBox
Isis::AbstractPlotTool::AbstractPlotTool
AbstractPlotTool(QWidget *parent)
When you construct a plot tool, this initializes the common functionality between plot tools.
Definition: AbstractPlotTool.cpp:34
PlotCurve.h
Isis::AbstractPlotTool::detachCurves
virtual void detachCurves()=0
This will be called when the selected plot window changes.
Isis::MdiCubeViewport::isLinked
bool isLinked() const
Is the viewport linked with other viewports.
Definition: MdiCubeViewport.h:50
Isis::CubePlotCurve::sourceCube
QStringList sourceCube() const
This method returns the cube view port associated with the curve.
Definition: CubePlotCurve.cpp:235
ASSERT
#define ASSERT(x)
Definition: IsisDebug.h:134
Isis::AbstractPlotTool
Parent class for plotting tools which provides common functionality.
Definition: AbstractPlotTool.h:43
Isis::PlotCurve::setColor
void setColor(const QColor &color)
Set the color of this curve and it's markers.
Definition: PlotCurve.cpp:97
Isis::AbstractPlotTool::createWindow
virtual PlotWindow * createWindow()=0
This needs to be implemented by children to instantiate a plot window of the appropriate child class ...
QObject
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
IsisDebug.h
Isis::PlotWindow
Definition: PlotWindow.h:88
Isis::CubeViewport::cube
Cube * cube() const
Definition: CubeViewport.h:338
Isis::AbstractPlotTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
This provides the standard plot tool options, such as selecting an active plot window.
Definition: AbstractPlotTool.cpp:103
Isis::AbstractPlotTool::repaintViewports
void repaintViewports()
This method causes all of the viewports to be repainted.
Definition: AbstractPlotTool.cpp:362
Isis::Tool::cubeViewport
MdiCubeViewport * cubeViewport() const
Return the current cubeviewport.
Definition: Tool.h:197
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::PlotWindow::paint
virtual void paint(MdiCubeViewport *vp, QPainter *painter)
Paint plot curve information onto the viewport.
Definition: PlotWindow.cpp:1787