USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::SpectralPlotWindow Class Reference

#include <SpectralPlotWindow.h>

Inherits Isis::PlotWindow.

List of all members.

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.
QwtPlotplot ()
void setMenus (QList< QMenu * > menus, QList< QAction * > actions)
 Sets up the menus added from a parent object.
QwtPlotZoomer * zoomer ()

Detailed Description

Author:
????-??-?? Tracie Sucharski and Steven Lambright

Member Enumeration Documentation

Enumerator:
ShowHideMarkersMenuOption 
ShowHideCurvesMenuOption 
ShowTableMenuOption 
SaveMenuOption 
PrintMenuOption 
TrackMenuOption 
BackgroundSwitchMenuOption 
ShowHideGridMenuOption 
RenameLabelsMenuOption 
SetDisplayRangeMenuOption 
ResetScaleMenuOption 
ClearPlotMenuOption 
DefaultHelpMenuOption 
LineFitMenuOption 
AllMenuOptions 

Constructor & Destructor Documentation

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 (  ) 

Member Function Documentation

void Isis::PlotWindow::add ( CubePlotCurve pc  )  [virtual, inherited]
bool Isis::SpectralPlotWindow::bandMarkersVisible (  )  const
Returns:
bool
bool Isis::PlotWindow::canAdd ( CubePlotCurve curveToTest  )  const [inherited]
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.

Parameters:
keepScale 

References Isis::PlotWindow::replot().

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

void Isis::PlotWindow::closed (  )  [signal, inherited]
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.

Parameters:
event 

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

void Isis::PlotWindow::createBestFitLine (  )  [slot, inherited]
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]
void Isis::PlotWindow::disableAxisAutoScale (  )  [protected, inherited]
void Isis::PlotWindow::dragEnterEvent ( QDragEnterEvent *  event  )  [protected, virtual, inherited]
void Isis::PlotWindow::dropEvent ( QDropEvent *  event  )  [protected, virtual, inherited]
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.

Parameters:
o 
e 
Returns:
bool

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]
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.

Parameters:
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]
void Isis::PlotWindow::paint ( MdiCubeViewport vp,
QPainter *  painter 
) [virtual, inherited]
QwtPlot * Isis::PlotWindow::plot (  )  [protected, inherited]
QColor Isis::PlotWindow::plotBackgroundColor (  )  const [inherited]

Returns the plot's background color.

Returns:
QColor
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]
QList< const QwtPlotSpectrogram * > Isis::PlotWindow::plotSpectrograms (  )  const [inherited]
QList< QwtPlotSpectrogram * > Isis::PlotWindow::plotSpectrograms (  )  [inherited]
QString Isis::PlotWindow::plotTitle (  )  const [inherited]

Returns the plot title.

Returns:
QwtText
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]
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.

Parameters:
axisId 
title 
void Isis::SpectralPlotWindow::setBandMarkersVisible ( bool  visible  )  [slot]
Parameters:
visible 

References Isis::PlotWindow::replot().

Referenced by SpectralPlotWindow().

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.

Parameters:
menu 
actions 
void Isis::PlotWindow::setPlotBackground ( QColor  c  )  [inherited]

Sets the plot background color to the given color.

Parameters:
c 

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

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

Returns the axis title of the given axis.

Parameters:
axisId 
Returns:
QwtText Sets the plot title to the given string.
Parameters:
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.

Parameters:
cvp 

Referenced by update().

void Isis::PlotWindow::showHelp (  )  [slot, inherited]

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

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

References d, and table.

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]
PlotCurve::Units Isis::PlotWindow::yAxisUnits (  )  const [inherited]
QwtPlotZoomer * Isis::PlotWindow::zoomer (  )  [protected, inherited]

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