X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fchatlinemodelitem.h;h=d4979cdf1b55d75bde29175354301bae7e3f3dd8;hb=86831c8857f0a729580cee547e10c9621d50c780;hp=9b5a496691d5d9a588c52b96b70f938ac2347a59;hpb=1817c8c8e2437d8aadcc1f07195fa4555cb1c17c;p=quassel.git diff --git a/src/qtui/chatlinemodelitem.h b/src/qtui/chatlinemodelitem.h index 9b5a4966..d4979cdf 100644 --- a/src/qtui/chatlinemodelitem.h +++ b/src/qtui/chatlinemodelitem.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,25 +22,28 @@ #define CHATLINEMODELITEM_H_ #include "messagemodel.h" -#include "uistyle.h" -class ChatLineModelItem : public MessageModelItem { - - public: - ChatLineModelItem(const Message &); - //virtual ~ChatLineModelItem() {}; - - virtual QVariant data(int column, int role) const; - virtual bool setData(int column, const QVariant &value, int role); +class ChatLineModelItemPrivate; - private: - struct ChatLinePart { - QString plainText; - UiStyle::FormatList formatList; - - }; - - ChatLinePart _timestamp, _sender, _contents; +class ChatLineModelItem : public MessageModelItem { +public: + ChatLineModelItem(const Message &); + ChatLineModelItem(const ChatLineModelItem &other); + ~ChatLineModelItem(); + + virtual QVariant data(int column, int role) const; + + /// Used to store information about words to be used for wrapping + struct Word { + quint16 start; + qreal endX; + qreal width; + qreal trailing; + }; + typedef QVector WrapList; + +private: + ChatLineModelItemPrivate *_data; }; #endif