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

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

Inheritance diagram for ChatLineModelItem:
Collaboration diagram for ChatLineModelItem:

Classes

struct  Word
 Used to store information about words to be used for wrapping. More...

Public Types

typedef QVector< WordWrapList

Public Member Functions

 ChatLineModelItem (const Message &)
virtual QVariant data (int column, int role) const
virtual bool setData (int column, const QVariant &value, int role)
virtual const Messagemessage () const
virtual const QDateTime & timestamp () const
virtual const MsgIdmsgId () const
virtual const BufferIdbufferId () const
virtual void setBufferId (BufferId bufferId)
virtual Message::Type msgType () const
virtual Message::Flags msgFlags () const
virtual void invalidateWrapList ()
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 Member Functions

QVariant timestampData (int role) const
QVariant senderData (int role) const
QVariant contentsData (int role) const
QVariant backgroundBrush (UiStyle::FormatType subelement, bool selected=false) const
quint32 messageLabel () const
void computeWrapList () const

Private Attributes

WrapList _wrapList
UiStyle::StyledMessage _styledMsg

Static Private Attributes

static unsigned char * TextBoundaryFinderBuffer = (unsigned char *)malloc(512 * sizeof(HB_CharAttributes_Dummy))
static int TextBoundaryFinderBufferSize = 512 * (sizeof(HB_CharAttributes_Dummy) / sizeof(unsigned char))

Detailed Description

Definition at line 28 of file chatlinemodelitem.h.

Member Typedef Documentation

typedef QVector<Word> WrapList

Definition at line 53 of file chatlinemodelitem.h.

Constructor & Destructor Documentation

ChatLineModelItem ( const Message msg)

Definition at line 46 of file chatlinemodelitem.cpp.

References _styledMsg, Message::flags, Message::sender, and Message::ServerMsg.

Member Function Documentation

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

Reimplemented from MessageModelItem.

Definition at line 55 of file chatlinemodelitem.cpp.

References _styledMsg, and MessageModel::FlagsRole.

virtual const Message& message ( ) const
inlinevirtual

Implements MessageModelItem.

Definition at line 36 of file chatlinemodelitem.h.

References _styledMsg.

virtual const QDateTime& timestamp ( ) const
inlinevirtual

Implements MessageModelItem.

Definition at line 37 of file chatlinemodelitem.h.

References _styledMsg.

virtual const MsgId& msgId ( ) const
inlinevirtual

Implements MessageModelItem.

Definition at line 38 of file chatlinemodelitem.h.

References _styledMsg.

virtual const BufferId& bufferId ( ) const
inlinevirtual

Implements MessageModelItem.

Definition at line 39 of file chatlinemodelitem.h.

References _styledMsg.

virtual void setBufferId ( BufferId  bufferId)
inlinevirtual

Implements MessageModelItem.

Definition at line 40 of file chatlinemodelitem.h.

References _styledMsg.

virtual Message::Type msgType ( ) const
inlinevirtual

Implements MessageModelItem.

Definition at line 41 of file chatlinemodelitem.h.

References _styledMsg.

virtual Message::Flags msgFlags ( ) const
inlinevirtual

Implements MessageModelItem.

Definition at line 42 of file chatlinemodelitem.h.

References _styledMsg.

virtual void invalidateWrapList ( )
inlinevirtual

Definition at line 44 of file chatlinemodelitem.h.

References _wrapList.

Referenced by ChatLineModel::styleChanged().

QVariant backgroundBrush ( UiStyle::FormatType  subelement,
bool  selected = false 
) const
private
quint32 messageLabel ( ) const
private
bool operator< ( const MessageModelItem other) const
inherited

Definition at line 490 of file messagemodel.cpp.

References MessageModelItem::msgId().

bool operator== ( const MessageModelItem other) const
inherited

Definition at line 496 of file messagemodel.cpp.

References MessageModelItem::msgId().

bool operator> ( const MessageModelItem other) const
inherited

Definition at line 502 of file messagemodel.cpp.

References MessageModelItem::msgId().

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

Definition at line 484 of file messagemodel.cpp.

Member Data Documentation

WrapList _wrapList
mutableprivate

Definition at line 65 of file chatlinemodelitem.h.

Referenced by computeWrapList(), contentsData(), and invalidateWrapList().

unsigned char * TextBoundaryFinderBuffer = (unsigned char *)malloc(512 * sizeof(HB_CharAttributes_Dummy))
staticprivate

Definition at line 68 of file chatlinemodelitem.h.

Referenced by computeWrapList().

int TextBoundaryFinderBufferSize = 512 * (sizeof(HB_CharAttributes_Dummy) / sizeof(unsigned char))
staticprivate

Definition at line 69 of file chatlinemodelitem.h.

Referenced by computeWrapList().


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