ICS

QicsTable Documentation Set

QicsKeyboardManager Class Reference

QicsKeyboardManager processes all key events of QicsTable. More...

#include <QicsKeyboardManager.h>

Inherits QObject.

List of all members.

Public Types

 NoAction = 0
 TraverseLeft
 TraverseRight
 TraverseUp
 TraverseDown
 TraverseLeftWithJump
 TraverseRightWithJump
 TraverseUpWithJump
 TraverseDownWithJump
 TraverseLeftWithSelection
 TraverseRightWithSelection
 TraverseUpWithSelection
 TraverseDownWithSelection
 TraverseBeginningOfTable
 TraverseEndOfTable
 TraverseBeginningOfRow
 TraverseEndOfRow
 TraverseBeginningOfRowWithSelection
 TraverseEndOfRowWithSelection
 TraverseBeginningOfColumn
 TraverseEndOfColumn
 TraversePageUp
 TraversePageDown
 TraversePageUpWithSelection
 TraversePageDownWithSelection
 FocusNextInTabOrder
 FocusPreviousInTabOrder
 UserBase = 0xff0000
enum  Action {
  NoAction = 0, TraverseLeft, TraverseRight, TraverseUp,
  TraverseDown, TraverseLeftWithJump, TraverseRightWithJump, TraverseUpWithJump,
  TraverseDownWithJump, TraverseLeftWithSelection, TraverseRightWithSelection, TraverseUpWithSelection,
  TraverseDownWithSelection, TraverseBeginningOfTable, TraverseEndOfTable, TraverseBeginningOfRow,
  TraverseEndOfRow, TraverseBeginningOfRowWithSelection, TraverseEndOfRowWithSelection, TraverseBeginningOfColumn,
  TraverseEndOfColumn, TraversePageUp, TraversePageDown, TraversePageUpWithSelection,
  TraversePageDownWithSelection, FocusNextInTabOrder, FocusPreviousInTabOrder, UserBase = 0xff0000
}

Public Member Functions

 QicsKeyboardManager (QObject *parent=0)
 Constructor for QicsKeyboardManager.
 ~QicsKeyboardManager ()
 Destructor.
void setTableGeometry (QicsGridGeometry *geometry)
QicsGridGeometrytableGeometry ()
void setKeyAction (const QicsKeyCombination &combo, Action action)
Action keyAction (const QicsKeyCombination &combo)
bool doAction (Action action, QicsScreenGrid *grid)
bool traverseIntoFrozen ()
void setTraverseIntoFrozen (bool traverse)
bool jumpIntoFrozen ()
void setJumpIntoFrozen (bool jump)
bool traverseIntoHeaders ()
void setTraverseIntoHeaders (bool traverse)
bool jumpIntoHeaders ()
void setJumpIntoHeaders (bool jump)
bool selectOnTraverse () const
void setSelectOnTraverse (bool select)
virtual bool handleTraversalKeys (QKeyEvent *e, QicsScreenGrid *grid)

Public Attributes

bool traverseIntoFrozen
bool jumpIntoFrozen
bool traverseIntoHeaders
bool jumpIntoHeaders
bool selectOnTraverse

Protected Types

typedef bool(QicsKeyboardManager::*) TraverseMethod (QicsScreenGrid *, bool)

Protected Slots

bool handleUserDefinedAction (Action action, QicsScreenGrid *grid)

Protected Member Functions

bool isMappedKeyCombination (const QicsKeyCombination &combo)
bool canTraverseInto (QicsScreenGrid *grid)
bool canJumpInto (QicsScreenGrid *grid)
bool traverseLeft (QicsScreenGrid *grid, bool with_jump=false)
bool traverseRight (QicsScreenGrid *grid, bool with_jump=false)
bool traverseUp (QicsScreenGrid *grid, bool with_jump=false)
bool traverseDown (QicsScreenGrid *grid, bool with_jump=false)
bool traverseBeginningOfTable (QicsScreenGrid *grid)
bool traverseEndOfTable (QicsScreenGrid *grid)
bool traverseBeginningOfRow (QicsScreenGrid *grid, bool with_jump=false)
bool traverseEndOfRow (QicsScreenGrid *grid, bool with_jump=false)
bool traverseBeginningOfColumn (QicsScreenGrid *grid, bool with_jump=false)
bool traverseEndOfColumn (QicsScreenGrid *grid, bool with_jump=false)
bool traversePageUp (QicsScreenGrid *grid, bool with_jump=false)
bool traversePageDown (QicsScreenGrid *grid, bool with_jump=false)
bool focusNextInTabOrder (QicsScreenGrid *grid)
bool focusPreviousInTabOrder (QicsScreenGrid *grid)
bool traverseAcrossGridsToCell (QicsScreenGrid *grid, int row, int col, bool=true)
void clearCurrentCells ()
void clearSelections ()
bool traverseWithSelection (QicsScreenGrid *grid, TraverseMethod tm)

