Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Properties | Private Attributes | List of all members
TestClass Class Reference

A little class with lots of properties. More...

#include <TestClass.h>

+ Inheritance diagram for TestClass:

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. More...
 
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) More...
 
QFont font
 declaration of a QFont property More...
 
bool myBool
 declaration of a boolean property More...
 
QString name
 declaration of a QString property More...
 
bool onWindows
 this is to test a readonly property More...
 
QVector3D position
 A QVector3D property. More...
 
QVariantMap propertyGroup
 if you declare a enum property, you also have to declare a Q_ENUMS More...
 
double radius
 declaration of a double property More...
 
int someNumber
 declaration of a readonly int property More...
 
QTime time
 declaration of a QTime property More...
 
StateLevel yourForm
 declaration of an enum property (a property which value is in a particular set) More...
 

Private Attributes

QColor backgroundColor
 intern value for the dynamic property More...
 

Detailed Description

A little class with lots of properties.

There are static properties declared with Q_PROPERTY and dynamic properties created at run-time.

Member Enumeration Documentation

Enumerator
I_AM_OK 
GOOD_FORM 
FEELING_GREAT 
HAPPY 
VERY_HAPPY 

Constructor & Destructor Documentation

TestClass::TestClass ( )
TestClass::~TestClass ( )
virtual

Member Function Documentation

bool TestClass::event ( QEvent *  e)
virtual

intercept signal for dynamic property change.

References backgroundColor.

bool TestClass::getBool ( ) const
inline

References myBool.

QColor TestClass::getColor ( ) const
inline

References color.

QFont TestClass::getFont ( ) const
inline

References font.

QVariantMap TestClass::getGroup ( ) const
inline

References propertyGroup.

StateLevel TestClass::getLevel ( ) const
inline

References yourForm.

QString TestClass::getName ( ) const
inline

References name.

bool TestClass::getOnWindows ( ) const
inline
QVector3D TestClass::getPosition ( ) const
inline

References position.

double TestClass::getRadius ( ) const
inline

References radius.

int TestClass::getSomeNumber ( ) const
inline

References someNumber.

QTime TestClass::getTime ( ) const
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.

Member Data Documentation

QColor TestClass::backgroundColor
private

intern value for the dynamic property

Referenced by event(), and TestClass().

Property Documentation

QColor TestClass::color
readwrite

declaration of a static QColor property (see also backgroundColor property)

Referenced by getColor(), setColor(), and TestClass().

QFont TestClass::font
readwrite

declaration of a QFont property

Referenced by getFont(), setFont(), and TestClass().

bool TestClass::myBool
readwrite

declaration of a boolean property

intern values for the static properties

Referenced by getBool(), setBool(), and TestClass().

QString TestClass::name
readwrite

declaration of a QString property

Referenced by getName(), setName(), and TestClass().

bool TestClass::onWindows
read

this is to test a readonly property

Referenced by TestClass().

QVector3D TestClass::position
readwrite

A QVector3D property.

Referenced by getPosition(), setPosition(), and TestClass().

QVariantMap TestClass::propertyGroup
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.

See Also
QVariant

Referenced by getGroup(), setGroup(), and TestClass().

double TestClass::radius
readwrite

declaration of a double property

Referenced by getRadius(), setRadius(), and TestClass().

int TestClass::someNumber
read

declaration of a readonly int property

Referenced by getSomeNumber(), and TestClass().

QTime TestClass::time
readwrite

declaration of a QTime property

Referenced by getTime(), setTime(), and TestClass().

StateLevel TestClass::yourForm
readwrite

declaration of an enum property (a property which value is in a particular set)

Referenced by getLevel(), setLevel(), and TestClass().


The documentation for this class was generated from the following files: