Isis 3 Programmer Reference
Isis::MatrixOptionsDialog Class Reference

This widget allows the user to modify the matrix display. More...

#include <MatrixOptionsDialog.h>

Inheritance diagram for Isis::MatrixOptionsDialog:
Inheritance graph
Collaboration diagram for Isis::MatrixOptionsDialog:
Collaboration graph

Public Slots

void applyOptions ()
 Send changes back to scene widget (MatrixOptions) so it can redraw the elements in the right color.
 
void readOptions ()
 Get the current options from the matrix scene widget.
 
void updateCorrelationData (QString currentData)
 Update the current correlation information.
 
void populateParameterComboBox (int index)
 Update parameter combo boxes at real time, when the img combo boxes are changed.
 

Signals

void optionsUpdated ()
 

Public Member Functions

 MatrixOptionsDialog (MatrixOptions *options, QWidget *parent)
 Main constructor.
 
 ~MatrixOptionsDialog ()
 Default Destructor.
 

Private Slots

void refreshWidgetStates ()
 This method will enable and disable widgets depending on which radio button is selected.
 
void askUserForGoodColor ()
 slot called when user clicks on good correlation color button
 
void askUserForBadColor ()
 slot called when user clicks on bad correlation color button
 
void updateToleranceSlider (const QString &value)
 slot called when user modifies the color tolerance line edit text.
 
void updateToleranceLineEdit (int value)
 slot called when user changes the slider position.
 
void updateSpecParam1ComboBox (const QString &key)
 when the img1 combo box is changed this slot will update the parameter combo box.
 
void updateSpecParam2ComboBox (const QString &key)
 when the img2 combo box is changed this slot will update the parameter combo box.
 

Private Member Functions

 Q_DISABLE_COPY (MatrixOptionsDialog)
 
void askUserForColor (QPushButton *button)
 Prompt the user for a new color.
 
void setColorToleranceStatus (bool enable)
 If the tolerance radiobutton is selected, this method will be called with true passed as the parameter.
 
void setFocusToleranceStatus (bool enable)
 If the focus tolerance radio button is selected, the tolerance widgets will be enabled.
 
void setSpecificParametersStatus (bool enable)
 If the specific parameters radio button is selected, the image and parameter spinboxes will be enabled.
 
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.
 

Private Attributes

MatrixOptionsm_options
 This will be used to populate all the widgets.
 
QPointer< QRadioButton > m_gradientRadioButton
 Select a tolerance for the color values.
 
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.
 
QPointer< QPushButton > m_goodCorrelationColorButton
 Color to use for matrix elements that are below the given threshold.
 
QPointer< QLineEdit > m_colorToleranceLineEdit
 
QPointer< QRadioButton > m_bestCorrelationRadioButton
 Focus the matrix on the best correlation................. What if there is more than one?
 
QPointer< QRadioButton > m_worstCorrelationRadioButton
 Focus the matrix on the worst correlation................. What if there is more than one?
 
QPointer< QRadioButton > m_specificCorrelationRadioButton
 Focus the matrix on the correlation corresponding to the specified images and parameters.
 
QPointer< QComboBoxm_image1ComboBox
 
QPointer< QComboBoxm_parameter1ComboBox
 
QPointer< QComboBoxm_image2ComboBox
 
QPointer< QComboBoxm_parameter2ComboBox
 
QPointer< QRadioButton > m_focusToleranceRadioButton
 Focus the matrix on a selected correlation value.
 
QPointer< QLineEdit > m_focusToleranceLineEdit
 
QPointer< QComboBoxm_goodElementsComboBox
 
QPointer< QComboBoxm_badElementsComboBox
 
QPointer< QWidgetm_verticalLayoutWidget
 
QPointer< QLabel > m_currentValueLabel
 
QPointer< QLabel > m_image1NameLabel
 
QPointer< QLabel > m_parameter1NameLabel
 
QPointer< QLabel > m_image2NameLabel
 
QPointer< QLabel > m_parameter2NameLabel
 

Detailed Description

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.

Author
2014-07-14 Kimberly Oyama
History

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.

Constructor & Destructor Documentation

◆ MatrixOptionsDialog()

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)

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

◆ ~MatrixOptionsDialog()

