InputEngine Class Reference

Processes keyboard/mouse events, dispatches the result, and handles the returned Command objects. More...

List of all members.

Public Member Functions

void catch_key_press (QKeyEvent *)
void catch_key_release (QKeyEvent *)
void catch_mousebutton_press (QMouseEvent *e)
void catch_mousebutton_release (QMouseEvent *e)
void catch_mousebutton_doubleclick (QMouseEvent *e)
void catch_scroll (QWheelEvent *e)
int collected_number ()
bool is_jogging ()
bool is_holding ()
QList< MenuData > create_menudata_for (QObject *item)
Commandget_holding_command () const
void create_menudata_for_metaobject (const QMetaObject *mo, QList< MenuData > &list) const
int broadcast_action_from_contextmenu (const QString &name)
void jog ()
void bypass_jog_until_mouse_movements_exceeded_manhattenlength (int length=35)
void activate ()
void suspend ()
void clear_modifier_keys ()
Commandsucces ()
Commandfailure ()
Commanddid_not_implement ()
int init_map (const QString &mapFilename)
void set_clear_time (int time)
void set_hold_sensitiveness (int factor)
void set_double_fact_interval (int time)

Friends

class EventCatcher
InputEngineie ()


Detailed Description

Processes keyboard/mouse events, dispatches the result, and handles the returned Command objects.

InputEngine forms, together with ViewPort, Command, ContextPointer, ContextItem
and Qt's Undo Framework, the framework that makes up the the Contextual
Interaction Interface, with analog type of actions, and un/redo (aka History) support.

Dispatching key facts to ContextItem objects

InputEngine parses the keyboard/mouse events generated by the pointed ViewPort
If the keysequence matches that of any given in the keymap file, it call's
broadcast_action(). A list of pointed ContextItem objects is retrieved then
from ContextPointer. This list represents all (gui) ContextItem objects with their
corresponding 'core' ContextItem objects, stacked, with the topmost gui object on top.

For each ContextItem in the list, the class name is retreived, and looked up in the keymap
if for the detected key fact an object was supplied with the exact same name.
If this is the case, the function name, also given in the keymap file by the given object name
is used to call the ContextItem's function. If succesfull, the InputEngine will stop iterating
over the list, and start handling the returned Command object.

If the keymap specified that the object's doesn't have a function (slot) to be called, but instead
uses a CommandPlugin, the list of loaded CommandPlugins is searched to find a match for the
plugin name supplied in the keymap file, if there is a match, the Plugin is used to create
the Command object, and the same routine is used to handle this Command object.

If the Command object returned no error during the handling, it'll be placed on it's
historystack. If no historystack was available, it's do_action() will be called, and
deleted afterwards.

See also:
Command, ContextPointer, ViewPort, CommandPlugin

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

Generated on Sun Mar 8 12:44:05 2009 for traverso by  doxygen 1.5.5