16#include "kritatoolsvgtext_export.h"
23class QInputMethodEvent;
90 void setCaretSetting(
int cursorWidth = 1,
int cursorFlash = 1000,
int cursorFlashLimit = 5000);
98 void setVisualMode(
const bool visualMode =
true);
104 void setPasteRichTextByDefault(
const bool pasteRichText =
true);
113 void setPos(
int pos,
int anchor);
116 void setPosToPoint(QPointF point,
bool moveAnchor =
true);
119 void moveCursor(
MoveMode mode,
bool moveAnchor =
true);
137 void removeLastCodePoint();
143 QPair<KoSvgTextProperties, KoSvgTextProperties> currentTextProperties()
const;
147 void mergePropertiesIntoSelection(
const KoSvgTextProperties props,
const QSet<KoSvgTextProperties::PropertyId> removeProperties = QSet<KoSvgTextProperties::PropertyId>());
155 void removeSelection();
174 void paintDecorations(QPainter &gc, QColor selectionColor,
int decorationThickness = 1);
176 QVariant inputMethodQuery(Qt::InputMethodQuery query)
const;
177 void inputMethodEvent(QInputMethodEvent *event);
193 void keyPressEvent(QKeyEvent *event);
205 bool registerPropertyAction(QAction *action,
const QString &name);
217 void stopBlinkCursor();
219 void updateInputMethodItemTransform();
220 void canvasResourceChanged(
int key,
const QVariant &
value);
222 void propertyAction();
235 bool pastePlainText();
249 void updateCursor(
bool firstUpdate =
false);
250 void updateSelection();
251 void updateIMEDecoration();
254 int moveModeResult(
MoveMode &mode,
int &pos,
bool visual =
false)
const;
255 bool acceptableInput(
const QKeyEvent *event)
const;
257 void commitIMEPreEdit();
259 void updateCanvasResources();
262 const QScopedPointer<Private>
d;
273 virtual void setPropertiesOnSelected(
KoSvgTextProperties properties, QSet<KoSvgTextProperties::PropertyId> removeProperties = QSet<KoSvgTextProperties::PropertyId>())
override;
274 virtual bool spanSelection()
override;
275 void emitSelectionChange();
278 const QScopedPointer<Private>
d;
float value(const T *src, size_t ch)
QVariant toggleProperty(SvgTextShortcutInfo info, QList< KoSvgTextProperties > currentProperties)
toggleProperty Handles toggling properties for getModifiedProperties split out to make code easier to...
ChangeType
Used by shapeChanged() to select which change was made.
The KoSvgTextPropertiesInterface class.
bool insertRichText(int pos, const KoSvgTextShape *richText)
insertRichText Insert rich text at the given cursor pos. This will first split contents at the given ...
QList< KoSvgTextProperties > propertiesForRange(const int startPos, const int endPos, bool inherited=false) const
propertiesForRange get the properties for a range.
bool insertText(int pos, QString text)
insertText Insert a text somewhere in the KoTextShape.
bool removeText(int &index, int &length)
removeText Where insert text explicitly uses a cursorposition, remove text uses a string index....
Interface to interact with the text property manager.
const QScopedPointer< Private > d
Q_DECLARE_METATYPE(KisPaintopLodLimitations)
ShapeChangeListener so we can inform any text cursors that the cursor needs updating.
void notifyShapeChanged(ChangeType type, KoShape *shape) override
virtual void notifyMarkupChanged()=0
virtual void notifyCursorPosChanged(int pos, int anchor)=0
KoSvgTextShape * shape() const
Get the current text shape.
bool pasteRichText()
pasteRichText
bool isAddingCommand() const
the cursor is currently adding a command
const QScopedPointer< Private > d
void sigOpenGlyphPalette()
void updateCursorDecoration(QRectF updateRect)