6#include <QtCore/private/qabstractitemmodel_p.h>
67 if (
f.year >
t.year || (
f.year ==
t.year &&
f.month >
t.month))
71 return 1 +
t.month + 12 * (
t.year -
f.year) -
f.month;
85 emit q->countChanged();
87 emit q->dataChanged(
q->index(0, 0),
q->index(
c - 1, 0));
110 if (
d->from !=
from) {
134 d->populate(
d->from,
to);
148 return d->from.addMonths(
index).month() - 1;
159 return d->from.addMonths(
index).year();
170 return d->getCount(
d->from,
date) - 1;
223 d->populate(
d->from,
d->to,
true);
228#include "moc_qquickcalendarmodel_p.cpp"
QObject * parent() const
Returns a pointer to the parent object.
The QCalendar class describes calendar systems.
bool isGregorian() const
Returns true if this calendar object is the Gregorian calendar object used as default calendar by oth...
YearMonthDay partsFromDate(QDate date) const
Converts a QDate to a year, month, and day of the month.
\inmodule QtCore \reentrant
constexpr bool isValid() const
Returns true if this date is valid; otherwise returns false.
void populate(QDate from, QDate to, bool force=false)
QQuickCalendarModelPrivate()
static int getCount(QDate from, QDate to)
Q_INVOKABLE int yearAt(int index) const
\qmlmethod int QtQuick.Controls::CalendarModel::yearAt(int index)
void classBegin() override
Invoked after class creation, but before any properties have been set.
void setFrom(const QDate &from)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
QVariant data(const QModelIndex &index, int role) const override
Returns the data stored under the given role for the item referred to by the index.
QQuickCalendarModel(QObject *parent=nullptr)
void setTo(const QDate &to)
Q_INVOKABLE int indexOf(const QDate &date) const
\qmlmethod int QtQuick.Controls::CalendarModel::indexOf(Date date)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
QHash< int, QByteArray > roleNames() const override
Q_INVOKABLE int monthAt(int index) const
\qmlmethod int QtQuick.Controls::CalendarModel::monthAt(int index)
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
GLenum GLenum GLsizei count
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent