Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgTextToolOptionsManager.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6#ifndef SVGTEXTTOOLOPTIONSOBJECT_H
7#define SVGTEXTTOOLOPTIONSOBJECT_H
8
9#include <QObject>
17class SvgTextToolOptionsManager : public QObject
18{
19 Q_OBJECT
21
22 Q_PROPERTY(int textType READ textType WRITE convertToTextType NOTIFY convertTextType)
25
26 /* Debug options */
27 Q_PROPERTY(bool showDebug READ showDebug WRITE setShowDebug NOTIFY showDebugChanged)
30
31public:
32 explicit SvgTextToolOptionsManager(QObject *parent = nullptr);
34
42 Q_ENUM(TextType)
43
46
47 /* Debug options */
48 bool showDebug() const;
49 void setShowDebug(const bool show);
50
51 bool showCharacterDebug() const;
52 void setShowCharacterDebug(const bool show);
53
54 bool showLineDebug() const;
55 void setShowLineDebug(const bool show);
56
57 /*
58 * typeType handles the conversion from textShapes
59 * to different types, like wrapped, preformatted
60 * and svg 1.1 style positioned text.
61 */
62 int textType() const;
63 void convertToTextType(const int type);
64
69 bool textPropertiesOpen() const;
70 void setTextPropertiesOpen(const bool open);
71
77 bool showTextPropertyButton() const;
78 void setShowTextPropertyButton(const bool show);
79
80public Q_SLOTS:
85 void emitOpenTextEditor();
90 void emitGlyphPalette();
91
92Q_SIGNALS:
94 void convertTextType(int type);
97
98 void openTextPropertiesDocker(bool open);
100
101 /* Debug options */
105
106private:
107 struct Private;
108 QScopedPointer<Private> d;
109};
110
111#endif // SVGTEXTTOOLOPTIONSOBJECT_H
The SvgTextToolOptionsManager class.
void setTextPropertiesOpen(const bool open)
void setShowTextPropertyButton(const bool show)
void emitGlyphPalette()
emitGlyphPalette Emit the open glyph palette signal.
SvgTextToolOptionsModel * optionsModel
void setOptionsModel(SvgTextToolOptionsModel *model)
void openTextPropertiesDocker(bool open)
TextType
Sync with KoSvgTextShape::TextType.
void convertTextType(int type)
void setShowCharacterDebug(const bool show)
void emitOpenTextEditor()
emitOpenTextEditor Emit the open text editor signal.