NorMIT-nav  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_ */
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::BoolPropertyPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
Definition: cxPlusConnectWidget.h:29
cxDefinitions.h
cx::StringPropertyPtr
boost::shared_ptr< class StringProperty > StringPropertyPtr
Definition: cxVideoConnectionWidget.h:42
cx::TrackingServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Definition: cxToolFilterWidget.h:27
cx::ConfigToolListWidget
Helper class for tool config list display.
Definition: cxToolListWidget.h:103
cx::StringPropertyBasePtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Definition: cxIGTLinkStreamerService.h:20
cxTrackerConfiguration.h
cxStringProperty.h
cx::TrackerConfiguration::Configuration
Definition: cxTrackerConfiguration.h:36
cxBoolProperty.h
cx::ToolConfigureGroupBox
Manage tool configurations.
Definition: cxToolConfigureWidget.h:50
cx::StateServicePtr
boost::shared_ptr< class StateService > StateServicePtr
Definition: cxLogicManager.h:27