Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

ShortcutLineEdit Class Reference

Specialised GUI control for entering keyboard shortcut combinations. More...

#include <ShortcutLineEdit.hpp>

List of all members.

Public Slots

void clear ()
 Clear contents and stored keys.
void backspace ()
 Remove the last key from the key sequence.
void setContents (QKeySequence ks)
 Emits contentsChanged() if the new sequence is not the same.

Signals

void focusChanged (bool focus)
 Needed for enabling/disabling buttons in ShortcutsDialog.
void contentsChanged ()

Public Member Functions

 ShortcutLineEdit (QWidget *parent=0)
QKeySequence getKeySequence ()
bool isEmpty () const

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
void focusInEvent (QFocusEvent *e)
void focusOutEvent (QFocusEvent *e)

Detailed Description

Specialised GUI control for entering keyboard shortcut combinations.

Allows Emacs-style key sequences (for example "Ctrl+E, Ctrl+2") no longer than four combinations. See the documentation of QKeySequence for details.

When ShortcutLineEdit receives the focus, its whole contents get selected. On a key press, if any of the contents are selected, the new key replaces all the previous contents. Otherwise, it's appended to the sequence.

Definition at line 35 of file ShortcutLineEdit.hpp.


Member Function Documentation

void ShortcutLineEdit::backspace (  )  [slot]

Remove the last key from the key sequence.

void ShortcutLineEdit::clear (  )  [slot]

Clear contents and stored keys.

void ShortcutLineEdit::focusChanged ( bool  focus  )  [signal]

Needed for enabling/disabling buttons in ShortcutsDialog.

Parameters:
[out] focus false if the widget has the focus, true otherwise.
void ShortcutLineEdit::setContents ( QKeySequence  ks  )  [slot]

Emits contentsChanged() if the new sequence is not the same.


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 14:05:44 2013 for Stellarium by  doxygen 1.6.3