NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
TrackedImageViewPreferencePage.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 TrackedImageViewPreferencePage_h
16 #define TrackedImageViewPreferencePage_h
17 
18 #include <berryIQtPreferencePage.h>
19 #include <berryIPreferences.h>
20 #include <QString>
21 
22 class QWidget;
23 class QPushButton;
24 class QDoubleSpinBox;
25 class ctkPathLineEdit;
26 class QCheckBox;
27 
34 class TrackedImageViewPreferencePage : public QObject, public berry::IQtPreferencePage
35 {
36  Q_OBJECT
37  Q_INTERFACES(berry::IPreferencePage)
38 
39 public:
40 
44  static const QString PREFERENCES_NODE_NAME;
45 
49  static const QString CALIBRATION_FILE_NAME;
50 
54  static const QString SCALE_FILE_NAME;
55 
59  static const QString EMTOWORLDCALIBRATION_FILE_NAME;
60 
64  static const QString FLIP_X_SCALING;
65 
69  static const QString FLIP_Y_SCALING;
70 
74  static const QString CLONE_IMAGE;
75 
79  static const QString SHOW_2D_WINDOW;
80 
84 
85  void Init(berry::IWorkbench::Pointer workbench) override;
86 
87  void CreateQtControl(QWidget* widget) override;
88 
89  QWidget* GetQtControl() const override;
90 
94  virtual bool PerformOk() override;
95 
99  virtual void PerformCancel() override;
100 
104  virtual void Update() override;
105 
106 private slots:
107 
108 private:
109 
110  QWidget *m_MainControl;
111  ctkPathLineEdit *m_CalibrationFileName;
112  ctkPathLineEdit *m_ScaleFileName;
113  ctkPathLineEdit *m_EmToWorldCalibrationFileName;
114 
115  bool m_Initializing;
116  QCheckBox *m_FlipXScaling;
117  QCheckBox *m_FlipYScaling;
118 
119  QCheckBox *m_CloneImage;
120  QCheckBox *m_Show2DWindow;
121 
122  berry::IPreferences::Pointer m_TrackedImageViewPreferencesNode;
123 };
124 
125 #endif // TrackedImageViewPreferencePage_h
126 
static const QString FLIP_X_SCALING
Stores the name of the preference node that contains whether we flip the x scale factor to be negativ...
Definition: TrackedImageViewPreferencePage.h:64
TrackedImageViewPreferencePage()
Definition: TrackedImageViewPreferencePage.cxx:40
static const QString FLIP_Y_SCALING
Stores the name of the preference node that contains whether we flip the y scale factor to be negativ...
Definition: TrackedImageViewPreferencePage.h:69
Preferences page for the Tracked Image View plugin.
Definition: TrackedImageViewPreferencePage.h:34
QWidget * GetQtControl() const override
Definition: TrackedImageViewPreferencePage.cxx:120
static const QString SCALE_FILE_NAME
Stores the name of the preference node that contains the name of the scale file.
Definition: TrackedImageViewPreferencePage.h:54
virtual bool PerformOk() override
Definition: TrackedImageViewPreferencePage.cxx:127
static const QString EMTOWORLDCALIBRATION_FILE_NAME
Stores the name of the preference node that contains the name of the scale file.
Definition: TrackedImageViewPreferencePage.h:59
virtual void Update() override
Definition: TrackedImageViewPreferencePage.cxx:148
void CreateQtControl(QWidget *widget) override
Definition: TrackedImageViewPreferencePage.cxx:76
virtual void PerformCancel() override
Definition: TrackedImageViewPreferencePage.cxx:141
static const QString SHOW_2D_WINDOW
Stores the name of the preference node that controls if we show the 2D window.
Definition: TrackedImageViewPreferencePage.h:79
void Init(berry::IWorkbench::Pointer workbench) override
Definition: TrackedImageViewPreferencePage.cxx:69
static const QString PREFERENCES_NODE_NAME
Stores the name of the preferences node.
Definition: TrackedImageViewPreferencePage.h:44
static const QString CLONE_IMAGE
Stores the name of the preference node that contains status whether we show the clone image button...
Definition: TrackedImageViewPreferencePage.h:74
static const QString CALIBRATION_FILE_NAME
Stores the name of the preference node that contains the name of the calibration file.
Definition: TrackedImageViewPreferencePage.h:49
~TrackedImageViewPreferencePage()
Definition: TrackedImageViewPreferencePage.cxx:63