Fraxinus  18.10
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 "cxForwardDeclarations.h"
23 
24 
25 class QComboBox;
26 class QLineEdit;
27 
28 namespace cx
29 {
30 
31 class SelectionGroupBox;
32 class ConfigToolListWidget;
33 
49 class cxGui_EXPORT ToolConfigureGroupBox : public QGroupBox
50 {
51  Q_OBJECT
52 
53 public:
54  ToolConfigureGroupBox(TrackingServicePtr trackingService, StateServicePtr stateService, QWidget* parent = NULL);
55  virtual ~ToolConfigureGroupBox();
56 
57  void setCurrentlySelectedCofiguration(QString configAbsoluteFilePath);
58  QString getCurrenctlySelectedConfiguration() const;
59  StringPropertyBasePtr getTrackingSystemSelector();
60 
61 signals:
62  void toolSelected(QString absoluteFilePath);
63 
64 public slots:
65  QString requestSaveConfigurationSlot();
66 
67 private slots:
68  void configChangedSlot();
69  void configEditedSlot();
70  void toolsChangedSlot();
71  void filterToolsSlot();
72  void onApplicationStateChanged();
73 
74 private:
75  void createTrackingSystemSelector();
76  void populateConfigurations();
77  int addConfigurationToComboBox(QString displayName, QString absoluteFilePath);
78  TrackerConfiguration::Configuration getCurrentConfiguration();
79  void populateReference();
80  int addRefrenceToComboBox(QString absoluteRefereneFilePath);
81  QString getCurrentConfigFilePath();
82 
83  QComboBox* mConfigFilesComboBox;
84  QLineEdit* mConfigFileLineEdit;
85  QComboBox* mReferenceComboBox;
86  ConfigToolListWidget* mToolListWidget;
87  bool mModified; // if set: content is modified: save on exit
88  StringPropertyPtr mTrackingSystemSelector;
89  TrackingServicePtr mTrackingService;
90  StateServicePtr mStateService;
91 
92  //TODO Implement in GUI
93  QString mTrackingSystemImplementation;
94 
95 };
96 
97 }
98 
99 #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...
Namespace for all CustusX production code.