CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxPropertyNull.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 CXPROPERTYNULL_H_
13 #define CXPROPERTYNULL_H_
14 
15 #include "cxResourceExport.h"
16 #include "cxProperty.h"
17 
18 namespace cx {
19 
26 class cxResource_EXPORT PropertyNull: public Property
27 {
28  Q_OBJECT
29 public:
30  virtual ~PropertyNull(){}
31  static PropertyPtr create() { return PropertyPtr(new PropertyNull()); }
32 
33 public:
34  virtual QString getDisplayName() const { return ""; }
35  virtual QString getUid() const { return ""; }
36 
37  virtual QVariant getValueAsVariant() const { return QVariant(); }
38  virtual void setValueFromVariant(QVariant val) {}
39 
40  virtual bool getEnabled() const { return false; }
41  virtual bool getAdvanced() const { return false; }
42  virtual QString getGroup() const { return ""; }
43 
44  virtual bool setEnabled(bool enabled) { return false;}
45  virtual bool setAdvanced(bool advanced) { return false;}
46  virtual bool setGroup(QString name) { return false;}
47 };
48 
49 } //namespace cx
50 
51 
52 #endif // CXPROPERTYNULL_H_
virtual ~PropertyNull()
virtual bool setAdvanced(bool advanced)
Set the advanced flag of the adapter.
virtual QString getUid() const
virtual bool getEnabled() const
Get the enabled/disabled state of the Property.
Superclass for all data adapters.
Definition: cxProperty.h:43
virtual bool setGroup(QString name)
Flag the adapter as part of a group.
boost::shared_ptr< class Property > PropertyPtr
virtual QString getGroup() const
Flag the adapter as part of a group.
virtual QVariant getValueAsVariant() const
virtual void setValueFromVariant(QVariant val)
static PropertyPtr create()
virtual QString getDisplayName() const
name of data entity. Used for display to user.
virtual bool setEnabled(bool enabled)
Set the enabled/disabled state of the Property.
virtual bool getAdvanced() const
Get the advanced flag of the adapter.
Namespace for all CustusX production code.