45 foreach (
QAction *menuAction, menuBar()->actions()) {
46 if (menuAction->text() ==
"&Options") {
47 QMenu *optsMenu = qobject_cast<QMenu *>(menuAction->parentWidget());
55 SpectralPlotWindow::~SpectralPlotWindow() {
81 QPen markerPen(color);
82 markerPen.setWidth(1);
84 QwtPlotMarker *newMarker =
new QwtPlotMarker;
85 newMarker->setLineStyle(QwtPlotMarker::LineStyle(2));
86 newMarker->setLinePen(markerPen);
87 newMarker->attach(
plot());
88 newMarker->setVisible(
false);
101 int redBand = 0, greenBand = 0, blueBand = 0, grayBand = 0;
107 if (pvl.
findObject(
"IsisCube").hasGroup(
"BandBin")) {
195 if (cvp == NULL)
return;
Cube display widget for certain Isis MDI applications.
QAction * m_showHideBandMarkers
This action toggles band marker visibility.
void update(MdiCubeViewport *activeViewport)
This window can show markers for the currently visible bands.
QwtPlotMarker * createMarker(QColor color)
This is a helper method to create new band markers with the same line style and a custom color...
bool isColor() const
Is the viewport shown in 3-band color.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
int greenBand() const
Return the green band currently viewed.
QwtPlotMarker * m_grayBandLine
The band marker for the gray band.
void setBandMarkersVisible(bool visible)
int redBand() const
Return the red band currently viewed.
The data is a wavelength.
double toDouble(const QString &string)
Global function to convert from a string to a double.
QwtPlotMarker * m_redBandLine
The band marker for the red band.
Cube * cube() const
Return the cube associated with viewport.
int grayBand() const
Return the gray band currently viewed.
Contains multiple PvlContainers.
QwtPlotMarker * m_blueBandLine
The band marker for the blue band.
A single keyword-value pair.
Container for cube-like labels.
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
void drawBandMarkers()
This method actually draws in the vertical band line(s) on the plot area.
bool m_markersVisible
True if the visibile state of the active markers should be true.
MdiCubeViewport * m_cvp
The viewport to be used as a reference for band markers.
void nullify()
This initializes the class member data to NULL.
void replot()
Reset the scale of the plot, replot it and emit plot changed.
int blueBand() const
Return the blue band currently viewed.
bool bandMarkersVisible() const
QwtPlotMarker * m_greenBandLine
The band marker for the green band.
QwtPlot * plot()
Get the plot encapsulated by this PlotWindow.
void setViewport(MdiCubeViewport *cvp)
This class needs to know which viewport the user is looking at so it can appropriately draw in the ba...
Units
These are all the possible units for the x or y data in a plot curve.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
PlotCurve::Units xAxisUnits() const
This is the data-type of the curves' x data in this plot window.
IO Handler for Isis Cubes.