Isis::MatrixOptionsDialog::~MatrixOptionsDialog ( )

Default Destructor.

Definition at line 383 of file MatrixOptionsDialog.cpp.

Member Function Documentation

◆ applyOptions

void Isis::MatrixOptionsDialog::applyOptions ( )
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().

◆ askUserForBadColor

void Isis::MatrixOptionsDialog::askUserForBadColor ( )
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().

◆ askUserForColor()

void Isis::MatrixOptionsDialog::askUserForColor ( QPushButton * button)
private

Prompt the user for a new color.

Parameters
goodIf 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().

◆ askUserForGoodColor

void Isis::MatrixOptionsDialog::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().

◆ populateParameterComboBox

void Isis::MatrixOptionsDialog::populateParameterComboBox ( int index)
slot

Update parameter combo boxes at real time, when the img combo boxes are changed.

Parameters
indexThe current index of the IMAGE combobox.

Definition at line 521 of file MatrixOptionsDialog.cpp.

◆ readOptions

void Isis::MatrixOptionsDialog::readOptions ( )
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.

History
2016-12-01 Ian Humphrey - Removed goodElements() and badElements() QList<double> declarations, as these are unused and were causing [-Wvexing-parse] warnings on the clang compiler by using the ()'s.

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

◆ refreshWidgetStates

void Isis::MatrixOptionsDialog::refreshWidgetStates ( )
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().

◆ setColorToleranceStatus()

void Isis::MatrixOptionsDialog::setColorToleranceStatus ( bool enable)
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.

Parameters
enableTrue 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().

◆ setFocusToleranceStatus()

void Isis::MatrixOptionsDialog::setFocusToleranceStatus ( bool enable)
private

If the focus tolerance radio button is selected, the tolerance widgets will be enabled.

Otherwise, they will be disabled.

Parameters
enableTrue if the radiobutton for that section is selected.

Definition at line 548 of file MatrixOptionsDialog.cpp.

Referenced by readOptions(), and refreshWidgetStates().

◆ setSpecificParametersStatus()

void Isis::MatrixOptionsDialog::setSpecificParametersStatus ( bool enable)
private

If the specific parameters radio button is selected, the image and parameter spinboxes will be enabled.

Otherwise, they will be disabled.

Parameters
enableTrue if the radiobutton for that section is selected.

Definition at line 562 of file MatrixOptionsDialog.cpp.

Referenced by readOptions(), and refreshWidgetStates().

◆ updateCorrelationData

void Isis::MatrixOptionsDialog::updateCorrelationData ( QString currentData)
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().

◆ updateSpecificParameterComboBox()

void Isis::MatrixOptionsDialog::updateSpecificParameterComboBox ( const QString & key,
QComboBox * comboBox )
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().

◆ updateSpecParam1ComboBox

void Isis::MatrixOptionsDialog::updateSpecParam1ComboBox ( const QString & key)
privateslot

when the img1 combo box is changed this slot will update the parameter combo box.

Parameters
indexThe index of the new img.

Definition at line 647 of file MatrixOptionsDialog.cpp.

References updateSpecificParameterComboBox().

Referenced by MatrixOptionsDialog().

◆ updateSpecParam2ComboBox

void Isis::MatrixOptionsDialog::updateSpecParam2ComboBox ( const QString & key)
privateslot

when the img2 combo box is changed this slot will update the parameter combo box.

Parameters
indexThe index of the new img.

Definition at line 658 of file MatrixOptionsDialog.cpp.

References updateSpecificParameterComboBox().

Referenced by MatrixOptionsDialog().

◆ updateToleranceLineEdit

void Isis::MatrixOptionsDialog::updateToleranceLineEdit ( int value)
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().

◆ updateToleranceSlider

void Isis::MatrixOptionsDialog::updateToleranceSlider ( const QString & value)
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().

Member Data Documentation

◆ m_badCorrelationColorButton

QPointer<QPushButton> Isis::MatrixOptionsDialog::m_badCorrelationColorButton
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().

◆ m_badElementsComboBox

QPointer<QComboBox> Isis::MatrixOptionsDialog::m_badElementsComboBox
private

Definition at line 113 of file MatrixOptionsDialog.h.

◆ m_bestCorrelationRadioButton

