itom
Loading...
Searching...
No Matches
qVector3DProperty.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2021, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom and its software development toolkit (SDK).
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 In addition, as a special exception, the Institut für Technische
15 Optik (ITO) gives you certain additional rights.
16 These rights are described in the ITO LGPL Exception version 1.0,
17 which can be found in the file LGPL_EXCEPTION.txt in this package.
18
19 itom is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
22 General Public Licence for more details.
23
24 You should have received a copy of the GNU Library General Public License
25 along with itom. If not, see <http://www.gnu.org/licenses/>.
26*********************************************************************** */
27
28#ifndef QVECTOR3DPROPERTY_H
29#define QVECTOR3DPROPERTY_H
30
31#include "Property.h"
32#include <qvariant.h>
33#include <qvector3d.h>
34
35
36class Property;
37class QObject;
38
39
40namespace ito {
41class QPROPERTYEDITOR_TEST_EXPORT QVector3DProperty : public Property
42{
43 Q_OBJECT
44 Q_PROPERTY(float x READ x WRITE setX DESIGNABLE true USER true)
45 Q_PROPERTY(float y READ y WRITE setY DESIGNABLE true USER true)
46 Q_PROPERTY(float z READ z WRITE setZ DESIGNABLE true USER true)
47
48public:
50 const QString& name = QString(), QObject* propertyObject = 0, QObject* parent = 0);
51
52 QVariant value(int role = Qt::UserRole) const;
53 virtual void setValue(const QVariant& value);
54
55 void setEditorHints(const QString& hints);
56
57 float x() const;
58 void setX(float x);
59
60 float y() const;
61 void setY(float y);
62
63 float z() const;
64 void setZ(float z);
65
66private:
67 QString parseHints(const QString& hints, const QChar component);
68
69 Property* m_x;
70 Property* m_y;
71 Property* m_z;
72};
73
74} // namespace ito
75#endif // QVECTOR3DPROPERTY_H
Definition Property.h:41
Definition qVector3DProperty.h:42
Definition apiFunctionsGraph.cpp:40