X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=63d92e689397bf1c440a8753c1dbd1d7f98c4f29;hb=982ece4929696e3817875543cab527740cc7e023;hp=c518c5fef35c7716d6f02caaa515aaad1075decd;hpb=da2b5b2e4e2b0ea1847a0a5f0cb4a3752fc655c9;p=quassel.git diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index c518c5fe..63d92e68 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -28,7 +28,7 @@ #include "chatitem.h" ChatItem::ChatItem(const QPersistentModelIndex &index_, QGraphicsItem *parent) : QGraphicsItem(parent), _index(index_) { - _width = _height = 0; + } ChatItem::~ChatItem() { @@ -43,9 +43,11 @@ QVariant ChatItem::data(int role) const { return _index.data(role); } +/* QRectF ChatItem::boundingRect() const { return QRectF(0, 0, _width, _height); } +*/ void ChatItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); @@ -58,9 +60,9 @@ void ChatItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, int ChatItem::setWidth(int w) { - _width = w; - _height = 20; // FIXME - return _height; + _boundingRect.setWidth(w); + _boundingRect.setHeight(20); // FIXME + return 20; } /*