Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickcheckdelegate_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QQUICKCHECKDELEGATE_P_H
5#define QQUICKCHECKDELEGATE_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/qquickitemdelegate_p.h>
19
21
23
24class Q_QUICKTEMPLATES2_EXPORT QQuickCheckDelegate : public QQuickItemDelegate
25{
27 Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL)
28 Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
29 // 2.4 (Qt 5.11)
30 Q_PRIVATE_PROPERTY(QQuickCheckDelegate::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION(2, 4))
31 QML_NAMED_ELEMENT(CheckDelegate)
33
34public:
35 explicit QQuickCheckDelegate(QQuickItem *parent = nullptr);
36
37 bool isTristate() const;
38 void setTristate(bool tristate);
39
40 Qt::CheckState checkState() const;
41 void setCheckState(Qt::CheckState state);
42
44 void tristateChanged();
45 void checkStateChanged();
46 // 2.4 (Qt 5.11)
47 Q_REVISION(2, 4) void nextCheckStateChanged();
48
49protected:
50 QFont defaultFont() const override;
51
52 void buttonChange(ButtonChange change) override;
53 void nextCheckState() override;
54
55#if QT_CONFIG(accessibility)
56 QAccessible::Role accessibleRole() const override;
57#endif
58
59private:
60 Q_DISABLE_COPY(QQuickCheckDelegate)
61 Q_DECLARE_PRIVATE(QQuickCheckDelegate)
62};
63
65
66#endif // QQUICKCHECKDELEGATE_P_H
\reentrant
Definition qfont.h:22
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
Item delegate with a check indicator that can be toggled on or off.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
else opt state
[0]
Combined button and popup list for selecting options.
Definition qcompare.h:63
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_SIGNALS
#define Q_PRIVATE_PROPERTY(d, text)
#define explicit