CustusX  18.04
An IGT application
cxToolProperty.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 CXTOOLPROPERTY_H_
13 #define CXTOOLPROPERTY_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include "cxStringPropertyBase.h"
18 #include "cxTool.h"
19 
20 namespace cx
21 {
22 typedef boost::shared_ptr<class TrackingService> TrackingServicePtr;
23 
32 class cxResource_EXPORT StringPropertyActiveTool : public StringPropertyBase
33 {
34  Q_OBJECT
35 public:
36  static StringPropertyBasePtr New(TrackingServicePtr trackingService) { return StringPropertyBasePtr(new StringPropertyActiveTool(trackingService)); }
37  explicit StringPropertyActiveTool(TrackingServicePtr trackingService);
39 
40 public: // basic methods
41  virtual QString getDisplayName() const;
42  virtual bool setValue(const QString& value);
43  virtual QString getValue() const;
44 
45 public: // optional methods
46  virtual QString getHelp() const;
47  virtual QStringList getValueRange() const;
48  virtual QString convertInternal2Display(QString internal);
49 
50 private:
51  TrackingServicePtr mTrackingService;
52 };
53 
54 
55 typedef boost::shared_ptr<class StringPropertyActiveProbeConfiguration> StringPropertyActiveProbeConfigurationPtr;
56 
62 {
63  Q_OBJECT
64 public:
65  static StringPropertyActiveProbeConfigurationPtr New(TrackingServicePtr trackingService) { return StringPropertyActiveProbeConfigurationPtr(new StringPropertyActiveProbeConfiguration(trackingService)); }
66  explicit StringPropertyActiveProbeConfiguration(TrackingServicePtr trackingService);
68 
69 public: // basic methods
70  virtual QString getDisplayName() const;
71  virtual bool setValue(const QString& value);
72  virtual QString getValue() const;
73 
74 public: // optional methods
75  virtual QString getHelp() const;
76  virtual QStringList getValueRange() const;
77  virtual QString convertInternal2Display(QString internal);
78 
79  // extensions
80  ToolPtr getTool() { return mTool; }
81 
82 private slots:
83  void activeToolChanged();
84 private:
85  ToolPtr mTool;
86  TrackingServicePtr mTrackingService;
87 };
88 
89 
93 }
94 
95 #endif /* CXTOOLPROPERTY_H_ */
boost::shared_ptr< class TrackingService > TrackingServicePtr
static StringPropertyActiveProbeConfigurationPtr New(TrackingServicePtr trackingService)
Abstract interface for interaction with internal string-valued data.
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
boost::shared_ptr< class StringPropertyActiveProbeConfiguration > StringPropertyActiveProbeConfigurationPtr
static StringPropertyBasePtr New(TrackingServicePtr trackingService)
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr