Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/3dview/gridmesh.h
- This file was copied to src/widgets/3dview/bedproperties.h.
Show All 19 Lines | 1 | /* Atelier KDE Printer Host for 3D Printing | |||
---|---|---|---|---|---|
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #pragma once | 23 | #pragma once | ||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <QNode> | 26 | #include <QNode> | ||
27 | #include <QGeometryRenderer> | 27 | #include <QGeometryRenderer> | ||
28 | #include <QSize> | ||||
28 | 29 | | |||
29 | class GridMesh : public Qt3DRender::QGeometryRenderer | 30 | class GridMesh : public Qt3DRender::QGeometryRenderer | ||
30 | { | 31 | { | ||
31 | Q_OBJECT | 32 | Q_OBJECT | ||
32 | 33 | Q_PROPERTY(QSize meshResolution READ meshResolution WRITE setMeshResolution NOTIFY meshResolutionChanged) | |||
33 | public: | 34 | public: | ||
34 | explicit GridMesh(Qt3DCore::QNode *parent = nullptr); | 35 | explicit GridMesh(Qt3DCore::QNode *parent = nullptr); | ||
35 | ~GridMesh(); | 36 | ~GridMesh(); | ||
37 | | ||||
38 | QSize meshResolution() const; | ||||
39 | | ||||
40 | public slots: | ||||
41 | void setMeshResolution(const QSize &meshResolution); | ||||
42 | | ||||
43 | signals: | ||||
44 | void meshResolutionChanged(const QSize &meshResolution); | ||||
45 | | ||||
46 | private: | ||||
47 | QSize m_meshResolution; | ||||
36 | }; | 48 | }; |