CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxColorProperty.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 CXCOLORPROPERTY_H_
13 #define CXCOLORPROPERTY_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include "cxColorPropertyBase.h"
18 #include "cxXmlOptionItem.h"
19 
20 
21 namespace cx
22 {
23 typedef boost::shared_ptr<class ColorProperty> ColorPropertyPtr;
24 
32 class cxResource_EXPORT ColorProperty: public ColorPropertyBase
33 {
34 Q_OBJECT
35 public:
36  virtual ~ColorProperty()
37  {
38  }
39 
43  static ColorPropertyPtr initialize(const QString& uid, QString name, QString help, QColor value, QDomNode root =
44  QDomNode());
45 
46 public:
47  // basic methods
48  virtual QString getDisplayName() const;
49  virtual QString getUid() const;
50  virtual bool setValue(QColor value);
51  virtual QColor getValue() const;
52 
53 public:
54  // optional methods
55  virtual QString getHelp() const;
56 
57 signals:
58  void valueWasSet();
59 
60 private:
61  QString mName;
62  QString mUid;
63  QString mHelp;
64  QColor mValue;
65  XmlOptionItem mStore;
66 
67 };
68 
69 } // namespace cx
70 
71 
72 #endif // CXCOLORPROPERTY_H_
boost::shared_ptr< class ColorProperty > ColorPropertyPtr
virtual ~ColorProperty()
Helper class for storing one string value in an xml document.
Namespace for all CustusX production code.