NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkIGIVLVideoOverlayEditorPreferencePage.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 niftkIGIVLVideoOverlayEditorPreferencePage_h
16 #define niftkIGIVLVideoOverlayEditorPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 
21 class QWidget;
22 class QPushButton;
23 class ctkPathLineEdit;
24 
25 namespace niftk
26 {
27 
33 struct IGIVLVideoOverlayEditorPreferencePage : public QObject, public berry::IQtPreferencePage
34 {
35  Q_OBJECT
36  Q_INTERFACES(berry::IPreferencePage)
37 
38 public:
40 
41  void Init(berry::IWorkbench::Pointer workbench) override;
42  void CreateQtControl(QWidget* widget) override;
43 
44  QWidget* GetQtControl() const override;
45 
49  virtual bool PerformOk() override;
50 
54  virtual void PerformCancel() override;
55 
59  virtual void Update() override;
60 
64  static const QString CALIBRATION_FILE_NAME;
65 
69  static const QString BACKGROUND_COLOR_PREFSKEY;
70  static const unsigned int DEFAULT_BACKGROUND_COLOR;
71 
72 public slots:
73 
75 
76 private:
77 
78  QWidget *m_MainControl;
79  ctkPathLineEdit *m_CalibrationFileName;
80  QPushButton *m_BackgroundColourButton;
81  unsigned int m_BackgroundColour;
82  berry::IPreferences::Pointer m_IGIVLVideoOverlayEditorPreferencesNode;
83 };
84 
85 } // end namespace
86 
87 #endif
void Init(berry::IWorkbench::Pointer workbench) override
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:45
virtual bool PerformOk() override
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:118
virtual void Update() override
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:134
static const QString BACKGROUND_COLOR_PREFSKEY
Stores the name of the preference node that contains the background colour.
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.h:69
QWidget * GetQtControl() const override
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:111
Preference page for IGIVLVideoOverlayEditor, eg. setting the gradient background. ...
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.h:33
static const QString CALIBRATION_FILE_NAME
Stores the name of the preference node that contains the name of the calibration file.
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.h:64
void OnBackgroundColourClicked()
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:93
static const unsigned int DEFAULT_BACKGROUND_COLOR
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.h:70
virtual void PerformCancel() override
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:127
void CreateQtControl(QWidget *widget) override
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:51
Definition: niftkExceptionObject.h:21
IGIVLVideoOverlayEditorPreferencePage()
Definition: niftkIGIVLVideoOverlayEditorPreferencePage.cxx:35