NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxStringPropertySelectTool.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 #ifndef CXSTRINGPROPERTYSELECTTOOL_H
12 #define CXSTRINGPROPERTYSELECTTOOL_H
13 
14 #include "cxResourceExport.h"
15 
16 #include "cxStringPropertyBase.h"
17 #include "cxForwardDeclarations.h"
18 
25 namespace cx
26 {
27 
28 typedef boost::shared_ptr<class StringPropertySelectTool> StringPropertySelectToolPtr;
29 
36 class cxResource_EXPORT StringPropertySelectTool : public StringPropertyBase
37 {
38  Q_OBJECT
39 public:
41  {
42  return StringPropertySelectToolPtr(new StringPropertySelectTool(trackingService));
43  }
46 
47  void setHelp(QString help);
48  void setValueName(QString name);
49 
50 public: // basic methods
51  virtual QString getDisplayName() const;
52  virtual bool setValue(const QString& value);
53  virtual QString getValue() const;
54 
55  virtual QStringList getValueRange() const;
56  virtual QString convertInternal2Display(QString internal);
57 
58 public: // optional methods
59  virtual QString getHelp() const;
60 
61 public: // interface extension
62  ToolPtr getTool() const;
63  bool isActiveToolSelected() const;
64 
65  void provideActiveTool(bool on);
66  void setActiveTool();
67 private:
68  TrackingServicePtr mTrackingService;
69  QString mValueName;
70  QString mHelp;
71  ToolPtr mTool;
72  bool mProvideActiveTool;
73  bool mActiveToolSelected;
74  const QString mActiveToolName;
75 };
76 
77 } // namespace cx
78 
83 #endif // CXSTRINGPROPERTYSELECTTOOL_H
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::StringPropertySelectTool
Adapter that selects and stores a tool. The tool is stored internally in the adapter....
Definition: cxStringPropertySelectTool.h:36
cx::StringPropertySelectTool::~StringPropertySelectTool
virtual ~StringPropertySelectTool()
Definition: cxStringPropertySelectTool.h:45
cx::TrackingServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Definition: cxToolFilterWidget.h:27
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cxStringPropertyBase.h
cx::StringPropertySelectTool::New
static StringPropertySelectToolPtr New(TrackingServicePtr trackingService)
Definition: cxStringPropertySelectTool.h:40
cx::StringPropertyBase
Abstract interface for interaction with internal string-valued data.
Definition: cxStringPropertyBase.h:65
cx::StringPropertySelectToolPtr
boost::shared_ptr< class StringPropertySelectTool > StringPropertySelectToolPtr
Definition: cxClipperWidget.h:27