|
Albert
|
#include <albert/app.h>
The public app instance interface.
Public Member Functions | |
| virtual void | show (const QString &input_text={})=0 |
| Shows the frontend and optionally sets the text to input_text. | |
| virtual void | showSettings (QString plugin_id={})=0 |
| Shows the settings window and optionally selects the plugin with plugin_id. | |
| virtual const ExtensionRegistry & | extensionRegistry () const =0 |
| Returns a const reference to the central extension registry. | |
Static Public Member Functions | |
| static void | restart () |
| Restarts the application. | |
| static void | quit () |
| Quits the application. | |
| static const std::filesystem::path & | configLocation () |
| Returns the path to the application config directory. | |
| static const std::filesystem::path & | cacheLocation () |
| Returns the path to the application cache directory. | |
| static const std::filesystem::path & | dataLocation () |
| Returns the path to the application data directory. | |
| static std::unique_ptr< QSettings > | settings () |
Returns a QSettings object initialized with the application configuration file path. | |
| static std::unique_ptr< QSettings > | state () |
Returns a QSettings object initialized with the application state file path. | |
| static App & | instance () |
| Returns the core app instance. | |
Protected Member Functions | |
| App () | |
| virtual | ~App () |
|
protected |
|
protectedvirtual |
|
static |
Returns the path to the application cache directory.
This function is thread-safe.
|
static |
Returns the path to the application config directory.
This function is thread-safe.
|
static |
Returns the path to the application data directory.
This function is thread-safe.
|
pure virtual |
Returns a const reference to the central extension registry.
Registering plugins via this registry is not allowed. Use PluginInstance::extensions(). See also WeakDependency and StrongDependency.
|
static |
Returns the core app instance.
|
static |
Quits the application.
This function is thread-safe.
|
static |
Restarts the application.
This function is thread-safe.
|
static |
Returns a QSettings object initialized with the application configuration file path.
As unique_ptr for the sake of movability.
This function is thread-safe.
|
pure virtual |
Shows the frontend and optionally sets the text to input_text.
|
pure virtual |
Shows the settings window and optionally selects the plugin with plugin_id.
|
static |
Returns a QSettings object initialized with the application state file path.
As unique_ptr for the sake of movability.
This function is thread-safe.