Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickmonthgrid_p.h
Go to the documentation of this file.
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 QQUICKMONTHGRID_P_H
5#define QQUICKMONTHGRID_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
21
22class QQmlComponent;
24
26{
28 Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
29 Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL)
31 Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
33 QML_NAMED_ELEMENT(AbstractMonthGrid)
35
36public:
37 explicit QQuickMonthGrid(QQuickItem *parent = nullptr);
38
39 int month() const;
40 void setMonth(int month);
41
42 int year() const;
43 void setYear(int year);
44
45 QVariant source() const;
46 void setSource(const QVariant &source);
47
48 QString title() const;
49 void setTitle(const QString &title);
50
51 QQmlComponent *delegate() const;
53
60
61 void pressed(const QDate &date);
62 void released(const QDate &date);
63 void clicked(const QDate &date);
64 void pressAndHold(const QDate &date);
65
66protected:
67 void componentComplete() override;
68 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
69 void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
70 void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
71 void updatePolish() override;
72
73 void timerEvent(QTimerEvent *event) override;
74
75private:
76 Q_DISABLE_COPY(QQuickMonthGrid)
77 Q_DECLARE_PRIVATE(QQuickMonthGrid)
78};
79
81
83
84#endif // QQUICKMONTHGRID_P_H
\inmodule QtCore \reentrant
Definition qdatetime.h:27
\inmodule QtCore
Definition qmargins.h:274
The QQmlComponent class encapsulates a QML component definition.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
Definition qquickitem.h:68
A grid of days for a calendar month.
void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override
void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override
QQmlComponent * delegate
void pressAndHold(const QDate &date)
void released(const QDate &date)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void pressed(const QDate &date)
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setTitle(const QString &title)
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
void setSource(const QVariant &source)
void setDelegate(QQmlComponent *delegate)
void delegateChanged()
void clicked(const QDate &date)
void setMonth(int month)
void updatePolish() override
This function should perform any layout as required for this item.
void sourceChanged()
void setYear(int year)
\inmodule QtCore\reentrant
Definition qrect.h:483
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qcoreevent.h:359
\inmodule QtCore
Definition qvariant.h:64
QDate date
[1]
Combined button and popup list for selecting options.
GLsizei GLsizei GLchar * source
struct _cl_event * event
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS