Isis 3 Programmer Reference
|
This configuration dialog is for users to determine the scatter plot parameters required to create a scatter plot. More...
#include <ScatterPlotConfigDialog.h>
Public Member Functions | |
ScatterPlotConfigDialog (MdiCubeViewport *activeViewport, Workspace *workspace, QWidget *parent=NULL) | |
This method creates all the dialog boxes required for the scatter plot window. More... | |
virtual QSize | sizeHint () const |
This is overridden to give a better default size than what Qt calculates by default. More... | |
Cube * | xAxisCube () const |
The current user selection for a cube for the x-axis data for a scatter plot. More... | |
Cube * | yAxisCube () const |
The current user selection for a cube for the x-axis data for a scatter plot. More... | |
int | xAxisCubeBand () const |
The current user selection for the band in the x-axis cube to get data from. More... | |
int | yAxisCubeBand () const |
The current user selection for the band in the y-axis cube to get data from. More... | |
int | xAxisBinCount () const |
The current user selection for the resolution of the scatter plot's x data. More... | |
int | yAxisBinCount () const |
The current user selection for the resolution of the scatter plot's y data. More... | |
QwtInterval | sampleRange () const |
This is the sample range from which the scatter plot should be created. More... | |
QwtInterval | lineRange () const |
This is the line range from which the scatter plot should be created. More... | |
MdiCubeViewport * | xAxisCubeViewport () const |
This returns a viewport which contains the x-axis cube. More... | |
MdiCubeViewport * | yAxisCubeViewport () const |
This returns a viewport which contains the y-axis cube. More... | |
Private Types | |
enum | RangeType { SampleRange, LineRange } |
This is used internally to differentiate range accessors. More... | |
Private Slots | |
void | refreshWidgetStates () |
Update the enabled/disabled states of the various widgets based on the current user inputs' states. More... | |
Private Member Functions | |
QList< Cube * > | removeFromList (QList< Cube *> list, QList< Cube *> itemsToRemove) |
This is a helper method. More... | |
QwtInterval | range (RangeType) const |
This returns the sample/line ranges indicated by the user for the scatter plot to be created on. More... | |
Private Attributes | |
Workspace * | m_workspace |
This is the workspace containing all of the viewports. More... | |
QPointer< QComboBox > | m_xAxisCubeCombo |
A user-selection for the x axis cube. More... | |
QPointer< QSpinBox > | m_xAxisCubeBandSpinBox |
A user-selection for the x axis cube's band to plot. More... | |
QPointer< QSpinBox > | m_xAxisBinCountSpinBox |
A user-selection for the x axis cube's resolution. More... | |
QPointer< QCheckBox > | m_useViewportRangesCheckBox |
A user-selection for using only the visible range of the viewport. More... | |
QPointer< QComboBox > | m_yAxisCubeCombo |
A user-selection for the y axis cube. More... | |
QPointer< QSpinBox > | m_yAxisCubeBandSpinBox |
A user-selection for the y axis cube's band to plot. More... | |
QPointer< QSpinBox > | m_yAxisBinCountSpinBox |
A user-selection for the y axis cube's resolution. More... | |
QPointer< QPushButton > | m_createButton |
This button triggers an accepted() signal. More... | |
Cube * | m_oldXAxisCube |
This is used to detect when a user changes the x-axis cube. More... | |
This configuration dialog is for users to determine the scatter plot parameters required to create a scatter plot.
Definition at line 29 of file ScatterPlotConfigDialog.h.
|
private |
This is used internally to differentiate range accessors.
Enumerator | |
---|---|
SampleRange | This is used to get the sample range in a generic way. |
LineRange | This is used to get the line range in a generic way. |
Definition at line 55 of file ScatterPlotConfigDialog.h.
Isis::ScatterPlotConfigDialog::ScatterPlotConfigDialog | ( | MdiCubeViewport * | activeViewport, |
Workspace * | workspace, | ||
QWidget * | parent = NULL |
||
) |
This method creates all the dialog boxes required for the scatter plot window.
activeViewport | The current user-selected viewport |
workspace | The workspace containing all of the viewports |
parent | The Qt-parent for this dialog |
The layout is shown below:
|-----------------------------------------------------------—|
Text rowspan=1, colspan=3 |
---|
Config X rowspan=1, colspan=3 |
-----------------------------------------------------------— |
| | Cube | Input Edit rowspan=1, colspan=1 | |-----------------------------------------------------------—| | | Band | Input Edit rowspan=1, colspan=1 | |-----------------------------------------------------------—| | | Bins (resolution) | Input Edit rowspan=1, colspan=1 | |-----------------------------------------------------------—| | | Use Viewport Ranges | Checkbox rowspan=1, colspan=1 | |-----------------------------------------------------------—| | Config Y rowspan=1, colspan=3 | |-----------------------------------------------------------—| | | Cube | Input Edit rowspan=1, colspan=1 | |-----------------------------------------------------------—| | | Band | Input Edit rowspan=1, colspan=1 | |-----------------------------------------------------------—| | | Bins (resolution) | Input Edit rowspan=1, colspan=1 | |-----------------------------------------------------------—| | Ok Cancel rowspan=1, colspan=3 | |-----------------------------------------------------------—|
Definition at line 29 of file ScatterPlotConfigDialog.cpp.
References Isis::CubeViewport::cube(), m_createButton, m_oldXAxisCube, m_useViewportRangesCheckBox, m_workspace, m_xAxisBinCountSpinBox, m_xAxisCubeBandSpinBox, m_xAxisCubeCombo, m_yAxisBinCountSpinBox, m_yAxisCubeBandSpinBox, m_yAxisCubeCombo, and refreshWidgetStates().
QwtInterval Isis::ScatterPlotConfigDialog::lineRange | ( | ) | const |
This is the line range from which the scatter plot should be created.
The return value is 1-based (lines start at 1) and inclusive. The range 1 and nlines is the entire line range.
Definition at line 301 of file ScatterPlotConfigDialog.cpp.
References LineRange, and range().
Referenced by range().
|
private |
This returns the sample/line ranges indicated by the user for the scatter plot to be created on.
This is a helper method for sampleRange() and lineRange(). NOTE: If a cube if opened twice, and we're using the viewport visible range, it's currently ambiguous which viewport to use.
rangeType | The range type we're getting: sample range or line range |
Definition at line 491 of file ScatterPlotConfigDialog.cpp.
References lineRange(), m_useViewportRangesCheckBox, Isis::Null, sampleRange(), SampleRange, Isis::CubeViewport::viewportToCube(), xAxisCube(), and xAxisCubeViewport().
Referenced by lineRange(), and sampleRange().
|
privateslot |
Update the enabled/disabled states of the various widgets based on the current user inputs' states.
This also updates the cube lists based on what exists and what is selected.
Definition at line 345 of file ScatterPlotConfigDialog.cpp.
References Isis::CubeViewport::cube(), Isis::Workspace::cubeViewportList(), Isis::Cube::fileName(), Isis::Cube::lineCount(), m_createButton, m_oldXAxisCube, m_useViewportRangesCheckBox, m_workspace, m_xAxisBinCountSpinBox, m_xAxisCubeBandSpinBox, m_xAxisCubeCombo, m_yAxisBinCountSpinBox, m_yAxisCubeBandSpinBox, m_yAxisCubeCombo, removeFromList(), Isis::Cube::sampleCount(), xAxisCube(), and yAxisCube().
Referenced by ScatterPlotConfigDialog().
|
private |
This is a helper method.
It takes all of the itemsToRemove out of list and returns the result.
list | The original list of cubes |
itemsToRemove | A list of cubes to take out of the original list of cubes |
Definition at line 470 of file ScatterPlotConfigDialog.cpp.
Referenced by refreshWidgetStates().
QwtInterval Isis::ScatterPlotConfigDialog::sampleRange | ( | ) | const |
This is the sample range from which the scatter plot should be created.
The return value is 1-based (samples start at 1) and inclusive. The range 1 and nsamples is the entire sample range.
Definition at line 289 of file ScatterPlotConfigDialog.cpp.
References range(), and SampleRange.
Referenced by range().
|
virtual |
This is overridden to give a better default size than what Qt calculates by default.
Definition at line 210 of file ScatterPlotConfigDialog.cpp.
int Isis::ScatterPlotConfigDialog::xAxisBinCount | ( | ) | const |
The current user selection for the resolution of the scatter plot's x data.
Definition at line 267 of file ScatterPlotConfigDialog.cpp.
References m_xAxisBinCountSpinBox.
Cube * Isis::ScatterPlotConfigDialog::xAxisCube | ( | ) | const |
The current user selection for a cube for the x-axis data for a scatter plot.
This never returns null if the dialog was accepted().
Definition at line 222 of file ScatterPlotConfigDialog.cpp.
References m_xAxisCubeCombo.
Referenced by range(), refreshWidgetStates(), and xAxisCubeViewport().
int Isis::ScatterPlotConfigDialog::xAxisCubeBand | ( | ) | const |
The current user selection for the band in the x-axis cube to get data from.
This isn't valid unless there is an xAxisCube().
Definition at line 246 of file ScatterPlotConfigDialog.cpp.
References m_xAxisCubeBandSpinBox.
MdiCubeViewport * Isis::ScatterPlotConfigDialog::xAxisCubeViewport | ( | ) | const |
This returns a viewport which contains the x-axis cube.
Definition at line 311 of file ScatterPlotConfigDialog.cpp.
References Isis::CubeViewport::cube(), Isis::Workspace::cubeViewportList(), m_workspace, and xAxisCube().
Referenced by range().
int Isis::ScatterPlotConfigDialog::yAxisBinCount | ( | ) | const |
The current user selection for the resolution of the scatter plot's y data.
Definition at line 277 of file ScatterPlotConfigDialog.cpp.
References m_yAxisBinCountSpinBox.
Cube * Isis::ScatterPlotConfigDialog::yAxisCube | ( | ) | const |
The current user selection for a cube for the x-axis data for a scatter plot.
This never returns null if the dialog was accepted().
Definition at line 234 of file ScatterPlotConfigDialog.cpp.
References m_yAxisCubeCombo.
Referenced by refreshWidgetStates(), and yAxisCubeViewport().
int Isis::ScatterPlotConfigDialog::yAxisCubeBand | ( | ) | const |
The current user selection for the band in the y-axis cube to get data from.
This isn't valid unless there is an yAxisCube().
Definition at line 257 of file ScatterPlotConfigDialog.cpp.
References m_yAxisCubeBandSpinBox.
MdiCubeViewport * Isis::ScatterPlotConfigDialog::yAxisCubeViewport | ( | ) | const |
This returns a viewport which contains the y-axis cube.
Definition at line 328 of file ScatterPlotConfigDialog.cpp.
References Isis::CubeViewport::cube(), Isis::Workspace::cubeViewportList(), m_workspace, and yAxisCube().
|
private |
This button triggers an accepted() signal.
This is only enabled when the user inputs make sense.
Definition at line 89 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), and ScatterPlotConfigDialog().
|
private |
This is used to detect when a user changes the x-axis cube.
Definition at line 92 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), and ScatterPlotConfigDialog().
|
private |
A user-selection for using only the visible range of the viewport.
Definition at line 76 of file ScatterPlotConfigDialog.h.
Referenced by range(), refreshWidgetStates(), and ScatterPlotConfigDialog().
|
private |
This is the workspace containing all of the viewports.
Definition at line 67 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), xAxisCubeViewport(), and yAxisCubeViewport().
|
private |
A user-selection for the x axis cube's resolution.
Definition at line 74 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), and xAxisBinCount().
|
private |
A user-selection for the x axis cube's band to plot.
Definition at line 72 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), and xAxisCubeBand().
|
private |
A user-selection for the x axis cube.
Definition at line 70 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), and xAxisCube().
|
private |
A user-selection for the y axis cube's resolution.
Definition at line 83 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), and yAxisBinCount().
|
private |
A user-selection for the y axis cube's band to plot.
Definition at line 81 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), and yAxisCubeBand().
|
private |
A user-selection for the y axis cube.
Definition at line 79 of file ScatterPlotConfigDialog.h.
Referenced by refreshWidgetStates(), ScatterPlotConfigDialog(), and yAxisCube().