KDEGames
kchatbaseitemdelegate.cpp
26void KChatBaseItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
41 painter->drawText(option.rect.x(), QFontMetrics(option.font).height() + option.rect.y(), i18n("%1: ", sender));
43 painter->drawText(option.rect.x() + 3 + QFontMetrics(((KChatBaseModel *)index.model())->nameFont()).boundingRect(i18n("%1: ", sender)).width(),
48QSize KChatBaseItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
55QSize KChatBaseItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index, const QString &sender, const QString &message) const
~KChatBaseItemDelegate() override
Destruct a KChatBaseItemDelegate object.
Definition kchatbaseitemdelegate.cpp:22
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Reimplementation of the default sizeHint.
Definition kchatbaseitemdelegate.cpp:48
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Reimplementation of the default paint method.
Definition kchatbaseitemdelegate.cpp:26
KChatBaseItemDelegate(QObject *parent=nullptr)
Constructs a KChatBaseItemDelegate object.
Definition kchatbaseitemdelegate.cpp:17
The class of the elements stored in the chat list model.
Definition kchatbasemodel.h:35
The model used to store messages displayed in the chat dialog messages list.
Definition kchatbasemodel.h:70
QString i18n(const char *text, const TYPE &arg...)
virtual QVariant data(const QModelIndex &index, int role) const const=0
QRect boundingRect(QChar ch) const const
int height() const const
int lineSpacing() const const
const QAbstractItemModel * model() const const
QObject * sender() const const
void drawText(const QPoint &position, const QString &text)
void setFont(const QFont &font)
int width() const const
DisplayRole
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.