CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxToolConfigureWidget.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 CXTOOLCONFIGUREWIDGET_H_
13 #define CXTOOLCONFIGUREWIDGET_H_
14 
15 #include "cxGuiExport.h"
16 
17 #include <QGroupBox>
18 
19 #include "cxDefinitions.h"
20 #include "cxTrackerConfiguration.h"
21 #include "cxStringProperty.h"
22 #include "cxBoolProperty.h"
23 #include "cxForwardDeclarations.h"
24 
25 
26 class QComboBox;
27 class QLineEdit;
28 
29 namespace cx
30 {
31 
32 class SelectionGroupBox;
33 class ConfigToolListWidget;
34 
50 class cxGui_EXPORT ToolConfigureGroupBox : public QGroupBox
51 {
52  Q_OBJECT
53 
54 public:
55  ToolConfigureGroupBox(TrackingServicePtr trackingService, StateServicePtr stateService, QWidget* parent = NULL);
56  virtual ~ToolConfigureGroupBox();
57 
58  void setCurrentlySelectedCofiguration(QString configAbsoluteFilePath);
59  QString getCurrenctlySelectedConfiguration() const;
60  StringPropertyBasePtr getTrackingSystemSelector();
61 
62 signals:
63  void toolSelected(QString absoluteFilePath);
64 
65 public slots:
66  QString requestSaveConfigurationSlot();
67  TrackerConfiguration::Configuration getConfiguration();
68 
69 private slots:
70  void configChangedSlot();
71  void configEditedSlot();
72  void toolsChangedSlot();
73  void filterToolsSlot();
74  void onApplicationStateChanged();
75  void trackingSystemImplementationChangedSlot();
76  void applyRefToToolsChangedSlot();
77 
78 private:
79  void createGUISelectors();
80  QStringList getTrackingSystemImplementationList();
81  void populateConfigurations();
82  int addConfigurationToComboBox(QString displayName, QString absoluteFilePath);
83  void populateReference();
84  int addRefrenceToComboBox(QString absoluteRefereneFilePath);
85  QString getCurrentConfigFilePath();
86 
87  QComboBox* mConfigFilesComboBox;
88  QLineEdit* mConfigFileLineEdit;
89  QComboBox* mReferenceComboBox;
90  ConfigToolListWidget* mToolListWidget;
91  bool mModified; // if set: content is modified: save on exit
92  StringPropertyPtr mTrackingSystemSelector;
93  StringPropertyPtr mTrackingSystemImplementationSelector;
94  BoolPropertyPtr mApplyRefToTools;
95  TrackingServicePtr mTrackingService;
96  StateServicePtr mStateService;
97 };
98 
99 }
100 
101 #endif /* CXTOOLCONFIGUREWIDGET_H_ */
boost::shared_ptr< class StateService > StateServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Helper class for tool config list display.
boost::shared_ptr< class StringProperty > StringPropertyPtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Manage tool configurationsA widget for creating/modifying tool configurations. The user can select co...
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Namespace for all CustusX production code.