CustusX  15.3.3-beta
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "cxLegacySingletons.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 
77 class cxGui_EXPORT VisualizationTab : public PreferenceTab
78 {
79  Q_OBJECT
80 public:
81  VisualizationTab(PatientModelServicePtr patientModelService, QWidget *parent = 0);
82  void init();
83 
84  public slots:
85  void saveParametersSlot();
86 
87 signals:
88 
89 protected:
91  QGridLayout *mMainLayout;
103 
104  //Stereo
107  QActionGroup* mStereoTypeActionGroup;
108  void initStereoTypeComboBox();
109 
110 private slots:
111  void setBackgroundColorSlot(QColor color);
112  //Stereo
113  void stereoTypeChangedSlot(int index);
114  void stereoFrameSequentialSlot();
115  void stereoInterlacedSlot();
116  void stereoDresdenSlot();
117  void stereoRedBlueSlot();
118  void eyeAngleSlot();
119 
120 // void setBackgroundColorSlot();
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;
152  QVBoxLayout *mMainLayout;
153 };
154 
163 class cxGui_EXPORT VideoTab : public PreferenceTab
164 {
165  Q_OBJECT
166 
167 public:
168  VideoTab(QWidget *parent = 0);
169  void init();
170 
171 public slots:
172  void saveParametersSlot();
173 
174 protected:
176  QVBoxLayout *mMainLayout;
177 
178  QRadioButton* m24bitRadioButton;
179  QRadioButton* m8bitRadioButton;
180  QCheckBox* mCompressCheckBox;
181 };
182 
209 class cxGui_EXPORT ToolConfigTab : public PreferenceTab
210 {
211  Q_OBJECT
212 
213 public:
214  ToolConfigTab(QWidget* parent = 0);
215  virtual ~ToolConfigTab();
216 
217  virtual void init();
218 
219 public slots:
220  virtual void saveParametersSlot();
221 
222 private slots:
223  void applicationChangedSlot();
224  void globalConfigurationFileChangedSlot(QString key);
225 
226 private:
227  FilePreviewWidget* mFilePreviewWidget;
228  ToolImagePreviewWidget* mImagePreviewWidget;
229  ToolConfigureGroupBox* mToolConfigureGroupBox;
230  ToolFilterGroupBox* mToolFilterGroupBox;
231 };
232 
241 class cxGui_EXPORT PreferencesDialog : public QDialog
242 {
243  Q_OBJECT
244 
245 public:
246  PreferencesDialog(VisualizationServicePtr visualizationService, PatientModelServicePtr patientModelService, QWidget *parent = 0);
247  virtual ~PreferencesDialog();
248 
249 signals:
250  void applied();
251 
252 private slots:
253  void selectTabSlot();
254  void applySlot();
255 
256 protected:
257  void addTab(PreferenceTab* widget, QString name);
258 
259  QActionGroup* mActionGroup;
260  QStackedWidget* mTabWidget;
261  QToolBar* mToolBar;
262  QDialogButtonBox *mButtonBox;
263 };
264 
271 class cxGui_EXPORT DebugTab : public PreferenceTab
272 {
273  Q_OBJECT
274 
275 public:
276  DebugTab(QWidget *parent = 0);
277  void init();
278 
279 public slots:
280  void saveParametersSlot();
281  void runDebugToolSlot();
282 
283 protected:
287  QGridLayout *mMainLayout;
288 };
289 
290 
291 
295 }//namespace cx
296 
297 #endif
DoublePropertyPtr mLabelSize
QCheckBox * mRenderSpeedLoggingCheckBox
QCheckBox * mManualToolPhysicalPropertiesCheckBox
QGridLayout * mMainLayout
QCheckBox * mAutoShowNewDataCheckBox
QRadioButton * m24bitRadioButton
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
DoublePropertyPtr mFollowTooltipBoundary
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
boost::shared_ptr< class VisualizationService > VisualizationServicePtr
Definition: cxRegServices.h:43
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
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