Albert
|
#include <albert/extensionregistry.h>
Inherits QObject.
The common extension pool.
Clients can add their extensions, while services can track extensions by listening to the signals added/removed or any particular extension interface using ExtensionWatcher.
Use in the main thread only!
Signals | |
void | added (Extension *) |
Emitted when an extension has been registered. | |
void | removed (Extension *) |
Emitted when an extension has been deregistered. | |
Public Member Functions | |
bool | registerExtension (Extension *) |
Add extension to the registry. | |
void | deregisterExtension (Extension *) |
Remove extension from the registry. | |
const std::map< QString, Extension * > & | extensions () |
Get map of all registered extensions. | |
template<typename T > | |
std::map< QString, T * > | extensions () |
Get map of all extensions of type T. | |
template<typename T > | |
T * | extension (const QString &id) |
Get extension by id implicitly dynamic_cast'ed to type T. | |
|
signal |
Emitted when an extension has been registered.
void albert::ExtensionRegistry::deregisterExtension | ( | Extension * | ) |
Remove extension from the registry.
|
inline |
Get extension by id implicitly dynamic_cast'ed to type T.
const std::map< QString, Extension * > & albert::ExtensionRegistry::extensions | ( | ) |
Get map of all registered extensions.
|
inline |
Get map of all extensions of type T.
bool albert::ExtensionRegistry::registerExtension | ( | Extension * | ) |
Add extension to the registry.
|
signal |
Emitted when an extension has been deregistered.