NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkVLStandardDisplayEditorPreferencePage.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 niftkVLStandardDisplayEditorPreferencePage_h
16 #define niftkVLStandardDisplayEditorPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 
21 class QWidget;
22 class QPushButton;
23 
24 namespace niftk
25 {
26 
32 struct VLStandardDisplayEditorPreferencePage : public QObject, public berry::IQtPreferencePage
33 {
34  Q_OBJECT
35  Q_INTERFACES(berry::IPreferencePage)
36 
37 public:
39 
40  void Init(berry::IWorkbench::Pointer workbench) override;
41  void CreateQtControl(QWidget* widget) override;
42 
43  QWidget* GetQtControl() const override;
44 
48  virtual bool PerformOk() override;
49 
53  virtual void PerformCancel() override;
54 
58  virtual void Update() override;
59 
63  static const QString BACKGROUND_COLOR_PREFSKEY;
64  static const unsigned int DEFAULT_BACKGROUND_COLOR;
65 
66 public slots:
67 
69 
70 private:
71 
72  QWidget *m_MainControl;
73  QPushButton *m_BackgroundColourButton;
74  unsigned int m_BackgroundColour;
75  berry::IPreferences::Pointer m_VLStandardDisplayEditorPreferencesNode;
76 };
77 
78 } // end namespace
79 
80 #endif
virtual void Update() override
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:127
static const unsigned int DEFAULT_BACKGROUND_COLOR
Definition: niftkVLStandardDisplayEditorPreferencePage.h:64
virtual void PerformCancel() override
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:120
void OnBackgroundColourClicked()
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:87
static const QString BACKGROUND_COLOR_PREFSKEY
Stores the name of the preference node that contains the background colour.
Definition: niftkVLStandardDisplayEditorPreferencePage.h:63
QWidget * GetQtControl() const override
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:105
Preference page for VLStandardDisplayEditor, eg. setting the background colour.
Definition: niftkVLStandardDisplayEditorPreferencePage.h:32
VLStandardDisplayEditorPreferencePage()
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:33
virtual bool PerformOk() override
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:112
void CreateQtControl(QWidget *widget) override
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:48
void Init(berry::IWorkbench::Pointer workbench) override
Definition: niftkVLStandardDisplayEditorPreferencePage.cxx:42
Definition: niftkExceptionObject.h:21