Krita Source Code Documentation
Loading...
Searching...
No Matches
GlyphPaletteProxyModel.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
7#ifndef GLYPHPALETTEPROXYMODEL_H
8#define GLYPHPALETTEPROXYMODEL_H
9
10#include <QSortFilterProxyModel>
11#include <KoFontGlyphModel.h>
12#include <QChar>
20class GlyphPaletteProxyModel: public QSortFilterProxyModel
21{
22 Q_OBJECT
23
24 Q_PROPERTY(QVariantList blockLabels READ blockLabels NOTIFY blockLabelsChanged)
25 Q_PROPERTY(int blockFilter READ blockFilter WRITE setBlockFilter NOTIFY blockFilterChanged)
26 Q_PROPERTY(QString searchText READ searchText() WRITE setSearchText NOTIFY searchTextChanged)
27public:
28 GlyphPaletteProxyModel(QObject *parent = nullptr);
29 ~GlyphPaletteProxyModel() override;
30
35 int blockFilter() const;
36
41 QString searchText() const;
42
48 QVariantList blockLabels() const;
49
50public Q_SLOTS:
56 void setSearchText(const QString &text);
62 void setBlockFilter(int filter);
63
70
71Q_SIGNALS:
75
76protected:
77 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
78private:
79 struct Private;
80 QScopedPointer<Private> d;
81
82};
83
84#endif // GLYPHPALETTEPROXYMODEL_H
The GlyphPaletteProxyModel class.
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
QScopedPointer< Private > d
void setBlockFilter(int filter)
setBlockFilter set the unicode block filter.
void setSearchText(const QString &text)
setSearchText
void emitBlockLabelsChanged()
emitBlockLabelsChanged This called "block labels changed" and is should be used when the source KoFon...