Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxShortcutEdit Class Reference

#include <QtxShortcutEdit.h>

Inheritance diagram for QtxShortcutEdit:
Inheritance graph

Public Member Functions

 QtxShortcutEdit (QWidget *=0)
 Constructor. More...
 
virtual ~QtxShortcutEdit ()
 Destructor. More...
 
void setShortcut (const QKeySequence &)
 Sets custom shortcut. More...
 
QKeySequence shortcut ()
 Gets custom shortcut. More...
 

Static Public Member Functions

static QString parseEvent (QKeyEvent *)
 Gets the key sequence from keys that were pressed. More...
 
static bool isValidKey (int)
 Check if the key event contains a 'valid' key. More...
 

Protected Member Functions

virtual bool eventFilter (QObject *, QEvent *)
 Custom event filter. More...
 

Private Slots

void onCliked ()
 Called when "Clear" button is clicked. More...
 
void onEditingFinished ()
 Called when myShortcut loses focus. More...
 

Private Member Functions

void initialize ()
 

Private Attributes

QLineEditmyShortcut
 
QString myPrevShortcutText
 

Constructor & Destructor Documentation

QtxShortcutEdit::QtxShortcutEdit ( QWidget parent = 0)
Parameters
parentparent widget

References initialize(), and myShortcut.

QtxShortcutEdit::~QtxShortcutEdit ( )
virtual

Member Function Documentation

bool QtxShortcutEdit::eventFilter ( QObject obj,
QEvent event 
)
protectedvirtual
Parameters
objevent receiver object
eventevent
Returns
true if further event processing should be stopped

References myPrevShortcutText, myShortcut, onCliked(), and parseEvent().

void QtxShortcutEdit::initialize ( )
private
bool QtxShortcutEdit::isValidKey ( int  aKey)
static
Parameters
aKeythe code of the key
Returns
true if the key is 'valid'
void QtxShortcutEdit::onCliked ( )
privateslot

References myShortcut.

void QtxShortcutEdit::onEditingFinished ( )
privateslot

References myPrevShortcutText, and myShortcut.

QString QtxShortcutEdit::parseEvent ( QKeyEvent *  e)
static
Parameters
ea key event
Returns
a string representation of the key sequence

References isValidKey().

void QtxShortcutEdit::setShortcut ( const QKeySequence &  seq)
Parameters
seqa key sequence describes a combination of keys
See Also
shortcut()

References myPrevShortcutText, and myShortcut.

QKeySequence QtxShortcutEdit::shortcut ( )
Returns
a key sequence describes a combination of keys
See Also
setShortcut()

References myShortcut.

Member Data Documentation

QString QtxShortcutEdit::myPrevShortcutText
private
QLineEdit* QtxShortcutEdit::myShortcut
private

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