NorMIT-nav  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_
cx::PropertyNull::getValueAsVariant
virtual QVariant getValueAsVariant() const
Definition: cxPropertyNull.h:37
cx::PropertyNull::getAdvanced
virtual bool getAdvanced() const
Get the advanced flag of the adapter.
Definition: cxPropertyNull.h:41
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::PropertyNull
Definition: cxPropertyNull.h:26
cx::PropertyNull::getEnabled
virtual bool getEnabled() const
Get the enabled/disabled state of the Property.
Definition: cxPropertyNull.h:40
cx::PropertyNull::create
static PropertyPtr create()
Definition: cxPropertyNull.h:31
cx::PropertyPtr
boost::shared_ptr< class Property > PropertyPtr
Definition: cxLocalServerStreamerServer.h:25
cx::PropertyNull::setGroup
virtual bool setGroup(QString name)
Flag the adapter as part of a group.
Definition: cxPropertyNull.h:46
cx::PropertyNull::getUid
virtual QString getUid() const
Definition: cxPropertyNull.h:35
cx::PropertyNull::~PropertyNull
virtual ~PropertyNull()
Definition: cxPropertyNull.h:30
cx::PropertyNull::getDisplayName
virtual QString getDisplayName() const
name of data entity. Used for display to user.
Definition: cxPropertyNull.h:34
cxProperty.h
cx::PropertyNull::setAdvanced
virtual bool setAdvanced(bool advanced)
Set the advanced flag of the adapter.
Definition: cxPropertyNull.h:45
cx::Property
Superclass for all data adapters.
Definition: cxProperty.h:43
cx::PropertyNull::setValueFromVariant
virtual void setValueFromVariant(QVariant val)
Definition: cxPropertyNull.h:38
cx::PropertyNull::setEnabled
virtual bool setEnabled(bool enabled)
Set the enabled/disabled state of the Property.
Definition: cxPropertyNull.h:44
cx::PropertyNull::getGroup
virtual QString getGroup() const
Flag the adapter as part of a group.
Definition: cxPropertyNull.h:42