Krita Source Code Documentation
Loading...
Searching...
No Matches
SvgTextEditor.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 *
3 * SPDX-FileCopyrightText: 2017 Boudewijn Rempt <boud@valdyas.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#ifndef TEXTNGSHAPECONFIGWIDGET_H
9#define TEXTNGSHAPECONFIGWIDGET_H
10
11#include <QWidget>
12#include <QTextEdit>
13
14#include <kxmlguiwindow.h>
15#include <KoColor.h>
16#include <KoSvgText.h>//for the enums
17
19
20#include "ui_WdgSvgTextEditor.h"
21#include "ui_WdgSvgTextSettings.h"
22
23class KoSvgTextShape;
24class KoDialog;
25
27{
28 Q_OBJECT
29public:
30 SvgTextEditor(QWidget *parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
32
34
35private Q_SLOTS:
36
37 void slotCloseEditor();
38
39 void save();
40
41 void undo();
42 void redo();
43
44 void cut();
45 void copy();
46 void paste();
47
48 void selectAll();
49 void deselect();
50
51 void find();
52 void findNext();
53 void findPrev();
54 void replace();
55
56 void zoomOut();
57 void zoomIn();
58
59 void setSettings();
60
61 void setModified(bool modified);
62 void dialogButtonClicked(QAbstractButton *button);
63
64Q_SIGNALS:
65 void textUpdated(KoSvgTextShape *shape, const QString &svg, const QString &defs);
67
68protected:
69 void wheelEvent(QWheelEvent *event) override;
70 bool eventFilter(QObject *watched, QEvent *event) override;
71
72private:
73 void applySettings();
74
75 QAction *createAction(const QString &name,
76 const char *member);
77 void createActions();
78
79 Ui_WdgSvgTextEditor m_textEditorWidget;
80 QTextEdit *m_currentEditor {0};
81 QWidget *m_page {0};
83
86
87 QString m_searchKey;
88
89 class Private;
90 QScopedPointer<Private> d;
91};
92
93#endif //TEXTNGSHAPECONFIGWIDGET_H
KDE top level main window with predefined action layout
bool event(QEvent *event) override
A dialog base class with standard buttons and predefined layouts.
Definition KoDialog.h:116
KoSvgTextShape * m_shape
void setModified(bool modified)
QAction * createAction(const QString &name, const char *member)
SvgTextEditor(QWidget *parent=0, Qt::WindowFlags f=Qt::WindowFlags())
bool eventFilter(QObject *watched, QEvent *event) override
BasicXMLSyntaxHighlighter * m_syntaxHighlighter
void dialogButtonClicked(QAbstractButton *button)
QScopedPointer< Private > d
QList< QAction * > m_svgTextActions
void textUpdated(KoSvgTextShape *shape, const QString &svg, const QString &defs)
QString m_searchKey
QTextEdit * m_currentEditor
void setInitialShape(KoSvgTextShape *shape)
void wheelEvent(QWheelEvent *event) override
QWidget * m_page
Ui_WdgSvgTextEditor m_textEditorWidget
void textEditorClosed()
QString button(const QWheelEvent &ev)