Private Attributes

QicsGridGeometrymyTableGeometry
 Current table geometry.
QMap< QicsKeyCombination,
Action
myActionMap
 All available mapped key kombinations.
bool myTraverseIntoFrozen
bool myJumpIntoFrozen
bool myTraverseIntoHeaders
bool myJumpIntoHeaders
bool mySelectOnTraverse


Detailed Description

QicsKeyboardManager processes all key events of QicsTable.

QicsKeyboardManager processes all key events of QicsTable, translates them into actions and do this actions.


Member Enumeration Documentation

enum QicsKeyboardManager::Action

List of all actions that can be done:

        TraverseLeft
        TraverseRight
        TraverseUp
        TraverseDown
    
        TraverseBeginningOfTable
        TraverseEndOfTable
        TraverseBeginningOfRow
        TraverseEndOfRow
        TraverseBeginningOfColumn
        TraverseEndOfColumn

        TraversePageUp
        TraversePageDown
        FocusNextInTabOrder
        FocusPreviousInTabOrder

Theese actions will be used for Tab and Enter keys which are traversing to the next row/column when last row/column achieved:

        TraverseLeftWithJump
        TraverseRightWithJump
        TraverseUpWithJump 
        TraverseDownWithJump


Constructor & Destructor Documentation

QicsKeyboardManager::QicsKeyboardManager ( QObject *  parent = 0  ) 

Constructor for QicsKeyboardManager.

QicsKeyboardManager::~QicsKeyboardManager (  ) 

Destructor.


Member Function Documentation

bool QicsKeyboardManager::canJumpInto ( QicsScreenGrid grid  )  [protected]

Returns true if jumping into screen grid grid available, otherwise false.

bool QicsKeyboardManager::canTraverseInto ( QicsScreenGrid grid  )  [protected]

Returns true if traversing into screen grid grid available, otherwise false.

void QicsKeyboardManager::clearCurrentCells (  )  [protected]

Clears all current cells for all grids.

void QicsKeyboardManager::clearSelections (  )  [protected]

Clears table's selection list.

bool QicsKeyboardManager::doAction ( Action  action,
QicsScreenGrid grid 
)

Does key action action in specific screen grid grid.

bool QicsKeyboardManager::focusNextInTabOrder ( QicsScreenGrid grid  )  [protected]

Focus next screen grid in tab order.

bool QicsKeyboardManager::focusPreviousInTabOrder ( QicsScreenGrid grid  )  [protected]

Focus previous screen grid in tab order.

virtual bool QicsKeyboardManager::handleTraversalKeys ( QKeyEvent *  e,
QicsScreenGrid grid 
) [virtual]

Handles traversal keys from specified screen grid grid.

bool QicsKeyboardManager::handleUserDefinedAction ( Action  action,
QicsScreenGrid grid 
) [protected, slot]

Specifies the handler for user defined action action in the grid grid.

bool QicsKeyboardManager::isMappedKeyCombination ( const QicsKeyCombination combo  )  [protected]

Returns true if key combination combo is mapped, otherwise false.

bool QicsKeyboardManager::jumpIntoFrozen (  ) 

Returns true if current cell can jump into frozen parts otherwise returns false. See the "jumpIntoFrozen" property for details.

See also:
setJumpIntoFrozen()

bool QicsKeyboardManager::jumpIntoHeaders (  ) 

Returns true if current cell can jump into headers otherwise returns false. See the "jumpIntoHeaders" property for details.

See also:
setJumpIntoHeaders()

Action QicsKeyboardManager::keyAction ( const QicsKeyCombination combo  ) 

Returns key action that holds combo parameter

bool QicsKeyboardManager::selectOnTraverse (  )  const

Returns true if current cell will be selected after traversing. See the "selectOnTraverse" property for details.

See also:
setSelectOnTraverse()

void QicsKeyboardManager::setJumpIntoFrozen ( bool  jump  ) 

If jump true current cell can jump into frozen parts otherwise not. See the "jumpIntoFrozen" property for details.

