Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxActiveToolProxy.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 CXACTIVETOOLPROXY_H_
13 #define CXACTIVETOOLPROXY_H_
14 
15 #include "cxResourceExport.h"
16 #include "cxTool.h"
17 
18 namespace cx
19 {
20 
27 typedef boost::shared_ptr<class ActiveToolProxy> ActiveToolProxyPtr;
28 class ToolManager;
29 
40 class cxResource_EXPORT ActiveToolProxy: public QObject
41 {
42 Q_OBJECT
43 
44 public:
45  static ActiveToolProxyPtr New(TrackingServicePtr trackingService)
46  {
47  return ActiveToolProxyPtr(new ActiveToolProxy(trackingService));
48  }
49 
50  ToolPtr getTool() { return mTool; }
51 
52 signals:
53  // the original tool change signal
54  void activeToolChanged(const QString&);
55 
56  // forwarding of active tool signals
57  void toolTransformAndTimestamp(Transform3D matrix, double timestamp);
58  void toolVisible(bool visible);
59  void tooltipOffset(double offset);
60  void toolProbeSector();
61  void tps(int);
62 
63 
64 private slots:
65  void activeToolChangedSlot(const QString&);
66  void trackingStateChanged();
67 private:
68  ActiveToolProxy(TrackingServicePtr trackingService);
69  ToolPtr mTool;
70  TrackingServicePtr mTrackingService;
71 };
72 
76 }
77 
78 #endif /* CXACTIVETOOLPROXY_H_ */
Helper class for connecting to the active tool.By listening to this class, you will always listen to ...
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class TrackingService > TrackingServicePtr
static ActiveToolProxyPtr New(TrackingServicePtr trackingService)
boost::shared_ptr< class ActiveToolProxy > ActiveToolProxyPtr
Definition: cxStatusBar.h:32
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr