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
qquickcheckbox_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 QQUICKCHECKBOX_P_H
5#define QQUICKCHECKBOX_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/qquickabstractbutton_p.h>
19
21
23
24class Q_QUICKTEMPLATES2_EXPORT QQuickCheckBox : public QQuickAbstractButton
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_PROPERTY(QJSValue nextCheckState READ getNextCheckState WRITE setNextCheckState NOTIFY
31 nextCheckStateChanged FINAL REVISION(2, 4))
32 QML_NAMED_ELEMENT(CheckBox)
34
35public:
36 explicit QQuickCheckBox(QQuickItem *parent = nullptr);
37
38 bool isTristate() const;
39 void setTristate(bool tristate);
40
41 Qt::CheckState checkState() const;
42 void setCheckState(Qt::CheckState state);
43 QJSValue getNextCheckState() const;
44 void setNextCheckState(const QJSValue &callback);
45
47 void tristateChanged();
48 void checkStateChanged();
49 // 2.4 (Qt 5.11)
50 Q_REVISION(2, 4) void nextCheckStateChanged();
51
52protected:
53 QFont defaultFont() const override;
54
55 void buttonChange(ButtonChange change) override;
56 void nextCheckState() override;
57
59 Q_DISABLE_COPY(QQuickCheckBox)
60 Q_DECLARE_PRIVATE(QQuickCheckBox)
61};
62
64
65#endif // QQUICKCHECKBOX_P_H
\reentrant
Definition qfont.h:22
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
Check button 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 explicit