Albert
Loading...
Searching...
No Matches
albert::App Class Referenceabstract

#include <albert/app.h>

Description

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 ExtensionRegistryextensionRegistry () 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 Appinstance ()
 Returns the core app instance.
 

Protected Member Functions

 App ()
 
virtual ~App ()
 

Constructor & Destructor Documentation

◆ App()

albert::App::App ( )
protected

◆ ~App()

virtual albert::App::~App ( )
protectedvirtual

Member Function Documentation

◆ cacheLocation()

static const std::filesystem::path & albert::App::cacheLocation ( )
static

Returns the path to the application cache directory.

This function is thread-safe.

◆ configLocation()

static const std::filesystem::path & albert::App::configLocation ( )
static

Returns the path to the application config directory.

This function is thread-safe.

◆ dataLocation()

static const std::filesystem::path & albert::App::dataLocation ( )
static

Returns the path to the application data directory.

This function is thread-safe.

◆ extensionRegistry()

virtual const ExtensionRegistry & albert::App::extensionRegistry ( ) const
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.

◆ instance()

static App & albert::App::instance ( )
static

Returns the core app instance.

◆ quit()

static void albert::App::quit ( )
static

Quits the application.

This function is thread-safe.

◆ restart()

static void albert::App::restart ( )
static

Restarts the application.

This function is thread-safe.

◆ settings()

static std::unique_ptr< QSettings > albert::App::settings ( )
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.

◆ show()

virtual void albert::App::show ( const QString &  input_text = {})
pure virtual

Shows the frontend and optionally sets the text to input_text.

◆ showSettings()

virtual void albert::App::showSettings ( QString  plugin_id = {})
pure virtual

Shows the settings window and optionally selects the plugin with plugin_id.

◆ state()

static std::unique_ptr< QSettings > albert::App::state ( )
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.


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