NorMIT-nav  22.09
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_ */
cx::LabeledComboBoxWidget
Composite widget for string selection.
Definition: cxLabeledComboBoxWidget.h:36
cx::ToolPropertiesWidget
Definition: cxToolPropertiesWidget.h:56
cx::Transform3DWidget
Widget for displaying and manipulating an affine matrix, i.e. a rotation+translation matrix.
Definition: cxTransform3DWidget.h:38
cxBaseWidget.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::BaseWidget
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
cxForwardDeclarations.h
cxSpaceProperty.h
cxTransform3DWidget.h
cx::TrackingServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Definition: cxToolFilterWidget.h:27
cx::ActiveToolPropertiesWidget
Definition: cxToolPropertiesWidget.h:40
cx::DoublePropertyToolOffsetPtr
boost::shared_ptr< class DoublePropertyToolOffset > DoublePropertyToolOffsetPtr
Definition: cxToolPropertiesWidget.h:36
cxPointMetric.h
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cx::SpacePropertyPtr
boost::shared_ptr< class SpaceProperty > SpacePropertyPtr
Definition: cxSpaceProperty.h:25
cxDoubleWidgets.h
cx::StringPropertyBasePtr
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
Definition: cxIGTLinkStreamerService.h:20
cxStringProperty.h
cxTrackingService.h
cx::SpaceProviderPtr
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Definition: cxLogicManager.h:23
cx::TrackingService::ToolMap
std::map< QString, ToolPtr > ToolMap
Definition: cxTrackingService.h:54