| 1 | // Copyright (C) 2021 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 | |
| 4 | #ifndef QQUICKWEEKNUMBERCOLUMN_P_H |
| 5 | #define QQUICKWEEKNUMBERCOLUMN_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtQuickTemplates2/private/qquickcontrol_p.h> |
| 19 | |
| 20 | QT_BEGIN_NAMESPACE |
| 21 | |
| 22 | class QQmlComponent; |
| 23 | class QQuickWeekNumberColumnPrivate; |
| 24 | |
| 25 | class QQuickWeekNumberColumn : public QQuickControl |
| 26 | { |
| 27 | Q_OBJECT |
| 28 | Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL) |
| 29 | Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL) |
| 30 | Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL) |
| 31 | Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) |
| 32 | QML_NAMED_ELEMENT(AbstractWeekNumberColumn) |
| 33 | QML_ADDED_IN_VERSION(6, 3) |
| 34 | |
| 35 | public: |
| 36 | explicit QQuickWeekNumberColumn(QQuickItem *parent = nullptr); |
| 37 | |
| 38 | int month() const; |
| 39 | void setMonth(int month); |
| 40 | |
| 41 | int year() const; |
| 42 | void setYear(int year); |
| 43 | |
| 44 | QVariant source() const; |
| 45 | void setSource(const QVariant &source); |
| 46 | |
| 47 | QQmlComponent *delegate() const; |
| 48 | void setDelegate(QQmlComponent *delegate); |
| 49 | |
| 50 | Q_SIGNALS: |
| 51 | void monthChanged(); |
| 52 | void yearChanged(); |
| 53 | void sourceChanged(); |
| 54 | void delegateChanged(); |
| 55 | |
| 56 | protected: |
| 57 | void componentComplete() override; |
| 58 | void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; |
| 59 | void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; |
| 60 | void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override; |
| 61 | |
| 62 | private: |
| 63 | Q_DISABLE_COPY(QQuickWeekNumberColumn) |
| 64 | Q_DECLARE_PRIVATE(QQuickWeekNumberColumn) |
| 65 | }; |
| 66 | |
| 67 | QT_END_NAMESPACE |
| 68 | |
| 69 | #endif // QQUICKWEEKNUMBERCOLUMN_P_H |
| 70 |
