CustusX  20.03-rc1
An IGT application
cxMetricReferenceArgumentList.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 CXMETRICREFERENCEARGUMENTLIST_H
13 #define CXMETRICREFERENCEARGUMENTLIST_H
14 
15 #include "cxResourceExport.h"
16 #include "cxPrecompiledHeader.h"
17 
18 #include "cxForwardDeclarations.h"
19 #include <vector>
20 #include <map>
21 #include "cxVector3D.h"
22 #include "cxTransform3D.h"
23 class QDomNode;
24 
25 namespace cx
26 {
27 
28 typedef boost::shared_ptr<class MetricReferenceArgumentList> MetricReferenceArgumentListPtr;
36 class cxResource_EXPORT MetricReferenceArgumentList : public QObject
37 {
38  Q_OBJECT
39 public:
40  explicit MetricReferenceArgumentList(QStringList descriptions);
41  void setValidArgumentTypes(QStringList types);
42 
43  unsigned getCount() const;
44  void set(int index, DataPtr p);
45  DataPtr get(int index);
46  bool validArgument(DataPtr p) const;
47  std::vector<Vector3D> getRefCoords() const;
48  QString getDescription(int index) const;
49  std::vector<Transform3D> getRefFrames() const;
50  virtual void addXml(QDomNode& dataNode);
51  virtual void parseXml(QDomNode& dataNode, const std::map<QString, DataPtr>& data);
52  QString getAsSingleLineString() const;
53 signals:
54  void argumentsChanged();
55 private:
56  std::vector<DataPtr> mArgument;
57  QStringList mDescriptions;
58  QStringList mValidTypes;
59 };
60 
61 
62 } // namespace cx
63 
64 #endif // CXMETRICREFERENCEARGUMENTLIST_H
Collection of Metric arguments that refer to another metric.
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class MetricReferenceArgumentList > MetricReferenceArgumentListPtr
Namespace for all CustusX production code.