Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
KeySequenceWidget Class Reference

#include </tmp/quassel/src/qtui/settingspages/keysequencewidget.h>

Collaboration diagram for KeySequenceWidget:

Public Slots

void setKeySequence (const QKeySequence &seq)

Signals

void keySequenceChanged (const QKeySequence &seq, const QModelIndex &conflicting=QModelIndex())
void clicked ()

Public Member Functions

 KeySequenceWidget (QWidget *parent=0)
void setModel (ShortcutsModel *model)

Private Slots

void updateShortcutDisplay ()
void startRecording ()
void cancelRecording ()
void clear ()

Private Member Functions

bool isRecording () const
void doneRecording ()
bool isOkWhenModifierless (int keyQt) const
bool isShiftAsModifierAllowed (int keyQt) const
bool isKeySequenceAvailable (const QKeySequence &seq)

Private Attributes

ShortcutsModel_shortcutsModel
bool _isRecording
QKeySequence _keySequence
QKeySequence _oldKeySequence
uint _modifierKeys
QModelIndex _conflictingIndex
KeySequenceButton_keyButton
QToolButton * _clearButton

Friends

class KeySequenceButton

Detailed Description

Definition at line 43 of file keysequencewidget.h.

Constructor & Destructor Documentation

KeySequenceWidget ( QWidget *  parent = 0)

Member Function Documentation

void setModel ( ShortcutsModel model)

Definition at line 196 of file keysequencewidget.cpp.

References _shortcutsModel.

void setKeySequence ( const QKeySequence &  seq)
slot

Definition at line 345 of file keysequencewidget.cpp.

References _clearButton, _keySequence, _oldKeySequence, doneRecording(), and isRecording().

Referenced by clear().

void keySequenceChanged ( const QKeySequence &  seq,
const QModelIndex &  conflicting = QModelIndex() 
)
signal

This signal is emitted when the current key sequence has changed by user input

Parameters
seqThe key sequence the user has chosen
conflictingThe index of an action that needs to have its shortcut removed. The user has already been asked to agree (if he declines, this signal won't be emitted at all).

Referenced by clear(), and doneRecording().

void clicked ( )
signal

Referenced by KeySequenceWidget().

void updateShortcutDisplay ( )
privateslot
void cancelRecording ( )
privateslot

Definition at line 338 of file keysequencewidget.cpp.

References _keySequence, _oldKeySequence, and doneRecording().

Referenced by KeySequenceButton::keyPressEvent().

void clear ( )
privateslot

Definition at line 360 of file keysequencewidget.cpp.

References keySequenceChanged(), and setKeySequence().

Referenced by KeySequenceWidget().

bool isRecording ( ) const
inlineprivate
bool isOkWhenModifierless ( int  keyQt) const
private

Definition at line 203 of file keysequencewidget.cpp.

Referenced by KeySequenceButton::keyPressEvent().

bool isShiftAsModifierAllowed ( int  keyQt) const
private

Definition at line 223 of file keysequencewidget.cpp.

Referenced by KeySequenceButton::keyPressEvent().

bool isKeySequenceAvailable ( const QKeySequence &  seq)
private

Friends And Related Function Documentation

friend class KeySequenceButton
friend

Definition at line 88 of file keysequencewidget.h.

Referenced by KeySequenceWidget().

Member Data Documentation

ShortcutsModel* _shortcutsModel
private

Definition at line 79 of file keysequencewidget.h.

Referenced by isKeySequenceAvailable(), and setModel().

bool _isRecording
private
QKeySequence _keySequence
private
QKeySequence _oldKeySequence
private

Definition at line 81 of file keysequencewidget.h.

Referenced by cancelRecording(), doneRecording(), setKeySequence(), and startRecording().

QModelIndex _conflictingIndex
private

Definition at line 83 of file keysequencewidget.h.

Referenced by doneRecording(), isKeySequenceAvailable(), and startRecording().

KeySequenceButton* _keyButton
private
QToolButton* _clearButton
private

Definition at line 86 of file keysequencewidget.h.

Referenced by KeySequenceWidget(), and setKeySequence().


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