dbusmenu-qt: DBusMenuImporter Class Reference

dbusmenu-qt 0.9.2

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Slots | Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
DBusMenuImporter Class Reference

`#include <dbusmenuimporter.h>`

Inheritance diagram for DBusMenuImporter:

## Public Slots
void | updateMenu ()

## Signals
void | menuUpdated ()
void | menuReadyToBeShown ()
void | actionActivationRequested (QAction *)

## Public Member Functions
| DBusMenuImporter (const QString &service, const QString &path, QObject *parent=0)
| DBusMenuImporter (const QString &service, const QString &path, DBusMenuImporterType type, QObject *parent=0)
QMenu * | menu () const

## Protected Member Functions
virtual QMenu * | createMenu (QWidget *parent)
virtual QIcon | iconForName (const QString &)

## Friends
class | DBusMenuImporterPrivate

## Detailed Description

A DBusMenuImporter instance can recreate a menu serialized over DBus by DBusMenuExporter

## Constructor & Destructor Documentation

DBusMenuImporter::DBusMenuImporter | ( | const QString & | service,
|  | const QString & | path,
|  | QObject * | parent = `0`
| ) |  |

Creates a DBusMenuImporter listening over DBus on service, path

DBusMenuImporter::DBusMenuImporter | ( | const QString & | service,
|  | const QString & | path,
|  | DBusMenuImporterType | type,
|  | QObject * | parent = `0`
| ) |  |

Creates a DBusMenuImporter listening over DBus on service, path, with either async or sync DBus calls

## Member Function Documentation

void DBusMenuImporter::actionActivationRequested | ( | QAction * |  | ) |
| signal

Emitted when the exporter was asked to activate an action

virtual QMenu* DBusMenuImporter::createMenu | ( | QWidget * | parent | ) |
| protectedvirtual

Must create a menu, may be customized to fit host appearance. Default implementation creates a simple QMenu.

virtual QIcon DBusMenuImporter::iconForName | ( | const QString & |  | ) |
| protectedvirtual

Must convert a name into an icon. Default implementation returns a null icon.

QMenu* DBusMenuImporter::menu | ( |  | ) | const

The menu created from listening to the DBusMenuExporter over DBus

void DBusMenuImporter::menuReadyToBeShown | ( |  | ) |
| signal

Emitted after every aboutToShow of the root menu. This signal is deprecated and only kept to keep compatibility with dbusmenu-qt 0.3.x. New code should use updateMenu() and menuUpdated()

Deprecated:

void DBusMenuImporter::menuUpdated | ( |  | ) |
| signal

Emitted after a call to updateMenu().

See also
  updateMenu()

void DBusMenuImporter::updateMenu | ( |  | ) |
| slot

Simulates a QMenu::aboutToShow() signal on the menu returned by menu(), ensuring it is up to date in case the menu is populated on the fly. It is not mandatory to call this method, showing the menu with QMenu::popup() or QMenu::exec() will generates an aboutToShow() signal, but calling it before ensures the size-hint of the menu is correct when it is time to show it, avoiding wrong positioning.

menuUpdated() will be emitted when the menu is ready.

Not that the aboutToShow() signal is only sent to the root menu, not to any submenu.

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

- /usr/src/ports/libdbusmenu-qt/libdbusmenu-qt-0.9.3-0.2.20150604bzr.x86_64/src/libdbusmenu-qt-0.9.3/src/dbusmenuimporter.h