|
Albert
|
#include <albert/app.h>
The public app instance interface.
Inherits QObject.
Public Member Functions | |
Main window | |
| 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. | |
Extensions | |
| virtual const std::map< QString, Extension * > & | extensions () const =0 |
| Get map of all registered extensions. | |
| template<typename T > | |
| std::map< QString, T * > | extensions () const |
| Get map of all extensions of type T. | |
| template<typename T > | |
| T * | extension (const QString &id) const |
| Get extension by id implicitly dynamic_cast'ed to type T. | |
Static Public Member Functions | |
| static App & | instance () |
| Returns the global app instance. | |
Application control | |
| static void | restart () |
| Restarts the application. | |
| static void | quit () |
| Quits the application. | |
Persistence | |
| 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 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. | |
Signals | |
| void | added (albert::Extension *) |
| Emitted when an extension has been registered. | |
| void | removed (albert::Extension *) |
| Emitted when an extension has been deregistered. | |
|
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.
|
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.
|
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.