Isis 3.0 Developer's Reference (API) |
Home |
#include <SpectralPlotWindow.h>
Inherits Isis::PlotWindow.
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, AllMenuOptions } |
Public Slots | |
void | setBandMarkersVisible (bool visible) |
void | clearPlot () |
This method completely clears the plot of all plot items. | |
void | createBestFitLine () |
void | printPlot () |
Provids printing support of the plot image. | |
void | changePlotLabels () |
This method creates the dialog box which allows the user to relabel the plot window. | |
void | savePlot () |
This method allows the user to save the plot as a png, jpg, or tif image file. | |
void | setDefaultRange () |
Resets the x/y min/max to the defaults. | |
void | setLabels () |
Makes the user specified changes to the plot labels. | |
void | setUserValues () |
This method sets the scale for the axis according to the user specified numbers. | |
void | showHideAllMarkers () |
Shows/Hides all the markers(symbols). | |
void | showHideAllCurves () |
This method shows or hides all of the curves in the plotWindow. | |
void | resetScale () |
Sets plot scale back to the defaults. | |
void | showHideGrid () |
This method hides/shows the grid on the plotWindow and changes the text for the action. | |
void | showHelp () |
This method creates and shows the help dialog box for the plot window. | |
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. | |
void | switchBackground () |
This method toggles the plot background color between black and white. | |
void | trackerEnabled () |
Enables the plot mouse tracker. | |
void | fillTable () |
Fills in the table with the data from the current curves in the plotWindow. | |
Signals | |
void | closed () |
void | plotChanged () |
Emitted every time there is a change to the plot window. | |
Public Member Functions | |
SpectralPlotWindow (PlotCurve::Units xUnits, QWidget *parent) | |
This constructs a spectral plot window. | |
~SpectralPlotWindow () | |
bool | bandMarkersVisible () const |
void | setViewport (MdiCubeViewport *cvp) |
This class needs to know which viewport the user is looking at so it can appropriately draw in the band lines. | |
void | update (MdiCubeViewport *activeViewport) |
virtual void | add (CubePlotCurve *pc) |
This method adds the curves to the plot. | |
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. | |
bool | canAdd (CubePlotCurve *curveToTest) const |
QColor | plotBackgroundColor () const |
Returns the plot's background color. | |
QList< CubePlotCurve * > | plotCurves () |
QList< const CubePlotCurve * > | plotCurves () const |
QList< QwtPlotSpectrogram * > | plotSpectrograms () |
QList< const QwtPlotSpectrogram * > | plotSpectrograms () const |
QString | plotTitle () const |
Returns the plot title. | |
bool | userCanAddCurves () const |
PlotCurve::Units | xAxisUnits () const |
PlotCurve::Units | yAxisUnits () const |
virtual void | paint (MdiCubeViewport *vp, QPainter *painter) |
void | replot () |
replot the plot | |
void | setAxisLabel (int axisId, QString title) |
Sets the plots given axis title to the given string. | |
void | setPlotBackground (QColor c) |
Sets the plot background color to the given color. | |
void | setPlotTitle (QString pt) |
Returns the axis title of the given axis. | |
void | setUserCanAddCurves (bool) |
void | showWindow () |
Shows the plot window, and raises it to the front of any overlapping sibling widgets. | |
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. | |
virtual void | closeEvent (QCloseEvent *event) |
This method is overridden so that we can be sure to write the current settings of the Main window. | |
virtual void | hideEvent (QHideEvent *event) |
This method ensure that the settings get written even if the Main window was only hidden, not closed. | |
Static Public Member Functions | |
static QString | defaultWindowTitle () |
Protected Slots | |
void | writeSettings () |
This overridden method is called when the mainwindow is closed or hidden to write the size and location settings (and tool bar location) to a config file in the user's home directory. | |
void | readSettings () |
This overridden method is called from the constructor so that when the mainwindow is created, it knows it's size and location and the tool bar location. | |
Protected Member Functions | |
void | createWidgets (MenuOptions optionsToProvide) |
This method is called by the constructor to create the plot, legend. | |
void | disableAxisAutoScale () |
virtual void | dragEnterEvent (QDragEnterEvent *event) |
virtual void | dropEvent (QDropEvent *event) |
void | enableZoomer (bool enable) |
virtual bool | eventFilter (QObject *o, QEvent *e) |
This method filters the events of the objects it is connected to. | |
void | mousePressEvent (QObject *object, QMouseEvent *e) |
QString | menuName () const |
Returns the name of the menu. | |
QwtPlot * | plot () |
void | setMenus (QList< QMenu * > menus, QList< QAction * > actions) |
Sets up the menus added from a parent object. | |
QwtPlotZoomer * | zoomer () |
enum Isis::PlotWindow::MenuOptions [inherited] |
Isis::SpectralPlotWindow::SpectralPlotWindow | ( | PlotCurve::Units | xUnits, | |
QWidget * | parent | |||
) |
This constructs a spectral plot window.
The spectral plot window graphs a spectral curve sent to it via the addPlotCurve() method.
References setBandMarkersVisible().
Isis::SpectralPlotWindow::~SpectralPlotWindow | ( | ) |
void Isis::PlotWindow::add | ( | CubePlotCurve * | pc | ) | [virtual, inherited] |
This method adds the curves to the plot.
pc |
References Isis::PlotCurve::attachMarkers(), Isis::PlotWindow::canAdd(), Isis::PlotWindow::fillTable(), Isis::PlotWindow::plotChanged(), Isis::PlotWindow::replot(), and Isis::PlotWindow::resetScale().
Referenced by Isis::PlotWindow::dropEvent().
bool Isis::SpectralPlotWindow::bandMarkersVisible | ( | ) | const |
bool Isis::PlotWindow::canAdd | ( | CubePlotCurve * | curveToTest | ) | const [inherited] |
References Isis::PlotCurve::xUnits(), and Isis::PlotCurve::yUnits().
Referenced by Isis::PlotWindow::add().
void Isis::PlotWindow::changePlotLabels | ( | ) | [slot, inherited] |
This method creates the dialog box which allows the user to relabel the plot window.
References Isis::PlotWindow::plot(), and Isis::PlotWindow::setLabels().
void Isis::PlotWindow::clearPlot | ( | ) | [slot, inherited] |
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
References Isis::PlotWindow::clearPlotCurves(), and Isis::TableMainWindow::table().
void Isis::PlotWindow::clearPlotCurves | ( | ) | [virtual, inherited] |
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.
keepScale |
References Isis::PlotWindow::replot().
Referenced by Isis::PlotWindow::clearPlot().
void Isis::PlotWindow::closed | ( | ) | [signal, inherited] |
Referenced by Isis::PlotWindow::eventFilter().
void Isis::MainWindow::closeEvent | ( | QCloseEvent * | event | ) | [virtual, inherited] |
This method is overridden so that we can be sure to write the current settings of the Main window.
event |
Reimplemented in Isis::TableMainWindow, and Isis::ViewportMainWindow.
void Isis::PlotWindow::createBestFitLine | ( | ) | [slot, inherited] |
References Isis::PlotWindow::plot().
void Isis::PlotWindow::createWidgets | ( | MenuOptions | optionsToProvide | ) | [protected, inherited] |
This method is called by the constructor to create the plot, legend.
zoomer, and main window
Referenced by Isis::PlotWindow::PlotWindow().
QString Isis::PlotWindow::defaultWindowTitle | ( | ) | [static, inherited] |
Referenced by Isis::SpectralPlotTool::createWindow(), and Isis::SpatialPlotTool::createWindow().
void Isis::PlotWindow::disableAxisAutoScale | ( | ) | [protected, inherited] |
Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().
void Isis::PlotWindow::dragEnterEvent | ( | QDragEnterEvent * | event | ) | [protected, virtual, inherited] |
void Isis::PlotWindow::dropEvent | ( | QDropEvent * | event | ) | [protected, virtual, inherited] |
References Isis::PlotWindow::add(), and Isis::PlotWindow::plotChanged().
void Isis::PlotWindow::enableZoomer | ( | bool | enable | ) | [protected, inherited] |
bool Isis::PlotWindow::eventFilter | ( | QObject * | o, | |
QEvent * | e | |||
) | [protected, virtual, inherited] |
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.
o | ||
e |
Reimplemented from Isis::MainWindow.
Reimplemented in Isis::ScatterPlotWindow.
References ASSERT, Isis::PlotWindow::closed(), Isis::PlotWindow::mousePressEvent(), Isis::PlotWindow::plot(), pos, and Isis::PlotWindow::writeSettings().
void Isis::PlotWindow::fillTable | ( | ) | [slot, inherited] |
Fills in the table with the data from the current curves in the plotWindow.
References Isis::TableMainWindow::addToTable(), Isis::IsSpecial(), Isis::TableMainWindow::listWidget(), Isis::Null, Isis::PlotWindow::plotCurves(), Isis::TableMainWindow::table(), and y.
Referenced by Isis::PlotWindow::add(), Isis::PlotWindow::PlotWindow(), and Isis::PlotWindow::showTable().
void Isis::MainWindow::hideEvent | ( | QHideEvent * | event | ) | [virtual, inherited] |
This method ensure that the settings get written even if the Main window was only hidden, not closed.
event |
Reimplemented in Isis::TableMainWindow.
QString Isis::PlotWindow::menuName | ( | ) | const [inline, protected, inherited] |
Returns the name of the menu.
void Isis::PlotWindow::mousePressEvent | ( | QObject * | object, | |
QMouseEvent * | e | |||
) | [protected, inherited] |
Referenced by Isis::PlotWindow::eventFilter().
void Isis::PlotWindow::paint | ( | MdiCubeViewport * | vp, | |
QPainter * | painter | |||
) | [virtual, inherited] |
Reimplemented in Isis::ScatterPlotWindow.
References Isis::CubePlotCurve::paint(), and Isis::PlotWindow::plotCurves().
Referenced by Isis::AbstractPlotTool::paintViewport().
QwtPlot * Isis::PlotWindow::plot | ( | ) | [protected, inherited] |
Referenced by Isis::HistogramPlotWindow::add(), Isis::PlotWindow::changePlotLabels(), Isis::ScatterPlotWindow::colorPlot(), Isis::PlotWindow::createBestFitLine(), Isis::ScatterPlotWindow::eventFilter(), Isis::PlotWindow::eventFilter(), Isis::PlotWindow::PlotWindow(), Isis::ScatterPlotWindow::ScatterPlotWindow(), Isis::PlotWindow::setDefaultRange(), and Isis::ScatterPlotWindow::setMousePosition().
QColor Isis::PlotWindow::plotBackgroundColor | ( | ) | const [inherited] |
Returns the plot's background color.
void Isis::PlotWindow::plotChanged | ( | ) | [signal, inherited] |
Emitted every time there is a change to the plot window.
Referenced by Isis::PlotWindow::add(), Isis::PlotWindow::dropEvent(), Isis::PlotWindow::PlotWindow(), and Isis::PlotWindow::replot().
QList< const CubePlotCurve * > Isis::PlotWindow::plotCurves | ( | ) | const [inherited] |
QList< CubePlotCurve * > Isis::PlotWindow::plotCurves | ( | ) | [inherited] |
References Isis::PlotCurve::color().
Referenced by Isis::PlotWindow::fillTable(), Isis::PlotWindow::paint(), and Isis::PlotWindow::showTable().
QList< const QwtPlotSpectrogram * > Isis::PlotWindow::plotSpectrograms | ( | ) | const [inherited] |
QList< QwtPlotSpectrogram * > Isis::PlotWindow::plotSpectrograms | ( | ) | [inherited] |
QString Isis::PlotWindow::plotTitle | ( | ) | const [inherited] |
Returns the plot title.
void Isis::PlotWindow::printPlot | ( | ) | [slot, inherited] |
Provids printing support of the plot image.
References size.
void Isis::PlotWindow::readSettings | ( | ) | [protected, virtual, slot, inherited] |
This overridden method is called from the constructor so that when the mainwindow is created, it knows it's size and location and the tool bar location.
Reimplemented from Isis::MainWindow.
References Isis::Filename::Expanded().
Referenced by Isis::PlotWindow::PlotWindow().
void Isis::PlotWindow::replot | ( | ) | [inherited] |
replot the plot
References Isis::PlotWindow::plotChanged(), and Isis::PlotWindow::resetScale().
Referenced by Isis::PlotWindow::add(), Isis::PlotWindow::clearPlotCurves(), Isis::ScatterPlotWindow::colorPlot(), Isis::SpectralPlotTool::refreshPlot(), Isis::SpatialPlotTool::refreshPlot(), Isis::ScatterPlotWindow::ScatterPlotWindow(), setBandMarkersVisible(), Isis::PlotWindow::setUserValues(), and Isis::ScatterPlotWindow::showHideContour().
void Isis::PlotWindow::resetScale | ( | ) | [slot, inherited] |
Sets plot scale back to the defaults.
References Isis::PlotCurve::Band.
Referenced by Isis::PlotWindow::add(), and Isis::PlotWindow::replot().
void Isis::PlotWindow::savePlot | ( | ) | [slot, inherited] |
This method allows the user to save the plot as a png, jpg, or tif image file.
void Isis::PlotWindow::setAxisLabel | ( | int | axisId, | |
QString | title | |||
) | [inherited] |
Sets the plots given axis title to the given string.
axisId | ||
title |
void Isis::SpectralPlotWindow::setBandMarkersVisible | ( | bool | visible | ) | [slot] |
void Isis::PlotWindow::setDefaultRange | ( | ) | [slot, inherited] |
Resets the x/y min/max to the defaults.
References Isis::PlotWindow::plot(), and Isis::PlotWindow::setUserValues().
void Isis::PlotWindow::setLabels | ( | ) | [slot, inherited] |
Makes the user specified changes to the plot labels.
Referenced by Isis::PlotWindow::changePlotLabels().
void Isis::PlotWindow::setMenus | ( | QList< QMenu * > | menu, | |
QList< QAction * > | actions | |||
) | [protected, inherited] |
Sets up the menus added from a parent object.
menu | ||
actions |
void Isis::PlotWindow::setPlotBackground | ( | QColor | c | ) | [inherited] |
Sets the plot background color to the given color.
c |
Referenced by Isis::PlotWindow::PlotWindow().
void Isis::PlotWindow::setPlotTitle | ( | QString | pt | ) | [inherited] |
Returns the axis title of the given axis.
axisId |
pt |
Referenced by Isis::PlotWindow::PlotWindow().
void Isis::PlotWindow::setUserCanAddCurves | ( | bool | userHasControl | ) | [inherited] |
void Isis::PlotWindow::setUserValues | ( | ) | [slot, inherited] |
This method sets the scale for the axis according to the user specified numbers.
References Isis::PlotWindow::replot().
Referenced by Isis::PlotWindow::setDefaultRange().
void Isis::SpectralPlotWindow::setViewport | ( | MdiCubeViewport * | cvp | ) |
This class needs to know which viewport the user is looking at so it can appropriately draw in the band lines.
cvp |
Referenced by update().
void Isis::PlotWindow::showHelp | ( | ) | [slot, inherited] |
void Isis::PlotWindow::showHideAllCurves | ( | ) | [slot, inherited] |
This method shows or hides all of the curves in the plotWindow.
void Isis::PlotWindow::showHideAllMarkers | ( | ) | [slot, inherited] |
Shows/Hides all the markers(symbols).
void Isis::PlotWindow::showHideGrid | ( | ) | [slot, inherited] |
This method hides/shows the grid on the plotWindow and changes the text for the action.
void Isis::PlotWindow::showTable | ( | ) | [slot, inherited] |
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.
References Isis::PlotWindow::fillTable(), Isis::PlotWindow::plotCurves(), Isis::TableMainWindow::setTrackListItems(), size, and Isis::TableMainWindow::syncColumns().
void Isis::PlotWindow::showWindow | ( | ) | [inherited] |
Shows the plot window, and raises it to the front of any overlapping sibling widgets.
Referenced by Isis::AbstractPlotTool::repaintViewports().
void Isis::PlotWindow::switchBackground | ( | ) | [slot, inherited] |
This method toggles the plot background color between black and white.
void Isis::PlotWindow::trackerEnabled | ( | ) | [slot, inherited] |
Enables the plot mouse tracker.
void Isis::SpectralPlotWindow::update | ( | MdiCubeViewport * | activeViewport | ) | [virtual] |
Reimplemented from Isis::PlotWindow.
References setViewport().
bool Isis::PlotWindow::userCanAddCurves | ( | ) | const [inherited] |
void Isis::MainWindow::writeSettings | ( | ) | const [virtual, inherited] |
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.
void Isis::PlotWindow::writeSettings | ( | ) | [protected, slot, inherited] |
This overridden method is called when the mainwindow is closed or hidden to write the size and location settings (and tool bar location) to a config file in the user's home directory.
References Isis::Filename::Expanded().
Referenced by Isis::PlotWindow::eventFilter().
PlotCurve::Units Isis::PlotWindow::xAxisUnits | ( | ) | const [inherited] |
Referenced by Isis::SpectralPlotTool::refreshPlot().
PlotCurve::Units Isis::PlotWindow::yAxisUnits | ( | ) | const [inherited] |
QwtPlotZoomer * Isis::PlotWindow::zoomer | ( | ) | [protected, inherited] |
Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().