NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkDnDDisplayPreferencePage.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 niftkDnDDisplayPreferencePage_h
16 #define niftkDnDDisplayPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <uk_ac_ucl_cmic_dnddisplay_Export.h>
20 #include <berryIPreferences.h>
21 
22 class QWidget;
23 class QPushButton;
24 class QComboBox;
25 class QSpinBox;
26 class QCheckBox;
27 
28 
29 namespace niftk
30 {
31 
38 struct DNDDISPLAY_EXPORT DnDDisplayPreferencePage : public QObject, public berry::IQtPreferencePage
39 {
40  Q_OBJECT
41  Q_INTERFACES(berry::IPreferencePage)
42 
43 public:
46 
47  void CreateQtControl(QWidget* widget);
48  QWidget* GetQtControl() const;
49 
51  void Init(berry::IWorkbench::Pointer workbench);
52 
54  virtual bool PerformOk();
55 
57  virtual void PerformCancel();
58 
60  virtual void Update();
61 
64 
66  static const QString DNDDISPLAY_BACKGROUND_COLOUR;
67 
70 
72  static const QString DNDDISPLAY_SLICE_SELECT_TRACKING;
73 
75  static const QString DNDDISPLAY_TIME_SELECT_TRACKING;
76 
79 
81  static const QString DNDDISPLAY_SHOW_2D_CURSORS;
82 
85 
88 
91 
93  static const QString DNDDISPLAY_DEFAULT_WINDOW_LAYOUT;
94 
97 
100 
103 
105  static const QString DNDDISPLAY_DEFAULT_DROP_TYPE;
106 
109 
112  static const QString DNDDISPLAY_SHOW_SHOWING_OPTIONS;
113 
116 
119 
122 
123 public slots:
124 
125  void OnBackgroundColourChanged();
126  void OnResetBackgroundColour();
127  void OnResetMIDASBackgroundColour();
128 
129 private:
130 
131  QWidget* m_MainControl;
132 
133  QString m_BackgroundColorStyleSheet;
134  QString m_BackgroundColor;
135 
136  QComboBox* m_ImageInterpolationComboBox;
137  QCheckBox* m_SliceSelectTracking;
138  QCheckBox* m_TimeSelectTracking;
139  QCheckBox* m_MagnificationSelectTracking;
140  QCheckBox* m_Show2DCursorsCheckBox;
141  QCheckBox* m_ShowDirectionAnnotationsCheckBox;
142  QCheckBox* m_ShowIntensityAnnotationCheckBox;
143  QCheckBox* m_Show3DWindowInMultiWindowLayoutCheckBox;
144  QComboBox* m_DefaultWindowLayoutComboBox;
145  QCheckBox* m_RememberEachWindowLayoutsViewerSettings;
146  QSpinBox* m_DefaultNumberOfViewerRowsSpinBox;
147  QSpinBox* m_DefaultNumberOfViewerColumnsSpinBox;
148  QComboBox* m_DefaultDropType;
149  QCheckBox* m_ShowMagnificationSliderCheckBox;
150  QCheckBox* m_ShowShowingOptionsCheckBox;
151  QCheckBox* m_ShowWindowLayoutControlsCheckBox;
152  QCheckBox* m_ShowViewerNumberControlsCheckBox;
153  QCheckBox* m_ShowDropTypeControlsCheckBox;
154  QPushButton* m_BackgroundColourButton;
155 
156  berry::IPreferences::Pointer m_DnDDisplayPreferencesNode;
157 };
158 
159 }
160 
161 #endif
static const QString DNDDISPLAY_SLICE_SELECT_TRACKING
Stores the preference name for slice select tracking.
Definition: niftkDnDDisplayPreferencePage.h:72
static const QString DNDDISPLAY_SHOW_DROP_TYPE_CONTROLS
Stores the preference name for a simple on/off preference for whether we show the single...
Definition: niftkDnDDisplayPreferencePage.h:121
static const QString DNDDISPLAY_SHOW_VIEWER_NUMBER_CONTROLS
Stores the preference name for whether we show the viewer number controls.
Definition: niftkDnDDisplayPreferencePage.h:118
static const QString DNDDISPLAY_SHOW_2D_CURSORS
Stores the preference name for whether we show the 2D cursors as people may prefer them to always be ...
Definition: niftkDnDDisplayPreferencePage.h:81
static const QString DNDDISPLAY_SHOW_INTENSITY_ANNOTATION
Stores the preference name for whether we show the intensity annotation.
Definition: niftkDnDDisplayPreferencePage.h:87
static const QString DNDDISPLAY_SHOW_MAGNIFICATION_SLIDER
Stores the preference name for whether we show the magnification slider, as most people wont need it...
Definition: niftkDnDDisplayPreferencePage.h:108
static const QString DNDDISPLAY_TIME_SELECT_TRACKING
Stores the preference name for time select tracking.
Definition: niftkDnDDisplayPreferencePage.h:75
static const QString DNDDISPLAY_BACKGROUND_COLOUR_STYLESHEET
Stores the preference name for the default background colour stylesheet in the NifTK DnD Display...
Definition: niftkDnDDisplayPreferencePage.h:69
static const QString DNDDISPLAY_DEFAULT_VIEWER_COLUMN_NUMBER
Stores the preference name for the default number of columns in the DnD Display.
Definition: niftkDnDDisplayPreferencePage.h:102
static const QString DNDDISPLAY_SHOW_DIRECTION_ANNOTATIONS
Stores the preference name for whether we show the direction annotations.
Definition: niftkDnDDisplayPreferencePage.h:84
static const QString DNDDISPLAY_DEFAULT_VIEWER_ROW_NUMBER
Stores the preference name for the default number of rows in the DnD Display.
Definition: niftkDnDDisplayPreferencePage.h:99
static const QString DNDDISPLAY_DEFAULT_INTERPOLATION_TYPE
Stores the preference name for the default image interpolation in the DnD Display.
Definition: niftkDnDDisplayPreferencePage.h:63
static const QString DNDDISPLAY_BACKGROUND_COLOUR
Stores the preference name for the default background colour in the DnD Display.
Definition: niftkDnDDisplayPreferencePage.h:66
static const QString DNDDISPLAY_SHOW_3D_WINDOW_IN_MULTI_WINDOW_LAYOUT
Stores the preference name for whether we show the 3D window in multiple window layout, as screen can get a bit cluttered.
Definition: niftkDnDDisplayPreferencePage.h:90
static const QString DNDDISPLAY_SHOW_SHOWING_OPTIONS
Stores the preference name for whether we show the the options to show/hide cursor, direction annotations and 3D window in multi window layout.
Definition: niftkDnDDisplayPreferencePage.h:112
static const QString DNDDISPLAY_MAGNIFICATION_SELECT_TRACKING
Stores the preference name for magnification select tracking.
Definition: niftkDnDDisplayPreferencePage.h:78
static const QString DNDDISPLAY_SHOW_WINDOW_LAYOUT_CONTROLS
Stores the preference name for whether we show the window layout controls.
Definition: niftkDnDDisplayPreferencePage.h:115
static const QString DNDDISPLAY_DEFAULT_WINDOW_LAYOUT
Stores the preference name for the default window layout in the NifTK DnD Display.
Definition: niftkDnDDisplayPreferencePage.h:93
static const QString DNDDISPLAY_REMEMBER_VIEWER_SETTINGS_PER_WINDOW_LAYOUT
Stores the preference name for whether to revert to last remembered slice, timestep and magnification...
Definition: niftkDnDDisplayPreferencePage.h:96
static const QString DNDDISPLAY_DEFAULT_DROP_TYPE
Stores the preference name for the default drop type (single, multiple, all).
Definition: niftkDnDDisplayPreferencePage.h:105
Provides a preferences page for the NifTK DnD Display, including default number of rows...
Definition: niftkDnDDisplayPreferencePage.h:38
Definition: niftkExceptionObject.h:21