|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
A widget showing an empty state with icon, message, and actions. More...
#include <loading_widgets.h>
Public Member Functions | |
| EmptyStateWidget (QWidget *parent=nullptr, ThemeManager *themeManager=nullptr) | |
| ~EmptyStateWidget () override=default | |
| void | addAction (const QString &label, const std::function< void()> &callback) |
| void | applyTheme () |
| void | clearActions () |
| void | setDescription (const QString &description) |
| void | setIcon (const QString &iconText) |
| void | setTitle (const QString &title) |
Protected Member Functions | |
| void | showEvent (QShowEvent *event) override |
A widget showing an empty state with icon, message, and actions.
Provides a more engaging empty state than just text.
Usage: auto* emptyState = new EmptyStateWidget(this); emptyState->setIcon("🎮"); emptyState->setTitle("No games found"); emptyState->setDescription("Try adjusting your filters or add some games"); emptyState->addAction("Add Game", [this]() { showAddGameDialog(); }); emptyState->addAction("Clear Filters", [this]() { clearFilters(); });
Definition at line 213 of file loading_widgets.h.
|
explicit |
Definition at line 376 of file loading_widgets.cpp.
References applyTheme().
|
overridedefault |
| void EmptyStateWidget::addAction | ( | const QString & | label, |
| const std::function< void()> & | callback ) |
Definition at line 437 of file loading_widgets.cpp.
| void EmptyStateWidget::applyTheme | ( | ) |
Definition at line 478 of file loading_widgets.cpp.
Referenced by EmptyStateWidget(), and showEvent().
| void EmptyStateWidget::clearActions | ( | ) |
Definition at line 466 of file loading_widgets.cpp.
| void EmptyStateWidget::setDescription | ( | const QString & | description | ) |
Definition at line 432 of file loading_widgets.cpp.
| void EmptyStateWidget::setIcon | ( | const QString & | iconText | ) |
Definition at line 422 of file loading_widgets.cpp.
| void EmptyStateWidget::setTitle | ( | const QString & | title | ) |
Definition at line 427 of file loading_widgets.cpp.
|
overrideprotected |
Definition at line 495 of file loading_widgets.cpp.
References applyTheme().