CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxToolPropertiesWidget.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 CXTOOLPROPERTIESWIDGET_H_
13 #define CXTOOLPROPERTIESWIDGET_H_
14 
15 #include "cxGuiExport.h"
16 
17 #include "cxBaseWidget.h"
18 
19 #include <vector>
20 #include <QTextEdit>
21 #include "cxForwardDeclarations.h"
22 #include "cxDoubleWidgets.h"
23 #include "cxSpaceProperty.h"
24 #include "cxStringProperty.h"
25 #include "cxTransform3DWidget.h"
26 #include "cxPointMetric.h"
27 #include "cxTrackingService.h"
28 
29 class QCheckBox;
30 class QGroupBox;
31 
32 class UsConfigGui;
33 
34 namespace cx
35 {
36 typedef boost::shared_ptr<class DoublePropertyToolOffset> DoublePropertyToolOffsetPtr;
38 
39 
40 class cxGui_EXPORT ActiveToolPropertiesWidget : public BaseWidget
41 {
42  Q_OBJECT
43 
44 public:
45  ActiveToolPropertiesWidget(TrackingServicePtr trackingService, SpaceProviderPtr spaceProvider, QWidget* parent);
46  virtual ~ActiveToolPropertiesWidget();
47 };
48 
56 class cxGui_EXPORT ToolPropertiesWidget : public BaseWidget
57 {
58  Q_OBJECT
59 
60 public:
61  ToolPropertiesWidget(StringPropertyBasePtr tool, TrackingServicePtr trackingService, SpaceProviderPtr spaceProvider, QWidget* parent);
62  virtual ~ToolPropertiesWidget();
63 
64 signals:
65 
66 protected slots:
67  void activeToolChangedSlot();
68  void manualToolWidgetChanged();
69  void spacesChangedSlot();
70 
71 protected:
72  void setupUI();
73  virtual void prePaintEvent();
74 
75 private:
77  void toolPositionChanged();
78  void updateFrontend();
79  void reconnectTools();
80  StringPropertyBasePtr mSelector;
81  TrackingServicePtr mTrackingService;
82  SpaceProviderPtr mSpaceProvider;
83  ToolPtr mTool;
85 
86  QVBoxLayout* mToptopLayout;
87  QGroupBox* mManualGroup;
88  Transform3DWidget* mManualToolWidget;
89  SpacePropertyPtr mSpaceSelector;
90  DoublePropertyToolOffsetPtr mToolOffset;
91 
92  QLabel* mActiveToolVisibleLabel;
93  QLabel* mToolNameLabel;
94  QLabel* mReferenceStatusLabel;
95  QLabel* mTrackingSystemStatusLabel;
96 
97  LabeledComboBoxWidget* mUSSectorConfigBox;
98 
99  QTextEdit* mMetadataLabel;
100  void updateBrowser();
101  QString createDescriptionForTool(ToolPtr current);
102 };
103 
104 }//end namespace cx
105 
106 
107 #endif /* CXTOOLPROPERTIESWIDGET_H_ */
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Widget for displaying and manipulating an affine matrix, i.e. a rotation+translation matrix...
boost::shared_ptr< class TrackingService > TrackingServicePtr
boost::shared_ptr< class DoublePropertyToolOffset > DoublePropertyToolOffsetPtr
boost::shared_ptr< class SpaceProperty > SpacePropertyPtr
Composite widget for string selection.
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
std::map< QString, ToolPtr > ToolMap
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr