 |
Computer Assited Medical Intervention Tool Kit
version 4.1
|
Go to the documentation of this file.
30 #include <QStringList>
302 Property(QString name,
const QVariant& variant, QString
description, QString unit);
305 virtual ~Property() =
default;
308 const QString& getName()
const;
311 const QVariant& getInitialValue()
const;
314 void setReadOnly(
bool);
317 bool getReadOnly()
const;
320 void setDescription(QString);
323 const QString& getDescription()
const;
339 void setAttribute(
const QString& attribute,
const QVariant& value);
352 QVariant getAttribute(QString attName);
355 QStringList getAttributeList();
360 void setEnumTypeName(QString);
371 void setEnumTypeName(QString enumTypeName, QObject* objectDeclaringTheEnum);
374 QString getEnumTypeName()
const;
383 QString getEnumValueAsString(
const QObject* objectDeclaringTheEnum)
const;
386 QMap<int, QIcon> getEnumIcons()
const;
389 void setEnumIcons(
const QMap<int, QIcon>& enumIcons);
395 void setGroupName(QString groupName);
400 QString getGroupName()
const;
414 QVariant initialValue;
423 QMap<QString, QVariant> attributeValues;
426 QString enumTypeName;
429 QMap<int, QIcon> enumIcons;
Property(QString name, const QVariant &variant, QString description, QString unit)
Constructor.
Definition: Property.cpp:56
void setDescription(QString)
set the description (can be rich text)
Definition: Property.cpp:93
QMap< int, QIcon > getEnumIcons() const
get the enum icons
Definition: Property.cpp:149
QString getGroupName() const
get this property subgroup's name
Definition: Property.cpp:159
void setEnumTypeName(QString)
if the property's type is an enum, set the name of the registered Qt Enum.
Definition: Property.cpp:109
QString enumTypeName
if the property's type is an enum, this is the Qt registered enum name, otherwise it is the null stri...
Definition: Property.h:472
QMap< int, QIcon > enumIcons
map containing all the icons for the enum
Definition: Property.h:475
const QString & getName() const
get the name of the property
Definition: Property.cpp:73
QMap< QString, QVariant > attributeValues
map containing all the attributes and their values
Definition: Property.h:469
void setAttribute(const QString &attribute, const QVariant &value)
Set a given property for this attribute.
Definition: Property.cpp:184
bool getReadOnly() const
Definition: Property.cpp:88
const char * description
Definition: applications/cepgenerator/main.cpp:37
QString name
name of the property
Definition: Property.h:450
QStringList getAttributeList()
returns the list of attribute names that are specific to this property
Definition: Property.cpp:179
QString description
description of the property, can be rich text
Definition: Property.h:463
QString getEnumTypeName() const
Definition: Property.cpp:104
const QVariant & getInitialValue() const
return the initial (default) value
Definition: Property.cpp:78
QVariant initialValue
initial value of the property, Only needed between the time when the property is instantiated and the...
Definition: Property.h:460
void setEnumIcons(const QMap< int, QIcon > &enumIcons)
set the icons for all the enums
Definition: Property.cpp:154
QVariant getAttribute(QString attName)
get the current value of a given attribute, see setAttribute() if the attribute attName was never set...
Definition: Property.cpp:169
void setReadOnly(bool)
set this property as read-only
Definition: Property.cpp:83
void setGroupName(QString groupName)
Set the group name.
Definition: Property.cpp:164
const QString & getDescription() const
get the description
Definition: Property.cpp:98
QString groupName
name of the group in which this property is classified (null if no group name were set)
Definition: Property.h:453
QString getEnumValueAsString(const QObject *objectDeclaringTheEnum) const
Utility method to get the current property value as a string.
Definition: Property.cpp:135
bool readOnly
is the property read only
Definition: Property.h:466
#define CAMITK_API
Definition: CamiTKAPI.h:49
Definition: Action.cpp:36