Public Member Functions | |
| int | x () const |
| int | y () const |
| QPoint | pos () |
| int | scene_x () const |
| int | scene_y () const |
| QPointF | scene_pos () const |
| void | set_point (int x, int y) |
| int | on_first_input_event_x () const |
| int | on_first_input_event_y () const |
| int | on_first_input_event_scene_x () const |
| int | on_first_input_event_scene_y () const |
| void | inputengine_first_input_event () |
| int | get_current_mode () const |
| void | jog_start () |
| void | jog_finished () |
| void | reset_cursor () |
| ViewPort * | get_viewport () |
| void | set_current_viewport (ViewPort *vp) |
| QList< QObject * > | get_context_items () |
| void | add_contextitem (QObject *item) |
| void | remove_contextitem (QObject *item) |
| QList< QObject * > | get_contextmenu_items () const |
| void | set_contextmenu_items (QList< QObject * > list) |
Friends | |
| ContextPointer & | cpointer () |
Use it in classes that inherit ViewPort to discover ViewItems under
the mouse cursor on the first input event x/y coordinates.
Also provides convenience functions to get ViewPort x/y coordinates
as well as scene x/y coordinates, which can be used for example in the
jog() implementation of Command classes.
ViewPort's mouse event handling automatically updates the state of ContextPointer
as well as the InputEngine, which makes sure the mouse is grabbed and released
during Hold type Command's.
Use cpointer() to get a reference to the singleton object!
| int ContextPointer::x | ( | ) | const [inline] |
Returns the current ViewPort's mouse x coordinate
Referenced by TrackPan::begin_hold(), TrackPan::jog(), and Gain::jog().
| int ContextPointer::y | ( | ) | const [inline] |
Returns the current ViewPort's mouse y coordinate
Referenced by Gain::jog().
| QPoint ContextPointer::pos | ( | ) | [inline] |
Convenience function, equals QPoint(cpointer().x(), cpointer().y())
Referenced by Gain::begin_hold().
| int ContextPointer::scene_x | ( | ) | const [inline] |
Convenience function that maps the ViewPort's mouse x
coordinate to the scene x coordinate
Referenced by MoveClip::jog().
| int ContextPointer::scene_y | ( | ) | const [inline] |
Convenience function that maps the ViewPort's mouse y
coordinate to the ViewPort's scene y coordinate
| QPointF ContextPointer::scene_pos | ( | ) | const [inline] |
Returns the current's ViewPort's mouse position in the ViewPort's scene position.
| void ContextPointer::set_point | ( | int | x, | |
| int | y | |||
| ) | [inline] |
Used by ViewPort to update the internal state of ContextPointer Not intended to be used somewhere else.
| x | The ViewPort's mouse x coordinate | |
| y | The ViewPort's mouse y coordinate |
| int ContextPointer::on_first_input_event_x | ( | ) | const [inline] |
| int ContextPointer::on_first_input_event_y | ( | ) | const [inline] |
| int ContextPointer::on_first_input_event_scene_x | ( | ) | const [inline] |
Returns the scene x coordinate on first input event.
Referenced by MoveClip::begin_hold().
| int ContextPointer::on_first_input_event_scene_y | ( | ) | const [inline] |
Returns the scene y coordinate on first input event.
| void ContextPointer::inputengine_first_input_event | ( | ) | [inline] |
Called _only_ by InputEngine, not to be used anywhere else.
| void ContextPointer::jog_start | ( | ) |
Called _only_ by InputEngine, not to be used anywhere else.
| void ContextPointer::jog_finished | ( | ) |
Called _only_ by InputEngine, not to be used anywhere else.
| void ContextPointer::reset_cursor | ( | ) |
Used by InputEngine to reset the current ViewPort's HoldCursor
after a 'Hold type' Command has been finished. Not be called
from anywhere else
References ViewPort::reset_cursor().
| ViewPort * ContextPointer::get_viewport | ( | ) |
The current pointed ViewPort
Referenced by TrackPan::jog(), MoveClip::jog(), Gain::jog(), Gain::set_collected_number(), Command::set_cursor_shape(), TrackPan::set_cursor_shape(), MoveClip::set_cursor_shape(), and Gain::set_cursor_shape().
| QList< QObject * > ContextPointer::get_context_items | ( | ) |
Returns a list of all 'soft selected' ContextItems.
To be able to also dispatch key facts to objects that don't inherit from ContextItem, but do inherit from QObject, the returned list holds QObjects.
References ContextItem::get_context(), and ViewPort::get_pointed_context_items().
| void ContextPointer::add_contextitem | ( | QObject * | item | ) |
Use this function to add an object that inherits from QObject
permanently to the 'soft selected' item list.
The added object will always be added to the list returned in
get_context_items(). This way, one can add objects that do not
inherit ContextItem, to be processed into the key fact dispatching
of InputEngine.
| item | The QObject to be added to the 'soft selected' item list |
| ContextPointer& cpointer | ( | ) | [friend] |
1.5.5