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

#include </tmp/quassel/src/common/message.h>

Inheritance diagram for Message:
Collaboration diagram for Message:

Private Types

enum  Flag {
  None = 0x00, Self = 0x01, Highlight = 0x02, Redirected = 0x04,
  ServerMsg = 0x08, Backlog = 0x80
}

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (Message) public
 Q_DECLARE_FLAGS (Flags, Flag) Message(const BufferInfo &bufferInfo
 Message (const QDateTime &ts, const BufferInfo &buffer=BufferInfo(), Type type=Plain, const QString &contents="", const QString &sender="", Flags flags=None)
const MsgIdmsgId () const
void setMsgId (MsgId id)
const BufferInfobufferInfo () const
const BufferIdbufferId () const
void setBufferId (BufferId id)
const QString & contents () const
const QString & sender () const
Type type () const
Flags flags () const
void setFlags (Flags flags)
const QDateTime & timestamp () const
bool isValid () const
bool operator< (const Message &other) const

Static Private Member Functions

static Message ChangeOfDay (const QDateTime &day)

Private Attributes

Type type = Plain
Type const QString & contents = ""
Type const QString const QString & sender = ""
Type const QString const
QString Flags 
flags = None)
QDateTime _timestamp
MsgId _msgId
BufferInfo _bufferInfo
QString _contents
QString _sender
Type _type
Flags _flags

Friends

QDataStream & operator>> (QDataStream &in, Message &msg)

Detailed Description

Definition at line 30 of file message.h.

Member Enumeration Documentation

enum Flag
private
Enumerator:
None 
Self 
Highlight 
Redirected 
ServerMsg 
Backlog 

Definition at line 58 of file message.h.

Constructor & Destructor Documentation

Message ( const QDateTime &  ts,
const BufferInfo buffer = BufferInfo(),
Type  type = Plain,
const QString &  contents = "",
const QString &  sender = "",
Flags  flags = None 
)
private

Definition at line 27 of file message.cpp.

Referenced by ChangeOfDay().

Member Function Documentation

Q_DECLARE_TR_FUNCTIONS ( Message  )
inlineprivate

The different types a message can have for display

Definition at line 32 of file message.h.

Q_DECLARE_FLAGS ( Flags  ,
Flag   
) const
private
static Message ChangeOfDay ( const QDateTime &  day)
inlinestaticprivate
const MsgId& msgId ( ) const
inlineprivate
const BufferId& bufferId ( ) const
inlineprivate

Definition at line 77 of file message.h.

References _bufferInfo, and BufferInfo::bufferId().

Referenced by NetworkModel::updateBufferActivity().

void setBufferId ( BufferId  id)
inlineprivate

Definition at line 78 of file message.h.

References _bufferInfo, and BufferInfo::setBufferId().

const QString& contents ( ) const
inlineprivate

Definition at line 79 of file message.h.

References _contents.

Referenced by UiStyle::StyledMessage::style().

const QString& sender ( ) const
inlineprivate

Definition at line 80 of file message.h.

References _sender.

Referenced by UiStyle::StyledMessage::style().

Type type ( ) const
inlineprivate

Definition at line 81 of file message.h.

References _type.

Referenced by UiStyle::StyledMessage::style().

Flags flags ( ) const
inlineprivate

Definition at line 82 of file message.h.

References _flags.

Referenced by setFlags().

void setFlags ( Flags  flags)
inlineprivate
bool isValid ( ) const
inlineprivate

Definition at line 86 of file message.h.

References _msgId, and SignedId::isValid().

Referenced by MessageModel::insertMessageGroup().

bool operator< ( const Message other) const
inlineprivate

Definition at line 88 of file message.h.

References _msgId.

Friends And Related Function Documentation

QDataStream& operator>> ( QDataStream &  in,
Message msg 
)
friend

Definition at line 57 of file message.cpp.

Member Data Documentation

QDateTime _timestamp
private

Definition at line 91 of file message.h.

Referenced by operator>>(), and timestamp().

MsgId _msgId
private

Definition at line 92 of file message.h.

Referenced by isValid(), msgId(), operator<(), operator>>(), and setMsgId().

BufferInfo _bufferInfo
private

Definition at line 93 of file message.h.

Referenced by bufferId(), bufferInfo(), operator>>(), and setBufferId().

QString _contents
private

Definition at line 94 of file message.h.

Referenced by contents(), and operator>>().

QString _sender
private

Definition at line 95 of file message.h.

Referenced by operator>>(), and sender().

Type _type
private

Definition at line 96 of file message.h.

Referenced by operator>>(), and type().

Flags _flags
private

Definition at line 97 of file message.h.

Referenced by flags(), operator>>(), and setFlags().


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