Fraxinus  17.12
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) 2008-2014, SINTEF Department of Medical Technology
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16 
17 3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 =========================================================================*/
32 
33 #ifndef CXPREFERANCESDIALOG_H_
34 #define CXPREFERANCESDIALOG_H_
35 
36 #include "cxGuiExport.h"
37 
38 #include "cxPreferenceTab.h"
39 #include "cxGeneralTab.h"
40 #include <QDialog>
41 #include "cxDoubleProperty.h"
42 #include "cxBoolProperty.h"
43 #include "cxStringProperty.h"
44 #include "cxForwardDeclarations.h"
45 
46 class QTabWidget;
47 class QToolBox;
48 class QToolBar;
49 class QStackedWidget;
50 class QDialogButtonBox;
51 class QLabel;
52 class QComboBox;
53 class QPushButton;
54 class QSpinBox;
55 class QCheckBox;
56 class QRadioButton;
57 class QGridLayout;
58 class QVBoxLayout;
59 class QLineEdit;
60 class QActionGroup;
61 
62 namespace cx
63 {
64 class Reporter;
65 class ViewManager;
66 class FilePreviewWidget;
67 class ToolImagePreviewWidget;
68 class ToolFilterGroupBox;
69 class ToolConfigureGroupBox;
70 
79 class cxGui_EXPORT VisualizationTab : public PreferenceTab
80 {
81  Q_OBJECT
82 public:
83  VisualizationTab(PatientModelServicePtr patientModelService, QWidget *parent = 0);
84  void init();
85 
86  public slots:
87  void saveParametersSlot();
88 
89 signals:
90 
91 protected:
93  QGridLayout *mMainLayout;
106 
107  //Stereo
110  QActionGroup* mStereoTypeActionGroup;
111  void initStereoTypeComboBox();
112 
113 private slots:
114  //Stereo
115  void stereoTypeChangedSlot(int index);
116  void stereoFrameSequentialSlot();
117  void stereoInterlacedSlot();
118  void stereoDresdenSlot();
119  void stereoRedBlueSlot();
120  void eyeAngleSlot();
121 };
122 
131 class cxGui_EXPORT AutomationTab : public PreferenceTab
132 {
133  Q_OBJECT
134 
135 public:
136  AutomationTab(QWidget *parent = 0);
137  void init();
138 
139 public slots:
140  void saveParametersSlot();
141 
142 
143 protected:
148  QCheckBox* mAutoSaveCheckBox;
153  QVBoxLayout *mMainLayout;
154 };
155 
164 class cxGui_EXPORT VideoTab : public PreferenceTab
165 {
166  Q_OBJECT
167 
168 public:
169  VideoTab(QWidget *parent = 0);
170  void init();
171 
172 public slots:
173  void saveParametersSlot();
174 
175 protected:
177  QVBoxLayout *mMainLayout;
178 
179  QRadioButton* m24bitRadioButton;
180  QRadioButton* m8bitRadioButton;
181  QCheckBox* mCompressCheckBox;
182 };
183 
210 class cxGui_EXPORT ToolConfigTab : public PreferenceTab
211 {
212  Q_OBJECT
213 
214 public:
215  ToolConfigTab(StateServicePtr stateService, TrackingServicePtr trackingService, QWidget* parent = 0);
216  virtual ~ToolConfigTab();
217 
218  virtual void init();
219 
220 public slots:
221  virtual void saveParametersSlot();
222 
223 private slots:
224  void applicationChangedSlot();
225  void globalConfigurationFileChangedSlot(QString key);
226 
227 private:
228  FilePreviewWidget* mFilePreviewWidget;
229  ToolImagePreviewWidget* mImagePreviewWidget;
230  ToolConfigureGroupBox* mToolConfigureGroupBox;
231  ToolFilterGroupBox* mToolFilterGroupBox;
232  StateServicePtr mStateService;
233 };
234 
243 class cxGui_EXPORT PreferencesDialog : public QDialog
244 {
245  Q_OBJECT
246 
247 public:
248  PreferencesDialog(ViewServicePtr viewService, PatientModelServicePtr patientModelService, StateServicePtr stateService, TrackingServicePtr trackingService, QWidget *parent = 0);
249  virtual ~PreferencesDialog();
250 
251 signals:
252  void applied();
253 
254 private slots:
255  void selectTabSlot();
256  void applySlot();
257 
258 protected:
259  void addTab(PreferenceTab* widget, QString name);
260 
261  QActionGroup* mActionGroup;
262  QStackedWidget* mTabWidget;
263  QToolBar* mToolBar;
264  QDialogButtonBox *mButtonBox;
265 };
266 
273 class cxGui_EXPORT DebugTab : public PreferenceTab
274 {
275  Q_OBJECT
276 
277 public:
278  DebugTab(PatientModelServicePtr patientModelService, TrackingServicePtr trackingService, QWidget *parent = 0);
279  void init();
280 
281 public slots:
282  void saveParametersSlot();
283  void runDebugToolSlot();
284 
285 protected:
289  QGridLayout *mMainLayout;
292 };
293 
294 
295 
299 }//namespace cx
300 
301 #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.