31 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL)
32 Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL)
33 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged RESET resetEnabled FINAL)
34 Q_PROPERTY(
bool checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL)
35 Q_PROPERTY(
bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL)
36#if QT_CONFIG(shortcut)
37 Q_PRIVATE_PROPERTY(QQuickAction::d_func(), QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL)
39 QML_NAMED_ELEMENT(Action)
40 QML_ADDED_IN_VERSION(2, 3)
43 explicit QQuickAction(QObject *parent =
nullptr);
47 void setText(
const QString &text);
49 QQuickIcon icon()
const;
50 void setIcon(
const QQuickIcon &icon);
52 bool isEnabled()
const;
53 void setEnabled(
bool enabled);
56 bool isChecked()
const;
57 void setChecked(
bool checked);
59 bool isCheckable()
const;
60 void setCheckable(
bool checkable);
62#if QT_CONFIG(shortcut)
63 QKeySequence shortcut()
const;
64 void setShortcut(
const QKeySequence &shortcut);
68 void toggle(QObject *source =
nullptr);
69 void trigger(QObject *source =
nullptr);
72 void textChanged(
const QString &text);
73 void iconChanged(
const QQuickIcon &icon);
74 void enabledChanged(
bool enabled);
75 void checkedChanged(
bool checked);
76 void checkableChanged(
bool checkable);
77#if QT_CONFIG(shortcut)
78 void shortcutChanged(
const QKeySequence &shortcut);
81 void toggled(QObject *source =
nullptr);
82 void triggered(QObject *source =
nullptr);
85 bool event(QEvent *event) override;
86 bool eventFilter(QObject *object, QEvent *event) override;
89 Q_DISABLE_COPY(QQuickAction)
90 Q_DECLARE_PRIVATE(QQuickAction)