LAttribute* primary() const
Returns a pointer to the application's primary attribute.
Public Functions
QLApplication(int& argc, char** argv, const QString& name, const QUuid& uuid) | |
LTheme* | active_theme() |
void | add_theme(LTheme* theme) |
QString | app_display_id() const |
void | apply_theme(LTheme* theme) |
virtual QList<QLThemeable*> | child_qlthemeables(Qt::FindChildOptions options = Qt::FindDirectChildrenOnly) override |
void | download_and_install_update() |
QFile* | icon_file() |
void | init() |
QString | latest_version() |
QString | name() |
LAttribute* | primary() const |
void | reapply_theme() |
void | set_github_repo(const QString& github_repo_url) |
void | set_publisher(const QString& publisher) |
void | set_version(const QString& version) |
QSettings& | settings() |
LTheme* | theme(const QString& theme_id) |
QMap<QString, LTheme*> | themes() |
bool | update_available() |
QString | version() |
Signals
void | active_theme_changed() |
void | theme_added(LTheme* theme) |
Slots
void | rename_theme(const QString& old_name, const QString& new_name) |
Detailed Description
A QLApplication is a QApplication and a QLThemeable that provides structure and functionality for a QLayers app.
Member Function Documentation
Constructs a QLayers application with the provided name and uuid.
LTheme* active_theme()
Returns a pointer to the applications active theme.
void active_theme_changed()
Signal
This signal is emitted when the application's theme changes.
void add_theme(LTheme* theme)
Adds theme to the list of available application themes.
QString app_display_id() const
Returns a string representing the application's display ID.
void apply_theme(LTheme* theme)
Applies theme as the active application theme.
QList<QLThemeable*> child_qlthemeables(Qt::FindChildOptions options = Qt::FindDirectChildrenOnly)
Virtual
Override
Returns a list of child themeables.
This function overrides QLThemeable::child_qlthemeables() to include additional child themeables.
void download_and_install_update()
Downloads the latest version of the application and installs it.
The application will quit before the install takes place.
void init()
Initializes the application.
This must be called manually to ensure that the application gets initialized properly.
QString latest_version()
Returns a string with the latest version tag of the application.
QString name()
Returns the name of the application.
LAttribute* primary() const
Returns a pointer to the application's primary attribute.
void reapply_theme()
Reapplies the current active theme.
Renames the application theme with the old_name to the new_name.
void set_github_repo(const QString& github_repo_url)
Sets the application's GitHub repository URL to github_repo_url.
void set_publisher(const QString& publisher)
Sets the name of the application publisher.
void set_version(const QString& version)
Sets the current version of the application.
QSettings& settings()
Returns a reference to the application's settings.
Returns a pointer to the application theme specified by theme_id.
Returns nullptr is no such theme exists.
void theme_added(LTheme* theme)
Signal
This signal is emitted when a theme is added to the application. theme is a pointer to the theme being added.
See add_theme()
Returns a map containing pointers to the application's themes. Theme display-IDs are used as keys to identify the themes.
bool update_available()
Returns true if there is an application update available, false otherwise.
QString version()
Returns a string with the current version tag of the application.
See set_version()