mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
6e04229d39
Some cosmetic changes. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5715 b45a01b8-16f6-495d-af2f-9b41ad6348cc
33 lines
740 B
C++
33 lines
740 B
C++
#include <QDateTime>
|
|
|
|
#include "PhotoCommentItem.h"
|
|
#include "ui_PhotoCommentItem.h"
|
|
|
|
|
|
PhotoCommentItem::PhotoCommentItem(const RsPhotoComment& comment, QWidget *parent):
|
|
QWidget(parent),
|
|
ui(new Ui::PhotoCommentItem), mComment(comment)
|
|
{
|
|
ui->setupUi(this);
|
|
setUp();
|
|
}
|
|
|
|
PhotoCommentItem::~PhotoCommentItem()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
const RsPhotoComment& PhotoCommentItem::getComment()
|
|
{
|
|
return mComment;
|
|
}
|
|
|
|
void PhotoCommentItem::setUp()
|
|
{
|
|
ui->labelComment->setText(QString::fromUtf8(mComment.mComment.c_str()));
|
|
QDateTime qtime;
|
|
qtime.setTime_t(mComment.mMeta.mPublishTs);
|
|
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
|
|
ui->datetimelabel->setText(timestamp);
|
|
}
|