Chatterino
Public Member Functions | Friends | List of all members
chatterino::Hotkey Class Reference

#include <Hotkey.hpp>

Public Member Functions

 Hotkey (HotkeyCategory category, QKeySequence keySequence, QString action, std::vector< QString > arguments, QString name)
 
virtual ~Hotkey ()=default
 
QString toString () const
 Returns the OS-specific string representation of the hotkey. More...
 
QString toPortableString () const
 Returns the portable string representation of the hotkey. More...
 
HotkeyCategory category () const
 Returns the category where this hotkey is active. This is labeled the "Category" in the UI. More...
 
QString action () const
 Returns the action which describes what this Hotkey is meant to do. More...
 
bool validAction () const
 
std::vector< QString > arguments () const
 Returns a list of arguments this hotkey has bound to it. More...
 
QString name () const
 Returns the display name of the hotkey. More...
 
QString getCategory () const
 Returns the user-friendly text representation of the hotkeys category. More...
 
const QKeySequence & keySequence () const
 Returns the programmating key sequence of the hotkey. More...
 

Friends

class HotkeyController
 

Constructor & Destructor Documentation

◆ Hotkey()

chatterino::Hotkey::Hotkey ( HotkeyCategory  category,
QKeySequence  keySequence,
QString  action,
std::vector< QString >  arguments,
QString  name 
)

◆ ~Hotkey()

virtual chatterino::Hotkey::~Hotkey ( )
virtualdefault

Member Function Documentation

◆ action()

QString chatterino::Hotkey::action ( ) const

Returns the action which describes what this Hotkey is meant to do.

For example, in the Window category there's a "showSearch" action which opens a search popup

Here is the caller graph for this function:

◆ arguments()

std::vector< QString > chatterino::Hotkey::arguments ( ) const

Returns a list of arguments this hotkey has bound to it.

Some actions require a set of arguments that the user can provide, for example the "openTab" action takes an argument for which tab to switch to. can be a number or a word like next or previous

◆ category()

HotkeyCategory chatterino::Hotkey::category ( ) const

Returns the category where this hotkey is active. This is labeled the "Category" in the UI.

See enum HotkeyCategory for more information about the various hotkey categories

◆ getCategory()

QString chatterino::Hotkey::getCategory ( ) const

Returns the user-friendly text representation of the hotkeys category.

Suitable for showing in the GUI. e.g. Split input box for HotkeyCategory::SplitInput

Here is the call graph for this function:

◆ keySequence()

const QKeySequence & chatterino::Hotkey::keySequence ( ) const

Returns the programmating key sequence of the hotkey.

The actual key codes required for the hotkey to trigger specifically on e.g CTRL+F5

Here is the caller graph for this function:

◆ name()

QString chatterino::Hotkey::name ( ) const

Returns the display name of the hotkey.

For example, in the Split category there's a "showSearch" action that has a default hotkey with the name "default show search"

◆ toPortableString()

QString chatterino::Hotkey::toPortableString ( ) const

Returns the portable string representation of the hotkey.

Suitable for saving to/loading from file e.g. Ctrl+F5 or Shift+Ctrl+R

Here is the call graph for this function:

◆ toString()

QString chatterino::Hotkey::toString ( ) const

Returns the OS-specific string representation of the hotkey.

Suitable for showing in the GUI e.g. Ctrl+F5 or Command+F5

Here is the call graph for this function:

◆ validAction()

bool chatterino::Hotkey::validAction ( ) const
Here is the call graph for this function:

Friends And Related Function Documentation

◆ HotkeyController

friend class HotkeyController
friend

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