Version: 6.3.1
Public Member Functions | Protected Member Functions | Private Slots | Private Attributes

QtxShortcutTree Class Reference

#include <QtxShortcutEdit.h>

Inheritance diagram for QtxShortcutTree:
Inheritance graph

Public Member Functions

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

Protected Member Functions

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

Private Slots

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

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

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

References myPrevBindings.

ShortcutMap * QtxShortcutTree::bindings ( const QString &  sec) const
QStringList QtxShortcutTree::sections ( ) const
Returns:
list of section names
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.

bool QtxShortcutTree::eventFilter ( QObject obj,
QEvent event 
) [protected, virtual]
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) [protected, virtual]

References myPrevBindings.

bool QtxShortcutTree::checkUniqueness ( QTreeWidgetItem item,
const QString &  shortcut 
) [protected, virtual]
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().

void QtxShortcutTree::onCurrentItemChanged ( QTreeWidgetItem cur,
QTreeWidgetItem prev 
) [private, slot]
Parameters:
curthe current item
prevthe previous current item

References myPrevBindings.


Field Documentation

QMap< QString, ShortcutMap > QtxShortcutTree.myPrevBindings [private]
QStringList QtxShortcutTree.myGeneralSections [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS