|
Krita Source Code Documentation
|
#include <SvgCreateTextStrategy.h>
Inheritance diagram for SvgCreateTextStrategy:Public Member Functions | |
| void | cancelInteraction () override |
| KUndo2Command * | createCommand () override |
| bool | draggingInlineSize () |
| void | finishInteraction (Qt::KeyboardModifiers modifiers) override |
| void | handleMouseMove (const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers) override |
| void | paint (QPainter &painter, const KoViewConverter &converter) override |
| SvgCreateTextStrategy (SvgTextTool *tool, const QPointF &clicked) | |
| ~SvgCreateTextStrategy () override=default | |
Public Member Functions inherited from KoInteractionStrategy | |
| KoInteractionStrategy (KoToolBase *parent) | |
| constructor | |
| KoToolBase * | tool () const |
| virtual | ~KoInteractionStrategy () |
| Destructor. | |
Private Attributes | |
| QPointF | m_dragEnd |
| QPointF | m_dragStart |
| QSizeF | m_minSizeInline |
| Qt::KeyboardModifiers | m_modifiers |
Additional Inherited Members | |
Protected Member Functions inherited from KoInteractionStrategy | |
| uint | decorationThickness () const |
| uint | grabSensitivity () const |
| Convenience function to get the global grab sensitivity. | |
| uint | handleRadius () const |
| Convenience function to get the global handle radius. | |
| KoInteractionStrategy (KoInteractionStrategyPrivate &) | |
| constructor | |
Protected Attributes inherited from KoInteractionStrategy | |
| KoInteractionStrategyPrivate * | d_ptr |
Definition at line 19 of file SvgCreateTextStrategy.h.
| SvgCreateTextStrategy::SvgCreateTextStrategy | ( | SvgTextTool * | tool, |
| const QPointF & | clicked ) |
Definition at line 26 of file SvgCreateTextStrategy.cpp.
References KoSvgText::FontMetrics::ascender, KoSvgTextProperties::defaultProperties(), KoSvgText::FontMetrics::descender, KoSvgText::FontMetrics::fontSize, KoSvgTextProperties::fontSize(), KoSvgTextProperties::inheritFrom(), KoSvgText::FontMetrics::lineGap, m_minSizeInline, KoSvgTextProperties::metrics(), KoInteractionStrategy::tool(), and KoSvgText::CssLengthPercentage::value.
|
overridedefault |
|
overridevirtual |
This method will undo frames based interactions by calling createCommand() and unexecuting that.
Reimplemented from KoInteractionStrategy.
Definition at line 149 of file SvgCreateTextStrategy.cpp.
References KoToolBase::canvas(), m_dragEnd, m_dragStart, KoSnapGuide::reset(), KoCanvasBase::snapGuide, KoInteractionStrategy::tool(), and KoCanvasBase::updateCanvas().
|
overridevirtual |
For interactions that are undo-able this method should be implemented to return such a command. Implementations should return 0 otherwise.
Implements KoInteractionStrategy.
Definition at line 58 of file SvgCreateTextStrategy.cpp.
References KoSvgText::AnchorEnd, KoSvgText::AnchorMiddle, KoSvgText::AnchorStart, KoSvgText::FontMetrics::ascender, KoToolBase::canvas(), KoShapeFactoryBase::createShape(), KoSvgText::AutoValue::customValue, KoSvgTextProperties::defaultProperties(), KoSvgTextProperties::DirectionId, KoSvgText::DirectionRightToLeft, KoSvgText::FontMetrics::fontSize, KoSvgTextProperties::fontSize(), KoSvgTextProperties::hasProperty(), KoSvgText::HorizontalTB, KoSvgTextProperties::inheritFrom(), KoSvgTextProperties::InlineSizeId, KoShapeRegistry::instance(), KoSvgText::AutoValue::isAuto, KoSvgText::FontMetrics::lineGap, m_dragEnd, m_dragStart, m_minSizeInline, m_modifiers, KoSvgTextProperties::metrics(), KoSvgText::OrientationUpright, KoSvgText::Preserve, KoSvgTextProperties::propertyOrDefault(), KoSnapGuide::reset(), KoCanvasBase::selectedShapesProxy(), KoProperties::setProperty(), KoSvgTextProperties::setProperty(), KUndo2Command::setText(), KoCanvasBase::shapeController, KoCanvasBase::snapGuide, KUndo2Command::text(), KoSvgTextProperties::TextAnchorId, KoSvgTextProperties::TextCollapseId, KoSvgTextProperties::TextOrientationId, KoSvgTextProperties::TextWrapId, KoInteractionStrategy::tool(), KoSvgText::CssLengthPercentage::value, KoGenericRegistry< T >::value(), KoSvgText::VerticalRL, KoSvgText::Wrap, and KoSvgTextProperties::WritingModeId.
| bool SvgCreateTextStrategy::draggingInlineSize | ( | ) |
Definition at line 161 of file SvgCreateTextStrategy.cpp.
References m_dragEnd, m_dragStart, m_minSizeInline, and m_modifiers.
|
overridevirtual |
Override to make final changes to the data on the end of an interaction.
Implements KoInteractionStrategy.
Definition at line 156 of file SvgCreateTextStrategy.cpp.
References m_modifiers.
|
overridevirtual |
Extending classes should implement this method to update the selectedShapes based on the new mouse position.
| mouseLocation | the new location in pt |
| modifiers | OR-ed set of keys pressed. |
Implements KoInteractionStrategy.
Definition at line 50 of file SvgCreateTextStrategy.cpp.
References KoToolBase::canvas(), kisGrowRect(), m_dragEnd, m_dragStart, m_modifiers, KoSnapGuide::snap(), KoCanvasBase::snapGuide, KoInteractionStrategy::tool(), and KoCanvasBase::updateCanvas().
|
overridevirtual |
Reimplement this if the action needs to draw a "blob" on the canvas; that is, a transient decoration like a rubber band.
Reimplemented from KoInteractionStrategy.
Definition at line 39 of file SvgCreateTextStrategy.cpp.
References KoInteractionStrategy::decorationThickness(), KoViewConverter::documentToView(), KisHandlePainterHelper::drawRubberLine(), m_dragEnd, m_dragStart, KisHandleStyle::primarySelection(), and KisHandlePainterHelper::setHandleStyle().
|
private |
Definition at line 35 of file SvgCreateTextStrategy.h.
|
private |
Definition at line 34 of file SvgCreateTextStrategy.h.
|
private |
Definition at line 36 of file SvgCreateTextStrategy.h.
|
private |
Definition at line 37 of file SvgCreateTextStrategy.h.