TextEmoticonsCore::EmojiSortFilterProxyModel Class
The EmojiProxyModel class Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <TextEmoticonsCore/EmojiSortFilterProxyModel> |
| CMake: | find_package(KF6TextEmoticonsCore REQUIRED)target_link_libraries(mytarget PRIVATE KF6::TextEmoticonsCore) |
| Inherits: | QSortFilterProxyModel |
Public Functions
| EmojiSortFilterProxyModel(QObject *parent = nullptr) | |
| virtual | ~EmojiSortFilterProxyModel() override |
| QString | category() const |
| TextEmoticonsCore::EmojiModelManager::EmojiTone | emojiTone() const |
| QString | emojiToneSuffix() const |
| QStringList | recentEmoticons() const |
| QString | searchIdentifier() const |
| void | setCategory(const QString &newCategories) |
| void | setEmojiTone(TextEmoticonsCore::EmojiModelManager::EmojiTone tone) |
| void | setRecentEmoticons(const QStringList &newRecentEmoticons) |
| void | setSearchIdentifier(const QString &newSearchIdentifier) |
Signals
| void | categoryChanged() |
| void | emojiToneChanged() |
| void | recentEmoticonsChanged() |
Reimplemented Protected Functions
| virtual bool | filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override |
| virtual bool | lessThan(const QModelIndex &left, const QModelIndex &right) const override |
Detailed Description
Member Function Documentation
[explicit] EmojiSortFilterProxyModel::EmojiSortFilterProxyModel(QObject *parent = nullptr)
Constructs an EmojiSortFilterProxyModel with the given parent parent The parent QObject
[override virtual noexcept] EmojiSortFilterProxyModel::~EmojiSortFilterProxyModel()
Destroys the EmojiSortFilterProxyModel
QString EmojiSortFilterProxyModel::category() const
Returns the current category filter Returns The emoji category to filter by
See also setCategory().
[signal] void EmojiSortFilterProxyModel::categoryChanged()
Emitted when the category filter changes
TextEmoticonsCore::EmojiModelManager::EmojiTone EmojiSortFilterProxyModel::emojiTone() const
Returns the current emoji tone setting Returns The EmojiTone value
See also setEmojiTone().
[signal] void EmojiSortFilterProxyModel::emojiToneChanged()
Emitted when the emoji tone changes
QString EmojiSortFilterProxyModel::emojiToneSuffix() const
Returns the emoji tone suffix Returns The string suffix for the current emoji tone
[override virtual protected] bool EmojiSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
Reimplements: QSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const.
Determines whether the row at source_row should be included in the model source_row The row number in the source model source_parent The parent index in the source model Returns true if the row should be included, false otherwise
[override virtual protected] bool EmojiSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
Reimplements: QSortFilterProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const.
Compares two emoticons for sorting left The left emoticon index right The right emoticon index Returns true if left should be sorted before right
QStringList EmojiSortFilterProxyModel::recentEmoticons() const
Returns the list of recent emoticons Returns A list of recent emoticon identifiers
See also setRecentEmoticons().
[signal] void EmojiSortFilterProxyModel::recentEmoticonsChanged()
Emitted when the list of recent emoticons changes
QString EmojiSortFilterProxyModel::searchIdentifier() const
Returns the search identifier filter Returns The search identifier string
See also setSearchIdentifier().
void EmojiSortFilterProxyModel::setCategory(const QString &newCategories)
Sets the emoji category filter newCategories The new category filter
See also category().
void EmojiSortFilterProxyModel::setEmojiTone(TextEmoticonsCore::EmojiModelManager::EmojiTone tone)
Sets the emoji tone tone The emoji tone to apply
See also emojiTone().
void EmojiSortFilterProxyModel::setRecentEmoticons(const QStringList &newRecentEmoticons)
Sets the list of recent emoticons newRecentEmoticons The new list of recent emoticons
See also recentEmoticons().
void EmojiSortFilterProxyModel::setSearchIdentifier(const QString &newSearchIdentifier)
Sets the search identifier filter newSearchIdentifier The new search identifier
See also searchIdentifier().