|
Krita Source Code Documentation
|
#include <SvgTextTool.h>
Inheritance diagram for SvgTextTool:Public Member Functions | |
| void | activate (const QSet< KoShape * > &shapes) override |
| reimplemented from KoToolBase | |
| void | copy () const override |
| reimplemented from superclass | |
| void | deactivate () override |
| reimplemented from KoToolBase | |
| QRectF | decorationsRect () const override |
| reimplemented from KoToolBase | |
| void | deleteSelection () override |
| reimplemented from superclass | |
| void | deselect () override |
| deselect the tool should clear the selection if it has one. | |
| void | focusInEvent (QFocusEvent *event) override |
| void | focusOutEvent (QFocusEvent *event) override |
| bool | hasSelection () override |
| reimplemented from superclass | |
| void | inputMethodEvent (QInputMethodEvent *event) override |
| QVariant | inputMethodQuery (Qt::InputMethodQuery query) const override |
| void | keyPressEvent (QKeyEvent *event) override |
| void | keyReleaseEvent (QKeyEvent *event) override |
| void | mouseDoubleClickEvent (KoPointerEvent *event) override |
| reimplemented from superclass | |
| void | mouseMoveEvent (KoPointerEvent *event) override |
| reimplemented from KoToolBase | |
| void | mousePressEvent (KoPointerEvent *event) override |
| reimplemented from KoToolBase | |
| void | mouseReleaseEvent (KoPointerEvent *event) override |
| reimplemented from KoToolBase | |
| void | mouseTripleClickEvent (KoPointerEvent *event) override |
| reimplemented from KoToolBase | |
| void | paint (QPainter &gc, const KoViewConverter &converter) override |
| reimplemented from KoToolBase | |
| bool | paste () override |
| reimplemented from superclass | |
| KisPopupWidgetInterface * | popupWidget () override |
| void | requestStrokeCancellation () override |
| void | requestStrokeEnd () override |
| bool | selectAll () override |
| selectAll select all data the tool can select. | |
| KoToolSelection * | selection () override |
| reimplemented from superclass | |
| SvgTextTool (KoCanvasBase *canvas) | |
| ~SvgTextTool () override | |
Public Member Functions inherited from KoToolBase | |
| QAction * | action (const QString &name) const |
| KoCanvasBase * | canvas () const |
| Returns the canvas the tool is working on. | |
| QCursor | cursor () const |
| return the last emitted cursor | |
| virtual void | customMoveEvent (KoPointerEvent *event) |
| virtual void | customPressEvent (KoPointerEvent *event) |
| virtual void | customReleaseEvent (KoPointerEvent *event) |
| virtual void | cut () |
| int | decorationThickness () const |
| decorationThickness The minimum thickness for tool decoration lines, this is derived from the screen magnification, thus the HiDPI settings. Note: to use this effectively, also set the pen to isCosmetic(true); | |
| virtual void | dragLeaveEvent (QDragLeaveEvent *event) |
| virtual void | dragMoveEvent (QDragMoveEvent *event, const QPointF &point) |
| virtual void | dropEvent (QDropEvent *event, const QPointF &point) |
| virtual void | explicitUserStrokeEndRequest () |
| explicitUserStrokeEndRequest is called by the input manager when the user presses Enter key or any equivalent. This callback comes before requestStrokeEnd(), which comes from a different source. | |
| KoToolFactoryBase * | factory () const |
| bool | isInTextMode () const |
| bool | isOpacityPresetMode () const |
| KoToolBase (KoCanvasBase *canvas) | |
| bool | maskSyntheticEvents () const |
| QList< QPointer< QWidget > > | optionWidgets () |
| virtual QMenu * | popupActionsMenu () |
| Q_INVOKABLE QString | toolId () const |
| virtual bool | wantsAutoScroll () const |
| ~KoToolBase () override | |
Protected Member Functions | |
| virtual QWidget * | createOptionWidget () override |
| reimplemented from KoToolBase | |
| KoSelection * | koSelection () const |
| KoSvgTextShape * | selectedShape () const |
Protected Member Functions inherited from KoToolBase | |
| virtual QList< QPointer< QWidget > > | createOptionWidgets () |
| int | grabSensitivity () const |
| Convenience function to get the current grab sensitivity. | |
| qreal | handleDocRadius () const |
| QRectF | handleGrabRect (const QPointF &position) const |
| QRectF | handlePaintRect (const QPointF &position) const |
| int | handleRadius () const |
| Convenience function to get the current handle radius. | |
| bool | isActivated () const |
| KoToolBase (KoToolBasePrivate &dd) | |
| KoPointerEvent * | lastDeliveredPointerEvent () const |
| void | setAbstractResource (KoAbstractCanvasResourceInterfaceSP abstractResource) |
| void | setConverter (KoDerivedResourceConverterSP converter) |
| void | setIsOpacityPresetMode (bool value) |
| void | setMaskSyntheticEvents (bool value) |
| void | setTextMode (bool value) |
| QHash< int, KoAbstractCanvasResourceInterfaceSP > | toolAbstractResources () |
| QHash< int, KoDerivedResourceConverterSP > | toolConverters () |
| void | useCursor (const QCursor &cursor) |
Private Types | |
| enum class | DragMode { None = 0 , Create , Select , InlineSizeHandle , Move , TextPathHandle , InShapeOffset , TypeSetting } |
| enum class | HighlightItem { None = 0 , InlineSizeStartHandle , InlineSizeEndHandle , MoveBorder , TypeSettingHandle } |
Private Slots | |
| QString | generateDefs (const KoSvgTextProperties &properties=KoSvgTextProperties()) |
| generateDefs This generates a defs section with the appropriate css and css strings assigned. | |
| void | insertRichText (KoSvgTextShape *richText, bool replaceLastGlyph=false) |
| insertRichText Insert a rich text shape, used by the glyph palette.. | |
| KoSvgTextProperties | propertiesForNewText () const |
| propertiesForNewText get the text properties that should be used for new text. | |
| void | showEditor () |
| void | showGlyphPalette () |
| showGlyphPalette Shows the glyph palette dialog. | |
| void | slotConvertType (int index) |
| slotConvertType | |
| void | slotMoveTextSelection (int index) |
| slotMoveTextSelection Move the start of the selection in typesetting mode by image 1 pix. | |
| void | slotShapeSelectionChanged () |
| selectionChanged called when the canvas selection is changed. | |
| void | slotTextTypeUpdated () |
| slotTextTypeUpdated Update the text type in the tool options. | |
| void | slotUpdateCursorDecoration (QRectF updateRect) |
| updateCursor update the canvas decorations in a particular update rect for the text cursor. | |
| void | slotUpdateTextPasteBehaviour () |
| slotUpdateTextPasteBehaviour update the default text paste behaviour. | |
| void | slotUpdateTypeSettingMode () |
| slotUpdateTypeSettingMode Enable typesetting mode from the tool options. | |
| void | slotUpdateVisualCursor () |
| slotUpdateVisualCursor update the visual cursor mode on the text cursor. | |
| void | textUpdated (KoSvgTextShape *shape, const QString &svg, const QString &defs) |
| void | updateGlyphPalette () |
| updateGlyphPalette update the glyph palette dialog from the current selection. | |
| void | updateTextPathHelper () |
Private Member Functions | |
| void | addMappedAction (KisSignalMapper *mapper, const QString &actionName, const int value, QActionGroup *group=nullptr) |
| qreal | grabSensitivityInPt () const |
| bool | nodeEditable () |
| nodeEditable | |
| KoSvgText::WritingMode | writingMode () const |
Private Attributes | |
| QCursor | m_base_cursor |
| KisSignalAutoConnectionsStore | m_canvasConnections |
| DragMode | m_dragging {DragMode::None} |
| QPointer< SvgTextEditor > | m_editor |
| QPointer< GlyphPaletteDialog > | m_glyphPalette |
| HighlightItem | m_highlightItem {HighlightItem::None} |
| QPainterPath | m_hoveredShapeHighlightRect |
| QCursor | m_ibeam_horizontal |
| QCursor | m_ibeam_horizontal_done |
| QCursor | m_ibeam_vertical |
| std::unique_ptr< KoInteractionStrategy > | m_interactionStrategy |
| QPointF | m_lastMousePos |
| QScopedPointer< SvgTextToolOptionsManager > | m_optionManager |
| bool | m_strategyAddingCommand {false} |
| QCursor | m_text_in_shape |
| QCursor | m_text_inline_horizontal |
| QCursor | m_text_inline_vertical |
| QCursor | m_text_on_path |
| SvgTextCursor | m_textCursor |
| SvgTextOnPathDecorationHelper | m_textOnPathHelper |
| QScopedPointer< KoSvgTextShapeOutlineHelper > | m_textOutlineHelper |
| QScopedPointer< KisSignalMapper > | m_textTypeSignalsMapper |
| QScopedPointer< KisSignalMapper > | m_typeSettingMovementMapper |
Friends | |
| class | SvgChangeTextPathInfoStrategy |
| class | SvgCreateTextStrategy |
Additional Inherited Members | |
Public Slots inherited from KoToolBase | |
| virtual void | canvasResourceChanged (int key, const QVariant &res) |
| virtual void | documentResourceChanged (int key, const QVariant &res) |
| virtual void | repaintDecorations () |
| virtual void | requestRedoDuringStroke () |
| virtual void | requestUndoDuringStroke () |
| void | setStatusText (const QString &statusText) |
| void | updateOptionsWidgetIcons () |
Signals inherited from KoToolBase | |
| void | activateTool (const QString &id) |
| void | cursorChanged (const QCursor &cursor) |
| void | selectionChanged (bool hasSelection) |
| void | statusTextChanged (const QString &statusText) |
| void | textModeChanged (bool inTextMode) |
Protected Attributes inherited from KoToolBase | |
| KoToolBasePrivate * | d_ptr |
Definition at line 35 of file SvgTextTool.h.
|
strongprivate |
| Enumerator | |
|---|---|
| None | |
| Create | |
| Select | |
| InlineSizeHandle | |
| Move | |
| TextPathHandle | |
| InShapeOffset | |
| TypeSetting | |
Definition at line 204 of file SvgTextTool.h.
|
strongprivate |
| Enumerator | |
|---|---|
| None | |
| InlineSizeStartHandle | |
| InlineSizeEndHandle | |
| MoveBorder | |
| TypeSettingHandle | |
Definition at line 214 of file SvgTextTool.h.
|
explicit |
Definition at line 100 of file SvgTextTool.cpp.
References KoToolBase::action(), addMappedAction(), dbgTools, KoSvgTextShape::InlineWrap, m_base_cursor, m_ibeam_horizontal, m_ibeam_horizontal_done, m_ibeam_vertical, m_text_in_shape, m_text_inline_horizontal, m_text_inline_vertical, m_text_on_path, m_textCursor, m_textOutlineHelper, m_textTypeSignalsMapper, m_typeSettingMovementMapper, SvgTextShortCuts::possibleActions(), KoSvgTextShape::PreformattedText, KoSvgTextShape::PrePositionedText, SvgTextCursor::registerPropertyAction(), KoToolBase::selectionChanged(), SvgTextCursor::setCaretSetting(), showGlyphPalette(), slotUpdateCursorDecoration(), and updateTextPathHelper().
|
override |
Definition at line 167 of file SvgTextTool.cpp.
References m_editor, and m_glyphPalette.
reimplemented from KoToolBase
Reimplemented from KoToolBase.
Definition at line 177 of file SvgTextTool.cpp.
References KoToolBase::activate(), KisSignalAutoConnectionsStore::addConnection(), KoToolBase::canvas(), KisMainWindow::dockWidget(), m_base_cursor, m_canvasConnections, m_optionManager, m_textCursor, m_textTypeSignalsMapper, m_typeSettingMovementMapper, KisViewManager::mainWindow(), KoToolBase::repaintDecorations(), KoToolBase::selectionChanged(), KisCanvas2::setCurrentShapeManagerOwnerShape(), KisTextPropertiesManager::setTextPropertiesInterface(), slotConvertType(), slotMoveTextSelection(), slotShapeSelectionChanged(), SvgTextCursor::textPropertyInterface(), KisViewManager::textPropertyManager(), KoToolBase::useCursor(), and KisCanvas2::viewManager().
|
private |
Definition at line 1137 of file SvgTextTool.cpp.
References KoToolBase::action(), m_textCursor, SvgTextCursor::registerPropertyAction(), KisSignalMapper::setMapping(), and value().
|
overridevirtual |
reimplemented from superclass
Reimplemented from KoToolBase.
Definition at line 473 of file SvgTextTool.cpp.
References SvgTextCursor::copy(), and m_textCursor.
|
overrideprotectedvirtual |
reimplemented from KoToolBase
Reimplemented from KoToolBase.
Definition at line 238 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KisQQuickWidget::connectMinimumHeightToRootObject(), debugEnabled(), KisMainWindow::dockWidget(), m_optionManager, KisViewManager::mainWindow(), SvgTextToolOptionsManager::openTextPropertiesDocker(), showEditor(), showGlyphPalette(), slotConvertType(), slotTextTypeUpdated(), slotUpdateTextPasteBehaviour(), slotUpdateTypeSettingMode(), slotUpdateVisualCursor(), KoToolBase::toolId(), and KisCanvas2::viewManager().
|
overridevirtual |
reimplemented from KoToolBase
Reimplemented from KoToolBase.
Definition at line 201 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KisSignalAutoConnectionsStore::clear(), KoToolBase::deactivate(), m_canvasConnections, m_hoveredShapeHighlightRect, m_textCursor, m_textTypeSignalsMapper, m_typeSettingMovementMapper, KoToolBase::repaintDecorations(), SvgTextCursor::setShape(), KisTextPropertiesManager::setTextPropertiesInterface(), KisViewManager::textPropertyManager(), and KisCanvas2::viewManager().
|
overridevirtual |
reimplemented from KoToolBase
Reimplemented from KoToolBase.
Definition at line 652 of file SvgTextTool.cpp.
References KoShape::absoluteTransformation(), KoSnapGuide::boundingRect(), KoSvgTextShape::boundingRect(), KoToolBase::canvas(), SvgTextOnPathDecorationHelper::decorationRect(), KoToolBase::handleRadius(), INLINE_SIZE_DASHES_PATTERN_A, INLINE_SIZE_DASHES_PATTERN_B, INLINE_SIZE_DASHES_PATTERN_LENGTH, kisGrowRect(), length(), m_hoveredShapeHighlightRect, m_textOnPathHelper, m_textOutlineHelper, selectedShape(), KoCanvasBase::snapGuide, KoCanvasBase::viewConverter(), and KoViewConverter::viewToDocumentX().
|
overridevirtual |
reimplemented from superclass
Reimplemented from KoToolBase.
Definition at line 478 of file SvgTextTool.cpp.
References m_textCursor, and SvgTextCursor::removeSelection().
|
overridevirtual |
deselect the tool should clear the selection if it has one.
Reimplemented from KoToolBase.
Definition at line 500 of file SvgTextTool.cpp.
References SvgTextCursor::deselectText(), and m_textCursor.
|
overridevirtual |
This passes on the focusInEven from the canvas widget, which can be used to activate animating decorations (like a cursor blink effect in the text tool).
Reimplemented from KoToolBase.
Definition at line 1087 of file SvgTextTool.cpp.
References SvgTextCursor::focusIn(), and m_textCursor.
|
overridevirtual |
This passes on the focusInEven from the canvas widget, which can be used to deactivate animating decorations (like a cursor blink effect in the text tool).
Reimplemented from KoToolBase.
Definition at line 1093 of file SvgTextTool.cpp.
References SvgTextCursor::focusOut(), and m_textCursor.
|
privateslot |
generateDefs This generates a defs section with the appropriate css and css strings assigned.
Definition at line 384 of file SvgTextTool.cpp.
References KoSvgTextProperties::convertParagraphProperties(), and KoSvgTextProperties::convertToSvgTextAttributes().
|
private |
Definition at line 1125 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KoToolBase::grabSensitivity(), KoCanvasBase::viewConverter(), and KoViewConverter::viewToDocumentX().
|
overridevirtual |
reimplemented from superclass
Reimplemented from KoToolBase.
Definition at line 488 of file SvgTextTool.cpp.
References SvgTextCursor::hasSelection(), and m_textCursor.
|
overridevirtual |
Text entry of complex text, like CJK, can be made more interactive if a tool implements this and the InputMethodQuery() methods. Reimplementing this only provides the user with a more responsive text experience, since the default implementation forwards the typed text as key pressed events.
| event | the input method event. |
Reimplemented from KoToolBase.
Definition at line 233 of file SvgTextTool.cpp.
References SvgTextCursor::inputMethodEvent(), and m_textCursor.
|
overridevirtual |
This method is used to query a set of properties of the tool to be able to support complex input method operations as support for surrounding text and reconversions. Default implementation returns simple defaults, for tools that want to provide a more responsive text entry experience for CJK languages it would be good to reimplement.
| query | specifies which property is queried. |
| converter | the view converter for the current canvas. |
Reimplemented from KoToolBase.
Definition at line 224 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KoToolBase::inputMethodQuery(), SvgTextCursor::inputMethodQuery(), and m_textCursor.
|
privateslot |
insertRichText Insert a rich text shape, used by the glyph palette..
| richText | – rich text shape. |
| replaceLastGlyph | – whether to replace the last glyph or to fully insert. |
Definition at line 375 of file SvgTextTool.cpp.
References SvgTextCursor::getPos(), SvgTextCursor::insertRichText(), m_textCursor, SvgTextCursor::moveCursor(), SvgTextCursor::MoveNextChar, SvgTextCursor::MovePreviousChar, and SvgTextCursor::setPos().
|
overridevirtual |
Called when a key is pressed. Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
| event | state and reason of this key press |
Reimplemented from KoToolBase.
Definition at line 1057 of file SvgTextTool.cpp.
References SvgTextCursor::keyPressEvent(), m_interactionStrategy, m_lastMousePos, m_textCursor, requestStrokeEnd(), and selectedShape().
|
overridevirtual |
Called when a key is released Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
| event | state and reason of this key release |
Reimplemented from KoToolBase.
Definition at line 1074 of file SvgTextTool.cpp.
References m_interactionStrategy, m_lastMousePos, m_textCursor, and SvgTextCursor::updateModifiers().
|
protected |
Definition at line 285 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, KoCanvasBase::selectedShapesProxy(), and KoSelectedShapesProxy::selection().
|
overridevirtual |
reimplemented from superclass
Reimplemented from KoToolBase.
Definition at line 1099 of file SvgTextTool.cpp.
References KoToolBase::canvas(), kisGrowRect(), m_hoveredShapeHighlightRect, m_textCursor, SvgTextCursor::moveCursor(), SvgTextCursor::MoveWordLeft, SvgTextCursor::MoveWordRight, KoPointerEvent::point, selectedShape(), SvgTextCursor::setPosToPoint(), and KoCanvasBase::updateCanvas().
|
overridevirtual |
reimplemented from KoToolBase
Implements KoToolBase.
Definition at line 906 of file SvgTextTool.cpp.
References KoShape::absoluteTransformation(), KoSvgTextShape::boundingRect(), KoToolBase::canvas(), Create, KoToolBase::cursor(), SvgTextCursor::cursorTypeForTypeSetting(), SvgCreateTextStrategy::draggingInlineSize(), grabSensitivityInPt(), KoToolBase::handleGrabRect(), SvgCreateTextStrategy::hasWrappingShape(), SvgChangeTextPaddingMarginStrategy::hitTest(), SvgTextOnPathDecorationHelper::hitTest(), KoSvgText::HorizontalTB, InlineSizeEndHandle, InlineSizeStartHandle, InShapeOffset, KoPathSegment::isValid(), kisGrowRect(), KoSvgTextShape_SHAPEID, lineToCursor(), m_base_cursor, m_dragging, m_highlightItem, m_hoveredShapeHighlightRect, m_ibeam_horizontal, m_ibeam_horizontal_done, m_ibeam_vertical, m_interactionStrategy, m_lastMousePos, m_text_in_shape, m_text_inline_horizontal, m_text_inline_vertical, m_text_on_path, m_textCursor, m_textOnPathHelper, m_textOutlineHelper, KoPointerEvent::modifiers(), MoveBorder, SvgTextCursor::NoHandle, None, KoPathShape::outline(), KoSvgTextShape::outlineRect(), KoPointerEvent::point, KoToolBase::repaintDecorations(), KoPathShape::segmentAtPoint(), Select, selectedShape(), SvgTextCursor::setTypeSettingHandleHovered(), KoShapeManager::shapeAt(), KisToolUtils::shapeHoverInfoCrossLayer(), KoCanvasBase::shapeManager(), KoSvgTextShape::textWrappingAreas(), TypeSettingHandle, SvgTextCursor::typeSettingHandleAtPos(), SvgTextCursor::updateModifiers(), KoToolBase::useCursor(), KoSvgTextShape::writingMode(), and writingMode().
|
overridevirtual |
reimplemented from KoToolBase
Implements KoToolBase.
Definition at line 776 of file SvgTextTool.cpp.
References KoToolBase::canvas(), Create, KoSelection::deselectAll(), SvgTextCursor::getPos(), grabSensitivityInPt(), KoToolBase::handleGrabRect(), SvgChangeTextPaddingMarginStrategy::hitTest(), SvgTextOnPathDecorationHelper::hitTest(), InlineSizeEndHandle, InlineSizeHandle, InlineSizeStartHandle, InShapeOffset, KoToolManager::instance(), KoPointerEvent::isTouchEvent(), KoSvgTextShape_SHAPEID, m_dragging, m_highlightItem, m_hoveredShapeHighlightRect, m_interactionStrategy, m_textCursor, m_textOnPathHelper, m_textOutlineHelper, KoPointerEvent::modifiers(), mouseMoveEvent(), Move, MoveBorder, nodeEditable(), SvgTextCursor::NoHandle, KoPointerEvent::point, KoToolBase::repaintDecorations(), KoSelection::select(), Select, selectedShape(), KoShapeManager::selection, KisToolUtils::selectShapeCrossLayer(), SvgTextCursor::setDominantBaselineFromHandle(), SvgTextCursor::setDrawTypeSettingHandle(), SvgTextOnPathDecorationHelper::setStrategyActive(), KoShapeManager::shapeAt(), KisToolUtils::shapeHoverInfoCrossLayer(), KoCanvasBase::shapeManager(), KoSnapGuide::snap(), KoCanvasBase::snapGuide, SvgChangeTextPathInfoStrategy, SvgCreateTextStrategy, KoToolManager::switchToolRequested(), TextPathHandle, TypeSetting, TypeSettingHandle, and SvgTextCursor::typeSettingHandleAtPos().
|
overridevirtual |
reimplemented from KoToolBase
Implements KoToolBase.
Definition at line 1032 of file SvgTextTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), m_base_cursor, m_dragging, m_interactionStrategy, m_strategyAddingCommand, m_textCursor, m_textOnPathHelper, m_textOutlineHelper, KoPointerEvent::modifiers(), None, Select, SvgTextCursor::setDrawTypeSettingHandle(), SvgTextOnPathDecorationHelper::setStrategyActive(), and KoToolBase::useCursor().
|
overridevirtual |
reimplemented from KoToolBase
Reimplemented from KoToolBase.
Definition at line 1114 of file SvgTextTool.cpp.
References KoToolBase::canvas(), m_textCursor, SvgTextCursor::moveCursor(), SvgTextCursor::ParagraphEnd, SvgTextCursor::ParagraphStart, KoPointerEvent::point, and selectedShape().
|
private |
nodeEditable
Definition at line 638 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KoCanvasResource::CurrentKritaNode, KisBaseNode::isEditable(), KisIconUtils::loadIcon(), KisToolUtils::nodeEditableMessage(), KoCanvasBase::resourceManager, KisViewManager::showFloatingMessage(), and KisCanvas2::viewManager().
|
overridevirtual |
reimplemented from KoToolBase
Implements KoToolBase.
Definition at line 682 of file SvgTextTool.cpp.
References KoShape::absoluteTransformation(), KoToolBase::canvas(), Create, KoShape::createHandlePainterHelperView(), debugEnabled(), KoToolBase::decorationThickness(), KoViewConverter::documentToView(), KisHandlePainterHelper::drawConnectionLine(), KisHandlePainterHelper::drawHandleCircle(), KisHandlePainterHelper::drawHandleLine(), KisHandlePainterHelper::drawPath(), KoToolBase::handleRadius(), KisHandleStyle::highlightedPrimaryHandles(), KisHandleStyle::highlightedPrimaryHandlesWithSolidOutline(), INLINE_SIZE_DASHES_PATTERN_A, INLINE_SIZE_DASHES_PATTERN_B, INLINE_SIZE_DASHES_PATTERN_LENGTH, INLINE_SIZE_HANDLE_THICKNESS, InlineSizeEndHandle, InlineSizeHandle, InlineSizeStartHandle, InShapeOffset, KoToolBase::isActivated(), length(), m_dragging, m_highlightItem, m_hoveredShapeHighlightRect, m_interactionStrategy, m_optionManager, m_textCursor, m_textOnPathHelper, m_textOutlineHelper, Move, MoveBorder, KoSvgTextShape::outlineRect(), KoSnapGuide::paint(), SvgTextOnPathDecorationHelper::paint(), KoSvgTextShape::paintDebug(), SvgTextCursor::paintDecorations(), KisHandleStyle::partiallyHighlightedPrimaryHandles(), KisHandleStyle::primarySelection(), KisHandleStyle::secondarySelection(), selectedShape(), SvgTextOnPathDecorationHelper::setDecorationThickness(), SvgTextOnPathDecorationHelper::setHandleRadius(), KisHandlePainterHelper::setHandleStyle(), KoCanvasBase::snapGuide, TypeSetting, KoCanvasBase::viewConverter(), and KoViewConverter::viewToDocumentX().
|
overridevirtual |
reimplemented from superclass
Reimplemented from KoToolBase.
Definition at line 483 of file SvgTextTool.cpp.
References m_textCursor, and SvgTextCursor::paste().
|
overridevirtual |
popupActionsMenu() does not return null. Reimplemented from KoToolBase.
Definition at line 219 of file SvgTextTool.cpp.
|
privateslot |
propertiesForNewText get the text properties that should be used for new text.
Definition at line 399 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KoSvgTextPropertyData::commonProperties, ResourceType::CssStyles, KoSvgTextProperties::FillId, KisCanvas2::image(), m_optionManager, KoCanvasBase::resourceManager, KisResourceModelProvider::resourceModel(), KisAllResourcesModel::resourcesForName(), KoSvgTextProperties::setProperty(), KoCanvasResource::SvgTextPropertyData, and KisImage::xRes().
|
overridevirtual |
Called when the user requested the cancellation of the current stroke. If you tool supports cancelling, override this method and do the needed work there
Doing nothing, since these signals come on undo/redo actions in the mainland undo stack, which we manipulate while editing text
Reimplemented from KoToolBase.
Definition at line 524 of file SvgTextTool.cpp.
|
overridevirtual |
Called when the image decided that the stroke should better be ended. If you tool supports long strokes, override this method and do the needed work there
Reimplemented from KoToolBase.
Definition at line 510 of file SvgTextTool.cpp.
References KoToolBase::isActivated(), SvgTextCursor::isAddingCommand, m_dragging, m_interactionStrategy, m_strategyAddingCommand, m_textCursor, m_textOnPathHelper, None, SvgTextOnPathDecorationHelper::setStrategyActive(), and KoToolBase::useCursor().
|
overridevirtual |
selectAll select all data the tool can select.
Reimplemented from KoToolBase.
Definition at line 493 of file SvgTextTool.cpp.
References m_textCursor, SvgTextCursor::moveCursor(), SvgTextCursor::ParagraphEnd, and SvgTextCursor::ParagraphStart.
|
protected |
Definition at line 293 of file SvgTextTool.cpp.
References KoToolBase::canvas(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, koSelection(), and KoSelection::selectedEditableShapes().
|
overridevirtual |
reimplemented from superclass
Reimplemented from KoToolBase.
Definition at line 505 of file SvgTextTool.cpp.
References m_textCursor.
|
privateslot |
Definition at line 306 of file SvgTextTool.cpp.
References m_editor, selectedShape(), and textUpdated().
|
privateslot |
showGlyphPalette Shows the glyph palette dialog.
Definition at line 338 of file SvgTextTool.cpp.
References insertRichText(), m_glyphPalette, m_textCursor, KoToolBase::selectionChanged(), and updateGlyphPalette().
|
privateslot |
slotConvertType
| index |
Definition at line 540 of file SvgTextTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KisCommandUtils::FlipFlopCommand::FINALIZING, SvgTextCursor::getPos(), KisCommandUtils::FlipFlopCommand::INITIALIZING, KoSvgTextShape::InlineWrap, m_textCursor, KoSvgTextRemoveShapeCommand::removeContourShapesFromFlow(), selectedShape(), KoCanvasBase::selectedShapesProxy(), KUndo2Command::setText(), slotTextTypeUpdated(), KoSvgTextShape::TextInShape, and KoSvgTextShape::textType().
|
privateslot |
slotMoveTextSelection Move the start of the selection in typesetting mode by image 1 pix.
| index | – Qt key for a direction. |
Definition at line 603 of file SvgTextTool.cpp.
References KoCanvasBase::addCommand(), KoToolBase::canvas(), KisCanvas2::coordinatesConverter, KisCommandUtils::FlipFlopCommand::FINALIZING, SvgTextCursor::getAnchor(), SvgTextCursor::getPos(), KisCoordinatesConverter::imageToDocumentTransform(), KisCommandUtils::FlipFlopCommand::INITIALIZING, m_textCursor, SvgTextChangeTransformsOnRange::OffsetAll, selectedShape(), KoCanvasBase::selectedShapesProxy(), and KUndo2Command::setText().
|
privateslot |
selectionChanged called when the canvas selection is changed.
Definition at line 434 of file SvgTextTool.cpp.
References KoSelection::deselectAll(), koSelection(), m_textCursor, m_textOnPathHelper, KoSelection::select(), KoSelection::selectedEditableShapes(), selectedShape(), SvgTextOnPathDecorationHelper::setShape(), SvgTextCursor::setShape(), KoToolBase::setTextMode(), SvgTextCursor::shape, and slotTextTypeUpdated().
|
privateslot |
slotTextTypeUpdated Update the text type in the tool options.
Definition at line 568 of file SvgTextTool.cpp.
References KoToolBase::action(), KoSvgTextShape::InlineWrap, m_optionManager, m_textCursor, KoSvgTextShape::PreformattedText, KoSvgTextShape::PrePositionedText, selectedShape(), KoSvgTextShape::textType(), and SvgTextCursor::updateTypeSettingDecorFromShape().
|
privateslot |
updateCursor update the canvas decorations in a particular update rect for the text cursor.
| updateRect | the rect to update in. |
Definition at line 533 of file SvgTextTool.cpp.
References KoToolBase::canvas(), and KoCanvasBase::updateCanvas().
|
privateslot |
slotUpdateTextPasteBehaviour update the default text paste behaviour.
Definition at line 563 of file SvgTextTool.cpp.
References m_optionManager, m_textCursor, and SvgTextCursor::setPasteRichTextByDefault().
|
privateslot |
slotUpdateTypeSettingMode Enable typesetting mode from the tool options.
Definition at line 632 of file SvgTextTool.cpp.
References m_optionManager, m_textCursor, SvgTextCursor::setTypeSettingModeActive(), and slotTextTypeUpdated().
|
privateslot |
slotUpdateVisualCursor update the visual cursor mode on the text cursor.
Definition at line 558 of file SvgTextTool.cpp.
References m_optionManager, m_textCursor, and SvgTextCursor::setVisualMode().
|
privateslot |
Definition at line 332 of file SvgTextTool.cpp.
References KoCanvasBase::addCommand(), and KoToolBase::canvas().
|
privateslot |
updateGlyphPalette update the glyph palette dialog from the current selection.
Definition at line 355 of file SvgTextTool.cpp.
References SvgTextCursor::currentTextProperties(), SvgTextCursor::getPos(), KoSvgTextShape::indexForPos(), m_glyphPalette, m_textCursor, KoSvgTextShape::plainText, KoSvgTextShape::posLeft(), KoSvgTextShape::posRight(), and SvgTextCursor::shape.
|
privateslot |
Definition at line 370 of file SvgTextTool.cpp.
References SvgTextCursor::getPos(), m_textCursor, m_textOnPathHelper, and SvgTextOnPathDecorationHelper::setPos().
|
private |
Definition at line 1131 of file SvgTextTool.cpp.
References propertiesForNewText(), KoSvgTextProperties::propertyOrDefault(), and KoSvgTextProperties::WritingModeId.
|
friend |
Definition at line 40 of file SvgTextTool.h.
|
friend |
Definition at line 39 of file SvgTextTool.h.
|
private |
Definition at line 242 of file SvgTextTool.h.
|
private |
Definition at line 238 of file SvgTextTool.h.
|
private |
Definition at line 226 of file SvgTextTool.h.
|
private |
Definition at line 223 of file SvgTextTool.h.
|
private |
Definition at line 224 of file SvgTextTool.h.
|
private |
Definition at line 228 of file SvgTextTool.h.
|
private |
Definition at line 240 of file SvgTextTool.h.
|
private |
Definition at line 248 of file SvgTextTool.h.
|
private |
Definition at line 249 of file SvgTextTool.h.
|
private |
Definition at line 247 of file SvgTextTool.h.
|
private |
Definition at line 227 of file SvgTextTool.h.
|
private |
Definition at line 225 of file SvgTextTool.h.
|
private |
Definition at line 222 of file SvgTextTool.h.
|
private |
Definition at line 229 of file SvgTextTool.h.
|
private |
Definition at line 246 of file SvgTextTool.h.
|
private |
Definition at line 243 of file SvgTextTool.h.
|
private |
Definition at line 244 of file SvgTextTool.h.
|
private |
Definition at line 245 of file SvgTextTool.h.
|
private |
Definition at line 235 of file SvgTextTool.h.
|
private |
Definition at line 236 of file SvgTextTool.h.
|
private |
Definition at line 237 of file SvgTextTool.h.
|
private |
Definition at line 231 of file SvgTextTool.h.
|
private |
Definition at line 232 of file SvgTextTool.h.