-ChatLine::~ChatLine() {
-
-}
-
-QString ChatLine::sender() const {
- return QString();
-}
-
-QString ChatLine::text() const {
- return QString();
-}
-
-MsgId ChatLine::msgId() const {
- return 0;
-}
-
-BufferInfo ChatLine::bufferInfo() const {
- Q_ASSERT(false); // do we actually need this function???
- return BufferInfo();
-}
-
-QDateTime ChatLine::timestamp() const {
- return QDateTime();
-}
-
-QRectF ChatLine::boundingRect () const {
- return childrenBoundingRect();
-}
-
-void ChatLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
-
-}
-
-void ChatLine::setColumnWidths(int tsColWidth, int senderColWidth, int textColWidth) {
- if(tsColWidth >= 0) {
- _tsColWidth = tsColWidth;
- _tsItem->setWidth(tsColWidth);
- }
- if(senderColWidth >= 0) {
- _senderColWidth = senderColWidth;
- _senderItem->setWidth(senderColWidth);
- }
- if(textColWidth >= 0) {
- _textColWidth = textColWidth;
- _textItem->setWidth(textColWidth);
- }
- layout();
-}
-
-void ChatLine::layout() {
- prepareGeometryChange();
- _tsItem->setPos(QPointF(0, 0));
- _senderItem->setPos(QPointF(_tsColWidth + QtUi::style()->sepTsSender(), 0));
- _textItem->setPos(QPointF(_tsColWidth + QtUi::style()->sepTsSender() + _senderColWidth + QtUi::style()->sepSenderText(), 0));
-}