NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkIGIVideoOverlayEditorPreferencePage.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef IGIVideoOverlayEditorPreferencePage_h
16 #define IGIVideoOverlayEditorPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 
21 class QWidget;
22 class QRadioButton;
23 class QPushButton;
24 class QWidgetAction;
25 class QCheckBox;
26 class ctkPathLineEdit;
27 
28 namespace niftk
29 {
30 
36 struct IGIVideoOverlayEditorPreferencePage : public QObject, public berry::IQtPreferencePage
37 {
38  Q_OBJECT
39  Q_INTERFACES(berry::IPreferencePage)
40 
41 public:
43 
44  void Init(berry::IWorkbench::Pointer workbench) override;
45  void CreateQtControl(QWidget* widget) override;
46 
47  QWidget* GetQtControl() const override;
48 
52  virtual bool PerformOk() override;
53 
57  virtual void PerformCancel() override;
58 
62  virtual void Update() override;
63 
67  static const QString CALIBRATION_FILE_NAME;
68 
72  static const QString FIRST_BACKGROUND_STYLE_SHEET;
73 
77  static const QString SECOND_BACKGROUND_STYLE_SHEET;
78 
82  static const QString FIRST_BACKGROUND_COLOUR;
83 
87  static const QString SECOND_BACKGROUND_COLOUR;
88 
89 public slots:
90 
91  void FirstColorChanged();
92  void SecondColorChanged();
93  void ResetColors();
94 
95 private:
96 
97  QWidget *m_MainControl;
98  ctkPathLineEdit *m_CalibrationFileName;
99  QPushButton *m_ColorButton1;
100  QPushButton *m_ColorButton2;
101  QString m_FirstColor;
102  QString m_SecondColor;
103  QString m_FirstColorStyleSheet;
104  QString m_SecondColorStyleSheet;
105 
106  berry::IPreferences::Pointer m_IGIVideoOverlayEditorPreferencesNode;
107 };
108 
109 } // end namespace
110 
111 #endif
virtual void Update() override
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:149
virtual bool PerformOk() override
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:130
static const QString FIRST_BACKGROUND_STYLE_SHEET
Stores the name of the preference node that contains the stylesheet of the first background colour...
Definition: niftkIGIVideoOverlayEditorPreferencePage.h:72
static const QString SECOND_BACKGROUND_STYLE_SHEET
Stores the name of the preference node that contains the stylesheet of the second background colour...
Definition: niftkIGIVideoOverlayEditorPreferencePage.h:77
void SecondColorChanged()
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:200
static const QString CALIBRATION_FILE_NAME
Stores the name of the preference node that contains the name of the calibration file.
Definition: niftkIGIVideoOverlayEditorPreferencePage.h:67
static const QString FIRST_BACKGROUND_COLOUR
Stores the name of the preference node that contains the first background colour. ...
Definition: niftkIGIVideoOverlayEditorPreferencePage.h:82
QWidget * GetQtControl() const override
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:123
void Init(berry::IWorkbench::Pointer workbench) override
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:48
Preference page for IGIVideoOverlayEditor, eg. setting the gradient background.
Definition: niftkIGIVideoOverlayEditorPreferencePage.h:36
static const QString SECOND_BACKGROUND_COLOUR
Stores the name of the preference node that contains the second background colour.
Definition: niftkIGIVideoOverlayEditorPreferencePage.h:87
void ResetColors()
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:222
virtual void PerformCancel() override
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:142
IGIVideoOverlayEditorPreferencePage()
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:38
void FirstColorChanged()
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:178
Definition: niftkExceptionObject.h:21
void CreateQtControl(QWidget *widget) override
Definition: niftkIGIVideoOverlayEditorPreferencePage.cxx:54