NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkDataSourcesViewPreferencePage.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 niftkDataSourcesViewPreferencePage_h
16 #define niftkDataSourcesViewPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 #include <QString>
21 #include <QColor>
22 
23 class QWidget;
24 class QSpinBox;
25 class ctkDirectoryButton;
26 
27 namespace niftk
28 {
29 
35 class DataSourcesViewPreferencePage : public QObject, public berry::IQtPreferencePage
36 {
37  Q_OBJECT
38  Q_INTERFACES(berry::IPreferencePage)
39 
40 public:
41 
45  static const QString PREFERENCES_NODE_NAME;
46 
50 
51  void Init(berry::IWorkbench::Pointer workbench) override;
52  void CreateQtControl(QWidget* widget) override;
53  QWidget* GetQtControl() const override;
54 
58  virtual bool PerformOk() override;
59 
63  virtual void PerformCancel() override;
64 
68  virtual void Update() override;
69 
70 private:
71 
72  QWidget *m_MainControl;
73  QSpinBox *m_FramesPerSecondSpinBox;
74  ctkDirectoryButton *m_DirectoryPrefix;
75  bool m_Initializing;
76  berry::IPreferences::Pointer m_DataSourcesViewPreferencesNode;
77 };
78 
79 } // end namespace
80 
81 #endif
82 
virtual void PerformCancel() override
Definition: niftkDataSourcesViewPreferencePage.cxx:109
virtual bool PerformOk() override
Definition: niftkDataSourcesViewPreferencePage.cxx:100
~DataSourcesViewPreferencePage()
Definition: niftkDataSourcesViewPreferencePage.cxx:54
DataSourcesViewPreferencePage()
Definition: niftkDataSourcesViewPreferencePage.cxx:34
static const QString PREFERENCES_NODE_NAME
Stores the name of the preferences node.
Definition: niftkDataSourcesViewPreferencePage.h:45
void Init(berry::IWorkbench::Pointer workbench) override
Definition: niftkDataSourcesViewPreferencePage.cxx:60
Preferences page for the surgical guidance plugin with choices for colours, default paths to save dat...
Definition: niftkDataSourcesViewPreferencePage.h:35
virtual void Update() override
Definition: niftkDataSourcesViewPreferencePage.cxx:116
Definition: niftkExceptionObject.h:21
QWidget * GetQtControl() const override
Definition: niftkDataSourcesViewPreferencePage.cxx:93
void CreateQtControl(QWidget *widget) override
Definition: niftkDataSourcesViewPreferencePage.cxx:67