Albert
Loading...
Searching...
No Matches
albert::plugin::Plugin Class Reference

#include <plugin.h>

Inheritance diagram for albert::plugin::Plugin:
albert::PluginInstance albert::plugin::ExtensionPlugin

Detailed Description

Base class for native plugins.

Native Albert plugins are based on Qt plugins. Qt plugins have to inherit QObject and contain the Q_OBJECT and Q_PLUGIN_METADATA macro. ALBERT_PLUGIN is a convenience macro calling Q_PLUGIN_METADATA with appropriate defaults. Albert expects plugins to inherit albert::PluginInstance.

In short to build a plugin you have to:

  • Inherit albert::Plugin
  • Add the Q_OBJECT and ALBERT_PLUGIN macro to the class body
See also
albert::plugin::ExtensionPlugin
Note
Boolean user QPROPERTY's of registered plugins will be picked up by the core extension and are provided to the user as inline options. See ALBERT_PLUGIN_PROPERTY, ALBERT_PLUGIN_PROPERTY_NONTRIVIAL and ALBERT_PLUGIN_PROPERTY_CONNECT.

Additional Inherited Members

- Public Member Functions inherited from albert::PluginInstance
 PluginInstance ()
 
QString id () const
 The plugin identifier. More...
 
QString name () const
 The human readable plugin name. More...
 
QString description () const
 Brief description of the plugin. More...
 
QDir cacheDir () const
 The recommended cache location. More...
 
QDir configDir () const
 The recommended config location. More...
 
QDir dataDir () const
 The recommended data location. More...
 
std::unique_ptr< QSettings > settings () const
 Persistent plugin settings utilizing QSettings. More...
 
std::unique_ptr< QSettings > state () const
 Persistent plugin state utilizing QSettings. More...
 
virtual void initialize (ExtensionRegistry &registry, std::map< QString, PluginInstance * > dependencies)
 The initialization function. More...
 
virtual void finalize (ExtensionRegistry &registry)
 The finalization function. More...
 
virtual QWidget * buildConfigWidget ()
 Config widget factory. More...
 
- Protected Member Functions inherited from albert::PluginInstance
virtual ~PluginInstance ()
 

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