|
Krita Source Code Documentation
|
This class handles both rotation and zooming operation. This is separate from Zoom and Rotate operation applied individually because the order of transformation is different. More...
#include <kis_zoom_and_rotate_action.h>
Inheritance diagram for KisZoomAndRotateAction:Classes | |
| class | Private |
Public Member Functions | |
| void | activate (int shortcut) override |
| void | begin (int shortcut, QEvent *event) override |
| void | cursorMovedAbsolute (const QPointF &lastPos, const QPointF &pos) override |
| void | deactivate (int shortcut) override |
| void | end (QEvent *event) override |
| KisInputActionGroup | inputActionGroup (int shortcut) const override |
| void | inputEvent (QEvent *event) override |
| KisZoomAndRotateAction () | |
| int | priority () const override |
| ~KisZoomAndRotateAction () | |
Public Member Functions inherited from KisAbstractInputAction | |
| virtual bool | canIgnoreModifiers () const |
| virtual QString | description () const |
| virtual QString | id () const |
| virtual bool | isAvailable () const |
| virtual bool | isShortcutRequired (int shortcut) const |
| KisAbstractInputAction (const QString &id) | |
| virtual QString | name () const |
| virtual QHash< QString, int > | shortcutIndexes () const |
| virtual bool | supportsHiResInputEvents (int shortcut) const |
| virtual bool | trySwitchShortcut (int oldShortcut, int newShortcut) |
| virtual | ~KisAbstractInputAction () |
Private Attributes | |
| const QScopedPointer< Private > | d |
Additional Inherited Members | |
Public Attributes inherited from KisAbstractInputAction | |
| QString | description |
| QString | id |
| QHash< QString, int > | indexes |
| QPointF | lastCursorPosition |
| QString | name |
| QPointF | startCursorPosition |
Static Public Attributes inherited from KisAbstractInputAction | |
| static KisInputManager * | inputManager |
Protected Member Functions inherited from KisAbstractInputAction | |
| virtual void | cursorMoved (const QPointF &lastPos, const QPointF &pos) |
| QPoint | eventPos (const QEvent *event) |
| QPointF | eventPosF (const QEvent *event) |
| KisInputManager * | inputManager () const |
| void | setDescription (const QString &description) |
| void | setName (const QString &name) |
| void | setShortcutIndexes (const QHash< QString, int > &indexes) |
This class handles both rotation and zooming operation. This is separate from Zoom and Rotate operation applied individually because the order of transformation is different.
Definition at line 19 of file kis_zoom_and_rotate_action.h.
Definition at line 22 of file kis_zoom_and_rotate_action.h.
| KisZoomAndRotateAction::KisZoomAndRotateAction | ( | ) |
Definition at line 52 of file kis_zoom_and_rotate_action.cpp.
References DiscreteZoomAndDiscreteRotateMode, DiscreteZoomAndRotateMode, PanAndDiscreteZoomAndDiscreteRotateMode, PanAndDiscreteZoomAndRotateMode, PanAndZoomAndDiscreteRotateMode, PanAndZoomAndRotateMode, KisAbstractInputAction::setName(), KisAbstractInputAction::setShortcutIndexes(), ZoomAndDiscreteRotateMode, and ZoomAndRotateMode.
| KisZoomAndRotateAction::~KisZoomAndRotateAction | ( | ) |
Definition at line 69 of file kis_zoom_and_rotate_action.cpp.
|
overridevirtual |
The method is called when the action is yet to be started, that is, e.g. the user has pressed all the modifiers for the action but hasn't started painting yet. This method is a right place to show the user what is going to happen, e.g. change the cursor.
Reimplemented from KisAbstractInputAction.
Definition at line 78 of file kis_zoom_and_rotate_action.cpp.
|
overridevirtual |
Begin the action.
| shortcut | The index of the behaviour to trigger. |
| event | The mouse event that has triggered this action. Is null for keyboard-activated actions. |
Reimplemented from KisAbstractInputAction.
Definition at line 88 of file kis_zoom_and_rotate_action.cpp.
References Private::canvas, d, KisAbstractInputAction::eventPosF(), and KisAbstractInputAction::inputManager.
|
overridevirtual |
Reimplemented from KisAbstractInputAction.
Definition at line 120 of file kis_zoom_and_rotate_action.cpp.
|
overridevirtual |
The method is called when the action is not a candidate for the starting anymore. The action should revert everything that was done in activate() method.
Reimplemented from KisAbstractInputAction.
Definition at line 83 of file kis_zoom_and_rotate_action.cpp.
|
overridevirtual |
End the action.
| event | The mouse event that has finished this action. Is null for keyboard-activated actions. |
Reimplemented from KisAbstractInputAction.
Definition at line 114 of file kis_zoom_and_rotate_action.cpp.
References d, and KisAbstractInputAction::end().
|
overridevirtual |
shortcut belongs to Reimplemented from KisAbstractInputAction.
Definition at line 134 of file kis_zoom_and_rotate_action.cpp.
References ViewTransformActionGroup.
|
overridevirtual |
Process an input event.
By default handles MouseMove events and passes the data to a convenience cursorMoved() method
| event | An event to process. |
Reimplemented from KisAbstractInputAction.
Definition at line 125 of file kis_zoom_and_rotate_action.cpp.
References d, and KisAbstractInputAction::inputEvent().
|
overridevirtual |
The priority for this action.
Priority determines how "important" the action is and is used to resolve conflicts when multiple actions can be activated.
Reimplemented from KisAbstractInputAction.
Definition at line 73 of file kis_zoom_and_rotate_action.cpp.
|
private |
Definition at line 48 of file kis_zoom_and_rotate_action.h.