NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkIGIUltrasoundOverlayEditorPreferencePage.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 IGIOverlayEditorPreferencePage_h
16 #define IGIOverlayEditorPreferencePage_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 IGIUltrasoundOverlayEditorPreferencePage : public QObject, public berry::IQtPreferencePage
37 {
38  Q_OBJECT
39  Q_INTERFACES(berry::IPreferencePage)
40 
41 public:
42 
44 
45  void Init(berry::IWorkbench::Pointer workbench) override;
46  void CreateQtControl(QWidget* widget) override;
47 
48  QWidget* GetQtControl() const override;
49 
53  virtual bool PerformOk() override;
54 
58  virtual void PerformCancel() override;
59 
63  virtual void Update() override;
64 
68  static const QString FIRST_BACKGROUND_STYLE_SHEET;
69 
73  static const QString SECOND_BACKGROUND_STYLE_SHEET;
74 
78  static const QString FIRST_BACKGROUND_COLOUR;
79 
83  static const QString SECOND_BACKGROUND_COLOUR;
84 
88  static const QString CLIP_TO_IMAGE_PLANE;
89 
90 public slots:
91 
92  void FirstColorChanged();
93  void SecondColorChanged();
94  void ResetColors();
95 
96 private:
97 
98  QWidget *m_MainControl;
99  QCheckBox *m_ClipToImagePlane;
100  QPushButton *m_ColorButton1;
101  QPushButton *m_ColorButton2;
102  QString m_FirstColor;
103  QString m_SecondColor;
104  QString m_FirstColorStyleSheet;
105  QString m_SecondColorStyleSheet;
106 
107  berry::IPreferences::Pointer m_IGIUltrasoundOverlayEditorPreferencesNode;
108 };
109 
110 } // end namespace
111 
112 #endif
void SecondColorChanged()
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:201
void ResetColors()
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:223
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.h:36
QWidget * GetQtControl() const override
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:123
static const QString SECOND_BACKGROUND_COLOUR
Stores the name of the preference node that contains the second background colour.
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.h:83
void FirstColorChanged()
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:179
static const QString CLIP_TO_IMAGE_PLANE
Stores the name of the preference node containing whether we are using clipping planes in Image Track...
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.h:88
virtual void PerformCancel() override
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:142
static const QString FIRST_BACKGROUND_STYLE_SHEET
Stores the name of the preference node that contains the stylesheet of the first background colour...
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.h:68
void CreateQtControl(QWidget *widget) override
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:54
virtual bool PerformOk() override
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:130
void Init(berry::IWorkbench::Pointer workbench) override
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:48
virtual void Update() override
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:149
static const QString SECOND_BACKGROUND_STYLE_SHEET
Stores the name of the preference node that contains the stylesheet of the second background colour...
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.h:73
IGIUltrasoundOverlayEditorPreferencePage()
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.cxx:38
static const QString FIRST_BACKGROUND_COLOUR
Stores the name of the preference node that contains the first background colour. ...
Definition: niftkIGIUltrasoundOverlayEditorPreferencePage.h:78
Definition: niftkExceptionObject.h:21