See also:
jumpIntoFrozen()

void QicsKeyboardManager::setJumpIntoHeaders ( bool  jump  ) 

If jump true current cell can jump into headers otherwise not. See the "jumpIntoHeaders" property for details.

See also:
jumpIntoHeaders()

void QicsKeyboardManager::setKeyAction ( const QicsKeyCombination combo,
Action  action 
)

Defines specific key action for key combination.

void QicsKeyboardManager::setSelectOnTraverse ( bool  select  ) 

If select is true current cell will be selected during the traversing, otherwise not. See the "selectOnTraverse" property for details.

See also:
selectOnTraverse()

void QicsKeyboardManager::setTraverseIntoFrozen ( bool  traverse  ) 

If traverse true current cell can be traversed into frozen parts otherwise not. See the "traverseIntoFrozen" property for details.

See also:
traverseIntoFrozen()

void QicsKeyboardManager::setTraverseIntoHeaders ( bool  traverse  ) 

If traverse true current cell can be traversed into headers otherwise not. See the "traverseIntoHeaders" property for details.

See also:
traverseIntoHeaders()

bool QicsKeyboardManager::traverseAcrossGridsToCell ( QicsScreenGrid grid,
int  row,
int  col,
bool  = true 
) [protected]

Does the traversing to the cell with row col coords in the grid screen grid.

bool QicsKeyboardManager::traverseBeginningOfColumn ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the upmost cell of the current column in the grid's current viewport. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseBeginningOfRow ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the leftmost cell of the current row in the grid's current viewport. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseBeginningOfTable ( QicsScreenGrid grid  )  [protected]

Moves the current cell to the top-left cell in the grid's current viewport.

bool QicsKeyboardManager::traverseDown ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the nearest cell to the down of the current cell that is enabled. Returns true if cell is moved otherwise false. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseEndOfColumn ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the bottommost cell of the current column in the grid's current viewport. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseEndOfRow ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the rightmost cell of the current row in the grid's current viewport. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseEndOfTable ( QicsScreenGrid grid  )  [protected]

Moves the current cell to the bottom-right cell in the grid's current viewport.

bool QicsKeyboardManager::traverseIntoFrozen (  ) 

Returns true if current cell can be traversed into frozen parts otherwise returns false. See the "traverseIntoFrozen" property for details.

See also:
setTraverseIntoFrozen()

bool QicsKeyboardManager::traverseIntoHeaders (  ) 

Returns true if current cell can be traversed into headers otherwise returns false. See the "traverseIntoHeaders" property for details.

See also:
setTraverseIntoHeaders()

bool QicsKeyboardManager::traverseLeft ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the nearest cell to the left of the current cell that is enabled. Returns true if cell is moved otherwise false. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traversePageDown ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the page down cell of the current row in the grid's current viewport. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traversePageUp ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the page up cell of the current row in the grid's current viewport. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseRight ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the nearest cell to the right of the current cell that is enabled. Returns true if cell is moved otherwise false. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseUp ( QicsScreenGrid grid,
bool  with_jump = false 
) [protected]

Moves the current cell to the nearest cell to the up of the current cell that is enabled. Returns true if cell is moved otherwise false. If with_jump parameter is true current cell will jump to the next row/column when the end of current row/column achieved.

bool QicsKeyboardManager::traverseWithSelection ( QicsScreenGrid grid,
TraverseMethod  tm 
) [protected]

Performs traversing with selection(using ARROW + SHIFT keys) grid parameter - grid that does the traversing tm - pointer to traverse class method.


Member Data Documentation

bool QicsKeyboardManager::jumpIntoFrozen

Specifies whether cell will jump into frozen regions. The default value of this property is true.

bool QicsKeyboardManager::jumpIntoHeaders

Specifies whether cell will jump into headers. The default value of this property is false.

QMap<QicsKeyCombination, Action> QicsKeyboardManager::myActionMap [private]

All available mapped key kombinations.

QicsGridGeometry* QicsKeyboardManager::myTableGeometry [private]

Current table geometry.

bool QicsKeyboardManager::selectOnTraverse

Specifies whether cell will be selected after traversing. The default value of this property is true.

bool QicsKeyboardManager::traverseIntoFrozen

Specifies whether cell will traverse into frozen regions. The default value of this property is true.

bool QicsKeyboardManager::traverseIntoHeaders

Specifies whether cell will traverse into headers. The default value of this property is false.


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

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.