Loading...
Searching...
No Matches
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() [1/2]

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

Creates a DBusMenuImporter listening over DBus on service, path

## DBusMenuImporter() [2/2]

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

## actionActivationRequested

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

signal

Emitted when the exporter was asked to activate an action

## createMenu()

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

protected virtual

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

## iconForName()

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

protected virtual

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

## menu()

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

The menu created from listening to the DBusMenuExporter over DBus

## menuReadyToBeShown

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

## menuUpdated

void DBusMenuImporter::menuUpdated | ( |  | ) |

signal

Emitted after a call to updateMenu().

See also
  updateMenu()

## 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:

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