7#include <albert/config.h>
8#include <albert/export.h>
63 [[nodiscard]] std::unique_ptr<QSettings>
settings()
const;
69 [[nodiscard]] std::unique_ptr<QSettings>
state()
const;
74 std::function<
void(
const QString &)> onSuccess,
75 std::function<
void(
const QString &)> onError)
const;
81 std::function<
void()> onSuccess,
82 std::function<
void(
const QString&)> onError)
const;
92 std::unique_ptr<Private> d;
108#define ALBERT_PLUGIN Q_OBJECT Q_PLUGIN_METADATA(IID ALBERT_PLUGIN_IID FILE "metadata.json")
Abstract plugin instance class.
Definition plugininstance.h:26
const PluginLoader & loader() const
The PluginLoader of this instance.
std::vector< std::filesystem::path > dataLocations() const
The existing data locations of this plugin.
std::unique_ptr< QSettings > state() const
Persistent plugin state.
virtual ~PluginInstance()
std::filesystem::path dataLocation() const
The recommended data location.
void writeKeychain(const QString &key, const QString &value, std::function< void()> onSuccess, std::function< void(const QString &)> onError) const
Sets the keychain value of key to value asynchronously.
std::unique_ptr< QSettings > settings() const
Persistent plugin settings.
std::filesystem::path cacheLocation() const
The recommended cache location.
virtual QWidget * buildConfigWidget()
The widget used to configure the plugin in the settings.
std::filesystem::path configLocation() const
The recommended config location.
virtual std::vector< albert::Extension * > extensions()
The extensions provided by this plugin.
void readKeychain(const QString &key, std::function< void(const QString &)> onSuccess, std::function< void(const QString &)> onError) const
Reads the keychain value for key asynchronously.
Asynchronous plugin loader turning a physical plugin into a logical PluginInstance.
Definition pluginloader.h:16
Albert core interface namespace.
Definition albert.h:14