Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquickdayofweekmodel_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
QQUICKDAYOFWEEKMODEL_P_H
6
#
define
QQUICKDAYOFWEEKMODEL_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
<
QtCore
/
qabstractitemmodel
.
h
>
20
#
include
<
QtCore
/
qlocale
.
h
>
21
#
include
<
QtQml
/
qqml
.
h
>
22
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
23
24
QT_BEGIN_NAMESPACE
25
26
class
QQuickDayOfWeekModelPrivate;
27
28
class
QQuickDayOfWeekModel
:
public
QAbstractListModel
29
{
30
Q_OBJECT
31
Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
32
Q_PROPERTY
(
int
count
READ
rowCount
CONSTANT
FINAL
)
33
34
public
:
35
explicit
QQuickDayOfWeekModel
(
QObject
*
parent
=
nullptr
);
36
37
QLocale
locale
()
const
;
38
void
setLocale
(
const
QLocale &locale);
39
40
Q_INVOKABLE
int
dayAt
(
int
index)
const
;
41
42
enum
{
43
DayRole
= Qt::UserRole + 1,
44
LongNameRole
,
45
ShortNameRole
,
46
NarrowNameRole
47
};
48
49
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
50
QVariant
data
(
const
QModelIndex &index,
int
role)
const
override
;
51
int
rowCount
(
const
QModelIndex &parent = QModelIndex())
const
override
;
52
53
Q_SIGNALS
:
54
void
localeChanged
();
55
56
private
:
57
Q_DISABLE_COPY
(
QQuickDayOfWeekModel
)
58
Q_DECLARE_PRIVATE
(
QQuickDayOfWeekModel
)
59
};
60
61
QT_END_NAMESPACE
62
63
#
endif
// QQUICKDAYOFWEEKMODEL_P_H
QQuickDayOfWeekModelPrivate
Definition
qquickdayofweekmodel.cpp:12
QQuickDayOfWeekModel
Definition
qquickdayofweekmodel_p.h:29
QQuickDayOfWeekModel::locale
QLocale locale() const
Definition
qquickdayofweekmodel.cpp:24
QQuickDayOfWeekModel::dayAt
Q_INVOKABLE int dayAt(int index) const
Definition
qquickdayofweekmodel.cpp:40
QQuickDayOfWeekModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
Definition
qquickdayofweekmodel.cpp:72
QQuickDayOfWeekModel::roleNames
QHash< int, QByteArray > roleNames() const override
Definition
qquickdayofweekmodel.cpp:79
QQuickDayOfWeekModel::setLocale
void setLocale(const QLocale &locale)
Definition
qquickdayofweekmodel.cpp:30
QQuickDayOfWeekModel::NarrowNameRole
@ NarrowNameRole
Definition
qquickdayofweekmodel_p.h:46
QQuickDayOfWeekModel::DayRole
@ DayRole
Definition
qquickdayofweekmodel_p.h:43
QQuickDayOfWeekModel::LongNameRole
@ LongNameRole
Definition
qquickdayofweekmodel_p.h:44
QQuickDayOfWeekModel::ShortNameRole
@ ShortNameRole
Definition
qquickdayofweekmodel_p.h:45
QQuickDayOfWeekModel::data
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.
Definition
qquickdayofweekmodel.cpp:51
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
quicktemplates
qquickdayofweekmodel_p.h
Generated on
for Qt by
1.18.0