|
Krita Source Code Documentation
|
#include <kis_selection_modifier_mapper.h>
Inheritance diagram for KisSelectionModifierMapper:Public Slots | |
| void | slotConfigChanged () |
Public Member Functions | |
| KisSelectionModifierMapper () | |
| SelectionAction | map (Qt::KeyboardModifiers m) |
| void | slotConfigChanged () |
| ~KisSelectionModifierMapper () override | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Static Public Member Functions | |
| static KisSelectionModifierMapper * | instance () |
| static SelectionAction | map (Qt::KeyboardModifiers m) |
Public Attributes | |
| Qt::KeyboardModifiers | addModifiers |
| Qt::KeyboardModifiers | intersectModifiers |
| Qt::KeyboardModifiers | replaceModifiers |
| Qt::KeyboardModifiers | subtractModifiers |
| Qt::KeyboardModifiers | symmetricdifferenceModifiers |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
This is a basic template to create selection tools from basic path based drawing tools. The template overrides the ability to execute alternate actions correctly. Modifier keys are overridden with the following behavior:
Shift: add to selection Alt: subtract from selection Shift+Alt: intersect current selection Ctrl: replace selection
Certain tools also use modifier keys to alter their behavior, e.g. forcing square proportions with the rectangle tool. The template enables the following rules for forwarding keys: 1) Any modifier keys held when the tool is first activated will determine the new selection method. 2) If the underlying tool does not take modifier keys, pressing modifier keys in the middle of a stroke will change the selection method. This applies to the lasso tool and polygon tool. 3) If the underlying tool takes modifier keys, they will always be forwarded to the underlying tool, and it is not possible to change the selection method in the middle of a stroke.
See KisToolSelectBase for usage.
Definition at line 41 of file kis_selection_modifier_mapper.cc.
| KisSelectionModifierMapper::KisSelectionModifierMapper | ( | ) |
Definition at line 53 of file kis_selection_modifier_mapper.cc.
References connect(), KisConfigNotifier::instance(), and slotConfigChanged().
|
override |
Definition at line 63 of file kis_selection_modifier_mapper.cc.
|
static |
Definition at line 67 of file kis_selection_modifier_mapper.cc.
| SelectionAction KisSelectionModifierMapper::map | ( | Qt::KeyboardModifiers | m | ) |
Definition at line 96 of file kis_selection_modifier_mapper.cc.
|
static |
| void KisSelectionModifierMapper::slotConfigChanged | ( | ) |
Definition at line 72 of file kis_selection_modifier_mapper.cc.
References m_d, and slotConfigChanged().
|
slot |
| Qt::KeyboardModifiers KisSelectionModifierMapper::addModifiers |
Definition at line 47 of file kis_selection_modifier_mapper.cc.
| Qt::KeyboardModifiers KisSelectionModifierMapper::intersectModifiers |
Definition at line 46 of file kis_selection_modifier_mapper.cc.
|
private |
Definition at line 32 of file kis_selection_modifier_mapper.h.
| Qt::KeyboardModifiers KisSelectionModifierMapper::replaceModifiers |
Definition at line 45 of file kis_selection_modifier_mapper.cc.
| Qt::KeyboardModifiers KisSelectionModifierMapper::subtractModifiers |
Definition at line 48 of file kis_selection_modifier_mapper.cc.
| Qt::KeyboardModifiers KisSelectionModifierMapper::symmetricdifferenceModifiers |
Definition at line 49 of file kis_selection_modifier_mapper.cc.