mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-23 05:44:45 -04:00
classes for history support, initial revision;
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1070 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8a08033728
commit
8ee7f4258d
8 changed files with 652 additions and 0 deletions
93
retroshare-gui/src/gui/im_history/IMHistoryItem.cpp
Normal file
93
retroshare-gui/src/gui/im_history/IMHistoryItem.cpp
Normal file
|
@ -0,0 +1,93 @@
|
|||
#include "IMHistoryItem.h"
|
||||
|
||||
//============================================================================
|
||||
|
||||
IMHistoryItem::IMHistoryItem()
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
IMHistoryItem::IMHistoryItem(const QString senderID,
|
||||
const QString receiverID,
|
||||
const QString text,
|
||||
const QDateTime time)
|
||||
{
|
||||
setTime(time);
|
||||
setReceiver(receiverID);
|
||||
setText(text);
|
||||
setSender(senderID);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
QDateTime
|
||||
IMHistoryItem::time() const
|
||||
{
|
||||
return vTime;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
QString
|
||||
IMHistoryItem::sender()
|
||||
{
|
||||
return vSender;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
QString
|
||||
IMHistoryItem::receiver()
|
||||
{
|
||||
return vReceiver ;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
QString
|
||||
IMHistoryItem::text() const
|
||||
{
|
||||
return vText;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
void
|
||||
IMHistoryItem::setTime(QDateTime time)
|
||||
{
|
||||
vTime = time;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
void
|
||||
IMHistoryItem::setSender(QString sender)
|
||||
{
|
||||
vSender = sender ;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
void
|
||||
IMHistoryItem::setReceiver(QString receiver)
|
||||
{
|
||||
vReceiver = receiver;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
void
|
||||
IMHistoryItem::setText(QString text)
|
||||
{
|
||||
vText = text ;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
//! after qSort() older messages will become first
|
||||
bool
|
||||
IMHistoryItem::operator<(const IMHistoryItem& item) const
|
||||
{
|
||||
return (vTime< item.time()) ;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue