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
qquickaction_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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKACTION_P_H
6
#
define
QQUICKACTION_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
<
QtQuickTemplates2
/
private
/
qtquicktemplates2global_p
.
h
>
20
#
include
<
QtQuickTemplates2
/
private
/
qquickicon_p
.
h
>
21
#
include
<
QtCore
/
qobject
.
h
>
22
#
include
<
QtQml
/
qqml
.
h
>
23
24
QT_BEGIN_NAMESPACE
25
26
class
QQuickIcon;
27
class
QQuickActionPrivate
;
28
29
class
Q_QUICKTEMPLATES2_EXPORT
QQuickAction
:
public
QObject
30
{
31
Q_OBJECT
32
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
33
Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL)
34
Q_PROPERTY(
bool
enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged RESET resetEnabled FINAL)
35
Q_PROPERTY(
bool
checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL)
36
Q_PROPERTY(
bool
checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL)
37
#
if
QT_CONFIG
(
shortcut
)
38
Q_PRIVATE_PROPERTY(QQuickAction::d_func(), QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
39
#
endif
40
QML_NAMED_ELEMENT(Action)
41
QML_ADDED_IN_VERSION(2, 3)
42
43
public
:
44
explicit
QQuickAction(QObject *parent =
nullptr
);
45
~QQuickAction();
46
47
QString text()
const
;
48
void
setText(
const
QString &text);
49
50
QQuickIcon icon()
const
;
51
void
setIcon(
const
QQuickIcon &icon);
52
53
bool
isEnabled()
const
;
54
void
setEnabled(
bool
enabled);
55
void
resetEnabled();
56
57
bool
isChecked()
const
;
58
void
setChecked(
bool
checked);
59
60
bool
isCheckable()
const
;
61
void
setCheckable(
bool
checkable);
62
63
#
if
QT_CONFIG
(
shortcut
)
64
QKeySequence shortcut()
const
;
65
void
setShortcut(
const
QKeySequence &shortcut);
66
#
endif
67
68
public
Q_SLOTS:
69
void
toggle(QObject *source =
nullptr
);
70
void
trigger(QObject *source =
nullptr
);
71
72
Q_SIGNALS:
73
void
textChanged(
const
QString &text);
74
void
iconChanged(
const
QQuickIcon &icon);
75
void
enabledChanged(
bool
enabled);
76
void
checkedChanged(
bool
checked);
77
void
checkableChanged(
bool
checkable);
78
#
if
QT_CONFIG
(
shortcut
)
79
void
shortcutChanged(
const
QKeySequence &shortcut);
80
#
endif
81
82
void
toggled(QObject *source =
nullptr
);
83
void
triggered(QObject *source =
nullptr
);
84
85
protected
:
86
bool
event(QEvent *event) override;
87
bool
eventFilter(QObject *object, QEvent *event) override;
88
89
private
:
90
Q_DISABLE_COPY(QQuickAction)
91
Q_DECLARE_PRIVATE(QQuickAction)
92
};
93
94
QT_END_NAMESPACE
95
96
#
endif
// QQUICKACTION_P_H
QQuickAbstractButtonPrivate
Definition
qquickabstractbutton_p_p.h:35
QQuickAbstractButton
Definition
qquickabstractbutton_p.h:28
QQuickActionGroupAttachedPrivate
Definition
qquickactiongroup.cpp:387
QQuickActionGroupAttached
Definition
qquickactiongroup_p.h:78
QQuickActionGroupPrivate
Groups actions together.
Definition
qquickactiongroup.cpp:111
QQuickActionGroup
Definition
qquickactiongroup_p.h:31
QQuickActionPrivate
Definition
qquickaction_p_p.h:34
QQuickAction
Definition
qquickaction_p.h:30
QQuickButtonGroupAttachedPrivate
Definition
qquickbuttongroup.cpp:491
QQuickButtonGroupAttached
Definition
qquickbuttongroup_p.h:89
QQuickButtonGroupPrivate
Mutually-exclusive group of checkable buttons.
Definition
qquickbuttongroup.cpp:146
QQuickButtonGroup
Definition
qquickbuttongroup_p.h:32
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
quicktemplates
qquickaction_p.h
Generated on
for Qt by
1.18.0