File indexing completed on 2025-01-26 05:19:14
0001 /* Atelier KDE Printer Host for 3D Printing 0002 Copyright (C) <2017-2018> 0003 Author: Patrick José Pereira - patrickjp@kde.org 0004 Kevin Ottens - ervin@kde.org 0005 0006 This program is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU General Public License as 0008 published by the Free Software Foundation; either version 3 of 0009 the License or any later version accepted by the membership of 0010 KDE e.V. (or its successor approved by the membership of KDE 0011 e.V.), which shall act as a proxy defined in Section 14 of 0012 version 3 of the license. 0013 0014 This program is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 GNU General Public License for more details. 0018 0019 You should have received a copy of the GNU General Public License 0020 along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 */ 0022 0023 #pragma once 0024 0025 #include <QGeometryRenderer> 0026 #include <QNode> 0027 #include <QObject> 0028 #include <QSize> 0029 0030 class GridMesh : public Qt3DRender::QGeometryRenderer 0031 { 0032 Q_OBJECT 0033 Q_PROPERTY(QSize meshResolution READ meshResolution WRITE setMeshResolution NOTIFY meshResolutionChanged) 0034 public: 0035 explicit GridMesh(Qt3DCore::QNode *parent = nullptr); 0036 ~GridMesh() = default; 0037 0038 QSize meshResolution() const; 0039 0040 public slots: 0041 void setMeshResolution(const QSize &meshResolution); 0042 0043 signals: 0044 void meshResolutionChanged(const QSize &meshResolution); 0045 0046 private: 0047 QSize m_meshResolution; 0048 };