Krita Source Code Documentation
Loading...
Searching...
No Matches
GlyphPaletteDialog.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef GLYPHPALETTEDIALOG_H
7#define GLYPHPALETTEDIALOG_H
8
9#include <KoDialog.h>
10#include <KisQQuickWidget.h>
11
12#include <KoSvgTextProperties.h>
13#include <KoFontGlyphModel.h>
14#include <KoSvgTextShape.h>
15#include <QStandardItemModel>
16
19
28{
29 Q_OBJECT
30public:
31 GlyphPaletteDialog(QWidget *parent = nullptr);
33
40 void setGlyphModelFromProperties(const QPair<KoSvgTextProperties, KoSvgTextProperties> &properties, const QString &text);
41
42Q_SIGNALS:
43 void signalInsertRichText(KoSvgTextShape *text, bool replace);
44public Q_SLOTS:
45
46 void slotInsertRichText(const int charRow, const int glyphRow = -1, const bool replace = false, const bool useCharMap = false);
47 // Show the glyphalts for charRow in a pop-up located at x, y. Make sure to adjust cell-size.
48 void slotShowPopupPalette(const int charRow, const int x = 0, const int y = 0, const int cellWidth = 100, const int cellHeight = 100);
50
51private:
54 QPair<KoSvgTextProperties, KoSvgTextProperties> m_lastUsedProperties;
57};
58
59#endif // GLYPHPALETTEDIALOG_H
The GlyphPaletteAltPopup class.
The GlyphPaletteDialog class.
GlyphPaletteDialog(QWidget *parent=nullptr)
void slotInsertRichText(const int charRow, const int glyphRow=-1, const bool replace=false, const bool useCharMap=false)
KoFontGlyphModel * m_model
GlyphPaletteProxyModel * m_charMapModel
QPair< KoSvgTextProperties, KoSvgTextProperties > m_lastUsedProperties
void signalInsertRichText(KoSvgTextShape *text, bool replace)
GlyphPaletteAltPopup * m_altPopup
void slotShowPopupPalette(const int charRow, const int x=0, const int y=0, const int cellWidth=100, const int cellHeight=100)
void setGlyphModelFromProperties(const QPair< KoSvgTextProperties, KoSvgTextProperties > &properties, const QString &text)
setGlyphModelFromProperties This updates the glyph model.
KisQQuickWidget * m_quickWidget
The GlyphPaletteProxyModel class.
The KisQQuickWidget class.
A dialog base class with standard buttons and predefined layouts.
Definition KoDialog.h:116
The KoFontGlyphModel class Creates a tree model of all the glyphs in a given face.