Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
ChatLineModel Class Reference

#include </tmp/quassel/src/qtui/chatlinemodel.h>

Inheritance diagram for ChatLineModel:
Collaboration diagram for ChatLineModel:

Public Types

enum  ChatLineRole { WrapListRole = MessageModel::UserRole, MsgLabelRole, SelectedBackgroundRole }
typedef ChatLineModelItem::Word Word
typedef ChatLineModelItem::WrapList WrapList
enum  MessageModelRole {
  DisplayRole = Qt::DisplayRole, EditRole = Qt::EditRole, BackgroundRole = Qt::BackgroundRole, MessageRole = Qt::UserRole,
  MsgIdRole, BufferIdRole, TypeRole, FlagsRole,
  TimestampRole, FormatRole, ColumnTypeRole, RedirectedToRole,
  UserRole
}
enum  ColumnType { TimestampColumn, SenderColumn, ContentsColumn, UserColumnType }

Public Slots

void requestBacklog (BufferId bufferId)
void messagesReceived (BufferId bufferId, int count)
void buffersPermanentlyMerged (BufferId bufferId1, BufferId bufferId2)
void insertErrorMessage (BufferInfo bufferInfo, const QString &errorString)

Signals

void finishedBacklogFetch (BufferId bufferId)

Public Member Functions

 ChatLineModel (QObject *parent=0)
virtual const MessageModelItemmessageItemAt (int i) const
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex parent (const QModelIndex &) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &=QModelIndex()) const
virtual QVariant data (const QModelIndex &index, int role) const
virtual bool setData (const QModelIndex &index, const QVariant &value, int role)
bool insertMessage (const Message &, bool fakeMsg=false)
void insertMessages (const QList< Message > &)
void clear ()

Protected Slots

virtual void styleChanged ()

Protected Member Functions

virtual int messageCount () const
virtual bool messagesIsEmpty () const
virtual MessageModelItemmessageItemAt (int i)
virtual const MessageModelItemfirstMessageItem () const
virtual MessageModelItemfirstMessageItem ()
virtual const MessageModelItemlastMessageItem () const
virtual MessageModelItemlastMessageItem ()
virtual void insertMessage__ (int pos, const Message &msg)
virtual void insertMessages__ (int pos, const QList< Message > &)
virtual void removeMessageAt (int i)
virtual void removeAllMessages ()
virtual Message takeMessageAt (int i)
virtual void customEvent (QEvent *event)

Private Attributes

QList< ChatLineModelItem_messageList

Detailed Description

Definition at line 29 of file chatlinemodel.h.

Member Typedef Documentation

Definition at line 42 of file chatlinemodel.h.

Definition at line 43 of file chatlinemodel.h.

Member Enumeration Documentation

Enumerator:
WrapListRole 
MsgLabelRole 
SelectedBackgroundRole 

Definition at line 34 of file chatlinemodel.h.

enum MessageModelRole
inherited
Enumerator:
DisplayRole 
EditRole 
BackgroundRole 
MessageRole 
MsgIdRole 
BufferIdRole 
TypeRole 
FlagsRole 
TimestampRole 
FormatRole 
ColumnTypeRole 
RedirectedToRole 
UserRole 

Definition at line 39 of file messagemodel.h.

enum ColumnType
inherited
Enumerator:
TimestampColumn 
SenderColumn 
ContentsColumn 
UserColumnType 

Definition at line 55 of file messagemodel.h.

Constructor & Destructor Documentation

ChatLineModel ( QObject *  parent = 0)

Definition at line 25 of file chatlinemodel.cpp.

References QtUi::style(), and styleChanged().

Member Function Documentation

virtual const MessageModelItem* messageItemAt ( int  i) const
inlinevirtual

Implements MessageModel.

Definition at line 44 of file chatlinemodel.h.

References _messageList.

virtual int messageCount ( ) const
inlineprotectedvirtual

Implements MessageModel.

Definition at line 48 of file chatlinemodel.h.

References _messageList.

virtual bool messagesIsEmpty ( ) const
inlineprotectedvirtual

Implements MessageModel.

Definition at line 49 of file chatlinemodel.h.

References _messageList.

virtual MessageModelItem* messageItemAt ( int  i)
inlineprotectedvirtual

Implements MessageModel.

Definition at line 50 of file chatlinemodel.h.

References _messageList.

virtual const MessageModelItem* firstMessageItem ( ) const
inlineprotectedvirtual

Implements MessageModel.

Definition at line 51 of file chatlinemodel.h.

References _messageList.

virtual MessageModelItem* firstMessageItem ( )
inlineprotectedvirtual

Implements MessageModel.

Definition at line 52 of file chatlinemodel.h.

References _messageList.

virtual const MessageModelItem* lastMessageItem ( ) const
inlineprotectedvirtual

Implements MessageModel.

Definition at line 53 of file chatlinemodel.h.

References _messageList.

virtual MessageModelItem* lastMessageItem ( )
inlineprotectedvirtual

Implements MessageModel.

Definition at line 54 of file chatlinemodel.h.

References _messageList.

virtual void insertMessage__ ( int  pos,
const Message msg 
)
inlineprotectedvirtual

Implements MessageModel.

Definition at line 55 of file chatlinemodel.h.

References _messageList.

void insertMessages__ ( int  pos,
const QList< Message > &  messages 
)
protectedvirtual

Implements MessageModel.

Definition at line 39 of file chatlinemodel.cpp.

References _messageList.

virtual void removeMessageAt ( int  i)
inlineprotectedvirtual

Implements MessageModel.

Definition at line 57 of file chatlinemodel.h.

References _messageList.

virtual void removeAllMessages ( )
inlineprotectedvirtual

Implements MessageModel.

Definition at line 58 of file chatlinemodel.h.

References _messageList.

Message takeMessageAt ( int  i)
protectedvirtual

Implements MessageModel.

Definition at line 48 of file chatlinemodel.cpp.

References _messageList.

void styleChanged ( )
protectedvirtualslot
QModelIndex index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
inlineinherited
QModelIndex parent ( const QModelIndex &  ) const
inlineinherited

Definition at line 62 of file messagemodel.h.

Referenced by MessageModel::rowCount().

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
inlineinherited
int columnCount ( const QModelIndex &  = QModelIndex()) const
inlineinherited

Definition at line 64 of file messagemodel.h.

Referenced by MessageModel::index(), and styleChanged().

QVariant data ( const QModelIndex &  index,
int  role 
) const
virtualinherited
bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
virtualinherited

Definition at line 66 of file messagemodel.cpp.

References MessageModel::messageCount(), and MessageModel::messageItemAt().

bool insertMessage ( const Message msg,
bool  fakeMsg = false 
)
inherited
void insertMessages ( const QList< Message > &  msglist)
inherited
void clear ( )
inherited
void finishedBacklogFetch ( BufferId  bufferId)
signalinherited
void messagesReceived ( BufferId  bufferId,
int  count 
)
slotinherited
void buffersPermanentlyMerged ( BufferId  bufferId1,
BufferId  bufferId2 
)
slotinherited
void customEvent ( QEvent *  event)
protectedvirtualinherited

Member Data Documentation


The documentation for this class was generated from the following files: