CustusX  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
DoublePropertyPtr mLabelSize
QCheckBox * mRenderSpeedLoggingCheckBox
QCheckBox * mManualToolPhysicalPropertiesCheckBox
QGridLayout * mMainLayout
boost::shared_ptr< class StateService > StateServicePtr
QCheckBox * mAutoShowNewDataCheckBox
TrackingServicePtr mTrackingService
boost::shared_ptr< class TrackingService > TrackingServicePtr
QRadioButton * m24bitRadioButton
BoolPropertyPtr mToolCrosshair
Widget for easily filtering tools based on clinical application and tracking system.Used in conjunction with ToolConfigureGroupBox, it is possible to drag tools from ToolFilterGroupBox and drop them into configurations in ToolConfigureGroupBox.
Automatic execution of actions when applicable.
QCheckBox * mAutoSaveCheckBox
QCheckBox * mAutoStartTrackingCheckBox
DoublePropertyPtr mAnnotationModelSize
boost::shared_ptr< class ViewService > ViewServicePtr
DoublePropertyPtr mFollowTooltipBoundary
QCheckBox * mAutoDeleteDICOMDBCheckBox
Various parameters related to ultrasound acquisition and reconstruction.
DoublePropertyPtr mSphereRadius
QCheckBox * mAutoLoadPatientCheckBox
BoolPropertyPtr mShowDataText
boost::shared_ptr< class StringProperty > StringPropertyPtr
Interface for selecting a tool configuration.
QLineEdit * mAcquisitionNameLineEdit
View a xml document.
QVBoxLayout * mMainLayout
QRadioButton * m8bitRadioButton
Widget for displaying a tools image.
DoublePropertyPtr mAutoLoadPatientWithinHours
StringPropertyPtr mClinicalView
PatientModelServicePtr mPatientModelService
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
QCheckBox * mAutoStartStreamingCheckBox
QActionGroup * mStereoTypeActionGroup
QDialogButtonBox * mButtonBox
boost::shared_ptr< class DoubleProperty > DoublePropertyPtr
Manage tool configurationsA widget for creating/modifying tool configurations. The user can select co...
QCheckBox * mCompressCheckBox
DoublePropertyPtr mEyeAngleAdapter
PatientModelServicePtr mPatientModelService
QCheckBox * mIGSTKDebugLoggingCheckBox
BoolPropertyPtr mShowLabels
StringPropertyPtr mAnnotationModel
QCheckBox * mAutoSelectActiveToolCheckBox
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Set application preferences.
QCheckBox * mAutoReconstructCheckBox
BoolPropertyPtr mFollowTooltip
QStackedWidget * mTabWidget
QVBoxLayout * mMainLayout
BoolPropertyPtr mShowMetricNamesInCorner
Debug settings.
DoublePropertyPtr mAnyplaneViewOffset
Namespace for all CustusX production code.