Libplasma
14#include <qqmlregistration.h>
20 QML_NAMED_ELEMENT(MenuItem)
30 Q_PROPERTY(
bool separator READ separator WRITE setSeparator NOTIFY separatorChanged)
34 Q_PROPERTY(
bool section READ section WRITE setSection NOTIFY sectionChanged)
35 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
36 Q_PROPERTY(QVariant icon READ icon WRITE setIcon NOTIFY iconChanged)
37 Q_PROPERTY(QAction *action READ action WRITE setAction NOTIFY actionChanged)
38 Q_PROPERTY(
bool checkable READ checkable WRITE setCheckable NOTIFY checkableChanged)
39 Q_PROPERTY(
bool checked READ checked WRITE setChecked NOTIFY toggled)
40 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
41 Q_PROPERTY(
bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
44 explicit QMenuItem(
QObject *parent =
nullptr);
46 QAction *action()
const;
47 void setAction(QAction *a);
48 QVariant icon()
const;
49 void setIcon(
const QVariant &i);
50 bool separator()
const;
51 void setSeparator(
bool s);
53 void setSection(
bool s);
55 void setText(
const QString &t);
57 bool checkable()
const;
58 void setCheckable(
bool checkable);
61 void setChecked(
bool checked);
63 bool isEnabled()
const;
64 void setEnabled(
bool enabled);
66 bool isVisible()
const;
67 void setVisible(
bool visible);
74 void separatorChanged();
75 void sectionChanged();
77 void toggled(
bool checked);
78 void checkableChanged();
79 void enabledChanged();
80 void visibleChanged();
void setParent(QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:48:23 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.