RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
Vec3fProperty Class Reference

#include <vec3fproperty.h>

Inheritance diagram for Vec3fProperty:
Property

Public Member Functions

 Vec3fProperty (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0)
 
QVariant value (int role=Qt::UserRole) const
 
virtual void setValue (const QVariant &value)
 
void setEditorHints (const QString &hints)
 
float x () const
 
void setX (float x)
 
float y () const
 
void setY (float y)
 
float z () const
 
void setZ (float z)
 
- Public Member Functions inherited from Property
 Property (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0)
 
QObject * propertyObject ()
 
bool isRoot ()
 
bool isReadOnly ()
 
int row ()
 
QString editorHints ()
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 
virtual QVariant editorData (QWidget *editor)
 
virtual bool setEditorData (QWidget *editor, const QVariant &data)
 
PropertyfindPropertyObject (QObject *propertyObject)
 

Properties

float x
 
float y
 
float z
 

Additional Inherited Members

- Signals inherited from Property
void propertyChanged (QObject *, QString, QVariant, QVariant)
 
- Protected Attributes inherited from Property
QObject * m_propertyObject
 
QString m_hints
 

Detailed Description

A custom property for Vec3f

This class provides a QLineEdit editor for all three values of a Vec3f struct (x, y, z) and also contains three QDoubleSpinBox instances to manipulate each value separately

Definition at line 24 of file vec3fproperty.h.

Constructor & Destructor Documentation

Vec3fProperty::Vec3fProperty ( const QString &  name = QString(),
QObject *  propertyObject = 0,
QObject *  parent = 0 
)

Definition at line 18 of file vec3fproperty.cpp.

Member Function Documentation

void Vec3fProperty::setEditorHints ( const QString &  hints)
virtual

Sets properties for the editor widget that is used to manipulate the data value managed by this instance

Parameters
hintsa string containing property settings for the editor widget that manipulates this property

Reimplemented from Property.

Definition at line 74 of file vec3fproperty.cpp.

void Vec3fProperty::setValue ( const QVariant &  value)
virtual

Sets the value stored by this property

Parameters
valuethe data converted to a QVariant

Reimplemented from Property.

Definition at line 42 of file vec3fproperty.cpp.

void Vec3fProperty::setX ( float  x)

Definition at line 86 of file vec3fproperty.cpp.

void Vec3fProperty::setY ( float  y)

Definition at line 96 of file vec3fproperty.cpp.

void Vec3fProperty::setZ ( float  z)

Definition at line 106 of file vec3fproperty.cpp.

QVariant Vec3fProperty::value ( int  role = Qt::UserRole) const
virtual

The value stored by this property

Returns
QVariant the data converted to a QVariant

Reimplemented from Property.

Definition at line 26 of file vec3fproperty.cpp.

float Vec3fProperty::x ( ) const
float Vec3fProperty::y ( ) const
float Vec3fProperty::z ( ) const

Property Documentation

float Vec3fProperty::x
readwrite

Definition at line 27 of file vec3fproperty.h.

float Vec3fProperty::y
readwrite

Definition at line 28 of file vec3fproperty.h.

float Vec3fProperty::z
readwrite

Definition at line 29 of file vec3fproperty.h.


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