Fraxinus  18.10
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:
40  static StringPropertySelectToolPtr New(TrackingServicePtr trackingService)
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 
64  void provideActiveTool(bool on);
65  void setActiveTool();
66 private:
67  TrackingServicePtr mTrackingService;
68  QString mValueName;
69  QString mHelp;
70  ToolPtr mTool;
71  bool mProvideActiveTool;
72  bool mActiveToolSelected;
73  const QString mActiveToolName;
74 };
75 
76 } // namespace cx
77 
82 #endif // CXSTRINGPROPERTYSELECTTOOL_H
boost::shared_ptr< class StringPropertySelectTool > StringPropertySelectToolPtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Adapter that selects and stores a tool. The tool is stored internally in the adapter. Use setValue/getValue plus changed() to access it.
Abstract interface for interaction with internal string-valued data.
static StringPropertySelectToolPtr New(TrackingServicePtr trackingService)
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr