projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Preliminary check-in of qmake-based build system. This is not finished yet!
[quassel.git]
/
src
/
common
/
message.h
diff --git
a/src/common/message.h
b/src/common/message.h
index
baa8846
..
7fcd797
100644
(file)
--- a/
src/common/message.h
+++ b/
src/common/message.h
@@
-21,12
+21,14
@@
#ifndef _MESSAGE_H_
#define _MESSAGE_H_
#ifndef _MESSAGE_H_
#define _MESSAGE_H_
+#include <QCoreApplication>
#include <QString>
#include <QDateTime>
#include "global.h"
class Message {
#include <QString>
#include <QDateTime>
#include "global.h"
class Message {
+ Q_DECLARE_TR_FUNCTIONS(Message);
public:
/** The different types a message can have for display */
public:
/** The different types a message can have for display */
@@
-47,6
+49,12
@@
class Message {
quint8 flags() const;
QDateTime timeStamp() const;
quint8 flags() const;
QDateTime timeStamp() const;
+ QString formattedTimeStamp();
+ QString formattedSender();
+ QString formattedText();
+
+ void format();
+
private:
QDateTime _timeStamp;
MsgId _msgId;
private:
QDateTime _timeStamp;
MsgId _msgId;
@@
-56,6
+64,10
@@
class Message {
Type _type;
quint8 _flags;
Type _type;
quint8 _flags;
+ QString _formattedTimeStamp, _formattedSender, _formattedText; // cache
+
+ QString mircToInternal(QString);
+
friend QDataStream &operator>>(QDataStream &in, Message &msg);
};
friend QDataStream &operator>>(QDataStream &in, Message &msg);
};