Loading...
Searching...
No Matches
DBusMenuExporter Class Reference

`#include <dbusmenuexporter.h>`

Inheritance diagram for DBusMenuExporter:

## Public Member Functions

| DBusMenuExporter (const QString &dbusObjectPath, QMenu *menu, const QDBusConnection &dbusConnection=QDBusConnection::sessionBus())
void | activateAction (QAction *action)
void | setStatus (const QString &status)
QString | status () const

## Protected Member Functions

virtual QString | iconNameForAction (QAction *action)

## Friends

class | DBusMenuExporterPrivate
class | DBusMenuExporterDBus
class | DBusMenu

## Detailed Description

A DBusMenuExporter instance can serialize a menu over DBus

## Constructor & Destructor Documentation

## DBusMenuExporter()

DBusMenuExporter::DBusMenuExporter | ( | const QString & | dbusObjectPath,
|  | QMenu * | menu,
|  | const QDBusConnection & | dbusConnection = QDBusConnection::sessionBus() )

Creates a DBusMenuExporter exporting menu at the dbus object path dbusObjectPath, using the given dbusConnection. The instance adds itself to the menu children.

## Member Function Documentation

## activateAction()

void DBusMenuExporter::activateAction | ( | QAction * | action | ) |

Asks the matching DBusMenuImporter to activate `action`. For menus it means popup them, for items it means triggering the associated action.

## iconNameForAction()

virtual QString DBusMenuExporter::iconNameForAction | ( | QAction * | action | ) |

protected virtual

Must extract the icon name for action. This is the name which will be used to present the icon over DBus. Default implementation returns action->icon().name() when built on Qt >= 4.7 and a null string otherwise.

## setStatus()

void DBusMenuExporter::setStatus | ( | const QString & | status | ) |

The status of the menu. Can be one of "normal" or "notice". This can be used to notify the other side the menu should be made more visible. For example, appmenu uses it to tell Unity panel to show/hide the menubar when the Alt modifier is pressed/released.

## status()

QString DBusMenuExporter::status | ( |  | ) | const

Returns the status of the menu. setStatus

The documentation for this class was generated from the following file:

- /build/libdbusmenu-qt-3ktzai/libdbusmenu-qt-0.9.3+16.04.20160218/src/dbusmenuexporter.h