QPointer<QRadioButton> Isis::MatrixOptionsDialog::m_bestCorrelationRadioButton
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().

◆ m_colorToleranceLineEdit

QPointer<QLineEdit> Isis::MatrixOptionsDialog::m_colorToleranceLineEdit
private

Definition at line 92 of file MatrixOptionsDialog.h.

◆ m_colorToleranceRadioButton

QPointer<QRadioButton> Isis::MatrixOptionsDialog::m_colorToleranceRadioButton
private

Definition at line 86 of file MatrixOptionsDialog.h.

◆ m_colorToleranceSlider

QPointer<QSlider> Isis::MatrixOptionsDialog::m_colorToleranceSlider
private

Definition at line 87 of file MatrixOptionsDialog.h.

◆ m_currentValueLabel

QPointer<QLabel> Isis::MatrixOptionsDialog::m_currentValueLabel
private

Definition at line 117 of file MatrixOptionsDialog.h.

◆ m_focusToleranceLineEdit

QPointer<QLineEdit> Isis::MatrixOptionsDialog::m_focusToleranceLineEdit
private

Definition at line 111 of file MatrixOptionsDialog.h.

◆ m_focusToleranceRadioButton

QPointer<QRadioButton> Isis::MatrixOptionsDialog::m_focusToleranceRadioButton
private

Focus the matrix on a selected correlation value.

Definition at line 110 of file MatrixOptionsDialog.h.

Referenced by MatrixOptionsDialog(), readOptions(), and refreshWidgetStates().

◆ m_goodCorrelationColorButton

QPointer<QPushButton> Isis::MatrixOptionsDialog::m_goodCorrelationColorButton
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().

◆ m_goodElementsComboBox

QPointer<QComboBox> Isis::MatrixOptionsDialog::m_goodElementsComboBox
private

Definition at line 112 of file MatrixOptionsDialog.h.

◆ m_gradientRadioButton

QPointer<QRadioButton> Isis::MatrixOptionsDialog::m_gradientRadioButton
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().

◆ m_image1ComboBox

QPointer<QComboBox> Isis::MatrixOptionsDialog::m_image1ComboBox
private

Definition at line 104 of file MatrixOptionsDialog.h.

◆ m_image1NameLabel

QPointer<QLabel> Isis::MatrixOptionsDialog::m_image1NameLabel
private

Definition at line 118 of file MatrixOptionsDialog.h.

◆ m_image2ComboBox

QPointer<QComboBox> Isis::MatrixOptionsDialog::m_image2ComboBox
private

Definition at line 106 of file MatrixOptionsDialog.h.

◆ m_image2NameLabel

QPointer<QLabel> Isis::MatrixOptionsDialog::m_image2NameLabel
private

Definition at line 120 of file MatrixOptionsDialog.h.

◆ m_options

MatrixOptions* Isis::MatrixOptionsDialog::m_options
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().

◆ m_parameter1ComboBox

QPointer<QComboBox> Isis::MatrixOptionsDialog::m_parameter1ComboBox
private

Definition at line 105 of file MatrixOptionsDialog.h.

◆ m_parameter1NameLabel

QPointer<QLabel> Isis::MatrixOptionsDialog::m_parameter1NameLabel
private

Definition at line 119 of file MatrixOptionsDialog.h.

◆ m_parameter2ComboBox

QPointer<QComboBox> Isis::MatrixOptionsDialog::m_parameter2ComboBox
private

Definition at line 107 of file MatrixOptionsDialog.h.

◆ m_parameter2NameLabel

QPointer<QLabel> Isis::MatrixOptionsDialog::m_parameter2NameLabel
private

Definition at line 121 of file MatrixOptionsDialog.h.

◆ m_specificCorrelationRadioButton

QPointer<QRadioButton> Isis::MatrixOptionsDialog::m_specificCorrelationRadioButton
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().

◆ m_verticalLayoutWidget

QPointer<QWidget> Isis::MatrixOptionsDialog::m_verticalLayoutWidget
private

Definition at line 114 of file MatrixOptionsDialog.h.

◆ m_worstCorrelationRadioButton

QPointer<QRadioButton> Isis::MatrixOptionsDialog::m_worstCorrelationRadioButton
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().


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