6#include <QDBusConnection>
7#include <QDBusMetaType>
15#if QT_CONFIG(shortcut)
16# include <private/qkeysequence_p.h>
18#include <qpa/qplatformmenu.h>
69 qCDebug(qLcMenu) <<
id <<
"depth" <<
depth << propertyNames;
85 return menu->revision();
115 arg.beginStructure();
117 arg.beginArray(qMetaTypeId<QDBusVariant>());
127 arg.beginStructure();
130 while (!
arg.atEnd()) {
136 childArgument >>
child;
146 qDBusRegisterMetaType<QDBusMenuItem>();
147 qDBusRegisterMetaType<QDBusMenuItemList>();
148 qDBusRegisterMetaType<QDBusMenuItemKeys>();
149 qDBusRegisterMetaType<QDBusMenuItemKeysList>();
150 qDBusRegisterMetaType<QDBusMenuLayoutItem>();
151 qDBusRegisterMetaType<QDBusMenuLayoutItemList>();
152 qDBusRegisterMetaType<QDBusMenuEvent>();
153 qDBusRegisterMetaType<QDBusMenuEventList>();
154 qDBusRegisterMetaType<QDBusMenuShortcut>();
158 : m_id(
item->dbusID())
160 if (
item->isSeparator()) {
167 if (
item->isCheckable()) {
168 QString toggleType =
item->hasExclusiveGroup() ?
"radio"_L1 :
"checkmark"_L1;
172#ifndef QT_NO_SHORTCUT
207 if (idx < 0 || idx ==
label.size() - 1)
214#ifndef QT_NO_SHORTCUT
218 for (
int i = 0;
i < sequence.
count(); ++
i) {
220 int key = sequence[
i].toCombined();
247 arg.beginStructure();
255 arg.beginStructure();
261#ifndef QT_NO_DEBUG_STREAM
266 d <<
"QDBusMenuItem(id=" <<
item.m_id <<
", properties=" <<
item.m_properties <<
')';
274 d <<
"QDBusMenuLayoutItem(id=" <<
item.m_id <<
", properties=" <<
item.m_properties <<
", " <<
item.m_children.size() <<
" children)";
\inmodule QtCore \reentrant
QVariant variant() const
Returns this D-Bus variant as a QVariant object.
bool isEnabled() const
Returns true if the item is enabled; otherwise, false is returned.
bool isVisible() const
Returns true if the item is visible; otherwise, false is returned.
The QIcon class provides scalable icons in different modes and states.
bool isNull() const
Returns true if the icon is empty; otherwise returns false.
QPixmap pixmap(const QSize &size, Mode mode=Normal, State state=Off) const
Returns a pixmap with the requested size, mode, and state, generating one if necessary.
static Q_GUI_EXPORT QString keyName(int key, QKeySequence::SequenceFormat format)
The QKeySequence class encapsulates a key sequence as used by shortcuts.
int count() const
Returns the number of keys in the key sequence.
bool isEmpty() const
Returns true if the key sequence is empty; otherwise returns false.
qsizetype size() const noexcept
iterator insert(const Key &key, const T &value)
bool save(const QString &fileName, const char *format=nullptr, int quality=-1) const
Saves the pixmap to the file with the given fileName using the specified image file format and qualit...
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Combined button and popup list for selecting options.
#define qCDebug(category,...)
GLint GLenum GLsizei GLsizei GLsizei depth
GLenum GLenum GLsizei const GLuint * ids
GLuint GLsizei const GLchar * label
[43]
GLenum GLuint GLenum GLsizei const GLchar * buf
static QString keyName(const QString &rKey)
#define QStringLiteral(str)