~ubuntu-branches/debian/experimental/quassel/experimental

« back to all changes in this revision

Viewing changes to src/qtui/chatlinemodel.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Mueller
  • Date: 2009-10-05 23:13:06 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091005231306-ngiajv5r0gbxjfoq
Tags: 0.5.0~rc2-1
* New upstream release (rc2)
* Make puiparts happy (closes: #538182)
* manageusers.py added (closes: #549296)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 ***************************************************************************/
20
20
 
21
21
#include "chatlinemodel.h"
 
22
#include "qtui.h"
 
23
#include "qtuistyle.h"
22
24
 
23
25
ChatLineModel::ChatLineModel(QObject *parent)
24
26
  : MessageModel(parent)
25
27
{
26
28
  qRegisterMetaType<WrapList>("ChatLineModel::WrapList");
27
29
  qRegisterMetaTypeStreamOperators<WrapList>("ChatLineModel::WrapList");
 
30
 
 
31
  connect(QtUi::style(), SIGNAL(changed()), SLOT(styleChanged()));
28
32
}
29
33
 
30
34
// MessageModelItem *ChatLineModel::createMessageModelItem(const Message &msg) {
44
48
  return msg;
45
49
}
46
50
 
 
51
void ChatLineModel::styleChanged() {
 
52
  foreach(ChatLineModelItem item, _messageList) {
 
53
    item.invalidateWrapList();
 
54
  }
 
55
  emit dataChanged(index(0,0), index(rowCount()-1, columnCount()-1));
 
56
}
 
57
 
47
58
QDataStream &operator<<(QDataStream &out, const ChatLineModel::WrapList wplist) {
48
59
  out << wplist.count();
49
60
  ChatLineModel::WrapList::const_iterator it = wplist.begin();