Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
SequenceEdit Class Reference

#include <sequence_edit.h>

Inheritance diagram for SequenceEdit:
[legend]
Collaboration diagram for SequenceEdit:
[legend]

Public Member Functions

 SequenceEdit (const QString &_shortcutName, QWidget *parent=nullptr)
QString getSequence ()
void setShortcutName (const QString &_shortcutName)
void refreshShortcut ()
void clear ()
void retranslateUi ()

Protected Member Functions

bool eventFilter (QObject *, QEvent *event) override

Private Slots

void removeLastShortcut ()
void restoreDefault ()

Private Member Functions

void processKey (QKeyEvent *e)
int translateModifiers (Qt::KeyboardModifiers state, const QString &text)
bool validateShortcut (const QKeySequence &sequence)
void finishShortcut ()
void updateSettings ()

Private Attributes

QString shortcutName
QLineEdit * lineEdit
QPushButton * clearButton
QPushButton * defaultButton
int keys = 0
int currentKey = 0
bool valid = false

Constructor & Destructor Documentation

◆ SequenceEdit()

SequenceEdit::SequenceEdit ( const QString & _shortcutName,
QWidget * parent = nullptr )
explicit
Here is the call graph for this function:

Member Function Documentation

◆ clear()

void SequenceEdit::clear ( )

◆ eventFilter()

bool SequenceEdit::eventFilter ( QObject * obj,
QEvent * event )
overrideprotected
Here is the call graph for this function:

◆ finishShortcut()

void SequenceEdit::finishShortcut ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSequence()

QString SequenceEdit::getSequence ( )

◆ processKey()

void SequenceEdit::processKey ( QKeyEvent * e)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshShortcut()

void SequenceEdit::refreshShortcut ( )
Here is the call graph for this function:

◆ removeLastShortcut

void SequenceEdit::removeLastShortcut ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restoreDefault

void SequenceEdit::restoreDefault ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void SequenceEdit::retranslateUi ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShortcutName()

void SequenceEdit::setShortcutName ( const QString & _shortcutName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ translateModifiers()

int SequenceEdit::translateModifiers ( Qt::KeyboardModifiers state,
const QString & text )
private
Here is the caller graph for this function:

◆ updateSettings()

void SequenceEdit::updateSettings ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateShortcut()

bool SequenceEdit::validateShortcut ( const QKeySequence & sequence)
private

Validates that shortcut is valid (is a valid shortcut key sequence and doesn't conflict with any other shortcuts). Displays warning messages if it's not valid.

Parameters
sequenceThe shortcut key sequence
Returns
True if the sequence isn't already self-contained
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ clearButton

QPushButton* SequenceEdit::clearButton
private

◆ currentKey

int SequenceEdit::currentKey = 0
private

◆ defaultButton

QPushButton* SequenceEdit::defaultButton
private

◆ keys

int SequenceEdit::keys = 0
private

◆ lineEdit

QLineEdit* SequenceEdit::lineEdit
private

◆ shortcutName

QString SequenceEdit::shortcutName
private

◆ valid

bool SequenceEdit::valid = false
private

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