Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickstarshape_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQUICKSTARSHAPE_P_P_H
6#define QQUICKSTARSHAPE_P_P_H
7
9#include <QtQml/private/qqmlpropertyutils_p.h>
10#include <QtQuickShapes/private/qquickshape_p_p.h>
11#include <qpoint.h>
12#include <qvectornd.h>
13#include <vector>
14
15//
16// W A R N I N G
17// -------------
18//
19// This file is not part of the Qt API. It exists purely as an
20// implementation detail. This header file may change from version to
21// version without notice, or even be removed.
22//
23// We mean it.
24//
25
27
29{
30 Q_DECLARE_PUBLIC(QQuickStarShape)
31
32public:
33 QQuickStarShapePrivate();
34 ~QQuickStarShapePrivate() override;
35
36 void updatePath();
37 void updatePoints();
38 void constructPolygonPath();
39 void constructRoundedPolygonPath();
40
41 qreal cornerRadius = 10;
42 int pointCount = 6;
43 qreal ratio = 0.5;
44
45 std::vector<QVector2D> points;
46
47 QQuickShapePath *path = nullptr;
48};
49
50QT_END_NAMESPACE
51
52#endif // QQUICKSTARSHAPE_P_P_H
The QVector2D class represents a vector or vertex in 2D space.
Definition qvectornd.h:32
constexpr float y() const noexcept
Returns the y coordinate of this point.
Definition qvectornd.h:503
QVector2D normalized() const noexcept
Returns the normalized unit vector form of this vector.
Definition qvectornd.h:530
constexpr float x() const noexcept
Returns the x coordinate of this point.
Definition qvectornd.h:502
static constexpr float dotProduct(QVector2D v1, QVector2D v2) noexcept
Returns the dot product of v1 and v2.
Definition qvectornd.h:605