Clean-up and refactor the blowfish encryption stuff
[quassel.git] / src / qtui / chatlinemodelitem.h
index 9fe4b8b..8f90d22 100644 (file)
@@ -30,6 +30,7 @@ public:
   ChatLineModelItem(const Message &);
 
   virtual QVariant data(int column, int role) const;
+  virtual bool setData(int column, const QVariant &value, int role);
 
   virtual inline const Message &message() const { return _styledMsg; }
   virtual inline const QDateTime &timestamp() const { return _styledMsg.timestamp(); }
@@ -39,6 +40,17 @@ public:
   virtual inline Message::Type msgType() const { return _styledMsg.type(); }
   virtual inline Message::Flags msgFlags() const { return _styledMsg.flags(); }
 
+  virtual inline void invalidateWrapList() { _wrapList.clear(); }
+
+  /// 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:
   QVariant timestampData(int role) const;
   QVariant senderData(int role) const;
@@ -47,7 +59,13 @@ private:
   QVariant backgroundBrush(UiStyle::FormatType subelement, bool selected = false) const;
   quint32 messageLabel() const;
 
+  void computeWrapList() const;
+
+  mutable WrapList _wrapList;
   UiStyle::StyledMessage _styledMsg;
+
+  static unsigned char *TextBoundaryFinderBuffer;
+  static int TextBoundaryFinderBufferSize;
 };
 
 #endif