Isis 3 Programmer Reference
Isis::HistogramPlotWindow Class Reference

#include <HistogramPlotWindow.h>

Inheritance diagram for Isis::HistogramPlotWindow:
Inheritance graph
Collaboration diagram for Isis::HistogramPlotWindow:
Collaboration graph

Public Types

enum  MenuOptions {
  ShowHideMarkersMenuOption = 1, ShowHideCurvesMenuOption = 2, ShowTableMenuOption = 4, SaveMenuOption = 8,
  PrintMenuOption = 16, TrackMenuOption = 32, BackgroundSwitchMenuOption = 64, ShowHideGridMenuOption = 128,
  RenameLabelsMenuOption = 256, SetDisplayRangeMenuOption = 512, ResetScaleMenuOption = 1024, ClearPlotMenuOption = 2048,
  DefaultHelpMenuOption = 4096, LineFitMenuOption = 8192, ConfigurePlotMenuOption = 16384, AllMenuOptions
}
 There is a menu option for everything in the plot window's menu. More...
 

Public Slots

void clearPlot ()
 This method completely clears the plot of all plot items. More...
 
void configurePlotCurves ()
 This method creates a CubePlotCurveConfigureDialog object. More...
 
void createBestFitLine ()
 This method prompts the user to select the best fit line criterea. More...
 
void printPlot ()
 Provides printing support of the plot image. More...
 
void changePlotLabels ()
 This method creates the dialog box which allows the user to relabel the plot window. More...
 
void savePlot ()
 This method allows the user to save the plot as a png, jpg, or tif image file. More...
 
void setDefaultRange ()
 Resets the x/y min/max to the defaults. More...
 
void setLabels ()
 Makes the user specified changes to the plot labels. More...
 
void setUserValues ()
 This method sets the scale for the axis according to the user specified numbers. More...
 
void showHideAllMarkers ()
 Shows/Hides all the markers(symbols) More...
 
void showHideAllCurves ()
 This method shows or hides all of the curves in the plotWindow. More...
 
void resetScale ()
 Sets plot scale back to the defaults. More...
 
void showHideGrid ()
 This method hides/shows the grid on the plotWindow and changes the text for the action. More...
 
void showHelp ()
 This method creates and shows the help dialog box for the plot window. More...
 
void showTable ()
 This method is called from the showTable action on the tool bar There are some checks done to make sure there are data to fill the table. More...
 
void switchBackground ()
 This method toggles the plot background color between black and white. More...
 
void trackerEnabled ()
 Enables the plot mouse tracker. More...
 
void scheduleFillTable ()
 Fills in the table with the data from the current curves in the plotWindow once all current actions/activations are done. More...
 
void fillTable ()
 Fills in the table with the data from the current curves in the plotWindow immediately. More...
 

Signals

void closed ()
 Emitted when there is a close event on this window that will be accepted. More...
 
void plotChanged ()
 Emitted every time there is a change to the plot window. More...
 
void requestFillTable ()
 

Public Member Functions

 HistogramPlotWindow (QString title, QWidget *parent)
 Constructor, creates a new HistogramPlotWindow. More...
 
void add (HistogramItem *)
 Add a HistogramItem to the plot. More...
 
int getNumItems ()
 
HistogramItemgetHistItem (int index)
 
QDockWidgetgetDockWidget ()
 
virtual void add (CubePlotCurve *pc)
 This method adds the curves to the plot. More...
 
virtual void add (CubePlotCurve *pc)
 This method adds the curves to the plot. More...
 
virtual void clearPlotCurves ()
 This method also clears the plot of all plot items, but does not call the table delete stuff This method is called from plotTool each time the changePlot() method is called. More...
 
bool canAdd (CubePlotCurve *curveToTest) const
 This method tests whethere or not a CubePlotCurve can be successfully added to this window. More...
 
QColor plotBackgroundColor () const
 Returns the plot's background color. More...
 
QList< CubePlotCurve * > plotCurves ()
 Get a comprehensive list of the plot curves inside of this plot window, excluding plot curves that are in the process of being removed. More...
 
QList< const CubePlotCurve * > plotCurves () const
 Get a comprehensive const list of the plot curves inside of this plot window, excluding plot curves that are in the process of being removed. More...
 
QList< QwtPlotSpectrogram * > plotSpectrograms ()
 Get a comprehensive list of the scatter plots (spectrograms) inside of this plot window. More...
 
QList< const QwtPlotSpectrogram * > plotSpectrograms () const
 Get a comprehensive const list of the scatter plots (spectrograms) inside of this plot window. More...
 
QString plotTitle () const
 Returns the plot title. More...
 
bool userCanAddCurves () const
 Ask if a user action can add this curve to this window in general. More...
 
PlotCurve::Units xAxisUnits () const
 This is the data-type of the curves' x data in this plot window. More...
 
PlotCurve::Units yAxisUnits () const
 This is the data-type of the curves' y data in this plot window. More...
 
virtual void paint (MdiCubeViewport *vp, QPainter *painter)
 Paint plot curve information onto the viewport. More...
 
void replot ()
 Reset the scale of the plot, replot it and emit plot changed. More...
 
void setAxisLabel (int axisId, QString title)
 Sets the plots given axis title to the given string. More...
 
void setPlotBackground (QColor c)
 Sets the plot background color to the given color. More...
 
void setPlotTitle (QString pt)
 Sets the plot title to the given string. More...
 
void setUserCanAddCurves (bool)
 Allow or disallow users from manually putting curves into this plot window through either copy-and-paste or drag-and-drop. More...
 
void showWindow ()
 Shows the plot window, and raises it to the front of any overlapping sibling widgets. More...
 
virtual void update (MdiCubeViewport *activeViewport)
 This is provided to allow children to react to tool updates. More...
 

