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

#include </tmp/quassel/src/client/messagemodel.h>

Inheritance diagram for MessageModelItem:
Collaboration diagram for MessageModelItem:

Public Member Functions

 MessageModelItem ()
 Creates a MessageModelItem from a Message object.
virtual ~MessageModelItem ()
virtual QVariant data (int column, int role) const
virtual bool setData (int column, const QVariant &value, int role)
virtual const Messagemessage () const =0
virtual const QDateTime & timestamp () const =0
virtual const MsgIdmsgId () const =0
virtual const BufferIdbufferId () const =0
virtual void setBufferId (BufferId bufferId)=0
virtual Message::Type msgType () const =0
virtual Message::Flags msgFlags () const =0
bool operator< (const MessageModelItem &) const
bool operator== (const MessageModelItem &) const
bool operator> (const MessageModelItem &) const

Static Public Member Functions

static bool lessThan (const MessageModelItem *m1, const MessageModelItem *m2)

Private Attributes

BufferId _redirectedTo

Detailed Description

Definition at line 133 of file messagemodel.h.

Constructor & Destructor Documentation

MessageModelItem ( )
inline

Creates a MessageModelItem from a Message object.

This baseclass implementation takes care of all Message data except the stylable strings. Subclasses need to provide Qt::DisplayRole at least, which should describe the plaintext strings without formattings (e.g. for searching purposes).

Definition at line 141 of file messagemodel.h.

virtual ~MessageModelItem ( )
inlinevirtual

Definition at line 142 of file messagemodel.h.

Member Function Documentation

bool setData ( int  column,
const QVariant &  value,
int  role 
)
virtual

Reimplemented in ChatLineModelItem.

Definition at line 469 of file messagemodel.cpp.

References _redirectedTo, and MessageModel::RedirectedToRole.

virtual const Message& message ( ) const
pure virtual

Implemented in ChatLineModelItem.

Referenced by data().

virtual const QDateTime& timestamp ( ) const
pure virtual
virtual const BufferId& bufferId ( ) const
pure virtual
virtual void setBufferId ( BufferId  bufferId)
pure virtual
virtual Message::Type msgType ( ) const
pure virtual

Implemented in ChatLineModelItem.

Referenced by data(), and operator<<().

virtual Message::Flags msgFlags ( ) const
pure virtual

Implemented in ChatLineModelItem.

Referenced by data(), and operator<<().

bool operator< ( const MessageModelItem other) const

Definition at line 490 of file messagemodel.cpp.

References msgId().

bool operator== ( const MessageModelItem other) const

Definition at line 496 of file messagemodel.cpp.

References msgId().

bool operator> ( const MessageModelItem other) const

Definition at line 502 of file messagemodel.cpp.

References msgId().

bool lessThan ( const MessageModelItem m1,
const MessageModelItem m2 
)
static

Definition at line 484 of file messagemodel.cpp.

Member Data Documentation

BufferId _redirectedTo
private

Definition at line 162 of file messagemodel.h.

Referenced by data(), and setData().


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