|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Fluent builder for creating PaletteCommand objects. More...
#include <command_palette.h>
Public Member Functions | |
| CommandBuilder (const QString &id) | |
| CommandBuilder & | action (std::function< void()> fn) |
| PaletteCommand | build () const |
| CommandBuilder & | category (const QString &cat) |
| CommandBuilder & | description (const QString &desc) |
| CommandBuilder & | enabledWhen (std::function< bool()> fn) |
| CommandBuilder & | icon (const QString &icon) |
| CommandBuilder & | label (const QString &label) |
| CommandBuilder & | priority (int p) |
| CommandBuilder & | shortcut (const QString &sc) |
| CommandBuilder & | visibleWhen (std::function< bool()> fn) |
Fluent builder for creating PaletteCommand objects.
Usage: auto cmd = CommandBuilder("game.launch") .label("Launch Game") .category("Games") .shortcut("Enter") .icon("...") .action([this]() { launchSelectedGame(); }) .enabledWhen([this]() { return hasSelectedGame(); }) .build();
Definition at line 219 of file command_palette.h.
|
inlineexplicit |
Definition at line 222 of file command_palette.h.
Referenced by action(), category(), description(), enabledWhen(), icon(), label(), priority(), shortcut(), and visibleWhen().
|
inline |
Definition at line 257 of file command_palette.h.
References CommandBuilder(), and action().
Referenced by action(), and ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 273 of file command_palette.h.
Referenced by ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 232 of file command_palette.h.
References CommandBuilder(), and category().
Referenced by category(), and ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 247 of file command_palette.h.
References CommandBuilder(), and description().
Referenced by description(), and ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 262 of file command_palette.h.
References CommandBuilder().
Referenced by ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 242 of file command_palette.h.
References CommandBuilder(), and icon().
Referenced by icon(), and ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 227 of file command_palette.h.
References CommandBuilder(), and label().
Referenced by label().
|
inline |
Definition at line 252 of file command_palette.h.
References CommandBuilder(), and priority().
Referenced by priority(), and ShortcutsController::registerPaletteCommands().
|
inline |
Definition at line 237 of file command_palette.h.
References CommandBuilder(), and shortcut().
Referenced by shortcut().
|
inline |
Definition at line 267 of file command_palette.h.
References CommandBuilder().
Referenced by ShortcutsController::registerPaletteCommands().