blob: 79ac58721d0e752c30340e7f0c25cf5e9ea3310e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#ifdef QUICK3D_MODULE
#include "geometrybase.h"
#include <QtGui/QVector3D>
namespace QmlDesigner {
namespace Internal {
class LineGeometry : public GeometryBase
{
Q_OBJECT
Q_PROPERTY(QVector3D startPos READ startPos WRITE setStartPos NOTIFY startPosChanged)
Q_PROPERTY(QVector3D endPos READ endPos WRITE setEndPos NOTIFY endPosChanged)
public:
LineGeometry();
~LineGeometry() override;
QVector3D startPos() const;
QVector3D endPos() const;
public slots:
void setStartPos(const QVector3D &pos);
void setEndPos(const QVector3D &pos);
signals:
void startPosChanged();
void endPosChanged();
protected:
void doUpdateGeometry() override;
private:
QVector3D m_startPos;
QVector3D m_endPos;
};
}
}
QML_DECLARE_TYPE(QmlDesigner::Internal::LineGeometry)
#endif // QUICK3D_MODULE
|