Albert
Loading...
Searching...
No Matches
albert::PluginInstance Class Reference

#include <albert/plugininstance.h>

Inheritance diagram for albert::PluginInstance:
[legend]

Detailed Description

Abstract plugin instance class.

The class every plugin has to inherit.

Public Member Functions

const PluginLoaderloader () const
 The PluginLoader of this instance.
 
albert::ExtensionRegistryregistry ()
 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 ()
 

Constructor & Destructor Documentation

◆ PluginInstance()

albert::PluginInstance::PluginInstance ( )
protected

◆ ~PluginInstance()

virtual albert::PluginInstance::~PluginInstance ( )
protectedvirtual

Member Function Documentation

◆ buildConfigWidget()

virtual QWidget * albert::PluginInstance::buildConfigWidget ( )
virtual

The widget used to configure the plugin in the settings.

Returns
The config widget.

◆ cacheLocation()

QString albert::PluginInstance::cacheLocation ( ) const

The recommended cache location.

Returns
The recommended cache location.
Since
0.24

◆ configLocation()

QString albert::PluginInstance::configLocation ( ) const

The recommended config location.

Returns
The recommended config location.
Since
0.24

◆ createOrThrow()

static QDir albert::PluginInstance::createOrThrow ( const QString &  path)
static

Creates a directory, throws an exception if it fails.

This is a utility function for use with the *Location functions.

Returns
The directory.
Since
0.24

◆ dataLocation()

QString albert::PluginInstance::dataLocation ( ) const

The recommended data location.

Returns
The recommended data location.
Since
0.24

◆ loader()

const PluginLoader & albert::PluginInstance::loader ( ) const

The PluginLoader of this instance.

Returns
The PluginLoader of this instance.
Since
0.24

◆ registry()

albert::ExtensionRegistry & albert::PluginInstance::registry ( )

The associated ExtensionRegistry.

Returns
The associated ExtensionRegistry.
Since
0.24

◆ settings()

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>.

Returns
Preconfigured QSettings object for config storage.

◆ state()

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>.

Since
0.23
Returns
Preconfigured QSettings object for state storage.

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