NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkGeneralSegmentorPreferencePage.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 niftkGeneralSegmentorPreferencePage_h
16 #define niftkGeneralSegmentorPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 
21 class QWidget;
22 class QPushButton;
23 
24 namespace niftk
25 {
26 
30 class GeneralSegmentorPreferencePage : public QObject, public berry::IQtPreferencePage
31 {
32  Q_OBJECT
33  Q_INTERFACES(berry::IPreferencePage)
34 
35 public:
36 
38  static const QString PREFERENCES_NODE_NAME;
39 
43 
44  void Init(berry::IWorkbench::Pointer workbench);
45 
46  void CreateQtControl(QWidget* widget);
47 
48  QWidget* GetQtControl() const;
49 
53  virtual bool PerformOk();
54 
58  virtual void PerformCancel();
59 
63  virtual void Update();
64 
65 protected slots:
66 
68  void OnResetDefaultColour();
69 
70 protected:
71 
72  QWidget* m_MainControl;
75  QString m_DefaultColor;
76 
78 
79  berry::IPreferences::Pointer m_GeneralSegmentorPreferencesNode;
80 };
81 
82 }
83 
84 #endif
QWidget * m_MainControl
Definition: niftkGeneralSegmentorPreferencePage.h:72
virtual bool PerformOk()
Definition: niftkGeneralSegmentorPreferencePage.cxx:111
berry::IPreferences::Pointer m_GeneralSegmentorPreferencesNode
Definition: niftkGeneralSegmentorPreferencePage.h:79
void Init(berry::IWorkbench::Pointer workbench)
Definition: niftkGeneralSegmentorPreferencePage.cxx:61
QPushButton * m_DefaultColorPushButton
Definition: niftkGeneralSegmentorPreferencePage.h:73
QString m_DefauleColorStyleSheet
Definition: niftkGeneralSegmentorPreferencePage.h:74
QWidget * GetQtControl() const
Definition: niftkGeneralSegmentorPreferencePage.cxx:104
virtual void PerformCancel()
Definition: niftkGeneralSegmentorPreferencePage.cxx:121
~GeneralSegmentorPreferencePage()
Definition: niftkGeneralSegmentorPreferencePage.cxx:54
bool m_Initializing
Definition: niftkGeneralSegmentorPreferencePage.h:77
void OnDefaultColourChanged()
Definition: niftkGeneralSegmentorPreferencePage.cxx:145
static const QString PREFERENCES_NODE_NAME
Stores the name of the preferences node.
Definition: niftkGeneralSegmentorPreferencePage.h:38
Preferences page for this plugin, enabling the choice of the default colour of the segmentation...
Definition: niftkGeneralSegmentorPreferencePage.h:30
void OnResetDefaultColour()
Definition: niftkGeneralSegmentorPreferencePage.cxx:172
QString m_DefaultColor
Definition: niftkGeneralSegmentorPreferencePage.h:75
GeneralSegmentorPreferencePage()
Definition: niftkGeneralSegmentorPreferencePage.cxx:36
virtual void Update()
Definition: niftkGeneralSegmentorPreferencePage.cxx:128
void CreateQtControl(QWidget *widget)
Definition: niftkGeneralSegmentorPreferencePage.cxx:68
Definition: niftkExceptionObject.h:21