1 | // Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QT3DEXTRAS_QCONEGEOMETRYVIEW_H |
5 | #define |
6 | |
7 | #include <Qt3DExtras/qt3dextras_global.h> |
8 | #include <Qt3DCore/qgeometryview.h> |
9 | |
10 | QT_BEGIN_NAMESPACE |
11 | |
12 | namespace Qt3DExtras { |
13 | |
14 | class Q_3DEXTRASSHARED_EXPORT : public Qt3DCore::QGeometryView |
15 | { |
16 | Q_OBJECT |
17 | Q_PROPERTY(int rings READ rings WRITE setRings NOTIFY ringsChanged) |
18 | Q_PROPERTY(int slices READ slices WRITE setSlices NOTIFY slicesChanged) |
19 | Q_PROPERTY( bool hasTopEndcap READ hasTopEndcap WRITE setHasTopEndcap NOTIFY hasTopEndcapChanged ) |
20 | Q_PROPERTY( bool hasBottomEndcap READ hasBottomEndcap WRITE setHasBottomEndcap NOTIFY hasBottomEndcapChanged ) |
21 | Q_PROPERTY( float topRadius READ topRadius WRITE setTopRadius NOTIFY topRadiusChanged ) |
22 | Q_PROPERTY( float bottomRadius READ bottomRadius WRITE setBottomRadius NOTIFY bottomRadiusChanged ) |
23 | Q_PROPERTY(float length READ length WRITE setLength NOTIFY lengthChanged) |
24 | public: |
25 | explicit (Qt3DCore::QNode *parent = nullptr); |
26 | (); |
27 | |
28 | int () const; |
29 | int () const; |
30 | bool () const; |
31 | bool () const; |
32 | float () const; |
33 | float () const; |
34 | float () const; |
35 | |
36 | public Q_SLOTS: |
37 | void ( bool hasTopEndcap ); |
38 | void ( bool hasBottomEndcap ); |
39 | void ( float topRadius ); |
40 | void ( float bottomRadius ); |
41 | void ( int rings ); |
42 | void ( int slices ); |
43 | void ( float length ); |
44 | |
45 | Q_SIGNALS: |
46 | void ( bool hasTopEndcap ); |
47 | void ( bool hasBottomEndcap ); |
48 | void ( float topRadius ); |
49 | void ( float bottomRadius ); |
50 | void ( int rings ); |
51 | void ( int slices ); |
52 | void ( float length ); |
53 | |
54 | private: |
55 | // As this is a default provided geometry renderer, no one should be able |
56 | // to modify the QGeometryRenderer's properties |
57 | |
58 | void (int instanceCount); |
59 | void (int vertexCount); |
60 | void (int indexOffset); |
61 | void (int firstInstance); |
62 | void (int index); |
63 | void (bool enabled); |
64 | void (Qt3DCore::QGeometry *geometry); |
65 | void (PrimitiveType primitiveType); |
66 | }; |
67 | |
68 | } // namespace Qt3DExtras |
69 | |
70 | QT_END_NAMESPACE |
71 | |
72 | #endif // QT3DEXTRAS_QCONEGEOMETRYVIEW_H |
73 | |