NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkThumbnailViewPreferencePage.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 niftkThumbnailViewPreferencePage_h
16 #define niftkThumbnailViewPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 
21 class QWidget;
22 class QSpinBox;
23 class QDoubleSpinBox;
24 class QCheckBox;
25 class QPushButton;
26 
27 
28 namespace niftk
29 {
30 
38 class ThumbnailViewPreferencePage : public QObject, public berry::IQtPreferencePage
39 {
40  Q_OBJECT
41  Q_INTERFACES(berry::IPreferencePage)
42 
43 public:
44 
48 
49  void CreateQtControl(QWidget* widget);
50  QWidget* GetQtControl() const;
51 
53  void Init(berry::IWorkbench::Pointer workbench);
54 
56  virtual bool PerformOk();
57 
59  virtual void PerformCancel();
60 
62  virtual void Update();
63 
65  static const QString THUMBNAIL_BOX_THICKNESS;
66 
68  static const QString THUMBNAIL_BOX_OPACITY;
69 
71  static const QString THUMBNAIL_BOX_LAYER;
72 
74  static const QString THUMBNAIL_TRACK_ONLY_MAIN_WINDOWS;
75 
76 protected:
77 
78  QWidget *m_MainControl;
79  QSpinBox *m_BoxThickness;
80  QDoubleSpinBox *m_BoxOpacity;
81  QSpinBox *m_BoxLayer;
83 
85 
86  berry::IPreferences::Pointer m_ThumbnailPreferencesNode;
87 };
88 
89 }
90 
91 #endif
static const QString THUMBNAIL_BOX_LAYER
Stores the name of the preferences node that stores the box layer.
Definition: niftkThumbnailViewPreferencePage.h:71
static const QString THUMBNAIL_BOX_OPACITY
Stores the name of the preferences node that stores the box opacity.
Definition: niftkThumbnailViewPreferencePage.h:68
void CreateQtControl(QWidget *widget)
Definition: niftkThumbnailViewPreferencePage.cxx:73
static const QString THUMBNAIL_TRACK_ONLY_MAIN_WINDOWS
Stores the name of the preferences node that tells if only main windows should be tracked...
Definition: niftkThumbnailViewPreferencePage.h:74
QSpinBox * m_BoxThickness
Definition: niftkThumbnailViewPreferencePage.h:79
void Init(berry::IWorkbench::Pointer workbench)
Nothing to do.
Definition: niftkThumbnailViewPreferencePage.cxx:66
ThumbnailViewPreferencePage()
Definition: niftkThumbnailViewPreferencePage.cxx:37
QWidget * GetQtControl() const
Definition: niftkThumbnailViewPreferencePage.cxx:125
virtual bool PerformOk()
Definition: niftkThumbnailViewPreferencePage.cxx:132
QWidget * m_MainControl
Definition: niftkThumbnailViewPreferencePage.h:78
~ThumbnailViewPreferencePage()
Definition: niftkThumbnailViewPreferencePage.cxx:59
QDoubleSpinBox * m_BoxOpacity
Definition: niftkThumbnailViewPreferencePage.h:80
bool m_Initializing
Definition: niftkThumbnailViewPreferencePage.h:84
virtual void PerformCancel()
Definition: niftkThumbnailViewPreferencePage.cxx:143
Preferences page for the ThumbnailView plugin, enabling the user to set line thickness, opacity, layer, and whether to respond to mouse events.
Definition: niftkThumbnailViewPreferencePage.h:38
virtual void Update()
Definition: niftkThumbnailViewPreferencePage.cxx:150
Definition: niftkExceptionObject.h:21
QSpinBox * m_BoxLayer
Definition: niftkThumbnailViewPreferencePage.h:81
berry::IPreferences::Pointer m_ThumbnailPreferencesNode
Definition: niftkThumbnailViewPreferencePage.h:86
QCheckBox * m_TrackOnlyMainWindows
Definition: niftkThumbnailViewPreferencePage.h:82
static const QString THUMBNAIL_BOX_THICKNESS
Stores the name of the preferences node that stores the box line thickness.
Definition: niftkThumbnailViewPreferencePage.h:65