Isis 3 Programmer Reference
|
This widget allows the user to modify the matrix display. More...
#include <MatrixOptionsDialog.h>
Public Slots | |
void | applyOptions () |
Send changes back to scene widget (MatrixOptions) so it can redraw the elements in the right color. More... | |
void | readOptions () |
Get the current options from the matrix scene widget. More... | |
void | updateCorrelationData (QString currentData) |
Update the current correlation information. More... | |
void | populateParameterComboBox (int index) |
Update parameter combo boxes at real time, when the img combo boxes are changed. More... | |
Signals | |
void | optionsUpdated () |
Public Member Functions | |
MatrixOptionsDialog (MatrixOptions *options, QWidget *parent) | |
Main constructor. More... | |
~MatrixOptionsDialog () | |
Default Destructor. More... | |
Private Slots | |
void | refreshWidgetStates () |
This method will enable and disable widgets depending on which radio button is selected. More... | |
void | askUserForGoodColor () |
slot called when user clicks on good correlation color button More... | |
void | askUserForBadColor () |
slot called when user clicks on bad correlation color button More... | |
void | updateToleranceSlider (const QString &value) |
slot called when user modifies the color tolerance line edit text. More... | |
void | updateToleranceLineEdit (int value) |
slot called when user changes the slider position. More... | |
void | updateSpecParam1ComboBox (const QString &key) |
when the img1 combo box is changed this slot will update the parameter combo box. More... | |
void | updateSpecParam2ComboBox (const QString &key) |
when the img2 combo box is changed this slot will update the parameter combo box. More... | |
Private Member Functions | |
Q_DISABLE_COPY (MatrixOptionsDialog) | |
void | askUserForColor (QPushButton *button) |
Prompt the user for a new color. More... | |
void | setColorToleranceStatus (bool enable) |
If the tolerance radiobutton is selected, this method will be called with true passed as the parameter. More... | |
void | setFocusToleranceStatus (bool enable) |
If the focus tolerance radio button is selected, the tolerance widgets will be enabled. More... | |
void | setSpecificParametersStatus (bool enable) |
If the specific parameters radio button is selected, the image and parameter spinboxes will be enabled. More... | |
void | updateSpecificParameterComboBox (const QString &key, QComboBox *comboBox) |
When the user switches the image combobox this slot will update the parameter combobox to be filled with the parameters associated with the new image. More... | |
Private Attributes | |
MatrixOptions * | m_options |
This will be used to populate all the widgets. More... | |
QPointer< QRadioButton > | m_gradientRadioButton |
Select a tolerance for the color values. More... | |
QPointer< QRadioButton > | m_colorToleranceRadioButton |
QPointer< QSlider > | m_colorToleranceSlider |
QPointer< QPushButton > | m_badCorrelationColorButton |
Color to use when for matrix elements that are above the given threshold. More... | |
QPointer< QPushButton > | m_goodCorrelationColorButton |
Color to use for matrix elements that are below the given threshold. More... | |
QPointer< QLineEdit > | m_colorToleranceLineEdit |
QPointer< QRadioButton > | m_bestCorrelationRadioButton |
Focus the matrix on the best correlation................. What if there is more than one? More... | |
QPointer< QRadioButton > | m_worstCorrelationRadioButton |
Focus the matrix on the worst correlation................. What if there is more than one? More... | |
QPointer< QRadioButton > | m_specificCorrelationRadioButton |
Focus the matrix on the correlation corresponding to the specified images and parameters. More... | |
QPointer< QComboBox > | m_image1ComboBox |
QPointer< QComboBox > | m_parameter1ComboBox |
QPointer< QComboBox > | m_image2ComboBox |
QPointer< QComboBox > | m_parameter2ComboBox |
QPointer< QRadioButton > | m_focusToleranceRadioButton |
Focus the matrix on a selected correlation value. More... | |
QPointer< QLineEdit > | m_focusToleranceLineEdit |
QPointer< QComboBox > | m_goodElementsComboBox |
QPointer< QComboBox > | m_badElementsComboBox |
QPointer< QWidget > | m_verticalLayoutWidget |
QPointer< QLabel > | m_currentValueLabel |
QPointer< QLabel > | m_image1NameLabel |
QPointer< QLabel > | m_parameter1NameLabel |
QPointer< QLabel > | m_image2NameLabel |
QPointer< QLabel > | m_parameter2NameLabel |
This widget allows the user to modify the matrix display.
This dialog allows the user to select different color schemes and change the focus of the display. The user can select a gradient color scheme, the default, or a two color, good/bad, color scheme that is based on a tolerance. When the matrix is too large to display the whole thing, the user will be able to select which part of the matrix they want to see.
2014-07-14 Kimberly Oyama - Original Version
2014-07-21 Kimberly Oyama - Color options are now updated and applied in the scene.
2016-08-25 Adam Paquette - Updated documentation. Fixes #4299.
2016-12-01 Ian Humphrey - Removed unused variables in readOptions() as they were causing warnings in the clang compiler.
Definition at line 38 of file MatrixOptionsDialog.h.
Isis::MatrixOptionsDialog::MatrixOptionsDialog | ( | MatrixOptions * | options, |
QWidget * | parent | ||
) |
Main constructor.
Layouts:
Widget TabWidget colorTab (colorOptionsPage) colorToleranceLayout (everything tolerance related) colorToleranceOptionsLayout (not including radiobutton, has slider) colorToleranceEditsLayout (not including slider) colorBadCorrLayout (bad corr label and color button) colorEnterTolLayout (tol label and line edit) colorGoodCorrLayout (good corr label and color button) colorGradientLayout (radiobutton)
focusTab (focusOptionsPage) focusPageLayout focusTolLayout (has tolerance radiobutton) focusTolEditLayout (tolerance label and line edit) elementsLayout focusBadElementsLayout (label and spinbox) focusGoodElementsLayout (label and spinbox) focusOptionsLayout (best, worst radiobuttons) focusSpecParamLayout (radiobutton, img1 label, img2 label) focusSpecParam1Layout (img1 combobox, param1 combobox) focusSpecParam2Layout (img2 combobox, param2 combobox)
currentCorrDataLayout currentCorrLayout (label, value) currentCorrImg1Layout (img1 name, param1 name) currentCorrImg2Layout (img2 name, param2 name)
matrixOptionsWidget | |
parent |
Definition at line 66 of file MatrixOptionsDialog.cpp.
References applyOptions(), askUserForBadColor(), askUserForGoodColor(), m_badCorrelationColorButton, m_bestCorrelationRadioButton, m_focusToleranceRadioButton, m_goodCorrelationColorButton, m_gradientRadioButton, m_options, m_specificCorrelationRadioButton, m_worstCorrelationRadioButton, readOptions(), refreshWidgetStates(), updateCorrelationData(), updateSpecParam1ComboBox(), updateSpecParam2ComboBox(), updateToleranceLineEdit(), and updateToleranceSlider().
Isis::MatrixOptionsDialog::~MatrixOptionsDialog | ( | ) |
Default Destructor.
Definition at line 383 of file MatrixOptionsDialog.cpp.
|
slot |
Send changes back to scene widget (MatrixOptions) so it can redraw the elements in the right color.
This will be called when the appy button is pressed.
Definition at line 398 of file MatrixOptionsDialog.cpp.
References m_badCorrelationColorButton, m_goodCorrelationColorButton, m_options, Isis::MatrixOptions::setBadCorrelationColor(), Isis::MatrixOptions::setColorScheme(), Isis::MatrixOptions::setColorTolerance(), and Isis::MatrixOptions::setGoodCorrelationColor().
Referenced by MatrixOptionsDialog().
|
privateslot |
slot called when user clicks on bad correlation color button
Definition at line 597 of file MatrixOptionsDialog.cpp.
References askUserForColor(), and m_badCorrelationColorButton.
Referenced by MatrixOptionsDialog().
|
private |
Prompt the user for a new color.
good | If true, modify the good correlation button. Otherwise, modify the bad correlation button. |
Definition at line 609 of file MatrixOptionsDialog.cpp.
Referenced by askUserForBadColor(), and askUserForGoodColor().
|
privateslot |
slot called when user clicks on good correlation color button
Definition at line 588 of file MatrixOptionsDialog.cpp.
References askUserForColor(), and m_goodCorrelationColorButton.
Referenced by MatrixOptionsDialog().
|
slot |
Update parameter combo boxes at real time, when the img combo boxes are changed.
index | The current index of the IMAGE combobox. |
Definition at line 521 of file MatrixOptionsDialog.cpp.
|
slot |
Get the current options from the matrix scene widget.
This will be called when the widget is first opened and when the displayed correlation matrix is changed.
Definition at line 445 of file MatrixOptionsDialog.cpp.
References Isis::MatrixOptions::badCorrelationColor(), Isis::MatrixOptions::colorScheme(), Isis::MatrixOptions::colorTolerance(), Isis::MatrixOptions::focusOption(), Isis::MatrixOptions::focusValue(), Isis::MatrixOptions::goodCorrelationColor(), m_badCorrelationColorButton, m_bestCorrelationRadioButton, m_focusToleranceRadioButton, m_goodCorrelationColorButton, m_gradientRadioButton, m_options, m_specificCorrelationRadioButton, m_worstCorrelationRadioButton, Isis::MatrixOptions::matrixImgsAndParams(), refreshWidgetStates(), setColorToleranceStatus(), setFocusToleranceStatus(), and setSpecificParametersStatus().
Referenced by MatrixOptionsDialog().
|
privateslot |
This method will enable and disable widgets depending on which radio button is selected.
Definition at line 574 of file MatrixOptionsDialog.cpp.
References m_focusToleranceRadioButton, m_specificCorrelationRadioButton, setColorToleranceStatus(), setFocusToleranceStatus(), and setSpecificParametersStatus().
Referenced by MatrixOptionsDialog(), and readOptions().
|
private |
If the tolerance radiobutton is selected, this method will be called with true passed as the parameter.
This will enable the color buttons and tolerance line edit.
If the color gradient radio button is selected this method will be called with false passed as the parameter. This will disable the tolerance widgets.
enable | True if the radiobutton for that section is selected. |
Definition at line 533 of file MatrixOptionsDialog.cpp.
References m_badCorrelationColorButton, and m_goodCorrelationColorButton.
Referenced by readOptions(), and refreshWidgetStates().
|
private |
If the focus tolerance radio button is selected, the tolerance widgets will be enabled.
Otherwise, they will be disabled.
enable | True if the radiobutton for that section is selected. |
Definition at line 548 of file MatrixOptionsDialog.cpp.
Referenced by readOptions(), and refreshWidgetStates().
|
private |
If the specific parameters radio button is selected, the image and parameter spinboxes will be enabled.
Otherwise, they will be disabled.
enable | True if the radiobutton for that section is selected. |
Definition at line 562 of file MatrixOptionsDialog.cpp.
Referenced by readOptions(), and refreshWidgetStates().
|
slot |
Update the current correlation information.
This slot is called when the m_options signal, changedCurrentCorrData() is emit. This happens when a matrix element is clicked on.
Definition at line 503 of file MatrixOptionsDialog.cpp.
Referenced by MatrixOptionsDialog().
|
private |
When the user switches the image combobox this slot will update the parameter combobox to be filled with the parameters associated with the new image.
Definition at line 668 of file MatrixOptionsDialog.cpp.
References m_options, and Isis::MatrixOptions::matrixImgsAndParams().
Referenced by updateSpecParam1ComboBox(), and updateSpecParam2ComboBox().
|
privateslot |
when the img1 combo box is changed this slot will update the parameter combo box.
index | The index of the new img. |
Definition at line 647 of file MatrixOptionsDialog.cpp.
References updateSpecificParameterComboBox().
Referenced by MatrixOptionsDialog().
|
privateslot |
when the img2 combo box is changed this slot will update the parameter combo box.
index | The index of the new img. |
Definition at line 658 of file MatrixOptionsDialog.cpp.
References updateSpecificParameterComboBox().
Referenced by MatrixOptionsDialog().
|
privateslot |
slot called when user changes the slider position.
It will update the tolerance line edit to match the new value.
Definition at line 636 of file MatrixOptionsDialog.cpp.
Referenced by MatrixOptionsDialog().
|
privateslot |
slot called when user modifies the color tolerance line edit text.
It will update the slider to match the new entry.
Definition at line 626 of file MatrixOptionsDialog.cpp.
Referenced by MatrixOptionsDialog().
|
private |
Color to use when for matrix elements that are above the given threshold.
Definition at line 89 of file MatrixOptionsDialog.h.
Referenced by applyOptions(), askUserForBadColor(), MatrixOptionsDialog(), readOptions(), and setColorToleranceStatus().
|
private |
Focus the matrix on the best correlation................. What if there is more than one?
Definition at line 97 of file MatrixOptionsDialog.h.
Referenced by MatrixOptionsDialog(), and readOptions().
|
private |
Focus the matrix on a selected correlation value.
Definition at line 110 of file MatrixOptionsDialog.h.
Referenced by MatrixOptionsDialog(), readOptions(), and refreshWidgetStates().
|
private |
Color to use for matrix elements that are below the given threshold.
Definition at line 91 of file MatrixOptionsDialog.h.
Referenced by applyOptions(), askUserForGoodColor(), MatrixOptionsDialog(), readOptions(), and setColorToleranceStatus().
|
private |
Select a tolerance for the color values.
All values above threshold will be one color, all values below the threshold will be a different color.
Definition at line 85 of file MatrixOptionsDialog.h.
Referenced by MatrixOptionsDialog(), and readOptions().
|
private |
This will be used to populate all the widgets.
Definition at line 77 of file MatrixOptionsDialog.h.
Referenced by applyOptions(), MatrixOptionsDialog(), readOptions(), and updateSpecificParameterComboBox().
|
private |
Focus the matrix on the correlation corresponding to the specified images and parameters.
Definition at line 103 of file MatrixOptionsDialog.h.
Referenced by MatrixOptionsDialog(), readOptions(), and refreshWidgetStates().
|
private |
Focus the matrix on the worst correlation................. What if there is more than one?
Definition at line 100 of file MatrixOptionsDialog.h.
Referenced by MatrixOptionsDialog(), and readOptions().