Isis 3 Programmer Reference
MatrixOptionsDialog.h
1 #ifndef MatrixOptionsDialog_h
2 #define MatrixOptionsDialog_h
3 
4 #include <QDialog>
5 #include <QPointer>
6 
7 #include "MatrixOptions.h"
8 
9 class QCheckBox;
10 class QComboBox;
11 class QLabel;
12 class QLineEdit;
13 class QSlider;
14 class QRadioButton;
15 
16 namespace Isis {
17 
38  class MatrixOptionsDialog : public QDialog {
39  Q_OBJECT
40  public:
41  MatrixOptionsDialog(MatrixOptions *options, QWidget *parent);
43 
44  signals:
45  void optionsUpdated();
46 
47  public slots:
48  void applyOptions();
49  void readOptions();
50  void updateCorrelationData(QString currentData);
51  void populateParameterComboBox(int index);
52 
53  private slots:
54  void refreshWidgetStates();
55  void askUserForGoodColor();
56  void askUserForBadColor();
57  void updateToleranceSlider(const QString &value);
58  void updateToleranceLineEdit(int value);
59  void updateSpecParam1ComboBox(const QString & key);
60  void updateSpecParam2ComboBox(const QString & key);
61 
62  private:
63  Q_DISABLE_COPY(MatrixOptionsDialog);
64  void askUserForColor(QPushButton *button);
65 
66  // functions to enable and disable groups
67  void setColorToleranceStatus(bool enable);
68  void setFocusToleranceStatus(bool enable);
69  void setSpecificParametersStatus(bool enable);
70  void updateSpecificParameterComboBox(const QString & key, QComboBox *comboBox);
71 
72  // update widgets as radiobuttons are chagned
73 
74  // Need parent object
75 
78 
79  // ------------------ Color widgets------------------------------------
80 
85  QPointer<QRadioButton> m_gradientRadioButton;
86  QPointer<QRadioButton> m_colorToleranceRadioButton;
87  QPointer<QSlider> m_colorToleranceSlider;
89  QPointer<QPushButton> m_badCorrelationColorButton;
91  QPointer<QPushButton> m_goodCorrelationColorButton;
92  QPointer<QLineEdit> m_colorToleranceLineEdit;
93 
94  // ------------------ Focus Widgets ------------------------------------
95 
97  QPointer<QRadioButton> m_bestCorrelationRadioButton;
98 
100  QPointer<QRadioButton> m_worstCorrelationRadioButton;
101 
103  QPointer<QRadioButton> m_specificCorrelationRadioButton;
104  QPointer<QComboBox> m_image1ComboBox;
105  QPointer<QComboBox> m_parameter1ComboBox;
106  QPointer<QComboBox> m_image2ComboBox;
107  QPointer<QComboBox> m_parameter2ComboBox;
108 
110  QPointer<QRadioButton> m_focusToleranceRadioButton;
111  QPointer<QLineEdit> m_focusToleranceLineEdit;
112  QPointer<QComboBox> m_goodElementsComboBox;
113  QPointer<QComboBox> m_badElementsComboBox;
114  QPointer<QWidget> m_verticalLayoutWidget;
115 
116  // ------------------ Current Element Widgets------------------------------------
117  QPointer<QLabel> m_currentValueLabel;
118  QPointer<QLabel> m_image1NameLabel;
119  QPointer<QLabel> m_parameter1NameLabel;
120  QPointer<QLabel> m_image2NameLabel;
121  QPointer<QLabel> m_parameter2NameLabel;
122  };
123 };
124 
125 #endif
Isis::MatrixOptionsDialog::m_badCorrelationColorButton
QPointer< QPushButton > m_badCorrelationColorButton
Color to use when for matrix elements that are above the given threshold.
Definition: MatrixOptionsDialog.h:89
QWidget
Isis::MatrixOptionsDialog::applyOptions
void applyOptions()
Send changes back to scene widget (MatrixOptions) so it can redraw the elements in the right color.
Definition: MatrixOptionsDialog.cpp:398
Isis::MatrixOptionsDialog::m_focusToleranceRadioButton
QPointer< QRadioButton > m_focusToleranceRadioButton
Focus the matrix on a selected correlation value.
Definition: MatrixOptionsDialog.h:110
Isis::MatrixOptionsDialog::m_worstCorrelationRadioButton
QPointer< QRadioButton > m_worstCorrelationRadioButton
Focus the matrix on the worst correlation................. What if there is more than one?
Definition: MatrixOptionsDialog.h:100
Isis::MatrixOptionsDialog::populateParameterComboBox
void populateParameterComboBox(int index)
Update parameter combo boxes at real time, when the img combo boxes are changed.
Definition: MatrixOptionsDialog.cpp:521
Isis::MatrixOptionsDialog::askUserForBadColor
void askUserForBadColor()
slot called when user clicks on bad correlation color button
Definition: MatrixOptionsDialog.cpp:597
Isis::MatrixOptions
This class holds the matrix color and focus information.
Definition: MatrixOptions.h:28
QComboBox
Isis::MatrixOptionsDialog::m_bestCorrelationRadioButton
QPointer< QRadioButton > m_bestCorrelationRadioButton
Focus the matrix on the best correlation................. What if there is more than one?
Definition: MatrixOptionsDialog.h:97
Isis::MatrixOptionsDialog::setColorToleranceStatus
void setColorToleranceStatus(bool enable)
If the tolerance radiobutton is selected, this method will be called with true passed as the paramete...
Definition: MatrixOptionsDialog.cpp:533
Isis::MatrixOptionsDialog::m_gradientRadioButton
QPointer< QRadioButton > m_gradientRadioButton
Select a tolerance for the color values.
Definition: MatrixOptionsDialog.h:85
Isis::MatrixOptionsDialog::updateSpecificParameterComboBox
void updateSpecificParameterComboBox(const QString &key, QComboBox *comboBox)
When the user switches the image combobox this slot will update the parameter combobox to be filled w...
Definition: MatrixOptionsDialog.cpp:668
Isis::MatrixOptionsDialog::updateCorrelationData
void updateCorrelationData(QString currentData)
Update the current correlation information.
Definition: MatrixOptionsDialog.cpp:503
Isis::MatrixOptionsDialog::setSpecificParametersStatus
void setSpecificParametersStatus(bool enable)
If the specific parameters radio button is selected, the image and parameter spinboxes will be enable...
Definition: MatrixOptionsDialog.cpp:562
Isis::MatrixOptionsDialog::m_specificCorrelationRadioButton
QPointer< QRadioButton > m_specificCorrelationRadioButton
Focus the matrix on the correlation corresponding to the specified images and parameters.
Definition: MatrixOptionsDialog.h:103
Isis::MatrixOptionsDialog::updateSpecParam1ComboBox
void updateSpecParam1ComboBox(const QString &key)
when the img1 combo box is changed this slot will update the parameter combo box.
Definition: MatrixOptionsDialog.cpp:647
Isis::MatrixOptionsDialog
This widget allows the user to modify the matrix display.
Definition: MatrixOptionsDialog.h:38
Isis::MatrixOptionsDialog::~MatrixOptionsDialog
~MatrixOptionsDialog()
Default Destructor.
Definition: MatrixOptionsDialog.cpp:383
Isis::MatrixOptionsDialog::setFocusToleranceStatus
void setFocusToleranceStatus(bool enable)
If the focus tolerance radio button is selected, the tolerance widgets will be enabled.
Definition: MatrixOptionsDialog.cpp:548
Isis::MatrixOptionsDialog::refreshWidgetStates
void refreshWidgetStates()
This method will enable and disable widgets depending on which radio button is selected.
Definition: MatrixOptionsDialog.cpp:574
Isis::MatrixOptionsDialog::updateToleranceSlider
void updateToleranceSlider(const QString &value)
slot called when user modifies the color tolerance line edit text.
Definition: MatrixOptionsDialog.cpp:626
Isis::MatrixOptionsDialog::updateToleranceLineEdit
void updateToleranceLineEdit(int value)
slot called when user changes the slider position.
Definition: MatrixOptionsDialog.cpp:636
QDialog
Isis::MatrixOptionsDialog::askUserForColor
void askUserForColor(QPushButton *button)
Prompt the user for a new color.
Definition: MatrixOptionsDialog.cpp:609
Isis::MatrixOptionsDialog::updateSpecParam2ComboBox
void updateSpecParam2ComboBox(const QString &key)
when the img2 combo box is changed this slot will update the parameter combo box.
Definition: MatrixOptionsDialog.cpp:658
Isis::MatrixOptionsDialog::readOptions
void readOptions()
Get the current options from the matrix scene widget.
Definition: MatrixOptionsDialog.cpp:445
Isis::MatrixOptionsDialog::m_goodCorrelationColorButton
QPointer< QPushButton > m_goodCorrelationColorButton
Color to use for matrix elements that are below the given threshold.
Definition: MatrixOptionsDialog.h:91
Isis::MatrixOptionsDialog::m_options
MatrixOptions * m_options
This will be used to populate all the widgets.
Definition: MatrixOptionsDialog.h:77
Isis::MatrixOptionsDialog::askUserForGoodColor
void askUserForGoodColor()
slot called when user clicks on good correlation color button
Definition: MatrixOptionsDialog.cpp:588
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::MatrixOptionsDialog::MatrixOptionsDialog
MatrixOptionsDialog(MatrixOptions *options, QWidget *parent)
Main constructor.
Definition: MatrixOptionsDialog.cpp:66