TextEmoticonsCore::EmojiModel Class

The EmojiModel class Author: Laurent Montel <montel@kde.org>. More...

Header: #include <TextEmoticonsCore/EmojiModel>
CMake: find_package(KF6TextEmoticonsCore REQUIRED)
target_link_libraries(mytarget PRIVATE KF6::TextEmoticonsCore)
Inherits: QAbstractListModel

Public Functions

EmojiModel(QObject *parent = nullptr)
virtual ~EmojiModel() override
TextEmoticonsCore::CustomEmojiIconManager *customEmojiIconManager() const
const QList<TextEmoticonsCore::CustomEmoji> &customEmojiList() const
const QList<TextEmoticonsCore::UnicodeEmoticon> &emoticonList() const
void setCustomEmojiIconManager(TextEmoticonsCore::CustomEmojiIconManager *newCustomEmojiIconManager)
void setCustomEmojiList(const QList<TextEmoticonsCore::CustomEmoji> &newCustomEmojiList)
void setUnicodeEmoticonList(const QList<TextEmoticonsCore::UnicodeEmoticon> &newEmoticonList)

Reimplemented Public Functions

virtual QVariant data(const QModelIndex &index, int role) const override
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override

Detailed Description

Member Function Documentation

[explicit] EmojiModel::EmojiModel(QObject *parent = nullptr)

Constructor for EmojiModel parent The parent object

[override virtual noexcept] EmojiModel::~EmojiModel()

Destructor for EmojiModel

TextEmoticonsCore::CustomEmojiIconManager *EmojiModel::customEmojiIconManager() const

Returns the custom emoji icon manager Returns Pointer to the CustomEmojiIconManager

See also setCustomEmojiIconManager().

const QList<TextEmoticonsCore::CustomEmoji> &EmojiModel::customEmojiList() const

Returns the list of custom emojis Returns The custom emoji list

See also setCustomEmojiList().

[override virtual] QVariant EmojiModel::data(const QModelIndex &index, int role) const

Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.

Returns the data for a given index and role index The model index role The data role Returns The data as a QVariant

const QList<TextEmoticonsCore::UnicodeEmoticon> &EmojiModel::emoticonList() const

Returns the list of unicode emoticons Returns A reference to the emoticon list

[override virtual] int EmojiModel::rowCount(const QModelIndex &parent = QModelIndex()) const

Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.

Returns the number of rows in the model parent The parent model index Returns The row count

void EmojiModel::setCustomEmojiIconManager(TextEmoticonsCore::CustomEmojiIconManager *newCustomEmojiIconManager)

Sets the custom emoji icon manager newCustomEmojiIconManager The icon manager to set

See also customEmojiIconManager().

void EmojiModel::setCustomEmojiList(const QList<TextEmoticonsCore::CustomEmoji> &newCustomEmojiList)

Sets the list of custom emojis newCustomEmojiList The custom emoji list to set

See also customEmojiList().

void EmojiModel::setUnicodeEmoticonList(const QList<TextEmoticonsCore::UnicodeEmoticon> &newEmoticonList)

Sets the list of unicode emoticons newEmoticonList The emoticon list to set