![]() |
Computer Assited Medical Intervention Tool Kit
|
A little class with lots of properties. More...
#include <TestClass.h>
Public Types | |
enum | StateLevel { I_AM_OK, GOOD_FORM, FEELING_GREAT, HAPPY, VERY_HAPPY } |
Public Member Functions | |
virtual bool | event (QEvent *e) |
intercept signal for dynamic property change. | |
bool | getBool () const |
QColor | getColor () const |
QFont | getFont () const |
QVariantMap | getGroup () const |
StateLevel | getLevel () const |
QString | getName () const |
bool | getOnWindows () const |
QVector3D | getPosition () const |
double | getRadius () const |
int | getSomeNumber () const |
QTime | getTime () const |
void | setBool (bool newBool) |
void | setColor (const QColor &color) |
void | setFont (const QFont &font) |
void | setGroup (const QVariantMap &) |
void | setLevel (StateLevel) |
void | setName (const QString &name) |
void | setPosition (QVector3D newV3D) |
void | setRadius (double radius) |
void | setTime (const QTime &time) |
TestClass () | |
virtual | ~TestClass () |
Properties | |
QColor | color |
declaration of a static QColor property (see also backgroundColor property) | |
QFont | font |
declaration of a QFont property | |
bool | myBool |
declaration of a boolean property | |
QString | name |
declaration of a QString property | |
bool | onWindows |
this is to test a readonly property | |
QVector3D | position |
A QVector3D property. | |
QVariantMap | propertyGroup |
if you declare a enum property, you also have to declare a Q_ENUMS | |
double | radius |
declaration of a double property | |
int | someNumber |
declaration of a readonly int property | |
QTime | time |
declaration of a QTime property | |
StateLevel | yourForm |
declaration of an enum property (a property which value is in a particular set) |
Private Attributes | |
QColor | backgroundColor |
intern value for the dynamic property |
A little class with lots of properties.
There are static properties declared with Q_PROPERTY and dynamic properties created at run-time.
TestClass::TestClass | ( | ) |
References backgroundColor, color, FEELING_GREAT, font, myBool, name, onWindows, position, propertyGroup, radius, someNumber, time, and yourForm.
|
virtual |
|
virtual |
intercept signal for dynamic property change.
References backgroundColor.
|
inline |
References myBool.
|
inline |
References color.
|
inline |
References font.
|
inline |
References propertyGroup.
|
inline |
References yourForm.
|
inline |
References name.
|
inline |
|
inline |
References position.
|
inline |
References radius.
|
inline |
References someNumber.
|
inline |
References time.
void TestClass::setBool | ( | bool | newBool | ) |
References myBool.
void TestClass::setColor | ( | const QColor & | color | ) |
References color.
void TestClass::setFont | ( | const QFont & | font | ) |
References font.
void TestClass::setGroup | ( | const QVariantMap & | newValue | ) |
References propertyGroup.
void TestClass::setLevel | ( | StateLevel | newValue | ) |
References yourForm.
void TestClass::setName | ( | const QString & | name | ) |
References name.
void TestClass::setPosition | ( | QVector3D | newV3D | ) |
References position.
void TestClass::setRadius | ( | double | radius | ) |
References radius.
void TestClass::setTime | ( | const QTime & | time | ) |
References time.
|
private |
intern value for the dynamic property
Referenced by event(), and TestClass().
|
readwrite |
declaration of a static QColor property (see also backgroundColor property)
Referenced by getColor(), setColor(), and TestClass().
|
readwrite |
declaration of a QFont property
Referenced by getFont(), setFont(), and TestClass().
|
readwrite |
declaration of a boolean property
intern values for the static properties
Referenced by getBool(), setBool(), and TestClass().
|
readwrite |
declaration of a QString property
Referenced by getName(), setName(), and TestClass().
|
read |
this is to test a readonly property
Referenced by TestClass().
|
readwrite |
A QVector3D property.
Referenced by getPosition(), setPosition(), and TestClass().
|
readwrite |
if you declare a enum property, you also have to declare a Q_ENUMS
Group some properties in a specific map. Pro: this allows to show a hierarchy in the properties. Cons: you have to manage the map yourself. Note that the only supported type of map is QVariantMap which is a typedef of QMap<QString, QVariant>. In this group all other misc type of supported properties are demonstrated.
Referenced by getGroup(), setGroup(), and TestClass().
|
readwrite |
declaration of a double property
Referenced by getRadius(), setRadius(), and TestClass().
|
read |
declaration of a readonly int property
Referenced by getSomeNumber(), and TestClass().
|
readwrite |
declaration of a QTime property
Referenced by getTime(), setTime(), and TestClass().
|
readwrite |
declaration of an enum property (a property which value is in a particular set)
Referenced by getLevel(), setLevel(), and TestClass().