diff options
Diffstat (limited to 'src/quick/items/qquickrectangle_p.h')
-rw-r--r-- | src/quick/items/qquickrectangle_p.h | 86 |
1 files changed, 34 insertions, 52 deletions
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h index c4f03de770..690154cd65 100644 --- a/src/quick/items/qquickrectangle_p.h +++ b/src/quick/items/qquickrectangle_p.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQuick module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QQUICKRECTANGLE_P_H #define QQUICKRECTANGLE_P_H @@ -59,13 +23,13 @@ QT_BEGIN_NAMESPACE -class Q_QUICK_PRIVATE_EXPORT QQuickPen : public QObject +class Q_QUICK_EXPORT QQuickPen : public QObject { Q_OBJECT - Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY penChanged) - Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY penChanged) - Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY penChanged) + Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL) + Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged FINAL) QML_ANONYMOUS QML_ADDED_IN_VERSION(2, 0) public: @@ -83,7 +47,9 @@ public: bool isValid() const; Q_SIGNALS: - void penChanged(); + void widthChanged(); + void colorChanged(); + void pixelAlignedChanged(); private: qreal m_width; @@ -92,7 +58,7 @@ private: bool m_valid : 1; }; -class Q_QUICK_PRIVATE_EXPORT QQuickGradientStop : public QObject +class Q_QUICK_EXPORT QQuickGradientStop : public QObject { Q_OBJECT @@ -118,7 +84,7 @@ private: QColor m_color; }; -class Q_QUICK_PRIVATE_EXPORT QQuickGradient : public QObject +class Q_QUICK_EXPORT QQuickGradient : public QObject { Q_OBJECT @@ -127,8 +93,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickGradient : public QObject Q_CLASSINFO("DefaultProperty", "stops") QML_NAMED_ELEMENT(Gradient) QML_ADDED_IN_VERSION(2, 0) + QML_EXTENDED_NAMESPACE(QGradient) - Q_ENUMS(QGradient::Preset) public: QQuickGradient(QObject *parent=nullptr); ~QQuickGradient() override; @@ -159,7 +125,7 @@ private: }; class QQuickRectanglePrivate; -class Q_QUICK_PRIVATE_EXPORT QQuickRectangle : public QQuickItem +class Q_QUICK_EXPORT QQuickRectangle : public QQuickItem { Q_OBJECT @@ -167,6 +133,10 @@ class Q_QUICK_PRIVATE_EXPORT QQuickRectangle : public QQuickItem Q_PROPERTY(QJSValue gradient READ gradient WRITE setGradient RESET resetGradient) Q_PROPERTY(QQuickPen * border READ border CONSTANT) Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY topLeftRadiusChanged RESET resetTopLeftRadius REVISION(6, 7) FINAL) + Q_PROPERTY(qreal topRightRadius READ topRightRadius WRITE setTopRightRadius NOTIFY topRightRadiusChanged RESET resetTopRightRadius REVISION(6, 7) FINAL) + Q_PROPERTY(qreal bottomLeftRadius READ bottomLeftRadius WRITE setBottomLeftRadius NOTIFY bottomLeftRadiusChanged RESET resetBottomLeftRadius REVISION(6, 7) FINAL) + Q_PROPERTY(qreal bottomRightRadius READ bottomRightRadius WRITE setBottomRightRadius NOTIFY bottomRightRadiusChanged RESET resetBottomRightRadius REVISION(6, 7) FINAL) QML_NAMED_ELEMENT(Rectangle) QML_ADDED_IN_VERSION(2, 0) public: @@ -184,9 +154,26 @@ public: qreal radius() const; void setRadius(qreal radius); + qreal topLeftRadius() const; + void setTopLeftRadius(qreal radius); + void resetTopLeftRadius(); + qreal topRightRadius() const; + void setTopRightRadius(qreal radius); + void resetTopRightRadius(); + qreal bottomLeftRadius() const; + void setBottomLeftRadius(qreal radius); + void resetBottomLeftRadius(); + qreal bottomRightRadius() const; + void setBottomRightRadius(qreal radius); + void resetBottomRightRadius(); + Q_SIGNALS: void colorChanged(); void radiusChanged(); + Q_REVISION(6, 7) void topLeftRadiusChanged(); + Q_REVISION(6, 7) void topRightRadiusChanged(); + Q_REVISION(6, 7) void bottomLeftRadiusChanged(); + Q_REVISION(6, 7) void bottomRightRadiusChanged(); protected: QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; @@ -201,9 +188,4 @@ private: QT_END_NAMESPACE -QML_DECLARE_TYPE(QQuickPen) -QML_DECLARE_TYPE(QQuickGradientStop) -QML_DECLARE_TYPE(QQuickGradient) -QML_DECLARE_TYPE(QQuickRectangle) - #endif // QQUICKRECTANGLE_P_H |