Fraxinus  22.04-rc5
An IGT application
cxToolMetric.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 CXTOOLMETRIC_H_
13 #define CXTOOLMETRIC_H_
14 
15 #include "cxResourceExport.h"
16 #include "cxPrecompiledHeader.h"
17 
18 #include "cxFrameMetricBase.h"
19 #include "cxPointMetric.h"
20 
21 namespace cx
22 {
23 
24 typedef boost::shared_ptr<class ToolMetric> ToolMetricPtr;
25 
26 
37 class cxResource_EXPORT ToolMetric: public cx::FrameMetricBase
38 {
39 Q_OBJECT
40 public:
41  virtual ~ToolMetric();
42  static ToolMetricPtr create(QString uid, QString name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
43 
44  double getToolOffset() const;
45  void setToolOffset(double val);
46  QString getToolName() const;
47  void setToolName(const QString& val);
48  virtual QString getType() const
49  {
50  return getTypeName();
51  }
52  static QString getTypeName()
53  {
54  return "ToolMetric";
55  }
56  virtual QIcon getIcon() {return QIcon(":/icons/metric_tool.png");}
57  virtual void addXml(QDomNode& dataNode);
58  virtual void parseXml(QDomNode& dataNode);
59 
60 private:
61  ToolMetric(const QString& uid, const QString& name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider);
62  double mToolOffset;
63  QString mToolName;
64 };
65 
66 } //namespace cx
67 
68 #endif /* CXTOOLMETRIC_H_ */
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
virtual QString getType() const
Definition: cxToolMetric.h:48
boost::shared_ptr< class ToolMetric > ToolMetricPtr
Definition: cxToolMetric.h:24
Abstract base class for frame metric.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
virtual QIcon getIcon()
Definition: cxToolMetric.h:56
static QString getTypeName()
Definition: cxToolMetric.h:52
Namespace for all CustusX production code.