Static Public Member Functions

static QString defaultWindowTitle ()
 This is the typical suffix for plot windows, it's here in case we want to update all plot windows to have a different ending than just 'Plot' on them (for example, 'Plot Window'). More...
 
static QString settingsFileName (QString objectTitle)
 

Protected Member Functions

void createWidgets (MenuOptions optionsToProvide)
 This method is called by the constructor to create the plot, legend. More...
 
void disableAxisAutoScale ()
 This turns off scaling the x/y axes automatically. More...
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 When a user drags data into our plot window, we need to indicate whether or not this data is compatible with this window. More...
 
virtual void dropEvent (QDropEvent *event)
 This is called when a user drops data into our window. More...
 
virtual bool eventFilter (QObject *o, QEvent *e)
 This method filters the events of the objects it is connected to. More...
 
void mousePressEvent (QObject *object, QMouseEvent *e)
 This is a helper method for the eventFilter() method. More...
 
QwtPlotplot ()
 Get the plot encapsulated by this PlotWindow. More...
 
void setMenus (QList< QMenu * > menus, QList< QAction * > actions)
 Sets up the menus added from a parent object. More...
 
QwtPlotZoomer * zoomer ()
 Get this window's plot's zoomer. More...
 
QString settingsFileName () const
 
virtual void closeEvent (QCloseEvent *event)
 This method is overridden so that we can be sure to write the current settings of the Main window. More...
 
virtual void readSettings (QSize defaultSize=QSize())
 This method ensure that the settings get written even if the Main window was only hidden, not closed. More...
 

Private Slots

void autoScaleCheckboxToggled ()
 This is a helper method for the set scale configuration dialog. More...
 
void onClipboardChanged ()
 This slot will be called when the system clipboard is changed. More...
 
void pasteCurve ()
 When the user pastes a curve try to put it into this plot window. More...
 

Private Member Functions

QPair< double, double > findDataRange (int axisId) const
 This calculates the data range of the specified axis (works with xBottom and yLeft only). More...
 
bool userCanAddCurve (const QMimeData *curve)
 Ask if a user action can add this curve to this window. More...
 
void updateVisibility (PlotCurve *curve)
 This method sets the visibility states in the curve (and it's symbols) to match with this window's current visibility settings. More...
 
void setupDefaultMenu (MenuOptions optionsToProvide)
 The user can add menu items from parent classes, but there are some menu items that are common between many types of plot windows. More...
 
virtual void writeSettings () const
 This method is called when the Main window is closed or hidden to write the size and location settings to a config file in the user's home directory. More...
 

Static Private Member Functions

static bool numericStringLessThan (QString left, QString right)
 

Private Attributes

QList< HistogramItem * > p_histItems
 
QDockWidgetp_dock
 
QWidgetm_parent
 Parent widget. More...
 
QwtPlotZoomer * m_zoomer
 Plot Zoomer. More...
 
QwtPlotGrid * m_grid
 Plot grid lines. More...
 
QCheckBox * m_autoScaleCheckBox
 Set Scale Dialog's checkbox for enabling automatic scaling on x & y. More...
 
QCheckBox * m_xLogCheckBox
 Set Scale Dialog's checkbox for using logarithmic scale for the x axis. More...
 
QCheckBox * m_yLogCheckBox
 Set Scale Dialog's checkbox for using logarithmic scale for the y axis. More...
 
QLineEdit * m_xMinEdit
 Set Scale Dialog's edit for the min X-axis value. More...
 
QLineEdit * m_xMaxEdit
 Set Scale Dialog's edit for the max X-axis value. More...
 
QLineEdit * m_yMinEdit
 Set Scale Dialog's edit for the min Y-axis value. More...
 
QLineEdit * m_yMaxEdit
 Set Scale Dialog's edit for the max Y-axis value. More...
 
QLineEdit * m_xAxisText
 Set Labels Dialog's edit for the x-axis label. More...
 
QLineEdit * m_yAxisText
 Set Labels Dialog's edit for the y-axis label. More...
 
QLineEdit * m_plotTitleText
 Set Labels Dialog's edit for the plot title. More...
 
QMenuBar * m_menubar
 Plot window's menu bar. More...
 
QActionm_pasteAct
 This is the paste action in the edit menu to paste a curve into the plot window. More...
 
QPointer< QActionm_action
 Plot window's action. More...
 
QPointer< QActionm_showHideAllCurves
 Hide all curves action. More...
 
QPointer< QActionm_showHideAllMarkers
 Hide all markers action. More...
 
QPointer< QActionm_showHideGrid
 Show plot grid lines action. More...
 
PlotCurve::Units m_xAxisUnits
 The units of the data on the x-bottom axis. More...
 
PlotCurve::Units m_yAxisUnits
 The units of the data on the y-left axis. More...
 
bool m_allowUserToAddCurves
 Is the window showing the curve markers? More...
 
bool m_autoscaleAxes
 True if we are autoscaling the x-bottom and y-left axes. More...
 
QwtPlotm_plot
 The plot in this window. More...
 
QwtLegend * m_legend
 The legend inserted in this plot. More...
 
bool m_plotXLogScale
 Tracks if the plot X axis is using a log (true) or linear (false) scale. More...
 
bool m_plotYLogScale
 Tracks if the plot Y axis is using a log (true) or linear (false) scale. More...
 
TableMainWindowm_tableWindow
 Table window. More...
 
QToolBarm_toolBar
 Tool bar on the plot window. More...
 
bool m_scheduledFillTable
 

Detailed Description

Author
????-??-?? Unknown

Definition at line 16 of file HistogramPlotWindow.h.

Member Enumeration Documentation

◆ MenuOptions

There is a menu option for everything in the plot window's menu.

This is provided so that you can enable/disable any given option.

Enumerator
ShowHideMarkersMenuOption 

This option is titled 'Hide All Symbols' which hides all markers.

ShowHideCurvesMenuOption 

This option is titled 'Hide All Curves' which makes all curves invisible.

ShowTableMenuOption 

This option brings up the table.

No table will be available without this option.

SaveMenuOption 

This option exports the plot into a standard image format.

No conversion to a standard image format file will be available without this option, but printing will still be available.

PrintMenuOption 

This option sends the plot to a printer.

TrackMenuOption 

This option enables mouse tracking on the plot area (displays next to the mouse which x/y point you are hovering over).

This option is by default disabled.

BackgroundSwitchMenuOption 

This option enables the ability for a user to change the background color of the plot from black to white.

ShowHideGridMenuOption 

This option enables the ability for a user to enable a grid over the plot area.

RenameLabelsMenuOption 

This option enables the ability for a user to change the x/y axis labels and plot title.

SetDisplayRangeMenuOption 

This option allows the user to set the x/y axis display value ranges.

ResetScaleMenuOption 

This option provides the user with an alternative zoom out button.

ClearPlotMenuOption 

This option allows the user to delete all of the data inside the plot.

If you don't want the user deleting a custom plot item, you should disable this option.

DefaultHelpMenuOption 

Not implemented.

LineFitMenuOption 

This option allows the user to create a best fit line for any of the scatter plot data or cube plot curve data in the window.

This allows the user to create new plot curves.

ConfigurePlotMenuOption 

This option allows the user to change the curve name, color, style size, and symbol of the curve.

AllMenuOptions 

This is all of the available menu options.

Definition at line 96 of file PlotWindow.h.

Constructor & Destructor Documentation

◆ HistogramPlotWindow()

Isis::HistogramPlotWindow::HistogramPlotWindow ( QString  title,
QWidget parent 
)

Constructor, creates a new HistogramPlotWindow.

Parameters
title
parent

Definition at line 17 of file HistogramPlotWindow.cpp.

References Isis::PlotWindow::plot(), and Isis::PlotWindow::setPlotBackground().

Member Function Documentation

◆ add() [1/3]

void Isis::PlotWindow::add

This method adds the curves to the plot.

Parameters
pc

Definition at line 189 of file PlotWindow.cpp.

◆ add() [2/3]

◆ add() [3/3]

void Isis::HistogramPlotWindow::add ( HistogramItem hi)

Add a HistogramItem to the plot.

Parameters
hi

Definition at line 60 of file HistogramPlotWindow.cpp.

References Isis::PlotWindow::plot().

Referenced by Isis::HistogramTool::validatePlotCurves().

◆ autoScaleCheckboxToggled

void Isis::PlotWindow::autoScaleCheckboxToggled ( )
privateslotinherited

This is a helper method for the set scale configuration dialog.

This enables or disables options inside of the dialog when a checkbox is clicked in the dialog. This does not change the state of the plot or plot zoomer.

Definition at line 1675 of file PlotWindow.cpp.

References Isis::PlotWindow::m_autoScaleCheckBox, Isis::PlotWindow::m_xMaxEdit, Isis::PlotWindow::m_xMinEdit, Isis::PlotWindow::m_yMaxEdit, and Isis::PlotWindow::m_yMinEdit.

Referenced by Isis::PlotWindow::setDefaultRange().

◆ canAdd()

bool Isis::PlotWindow::canAdd ( CubePlotCurve curveToTest) const
inherited

This method tests whethere or not a CubePlotCurve can be successfully added to this window.

Plot curves with mismatched X/Y data from the plot's x/y axis types can not be added to the window. This does not test whether or not a user is allowed to add the curve manually, just if the curve can be added programatically.

Parameters
curveToTestThe plot curve to test for compatibility with this window
Returns
True if the curve is compatible with this window, false otherwise

Definition at line 305 of file PlotWindow.cpp.

References Isis::PlotWindow::m_xAxisUnits, Isis::PlotWindow::m_yAxisUnits, Isis::PlotCurve::xUnits(), and Isis::PlotCurve::yUnits().

Referenced by Isis::PlotWindow::add(), and Isis::PlotWindow::userCanAddCurve().

◆ changePlotLabels

void Isis::PlotWindow::changePlotLabels ( )
slotinherited

This method creates the dialog box which allows the user to relabel the plot window.

Definition at line 854 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot, Isis::PlotWindow::m_plotTitleText, Isis::PlotWindow::m_xAxisText, Isis::PlotWindow::m_yAxisText, Isis::PlotWindow::plot(), and Isis::PlotWindow::setLabels().

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ clearPlot

void Isis::PlotWindow::clearPlot ( )
slotinherited

This method completely clears the plot of all plot items.

i.e. curves and markers, which also deletes the legend also calls the necessary method to delete the table stuff

Definition at line 492 of file PlotWindow.cpp.

References Isis::PlotWindow::clearPlotCurves(), Isis::PlotWindow::m_tableWindow, and Isis::TableMainWindow::table().

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ clearPlotCurves()

void Isis::PlotWindow::clearPlotCurves ( )
virtualinherited

This method also clears the plot of all plot items, but does not call the table delete stuff This method is called from plotTool each time the changePlot() method is called.

Definition at line 540 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot, and Isis::PlotWindow::replot().

Referenced by Isis::PlotWindow::clearPlot().

◆ closed

void Isis::PlotWindow::closed ( )
signalinherited

Emitted when there is a close event on this window that will be accepted.

Referenced by Isis::PlotWindow::eventFilter().

◆ closeEvent()

void Isis::MainWindow::closeEvent ( QCloseEvent *  event)
protectedvirtualinherited

This method is overridden so that we can be sure to write the current settings of the Main window.

Parameters
event

Reimplemented in Isis::ViewportMainWindow, and Isis::TableMainWindow.

Definition at line 37 of file MainWindow.cpp.

References Isis::MainWindow::writeSettings().

Referenced by Isis::TableMainWindow::closeEvent(), and Isis::ViewportMainWindow::closeEvent().

◆ configurePlotCurves

void Isis::PlotWindow::configurePlotCurves ( )
slotinherited

This method creates a CubePlotCurveConfigureDialog object.

When there are no curves in this PlotWindow, the dialog will not be created.

Definition at line 508 of file PlotWindow.cpp.

References Isis::PlotWindow::plotChanged(), and Isis::PlotWindow::plotCurves().

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ createBestFitLine

void Isis::PlotWindow::createBestFitLine ( )
slotinherited

This method prompts the user to select the best fit line criterea.

The PlotWindowBestFitDialog will create the best fit line automatically when the user asks for one, so we don't need to worry about doing any more than showing a dialog here.

Definition at line 529 of file PlotWindow.cpp.

References Isis::PlotWindow::plot().

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ createWidgets()

void Isis::PlotWindow::createWidgets ( MenuOptions  optionsToProvide)
protectedinherited

This method is called by the constructor to create the plot, legend.

zoomer, and main window.

Parameters
optionsToProvideThis is a bit-flag containing information on which menu options to give the user/put in the GUI.

Definition at line 145 of file PlotWindow.cpp.

References Isis::PlotWindow::m_grid, Isis::PlotWindow::m_legend, Isis::PlotWindow::m_plot, Isis::PlotWindow::m_zoomer, and Isis::PlotWindow::setupDefaultMenu().

Referenced by Isis::PlotWindow::PlotWindow().

◆ defaultWindowTitle()

QString Isis::PlotWindow::defaultWindowTitle ( )
staticinherited

This is the typical suffix for plot windows, it's here in case we want to update all plot windows to have a different ending than just 'Plot' on them (for example, 'Plot Window').

Returns
A string to be appended to your window title

Definition at line 1810 of file PlotWindow.cpp.

Referenced by Isis::HistogramTool::createWindow(), Isis::SpatialPlotTool::createWindow(), and Isis::SpectralPlotTool::createWindow().

◆ disableAxisAutoScale()

void Isis::PlotWindow::disableAxisAutoScale ( )
protectedinherited

This turns off scaling the x/y axes automatically.

Use this if you have a very specific axis range you want to use, but keep in mind that users (potentially) have an option to re-enable axis auto scaling if they want to.

Definition at line 1664 of file PlotWindow.cpp.

References Isis::PlotWindow::m_autoscaleAxes.

Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().

◆ dragEnterEvent()

void Isis::PlotWindow::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtualinherited

When a user drags data into our plot window, we need to indicate whether or not this data is compatible with this window.

This checks userCanAddCurve() on the drag & drop data and allows or disallowed the event accordingly.

Parameters
eventThe drag event to test

Definition at line 1823 of file PlotWindow.cpp.

References Isis::PlotWindow::m_legend, and Isis::PlotWindow::userCanAddCurve().

◆ dropEvent()

void Isis::PlotWindow::dropEvent ( QDropEvent *  event)
protectedvirtualinherited

This is called when a user drops data into our window.

The dragEnterEvent() must have said that this curve is compatible with this window. This provides all of the available options to the user (if any) set by the creator of the drag & drop event (i.e. whether or not we can move or just copy). If there are options, we create a context menu - otherwise the default action is taken.

Parameters
eventThe drop event containing the curve to put into the current window.

Definition at line 1844 of file PlotWindow.cpp.

References Isis::PlotWindow::add(), Isis::PlotWindow::m_allowUserToAddCurves, and Isis::PlotWindow::plotChanged().

◆ eventFilter()

bool Isis::PlotWindow::eventFilter ( QObject o,
QEvent *  e 
)
protectedvirtualinherited

This method filters the events of the objects it is connected to.

In this case, the eventFilter has been installed on the m_plot and m_legend.

Parameters
o
e
Returns
bool

Reimplemented in Isis::ScatterPlotWindow.

Definition at line 1590 of file PlotWindow.cpp.

References Isis::PlotWindow::closed(), Isis::PlotWindow::mousePressEvent(), and Isis::PlotWindow::plot().

Referenced by Isis::ScatterPlotWindow::eventFilter().

◆ fillTable

◆ findDataRange()

QPair< double, double > Isis::PlotWindow::findDataRange ( int  axisId) const
privateinherited

This calculates the data range of the specified axis (works with xBottom and yLeft only).

This is used to provide unit context (band #'s shouldn't ever pad) and to fix the lack of an axis when only one value exists (if there is only one x-value, this will always pad with +/- 0.5).

Parameters
axisIdThis must be yLeft or xBottom
Returns
The double range of the data contained by the given axis.

Definition at line 1722 of file PlotWindow.cpp.

References Isis::PlotWindow::plotCurves().

Referenced by Isis::PlotWindow::resetScale().

◆ mousePressEvent()

void Isis::PlotWindow::mousePressEvent ( QObject object,
QMouseEvent *  event 
)
protectedinherited

This is a helper method for the eventFilter() method.

When a mouse press event is seen, this handles it. For example, if the user right clicks and the clipboard contains compatible data then this will give a paste option.

Parameters
objectThe object which was pressed
eventThe mouse event which contains button information

Definition at line 1628 of file PlotWindow.cpp.

References Isis::PlotWindow::pasteCurve(), and Isis::PlotWindow::userCanAddCurve().

Referenced by Isis::PlotWindow::eventFilter().

◆ onClipboardChanged

void Isis::PlotWindow::onClipboardChanged ( )
privateslotinherited

This slot will be called when the system clipboard is changed.

Definition at line 1686 of file PlotWindow.cpp.

References Isis::PlotWindow::m_pasteAct, and Isis::PlotWindow::userCanAddCurve().

Referenced by Isis::PlotWindow::PlotWindow().

◆ paint()

void Isis::PlotWindow::paint ( MdiCubeViewport vp,
QPainter *  painter 
)
virtualinherited

Paint plot curve information onto the viewport.

Parameters
vpThe cube viewport to paint onto
painterThe painter to use for painting

Reimplemented in Isis::ScatterPlotWindow.

Definition at line 1787 of file PlotWindow.cpp.

References Isis::CubePlotCurve::paint(), and Isis::PlotWindow::plotCurves().

Referenced by Isis::ScatterPlotWindow::paint(), and Isis::AbstractPlotTool::paintViewport().

◆ pasteCurve

void Isis::PlotWindow::pasteCurve ( )
privateslotinherited

When the user pastes a curve try to put it into this plot window.

This shouldn't be called when the curve on the system clipboard isn't compatible.

Definition at line 1697 of file PlotWindow.cpp.

References Isis::PlotWindow::add(), Isis::PlotWindow::m_allowUserToAddCurves, and Isis::PlotWindow::plotChanged().

Referenced by Isis::PlotWindow::mousePressEvent(), and Isis::PlotWindow::setupDefaultMenu().

◆ plot()

◆ plotBackgroundColor()

QColor Isis::PlotWindow::plotBackgroundColor ( ) const
inherited

Returns the plot's background color.

Returns
QColor

Definition at line 317 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

◆ plotChanged

◆ plotCurves() [1/2]

QList< CubePlotCurve * > Isis::PlotWindow::plotCurves ( )
inherited

Get a comprehensive list of the plot curves inside of this plot window, excluding plot curves that are in the process of being removed.

Returns
The plot curves contained inside of this plot window

Definition at line 328 of file PlotWindow.cpp.

References Isis::PlotCurve::color(), and Isis::PlotWindow::m_plot.

Referenced by Isis::PlotWindow::configurePlotCurves(), Isis::PlotWindow::fillTable(), Isis::PlotWindow::findDataRange(), Isis::PlotWindow::paint(), and Isis::PlotWindow::showTable().

◆ plotCurves() [2/2]

QList< const CubePlotCurve * > Isis::PlotWindow::plotCurves ( ) const
inherited

Get a comprehensive const list of the plot curves inside of this plot window, excluding plot curves that are in the process of being removed.

Returns
The const plot curves contained inside of this plot window

Definition at line 354 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

◆ plotSpectrograms() [1/2]

QList< QwtPlotSpectrogram * > Isis::PlotWindow::plotSpectrograms ( )
inherited

Get a comprehensive list of the scatter plots (spectrograms) inside of this plot window.

Returns
The spectrograms (scatter plots) contained inside of this plot window

Definition at line 381 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

◆ plotSpectrograms() [2/2]

QList< const QwtPlotSpectrogram * > Isis::PlotWindow::plotSpectrograms ( ) const
inherited

Get a comprehensive const list of the scatter plots (spectrograms) inside of this plot window.

Returns
The const spectrograms (scatter plots) contained inside of this plot window

Definition at line 409 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

◆ plotTitle()

QString Isis::PlotWindow::plotTitle ( ) const
inherited

Returns the plot title.

Returns
QwtText

Definition at line 241 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

◆ printPlot

void Isis::PlotWindow::printPlot ( )
slotinherited

Provides printing support of the plot image.

Definition at line 573 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ readSettings()

void Isis::MainWindow::readSettings ( QSize  defaultSize = QSize())
protectedvirtualinherited

This method ensure that the settings get written even if the Main window was only hidden, not closed.

Parameters
eventThis method is called from the constructor so that when the Main window is created, it know's it's size and location.

Reimplemented in Isis::MosaicMainWindow.

Definition at line 80 of file MainWindow.cpp.

Referenced by Isis::PlotWindow::PlotWindow(), Isis::MosaicMainWindow::readSettings(), Isis::TableMainWindow::TableMainWindow(), and Isis::ViewportMainWindow::ViewportMainWindow().

◆ replot()

◆ resetScale

◆ savePlot

void Isis::PlotWindow::savePlot ( )
slotinherited

This method allows the user to save the plot as a png, jpg, or tif image file.

Definition at line 605 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ scheduleFillTable

void Isis::PlotWindow::scheduleFillTable ( )
slotinherited

Fills in the table with the data from the current curves in the plotWindow once all current actions/activations are done.

This is provided for performance reasons - re-plotting 4 curves only requires one fillTable at the end, instead of after each curve change.

Definition at line 1399 of file PlotWindow.cpp.

Referenced by Isis::PlotWindow::PlotWindow().

◆ setAxisLabel()

void Isis::PlotWindow::setAxisLabel ( int  axisId,
QString  title 
)
inherited

Sets the plots given axis title to the given string.

Parameters
axisId
title

Definition at line 208 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

◆ setDefaultRange

◆ setLabels

void Isis::PlotWindow::setLabels ( )
slotinherited

Makes the user specified changes to the plot labels.

Definition at line 910 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot, Isis::PlotWindow::m_plotTitleText, Isis::PlotWindow::m_xAxisText, and Isis::PlotWindow::m_yAxisText.

Referenced by Isis::PlotWindow::changePlotLabels().

◆ setMenus()

void Isis::PlotWindow::setMenus ( QList< QMenu * >  menu,
QList< QAction * >  actions 
)
protectedinherited

Sets up the menus added from a parent object.

Parameters
menu
actions

Definition at line 1358 of file PlotWindow.cpp.

References Isis::PlotWindow::m_menubar, and Isis::PlotWindow::m_toolBar.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ setPlotBackground()

void Isis::PlotWindow::setPlotBackground ( QColor  c)
inherited

Sets the plot background color to the given color.

Parameters
c

Definition at line 289 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

Referenced by HistogramPlotWindow(), and Isis::PlotWindow::PlotWindow().

◆ setPlotTitle()

void Isis::PlotWindow::setPlotTitle ( QString  pt)
inherited

Sets the plot title to the given string.

This does not update the window title.

Parameters
ptThe plot title to use

Definition at line 219 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

Referenced by Isis::PlotWindow::PlotWindow().

◆ setupDefaultMenu()

void Isis::PlotWindow::setupDefaultMenu ( MenuOptions  optionsToProvide)
privateinherited

The user can add menu items from parent classes, but there are some menu items that are common between many types of plot windows.

Parameters
optionsToProvideA bit-flag containing information on which options to provide to the users.

Definition at line 1048 of file PlotWindow.cpp.

References Isis::PlotWindow::BackgroundSwitchMenuOption, Isis::PlotWindow::changePlotLabels(), Isis::PlotWindow::clearPlot(), Isis::PlotWindow::ClearPlotMenuOption, Isis::PlotWindow::configurePlotCurves(), Isis::PlotWindow::ConfigurePlotMenuOption, Isis::PlotWindow::createBestFitLine(), Isis::PlotWindow::LineFitMenuOption, Isis::PlotWindow::m_pasteAct, Isis::PlotWindow::m_plot, Isis::PlotWindow::m_showHideAllCurves, Isis::PlotWindow::m_showHideAllMarkers, Isis::PlotWindow::m_showHideGrid, Isis::PlotWindow::pasteCurve(), Isis::PlotWindow::PrintMenuOption, Isis::PlotWindow::printPlot(), Isis::PlotWindow::RenameLabelsMenuOption, Isis::PlotWindow::resetScale(), Isis::PlotWindow::ResetScaleMenuOption, Isis::PlotWindow::SaveMenuOption, Isis::PlotWindow::savePlot(), Isis::PlotWindow::setDefaultRange(), Isis::PlotWindow::SetDisplayRangeMenuOption, Isis::PlotWindow::setMenus(), Isis::PlotWindow::showHelp(), Isis::PlotWindow::showHideAllCurves(), Isis::PlotWindow::showHideAllMarkers(), Isis::PlotWindow::ShowHideCurvesMenuOption, Isis::PlotWindow::showHideGrid(), Isis::PlotWindow::ShowHideGridMenuOption, Isis::PlotWindow::ShowHideMarkersMenuOption, Isis::PlotWindow::showTable(), Isis::PlotWindow::ShowTableMenuOption, Isis::PlotWindow::switchBackground(), Isis::PlotWindow::trackerEnabled(), and Isis::PlotWindow::TrackMenuOption.

Referenced by Isis::PlotWindow::createWidgets().

◆ setUserCanAddCurves()

void Isis::PlotWindow::setUserCanAddCurves ( bool  userHasControl)
inherited

Allow or disallow users from manually putting curves into this plot window through either copy-and-paste or drag-and-drop.

Parameters
userHasControlTrue if users can add curves manually, false otherwise

Definition at line 231 of file PlotWindow.cpp.

References Isis::PlotWindow::m_allowUserToAddCurves.

◆ setUserValues

◆ showHelp

void Isis::PlotWindow::showHelp ( )
slotinherited

This method creates and shows the help dialog box for the plot window.

this is called from the Help-->Basic Help menu.

Definition at line 999 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ showHideAllCurves

void Isis::PlotWindow::showHideAllCurves ( )
slotinherited

This method shows or hides all of the curves in the plotWindow.

Definition at line 967 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot, and Isis::PlotWindow::m_showHideAllCurves.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ showHideAllMarkers

void Isis::PlotWindow::showHideAllMarkers ( )
slotinherited

Shows/Hides all the markers(symbols)

Definition at line 939 of file PlotWindow.cpp.

References Isis::PlotWindow::m_plot, and Isis::PlotWindow::m_showHideAllMarkers.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ showHideGrid

void Isis::PlotWindow::showHideGrid ( )
slotinherited

This method hides/shows the grid on the plotWindow and changes the text for the action.

Definition at line 923 of file PlotWindow.cpp.

References Isis::PlotWindow::m_grid, Isis::PlotWindow::m_plot, and Isis::PlotWindow::m_showHideGrid.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ showTable

void Isis::PlotWindow::showTable ( )
slotinherited

This method is called from the showTable action on the tool bar There are some checks done to make sure there are data to fill the table.

Definition at line 1566 of file PlotWindow.cpp.

References Isis::PlotWindow::fillTable(), Isis::PlotWindow::m_parent, Isis::PlotWindow::m_tableWindow, Isis::PlotWindow::plotCurves(), Isis::TableMainWindow::setTrackListItems(), and Isis::TableMainWindow::syncColumns().

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ showWindow()

void Isis::PlotWindow::showWindow ( )
inherited

Shows the plot window, and raises it to the front of any overlapping sibling widgets.

Definition at line 185 of file PlotWindow.cpp.

Referenced by Isis::AbstractPlotTool::selectedWindowChanged(), and Isis::AbstractPlotTool::showPlotWindow().

◆ switchBackground

void Isis::PlotWindow::switchBackground ( )
slotinherited

This method toggles the plot background color between black and white.

Definition at line 635 of file PlotWindow.cpp.

References Isis::PlotWindow::m_grid, Isis::PlotWindow::m_plot, and Isis::PlotWindow::m_zoomer.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ trackerEnabled

void Isis::PlotWindow::trackerEnabled ( )
slotinherited

Enables the plot mouse tracker.

Definition at line 560 of file PlotWindow.cpp.

References Isis::PlotWindow::m_zoomer.

Referenced by Isis::PlotWindow::setupDefaultMenu().

◆ update()

void Isis::PlotWindow::update ( MdiCubeViewport activeViewport)
virtualinherited

This is provided to allow children to react to tool updates.

This is useful for example for band markers in the spectral plots.

Parameters
activeViewportThe currently selected viewport

Reimplemented in Isis::SpectralPlotWindow.

Definition at line 197 of file PlotWindow.cpp.

Referenced by Isis::AbstractPlotTool::updateTool().

◆ updateVisibility()

void Isis::PlotWindow::updateVisibility ( PlotCurve curve)
privateinherited

This method sets the visibility states in the curve (and it's symbols) to match with this window's current visibility settings.

Every means of adding a curve to the window needs to call this with the curve that is being added, otherwise visibility states will not be consistent.

Parameters
curveCurve (with symbols) to set the visibility states on

Definition at line 1330 of file PlotWindow.cpp.

References Isis::PlotWindow::m_showHideAllCurves, Isis::PlotWindow::m_showHideAllMarkers, Isis::PlotWindow::plotChanged(), and Isis::PlotCurve::setMarkerVisible().

Referenced by Isis::PlotWindow::add().

◆ userCanAddCurve()

bool Isis::PlotWindow::userCanAddCurve ( const QMimeData *  curve)
privateinherited

Ask if a user action can add this curve to this window.

This verifies that the user is allowed to add curves to this window and that programmatically the curve can be added (i.e. things such as the X/Y data units match).

Parameters
curveMime-data containing a plot curve to be added
Returns
True if the user should be allowed to paste/drop the curve into this window

Definition at line 1306 of file PlotWindow.cpp.

References Isis::PlotWindow::canAdd(), and Isis::PlotWindow::m_allowUserToAddCurves.

Referenced by Isis::PlotWindow::dragEnterEvent(), Isis::PlotWindow::mousePressEvent(), and Isis::PlotWindow::onClipboardChanged().

◆ userCanAddCurves()

bool Isis::PlotWindow::userCanAddCurves ( ) const
inherited

Ask if a user action can add this curve to this window in general.

This verifies that the user is allowed to add curves to this window but not that a particular curve is compatible with this window.

Returns
True if the user should be allowed to paste/drop curves in general into this window

Definition at line 254 of file PlotWindow.cpp.

References Isis::PlotWindow::m_allowUserToAddCurves.

◆ writeSettings()

void Isis::MainWindow::writeSettings ( ) const
privatevirtualinherited

This method is called when the Main window is closed or hidden to write the size and location settings to a config file in the user's home directory.

Definition at line 124 of file MainWindow.cpp.

Referenced by Isis::MainWindow::closeEvent().

◆ xAxisUnits()

PlotCurve::Units Isis::PlotWindow::xAxisUnits ( ) const
inherited

This is the data-type of the curves' x data in this plot window.

All of the cube plot curves must have the same units for x axis data or the display will not make sense.

Returns
X-Axis Curve Data Units

Definition at line 266 of file PlotWindow.cpp.

References Isis::PlotWindow::m_xAxisUnits.

Referenced by Isis::SpectralPlotWindow::drawBandMarkers(), Isis::PlotWindow::PlotWindow(), Isis::SpatialPlotTool::refreshPlot(), and Isis::SpectralPlotTool::refreshPlot().

◆ yAxisUnits()

PlotCurve::Units Isis::PlotWindow::yAxisUnits ( ) const
inherited

This is the data-type of the curves' y data in this plot window.

All of the cube plot curves must have the same units for y-left axis data (y-right sometimes has different units) or the display will not make sense.

Returns
Left Y-Axis Data Units

Definition at line 278 of file PlotWindow.cpp.

References Isis::PlotWindow::m_yAxisUnits.

Referenced by Isis::PlotWindow::PlotWindow().

◆ zoomer()

QwtPlotZoomer * Isis::PlotWindow::zoomer ( )
protectedinherited

Get this window's plot's zoomer.

Returns
A QwtPlotZoomer which is associated with this PlotWindow's QwtPlot

Definition at line 1388 of file PlotWindow.cpp.

References Isis::PlotWindow::m_zoomer.

Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().

Member Data Documentation

◆ m_action

QPointer<QAction> Isis::PlotWindow::m_action
privateinherited

Plot window's action.

Definition at line 312 of file PlotWindow.h.

◆ m_allowUserToAddCurves

bool Isis::PlotWindow::m_allowUserToAddCurves
privateinherited

◆ m_autoscaleAxes

bool Isis::PlotWindow::m_autoscaleAxes
privateinherited

◆ m_autoScaleCheckBox

QCheckBox* Isis::PlotWindow::m_autoScaleCheckBox
privateinherited

Set Scale Dialog's checkbox for enabling automatic scaling on x & y.

Definition at line 281 of file PlotWindow.h.

Referenced by Isis::PlotWindow::autoScaleCheckboxToggled(), Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_grid

QwtPlotGrid* Isis::PlotWindow::m_grid
privateinherited

◆ m_legend

QwtLegend* Isis::PlotWindow::m_legend
privateinherited

The legend inserted in this plot.

Definition at line 331 of file PlotWindow.h.

Referenced by Isis::PlotWindow::add(), Isis::PlotWindow::createWidgets(), and Isis::PlotWindow::dragEnterEvent().

◆ m_menubar

QMenuBar* Isis::PlotWindow::m_menubar
privateinherited

Plot window's menu bar.

Definition at line 302 of file PlotWindow.h.

Referenced by Isis::PlotWindow::PlotWindow(), and Isis::PlotWindow::setMenus().

◆ m_parent

QWidget* Isis::PlotWindow::m_parent
privateinherited

Parent widget.

Definition at line 275 of file PlotWindow.h.

Referenced by Isis::PlotWindow::PlotWindow(), and Isis::PlotWindow::showTable().

◆ m_pasteAct

QAction* Isis::PlotWindow::m_pasteAct
privateinherited

This is the paste action in the edit menu to paste a curve into the plot window.

This is enabled or disabled based on what is in the clipboard.

Definition at line 309 of file PlotWindow.h.

Referenced by Isis::PlotWindow::onClipboardChanged(), Isis::PlotWindow::PlotWindow(), and Isis::PlotWindow::setupDefaultMenu().

◆ m_plot

◆ m_plotTitleText

QLineEdit* Isis::PlotWindow::m_plotTitleText
privateinherited

Set Labels Dialog's edit for the plot title.

Definition at line 299 of file PlotWindow.h.

Referenced by Isis::PlotWindow::changePlotLabels(), and Isis::PlotWindow::setLabels().

◆ m_plotXLogScale

bool Isis::PlotWindow::m_plotXLogScale
privateinherited

Tracks if the plot X axis is using a log (true) or linear (false) scale.

Definition at line 332 of file PlotWindow.h.

Referenced by Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_plotYLogScale

bool Isis::PlotWindow::m_plotYLogScale
privateinherited

Tracks if the plot Y axis is using a log (true) or linear (false) scale.

Definition at line 333 of file PlotWindow.h.

Referenced by Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_showHideAllCurves

QPointer<QAction> Isis::PlotWindow::m_showHideAllCurves
privateinherited

◆ m_showHideAllMarkers

QPointer<QAction> Isis::PlotWindow::m_showHideAllMarkers
privateinherited

◆ m_showHideGrid

QPointer<QAction> Isis::PlotWindow::m_showHideGrid
privateinherited

Show plot grid lines action.

Definition at line 318 of file PlotWindow.h.

Referenced by Isis::PlotWindow::setupDefaultMenu(), and Isis::PlotWindow::showHideGrid().

◆ m_tableWindow

TableMainWindow* Isis::PlotWindow::m_tableWindow
privateinherited

◆ m_toolBar

QToolBar* Isis::PlotWindow::m_toolBar
privateinherited

Tool bar on the plot window.

Definition at line 335 of file PlotWindow.h.

Referenced by Isis::PlotWindow::PlotWindow(), and Isis::PlotWindow::setMenus().

◆ m_xAxisText

QLineEdit* Isis::PlotWindow::m_xAxisText
privateinherited

Set Labels Dialog's edit for the x-axis label.

Definition at line 295 of file PlotWindow.h.

Referenced by Isis::PlotWindow::changePlotLabels(), and Isis::PlotWindow::setLabels().

◆ m_xAxisUnits

PlotCurve::Units Isis::PlotWindow::m_xAxisUnits
privateinherited

The units of the data on the x-bottom axis.

Definition at line 321 of file PlotWindow.h.

Referenced by Isis::PlotWindow::canAdd(), Isis::PlotWindow::PlotWindow(), Isis::PlotWindow::resetScale(), and Isis::PlotWindow::xAxisUnits().

◆ m_xLogCheckBox

QCheckBox* Isis::PlotWindow::m_xLogCheckBox
privateinherited

Set Scale Dialog's checkbox for using logarithmic scale for the x axis.

Definition at line 283 of file PlotWindow.h.

Referenced by Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_xMaxEdit

QLineEdit* Isis::PlotWindow::m_xMaxEdit
privateinherited

Set Scale Dialog's edit for the max X-axis value.

Definition at line 289 of file PlotWindow.h.

Referenced by Isis::PlotWindow::autoScaleCheckboxToggled(), Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_xMinEdit

QLineEdit* Isis::PlotWindow::m_xMinEdit
privateinherited

Set Scale Dialog's edit for the min X-axis value.

Definition at line 287 of file PlotWindow.h.

Referenced by Isis::PlotWindow::autoScaleCheckboxToggled(), Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_yAxisText

QLineEdit* Isis::PlotWindow::m_yAxisText
privateinherited

Set Labels Dialog's edit for the y-axis label.

Definition at line 297 of file PlotWindow.h.

Referenced by Isis::PlotWindow::changePlotLabels(), and Isis::PlotWindow::setLabels().

◆ m_yAxisUnits

PlotCurve::Units Isis::PlotWindow::m_yAxisUnits
privateinherited

The units of the data on the y-left axis.

Definition at line 323 of file PlotWindow.h.

Referenced by Isis::PlotWindow::canAdd(), Isis::PlotWindow::PlotWindow(), Isis::PlotWindow::resetScale(), and Isis::PlotWindow::yAxisUnits().

◆ m_yLogCheckBox

QCheckBox* Isis::PlotWindow::m_yLogCheckBox
privateinherited

Set Scale Dialog's checkbox for using logarithmic scale for the y axis.

Definition at line 285 of file PlotWindow.h.

Referenced by Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_yMaxEdit

QLineEdit* Isis::PlotWindow::m_yMaxEdit
privateinherited

Set Scale Dialog's edit for the max Y-axis value.

Definition at line 293 of file PlotWindow.h.

Referenced by Isis::PlotWindow::autoScaleCheckboxToggled(), Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_yMinEdit

QLineEdit* Isis::PlotWindow::m_yMinEdit
privateinherited

Set Scale Dialog's edit for the min Y-axis value.

Definition at line 291 of file PlotWindow.h.

Referenced by Isis::PlotWindow::autoScaleCheckboxToggled(), Isis::PlotWindow::setDefaultRange(), and Isis::PlotWindow::setUserValues().

◆ m_zoomer


The documentation for this class was generated from the following files: