Albert
|
#include <albert/plugininstance.h>
Abstract plugin instance class.
The class every plugin has to inherit.
Public Member Functions | |
const PluginLoader & | loader () const |
The PluginLoader of this instance. | |
albert::ExtensionRegistry & | registry () |
The associated ExtensionRegistry. | |
virtual QWidget * | buildConfigWidget () |
The widget used to configure the plugin in the settings. | |
QString | cacheLocation () const |
The recommended cache location. | |
QString | configLocation () const |
The recommended config location. | |
QString | dataLocation () const |
The recommended data location. | |
std::unique_ptr< QSettings > | settings () const |
Persistent plugin settings. | |
std::unique_ptr< QSettings > | state () const |
Persistent plugin state. | |
Static Public Member Functions | |
static QDir | createOrThrow (const QString &path) |
Creates a directory, throws an exception if it fails. | |
Protected Member Functions | |
PluginInstance () | |
virtual | ~PluginInstance () |
|
protected |
|
protectedvirtual |
|
virtual |
The widget used to configure the plugin in the settings.
QString albert::PluginInstance::cacheLocation | ( | ) | const |
The recommended cache location.
QString albert::PluginInstance::configLocation | ( | ) | const |
The recommended config location.
|
static |
Creates a directory, throws an exception if it fails.
This is a utility function for use with the *Location functions.
QString albert::PluginInstance::dataLocation | ( | ) | const |
The recommended data location.
const PluginLoader & albert::PluginInstance::loader | ( | ) | const |
albert::ExtensionRegistry & albert::PluginInstance::registry | ( | ) |
std::unique_ptr< QSettings > albert::PluginInstance::settings | ( | ) | const |
Persistent plugin settings.
Preconfigured according to albert conventions, i.e. using albert::settings() configured to write to a section titled <plugin-id>.
std::unique_ptr< QSettings > albert::PluginInstance::state | ( | ) | const |
Persistent plugin state.
Preconfigured according to albert conventions, i.e. using albert::state() configured to write to a section titled <plugin-id>.