NorMIT-nav  16.5
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;
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(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 };
233 
242 class cxGui_EXPORT PreferencesDialog : public QDialog
243 {
244  Q_OBJECT
245 
246 public:
247  PreferencesDialog(ViewServicePtr viewService, PatientModelServicePtr patientModelService, QWidget *parent = 0);
248  virtual ~PreferencesDialog();
249 
250 signals:
251  void applied();
252 
253 private slots:
254  void selectTabSlot();
255  void applySlot();
256 
257 protected:
258  void addTab(PreferenceTab* widget, QString name);
259 
260  QActionGroup* mActionGroup;
261  QStackedWidget* mTabWidget;
262  QToolBar* mToolBar;
263  QDialogButtonBox *mButtonBox;
264 };
265 
272 class cxGui_EXPORT DebugTab : public PreferenceTab
273 {
274  Q_OBJECT
275 
276 public:
277  DebugTab(QWidget *parent = 0);
278  void init();
279 
280 public slots:
281  void saveParametersSlot();
282  void runDebugToolSlot();
283 
284 protected:
288  QGridLayout *mMainLayout;
289 };
290 
291 
292 
296 }//namespace cx
297 
298 #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
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
cxLogicManager_EXPORT ViewServicePtr viewService()
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