6#include <QtCore/private/qabstractitemmodel_p.h>
7#include <QtCore/qdatetime.h>
40 QDate firstDayOfMonthDate(
y,
m, 1);
47 for (
int i = 0;
i < 6; ++
i)
51 emit q->dataChanged(
q->index(0, 0),
q->index(5, 0));
84 if (
d->year !=
year) {
85 d->init(
d->month,
year,
d->locale);
110 if (index < 0 || index > 5)
112 return d->weekNumbers[
index];
118 if (weekNumber < d->weekNumbers[0] || weekNumber >
d->weekNumbers[5])
120 return weekNumber -
d->weekNumbers[0];
127 if (weekNumber != -1)
149#include "moc_qquickweeknumbermodel_p.cpp"
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore \reentrant
int weekNumber(int *yearNum=nullptr) const
Returns the ISO 8601 week number (1 to 53).
int month() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QDate addDays(qint64 days) const
Returns a QDate object containing a date ndays later than the date of this object (or earlier if nday...
int year() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QDate currentDate()
Returns the system clock's current date.
int dayOfWeek() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Qt::DayOfWeek firstDayOfWeek() const
static QDate calculateFirst(int month, int year, const QLocale &locale)
QQuickWeekNumberModelPrivate()
void init(int month, int year, const QLocale &locale=QLocale())
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
QQuickWeekNumberModel(QObject *parent=nullptr)
QHash< int, QByteArray > roleNames() const override
void setLocale(const QLocale &locale)
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.
Q_INVOKABLE int indexOf(int weekNumber) const
Q_INVOKABLE int weekNumberAt(int index) const
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent