itom
Loading...
Searching...
No Matches
CustomTypes.h
1// *************************************************************************************************
2//
3// This code is part of the Sample Application to demonstrate the use of the QPropertyEditor library.
4// It is distributed as public domain and can be modified and used by you without any limitations.
5//
6// Your feedback is welcome!
7//
8// Author: Volker Wiendl
9// Enum enhancement by Roman alias banal from qt-apps.org
10// *************************************************************************************************
11
12#ifndef CUSTOMTYPES_H_
13#define CUSTOMTYPES_H_
14
15#include <Qt/qvariant.h>
16
17class Property;
18class QObject;
19
20struct Vec3f
21{
22 Vec3f() : X(0.0f), Y(0.0f), Z(0.0f) {}
23 Vec3f(float x, float y, float z) : X(x), Y(y), Z(z) {}
24 float X, Y, Z;
25
26 bool operator == (const Vec3f& other) const {return X == other.X && Y == other.Y && Z == other.Z;}
27 bool operator != (const Vec3f& other) const {return X != other.X || Y != other.Y || Z != other.Z;}
28
29};
30Q_DECLARE_METATYPE(Vec3f)
31
32
33namespace CustomTypes
34{
35 void registerTypes();
36 Property* createCustomProperty(const QString& name, QObject* propertyObject, Property* parent);
37
38}
39#endif
Definition Property.h:41
Definition CustomTypes.h:21