#include <HotkeyController.hpp>
|
| HotkeyController () |
|
HotkeyModel * | createModel (QObject *parent) |
|
std::vector< QShortcut * > | shortcutsForCategory (HotkeyCategory category, HotkeyMap actionMap, QWidget *parent) |
|
void | save () override |
|
std::shared_ptr< Hotkey > | getHotkeyByName (QString name) |
|
QKeySequence | getDisplaySequence (HotkeyCategory category, const QString &action, const std::optional< std::vector< QString >> &arguments={}) const |
| returns a QKeySequence that perfoms the actions requested. Accepted if and only if the category matches, the action matches and arguments match. When arguments is present, contents of arguments must match the checked hotkey, otherwise arguments are ignored. For example: More...
|
|
int | replaceHotkey (QString oldName, std::shared_ptr< Hotkey > newHotkey) |
| removes the hotkey with the oldName and inserts newHotkey at the end More...
|
|
boost::optional< HotkeyCategory > | hotkeyCategoryFromName (QString categoryName) |
|
bool | isDuplicate (std::shared_ptr< Hotkey > hotkey, QString ignoreNamed) |
| checks if the hotkey is duplicate More...
|
|
QString | categoryDisplayName (HotkeyCategory category) const |
| Returns the display name of the given hotkey category. More...
|
|
QString | categoryName (HotkeyCategory category) const |
| Returns the name of the given hotkey category. More...
|
|
const std::map< HotkeyCategory, HotkeyCategoryData > & | categories () const |
|
virtual | ~Singleton ()=default |
|
virtual void | initialize (Settings &settings, Paths &paths) |
|
◆ HotkeyFunction
◆ HotkeyMap
◆ HotkeyController()
chatterino::HotkeyController::HotkeyController |
( |
| ) |
|
◆ categories()
- Returns
- a const map with the HotkeyCategory enum as its key, and HotkeyCategoryData as the value.
◆ categoryDisplayName()
QString chatterino::HotkeyController::categoryDisplayName |
( |
HotkeyCategory |
category | ) |
const |
Returns the display name of the given hotkey category.
- Returns
- the display name, or an empty string if an invalid hotkey category was given
◆ categoryName()
QString chatterino::HotkeyController::categoryName |
( |
HotkeyCategory |
category | ) |
const |
Returns the name of the given hotkey category.
- Returns
- the name, or an empty string if an invalid hotkey category was given
◆ createModel()
HotkeyModel * chatterino::HotkeyController::createModel |
( |
QObject * |
parent | ) |
|
◆ getDisplaySequence()
QKeySequence chatterino::HotkeyController::getDisplaySequence |
( |
HotkeyCategory |
category, |
|
|
const QString & |
action, |
|
|
const std::optional< std::vector< QString >> & |
arguments = {} |
|
) |
| const |
returns a QKeySequence that perfoms the actions requested. Accepted if and only if the category matches, the action matches and arguments match. When arguments is present, contents of arguments must match the checked hotkey, otherwise arguments are ignored. For example:
- std::nullopt (or {}) will match any hotkey satisfying category, action values,
- {{"foo", "bar"}} will only match a hotkey that has these arguments and these arguments only
◆ getHotkeyByName()
std::shared_ptr< Hotkey > chatterino::HotkeyController::getHotkeyByName |
( |
QString |
name | ) |
|
◆ hotkeyCategoryFromName()
boost::optional< HotkeyCategory > chatterino::HotkeyController::hotkeyCategoryFromName |
( |
QString |
categoryName | ) |
|
◆ isDuplicate()
bool chatterino::HotkeyController::isDuplicate |
( |
std::shared_ptr< Hotkey > |
hotkey, |
|
|
QString |
ignoreNamed |
|
) |
| |
checks if the hotkey is duplicate
- Parameters
-
hotkey | the hotkey to check |
ignoreNamed | name of hotkey to ignore. Useful for ensuring we don't fail if the hotkey's name is being edited |
- Returns
- true if the given hotkey is a duplicate, false if it's not
◆ replaceHotkey()
int chatterino::HotkeyController::replaceHotkey |
( |
QString |
oldName, |
|
|
std::shared_ptr< Hotkey > |
newHotkey |
|
) |
| |
removes the hotkey with the oldName and inserts newHotkey at the end
- Returns
- the new index in the SignalVector
◆ save()
void chatterino::HotkeyController::save |
( |
| ) |
|
|
overridevirtual |
◆ shortcutsForCategory()
std::vector< QShortcut * > chatterino::HotkeyController::shortcutsForCategory |
( |
HotkeyCategory |
category, |
|
|
HotkeyMap |
actionMap, |
|
|
QWidget * |
parent |
|
) |
| |
◆ KeyboardSettingsPage
◆ onItemsUpdated
pajlada::Signals::NoArgSignal chatterino::HotkeyController::onItemsUpdated |
The documentation for this class was generated from the following files: