NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxPreferencesDialog.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXPREFERANCESDIALOG_H_
13 #define CXPREFERANCESDIALOG_H_
14 
15 #include "cxGuiExport.h"
16 
17 #include "cxPreferenceTab.h"
18 #include "cxGeneralTab.h"
19 #include <QDialog>
20 #include "cxDoubleProperty.h"
21 #include "cxBoolProperty.h"
22 #include "cxStringProperty.h"
23 #include "cxForwardDeclarations.h"
24 
25 class QTabWidget;
26 class QToolBox;
27 class QToolBar;
28 class QStackedWidget;
29 class QDialogButtonBox;
30 class QLabel;
31 class QComboBox;
32 class QPushButton;
33 class QSpinBox;
34 class QCheckBox;
35 class QRadioButton;
36 class QGridLayout;
37 class QVBoxLayout;
38 class QLineEdit;
39 class QActionGroup;
40 
41 namespace cx
42 {
43 class Reporter;
44 class ViewManager;
45 class FilePreviewWidget;
46 class ToolImagePreviewWidget;
47 class ToolFilterGroupBox;
48 class ToolConfigureGroupBox;
49 
58 class cxGui_EXPORT VisualizationTab : public PreferenceTab
59 {
60  Q_OBJECT
61 public:
62  VisualizationTab(PatientModelServicePtr patientModelService, QWidget *parent = 0);
63  void init();
64 
65 public slots:
66  void saveParametersSlot();
67 
68 signals:
69 
70 protected:
72  QGridLayout *mMainLayout;
85 
86  //Stereo
87  QComboBox* mStereoTypeComboBox;
89  QActionGroup* mStereoTypeActionGroup;
90  void initStereoTypeComboBox();
91 
92 private slots:
93  //Stereo
94  void stereoTypeChangedSlot(int index);
95  void stereoFrameSequentialSlot();
96  void stereoInterlacedSlot();
97  void stereoDresdenSlot();
98  void stereoRedBlueSlot();
99  void eyeAngleSlot();
100 };
101 
110 class cxGui_EXPORT AutomationTab : public PreferenceTab
111 {
112  Q_OBJECT
113 
114 public:
115  AutomationTab(QWidget *parent = 0);
116  void init();
117 
118 public slots:
119  void saveParametersSlot();
120 
121 
122 protected:
127  QCheckBox* mAutoSaveCheckBox;
132  QVBoxLayout *mMainLayout;
133 };
134 
143 class cxGui_EXPORT VideoTab : public PreferenceTab
144 {
145  Q_OBJECT
146 
147 public:
148  VideoTab(QWidget *parent = 0);
149  void init();
150 
151 public slots:
152  void saveParametersSlot();
153 
154 protected:
156  QVBoxLayout *mMainLayout;
157 
158  QRadioButton* m24bitRadioButton;
159  QRadioButton* m8bitRadioButton;
160  QCheckBox* mCompressCheckBox;
161 };
162 
189 class cxGui_EXPORT ToolConfigTab : public PreferenceTab
190 {
191  Q_OBJECT
192 
193 public:
194  ToolConfigTab(StateServicePtr stateService, TrackingServicePtr trackingService, QWidget* parent = 0);
195  virtual ~ToolConfigTab();
196 
197  virtual void init();
198 
199 public slots:
200  virtual void saveParametersSlot();
201 
202 private slots:
203  void applicationChangedSlot();
204  void globalConfigurationFileChangedSlot(QString key);
205 
206 private:
207  FilePreviewWidget* mFilePreviewWidget;
208  ToolImagePreviewWidget* mImagePreviewWidget;
209  ToolConfigureGroupBox* mToolConfigureGroupBox;
210  ToolFilterGroupBox* mToolFilterGroupBox;
211  StateServicePtr mStateService;
212 };
213 
222 class cxGui_EXPORT PreferencesDialog : public QDialog
223 {
224  Q_OBJECT
225 
226 public:
227  PreferencesDialog(ViewServicePtr viewService, PatientModelServicePtr patientModelService,
228  StateServicePtr stateService, TrackingServicePtr trackingService,
229  int currentTabIndex = 0, QWidget *parent = 0);
230  virtual ~PreferencesDialog();
231 
232 signals:
233  void applied();
234 
235 private slots:
236  void selectTabSlot();
237  void applySlot();
238 
239 protected:
240  void addTab(PreferenceTab* widget, QString name, int selectedIndex = 0);
241 
242  QActionGroup* mActionGroup;
243  QStackedWidget* mTabWidget;
244  QToolBar* mToolBar;
245  QDialogButtonBox *mButtonBox;
246 };
247 
254 class cxGui_EXPORT DebugTab : public PreferenceTab
255 {
256  Q_OBJECT
257 
258 public:
259  DebugTab(PatientModelServicePtr patientModelService, TrackingServicePtr trackingService, QWidget *parent = 0);
260  void init();
261 
262 public slots:
263  void saveParametersSlot();
264  void runDebugToolSlot();
265 
266 protected:
270  QGridLayout *mMainLayout;
273 };
274 
275 
276 
280 }//namespace cx
281 
282 #endif
cx::VisualizationTab::mLabelSize
DoublePropertyPtr mLabelSize
Definition: cxPreferencesDialog.h:74
cx::VisualizationTab::mAnnotationModel
StringPropertyPtr mAnnotationModel
Definition: cxPreferencesDialog.h:79
cx::VisualizationTab::mEyeAngleAdapter
DoublePropertyPtr mEyeAngleAdapter
Definition: cxPreferencesDialog.h:88
cx::PreferencesDialog::mToolBar
QToolBar * mToolBar
Definition: cxPreferencesDialog.h:244
cx::VideoTab::mAcquisitionNameLineEdit
QLineEdit * mAcquisitionNameLineEdit
Definition: cxPreferencesDialog.h:155
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ToolImagePreviewWidget
Widget for displaying a tools image.
Definition: cxToolImagePreviewWidget.h:28
cxForwardDeclarations.h
cx::VisualizationTab::mToolCrosshair
BoolPropertyPtr mToolCrosshair
Definition: cxPreferencesDialog.h:77
cx::VisualizationTab::mFollowTooltip
BoolPropertyPtr mFollowTooltip
Definition: cxPreferencesDialog.h:82
cx::PreferenceTab
Definition: cxPreferenceTab.h:30
cx::BoolPropertyPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Definition: cxPlusConnectWidget.h:29
cxPreferenceTab.h
cx::AutomationTab::mAutoShowNewDataCheckBox
QCheckBox * mAutoShowNewDataCheckBox
Definition: cxPreferencesDialog.h:128
cx::VisualizationTab::mFollowTooltipBoundary
DoublePropertyPtr mFollowTooltipBoundary
Definition: cxPreferencesDialog.h:83
cx::AutomationTab::mAutoDeleteDICOMDBCheckBox
QCheckBox * mAutoDeleteDICOMDBCheckBox
Definition: cxPreferencesDialog.h:130
cx::StringPropertyPtr
boost::shared_ptr< class StringProperty > StringPropertyPtr
Definition: cxVideoConnectionWidget.h:42
cx::AutomationTab::mAutoLoadPatientWithinHours
DoublePropertyPtr mAutoLoadPatientWithinHours
Definition: cxPreferencesDialog.h:131
cx::DebugTab::mPatientModelService
PatientModelServicePtr mPatientModelService
Definition: cxPreferencesDialog.h:271
cxDoubleProperty.h
cx::DebugTab::mIGSTKDebugLoggingCheckBox
QCheckBox * mIGSTKDebugLoggingCheckBox
Definition: cxPreferencesDialog.h:267
cx::VisualizationTab::mShowLabels
BoolPropertyPtr mShowLabels
Definition: cxPreferencesDialog.h:76
cx::VisualizationTab
Definition: cxPreferencesDialog.h:58
cx::AutomationTab
Automatic execution of actions when applicable.
Definition: cxPreferencesDialog.h:110
cx::VideoTab::m24bitRadioButton
QRadioButton * m24bitRadioButton
Definition: cxPreferencesDialog.h:158
cx::DoublePropertyPtr
boost::shared_ptr< class DoubleProperty > DoublePropertyPtr
Definition: cxReconstructionMethodService.h:33
cx::DebugTab::mRenderSpeedLoggingCheckBox
QCheckBox * mRenderSpeedLoggingCheckBox
Definition: cxPreferencesDialog.h:269
cx::ToolFilterGroupBox
Widget for easily filtering tools based on clinical application and tracking system.
Definition: cxToolFilterWidget.h:43
cx::VisualizationTab::mMainLayout
QGridLayout * mMainLayout
Definition: cxPreferencesDialog.h:72
cx::ToolConfigTab
Interface for selecting a tool configuration.
Definition: cxPreferencesDialog.h:189
cx::VisualizationTab::mAnnotationModelSize
DoublePropertyPtr mAnnotationModelSize
Definition: cxPreferencesDialog.h:80
cx::AutomationTab::mAutoStartStreamingCheckBox
QCheckBox * mAutoStartStreamingCheckBox
Definition: cxPreferencesDialog.h:125
cx::VideoTab::m8bitRadioButton
QRadioButton * m8bitRadioButton
Definition: cxPreferencesDialog.h:159
cx::AutomationTab::mAutoLoadPatientCheckBox
QCheckBox * mAutoLoadPatientCheckBox
Definition: cxPreferencesDialog.h:129
cx::TrackingServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Definition: cxToolFilterWidget.h:27
cx::VideoTab
Various parameters related to ultrasound acquisition and reconstruction.
Definition: cxPreferencesDialog.h:143
cx::DebugTab::mMainLayout
QGridLayout * mMainLayout
Definition: cxPreferencesDialog.h:270
cx::VideoTab::mCompressCheckBox
QCheckBox * mCompressCheckBox
Definition: cxPreferencesDialog.h:160
cx::PreferencesDialog::mActionGroup
QActionGroup * mActionGroup
Definition: cxPreferencesDialog.h:242
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::DebugTab::mTrackingService
TrackingServicePtr mTrackingService
Definition: cxPreferencesDialog.h:272
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
cx::AutomationTab::mMainLayout
QVBoxLayout * mMainLayout
Definition: cxPreferencesDialog.h:132
cx::PreferencesDialog
Set application preferences.
Definition: cxPreferencesDialog.h:222
cx::DebugTab::mManualToolPhysicalPropertiesCheckBox
QCheckBox * mManualToolPhysicalPropertiesCheckBox
Definition: cxPreferencesDialog.h:268
cx::VisualizationTab::mStereoTypeComboBox
QComboBox * mStereoTypeComboBox
Definition: cxPreferencesDialog.h:87
cx::VisualizationTab::mAnyplaneViewOffset
DoublePropertyPtr mAnyplaneViewOffset
Definition: cxPreferencesDialog.h:81
cx::VisualizationTab::mClinicalView
StringPropertyPtr mClinicalView
Definition: cxPreferencesDialog.h:84
cx::VisualizationTab::mSphereRadius
DoublePropertyPtr mSphereRadius
Definition: cxPreferencesDialog.h:73
cx::FilePreviewWidget
View a xml document.
Definition: cxFilePreviewWidget.h:37
cx::VisualizationTab::mPatientModelService
PatientModelServicePtr mPatientModelService
Definition: cxPreferencesDialog.h:71
cx::AutomationTab::mAutoSaveCheckBox
QCheckBox * mAutoSaveCheckBox
Definition: cxPreferencesDialog.h:127
cx::AutomationTab::mAutoStartTrackingCheckBox
QCheckBox * mAutoStartTrackingCheckBox
Definition: cxPreferencesDialog.h:124
cx::PreferencesDialog::mTabWidget
QStackedWidget * mTabWidget
Definition: cxPreferencesDialog.h:243
cxStringProperty.h
cx::VideoTab::mMainLayout
QVBoxLayout * mMainLayout
Definition: cxPreferencesDialog.h:156
cx::DebugTab
Debug settings.
Definition: cxPreferencesDialog.h:254
cx::VisualizationTab::mShowMetricNamesInCorner
BoolPropertyPtr mShowMetricNamesInCorner
Definition: cxPreferencesDialog.h:78
cxBoolProperty.h
cx::VisualizationTab::mShowDataText
BoolPropertyPtr mShowDataText
Definition: cxPreferencesDialog.h:75
cxGeneralTab.h
cx::VisualizationTab::mStereoTypeActionGroup
QActionGroup * mStereoTypeActionGroup
Definition: cxPreferencesDialog.h:89
cx::AutomationTab::mAutoSelectActiveToolCheckBox
QCheckBox * mAutoSelectActiveToolCheckBox
Definition: cxPreferencesDialog.h:123
cx::AutomationTab::mAutoReconstructCheckBox
QCheckBox * mAutoReconstructCheckBox
Definition: cxPreferencesDialog.h:126
cx::ToolConfigureGroupBox
Manage tool configurations.
Definition: cxToolConfigureWidget.h:50
cx::StateServicePtr
boost::shared_ptr< class StateService > StateServicePtr
Definition: cxLogicManager.h:27
cx::PreferencesDialog::mButtonBox
QDialogButtonBox * mButtonBox
Definition: cxPreferencesDialog.h:245