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
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKMONTHGRID_P_H
6#define QQUICKMONTHGRID_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuickTemplates2/private/qquickcontrol_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQmlComponent;
25
27{
28 Q_OBJECT
29 Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
36
37public:
38 explicit QQuickMonthGrid(QQuickItem *parent = nullptr);
39
40 int month() const;
41 void setMonth(int month);
42
43 int year() const;
44 void setYear(int year);
45
46 QVariant source() const;
47 void setSource(const QVariant &source);
48
49 QString title() const;
50 void setTitle(const QString &title);
51
52 QQmlComponent *delegate() const;
53 void setDelegate(QQmlComponent *delegate);
54
61
62 void pressed(QDateTime date);
63 void released(QDateTime date);
64 void clicked(QDateTime date);
65 void pressAndHold(QDateTime date);
66
67protected:
69 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
70 void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
71 void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
73
74 void timerEvent(QTimerEvent *event) override;
75
76private:
79};
80
81QT_END_NAMESPACE
82
83#endif // QQUICKMONTHGRID_P_H
A grid of days for a calendar month.
bool handleRelease(const QPointF &point, ulong timestamp) override
bool handlePress(const QPointF &point, ulong timestamp) override
QQuickMonthModel * model
QQuickItem * cellAt(const QPointF &pos) const
QDateTime dateOf(QQuickItem *cell) const
bool handleMove(const QPointF &point, ulong timestamp) override
void clearPress(bool clicked)
void updatePress(const QPointF &pos)
void clicked(QDateTime date)
void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override
void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
int month() const
\qmlproperty int QtQuick.Controls::MonthGrid::month
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.
QQmlComponent * delegate() const
\qmlproperty Component QtQuick.Controls::MonthGrid::delegate
void setSource(const QVariant &source)
void setDelegate(QQmlComponent *delegate)
QString title() const
\qmlproperty string QtQuick.Controls::MonthGrid::title
void pressAndHold(QDateTime date)
void delegateChanged()
void setMonth(int month)
void updatePolish() override
This function should perform any layout as required for this item.
QVariant source() const
void sourceChanged()
void setYear(int year)
void pressed(QDateTime date)
int year() const
\qmlproperty int QtQuick.Controls::MonthGrid::year
void released(QDateTime date)