/***************************************************************************
- * 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 *
#define CHATLINEMODELITEM_H_
#include "messagemodel.h"
-#include "uistyle.h"
-class ChatlineModelItem : public MessageModelItem {
+class ChatLineModelItemPrivate;
- public:
- ChatlineModelItem(const Message &);
- //virtual ~ChatlineModelItem() {};
+class ChatLineModelItem : public MessageModelItem {
+public:
+ ChatLineModelItem(const Message &);
+ ChatLineModelItem(const ChatLineModelItem &other);
+ ~ChatLineModelItem();
- virtual QVariant data(int column, int role) const;
- virtual bool setData(int column, const QVariant &value, int role);
+ virtual QVariant data(int column, int role) const;
- private:
- UiStyle::StyledMessage _msg;
+ /// Used to store information about words to be used for wrapping
+ struct Word {
+ quint16 start;
+ qreal endX;
+ qreal width;
+ qreal trailing;
+ };
+ typedef QVector<Word> WrapList;
+
+private:
+ ChatLineModelItemPrivate *_data;
};
#endif