
Public Slots | |
| void | pan_left (bool autorepeat) |
| void | pan_right (bool autorepeat) |
Public Member Functions | |
| TrackPan (Track *track, QVariantList args) | |
| int | begin_hold () |
| int | finish_hold () |
| int | prepare_actions () |
| int | do_action () |
| int | undo_action () |
| void | cancel_action () |
| int | jog () |
| void | set_cursor_shape (int useX, int useY) |
Classes | |
| struct | Data |
| int TrackPan::begin_hold | ( | ) | [virtual] |
Virtual function, only needs to be reimplemented when making a hold type of Command
In case of a 'Hold fact' type of Command, you should also retrieve
the 'old' state here to be able to restore it in undo_action()
Reimplemented from Command.
References ContextPointer::x().
| int TrackPan::finish_hold | ( | ) | [virtual] |
Virtual function, only needs to be reimplemented when making a hold type of Command
Reimplemented from Command.
Referenced by cancel_action().
| int TrackPan::prepare_actions | ( | ) | [virtual] |
Virtual function, needs to be reimplemented for all type of Commands
Use this function to do any kind of calculation or information gathering to be able to perform the actual action in do_action()
Reimplemented from Command.
| int TrackPan::do_action | ( | ) | [virtual] |
Virtual function, needs to be reimplemented for all type of Commands
This function is called after the action is finished and each time the historystack 'redoes' an action.
Normally the data created in prepare_actions() will be used here to do the actuall action, which most of the case will be one or a few functions calls.
In case of a Single fact type of Command, you should also retrieve
the 'old' state here to be able to restore it in undo_action()
Reimplemented from Command.
| int TrackPan::undo_action | ( | ) | [virtual] |
Virtual function, needs to be reimplemented for all type of Commands
This function is called each time the historystack 'undoes' an action,
use prepare_actions(), or in case of a hold type command begin_hold() to
store the old value(s), your command will change in do_action(), and use
those here to restore the old state.
Reimplemented from Command.
Referenced by cancel_action().
| void TrackPan::cancel_action | ( | ) | [virtual] |
Cancels the action (makes only sense for hold type of actions). Reimplement to undo any changes allready made, either be it data from the core that has changed, or e.g. gui items who moved in the jog() function.
Reimplemented from Command.
References finish_hold(), and undo_action().
| int TrackPan::jog | ( | ) | [virtual] |
Virtual function, only needs to be reimplemented when making a hold type of Command
This function makes it possible to create 'analog' type of actions possible.
Use the convenience functions of ContextPointer to get scene x and y coordinates
to move or adjust canvas items positions/parameters.
Reimplemented from Command.
References ContextPointer::get_viewport(), ViewPort::set_holdcursor_text(), and ContextPointer::x().
| void TrackPan::set_cursor_shape | ( | int | useX, | |
| int | useY | |||
| ) | [virtual] |
Uses the mouse hints specified in the keymap.xml file to set a cursor to hint the user which movement has to be made on hold type of commands
Reimplement if you want a different type of cursor, or want to use the more advanced HoldCursor supplied by ViewPort
| useX | If 1, suggests horizontal mouse movement | |
| useY | If 1, suggests vertical mouse movement |
Reimplemented from Command.
References ContextPointer::get_viewport(), and ViewPort::set_holdcursor().
1.5.5