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

#include <QtxShortcutEdit.h>

Inheritance diagram for QtxShortcutTree:
Inheritance graph

Public Member Functions

 QtxShortcutTree (QWidget *parent=0)
 Constructor. More...
 
virtual ~QtxShortcutTree ()
 Destructor. More...
 
void setBindings (const QString &, const ShortcutMap &)
 Set key bindings to the tree. More...
 
ShortcutMapbindings (const QString &) const
 
QStringList sections () const
 Get all sections names. More...
 
void setGeneralSections (const QStringList &)
 Set the list of shortcuts general sections. More...
 

Protected Member Functions

virtual bool eventFilter (QObject *, QEvent *)
 Custom event filter. More...
 
virtual void focusOutEvent (QFocusEvent *)
 
virtual bool checkUniqueness (QTreeWidgetItem *, const QString &)
 Check uniqueness of the shortcut. More...
 

Private Slots

void onCurrentItemChanged (QTreeWidgetItem *, QTreeWidgetItem *)
 Called when the current item changes. More...
 

Private Attributes

QMap< QString, ShortcutMapmyPrevBindings
 
QStringList myGeneralSections
 

Constructor & Destructor Documentation

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

References COLUMN_SIZE, and onCurrentItemChanged().

QtxShortcutTree::~QtxShortcutTree ( )
virtual

Member Function Documentation

ShortcutMap * QtxShortcutTree::bindings ( const QString &  sec) const
bool QtxShortcutTree::checkUniqueness ( QTreeWidgetItem item,
const QString &  shortcut 
)
protectedvirtual
Parameters
itemcurrent item of the shortcut tree
shortcutshortcut appointed for the current item
Returns
true if the given shortcut is allowed

References myGeneralSections, and sections().

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

References checkUniqueness(), myPrevBindings, and QtxShortcutEdit::parseEvent().

void QtxShortcutTree::focusOutEvent ( QFocusEvent *  event)
protectedvirtual

References myPrevBindings.

void QtxShortcutTree::onCurrentItemChanged ( QTreeWidgetItem cur,
QTreeWidgetItem prev 
)
privateslot
Parameters
curthe current item
prevthe previous current item

References myPrevBindings.

QStringList QtxShortcutTree::sections ( ) const
Returns
list of section names
void QtxShortcutTree::setBindings ( const QString &  title,
const ShortcutMap theShortcutMap 
)
Parameters
titlethe name of top-level item
theShortcutMapmap of key bindings

References myPrevBindings.

void QtxShortcutTree::setGeneralSections ( const QStringList &  sectionsList)

Key combinations in general sections should not intersect with any other key combinations.

Parameters
sectionsListlist of common section names

References myGeneralSections.

Member Data Documentation

QStringList QtxShortcutTree::myGeneralSections
private
QMap< QString, ShortcutMap > QtxShortcutTree::myPrevBindings
private

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