added created datetime

This commit is contained in:
Rafael 2016-05-08 19:07:55 +02:00
parent 3ac7f4c611
commit 419cd98cba
2 changed files with 14 additions and 0 deletions

View file

@ -342,6 +342,12 @@ void SnapmaticPicture::parseJsonContent()
{
jsonCrewID = jsonMap["crewid"].toInt();
}
if (jsonMap.contains("creat"))
{
QDateTime createdTimestamp;
createdTimestamp.setTime_t(jsonMap["creat"].toUInt());
jsonCreatedDateTime = createdTimestamp;
}
if (jsonMap.contains("plyrs"))
{
jsonPlyrsList = jsonMap["plyrs"].toStringList();
@ -389,3 +395,8 @@ QStringList SnapmaticPicture::getPlayers()
{
return jsonPlyrsList;
}
QDateTime SnapmaticPicture::getCreatedDateTime()
{
return jsonCreatedDateTime;
}

View file

@ -20,6 +20,7 @@
#define SNAPMATICPICTURE_H
#include <QStringList>
#include <QDateTime>
#include <QObject>
#include <QString>
#include <QImage>
@ -41,6 +42,7 @@ public:
QString getPictureSortStr();
QString getPictureFileName();
QString getExportPictureFileName();
QDateTime getCreatedDateTime();
void setPicture(const QImage &picture);
void setPicFileName(QString picFileName_);
@ -88,6 +90,7 @@ private:
double jsonLocZ;
QString jsonArea;
QStringList jsonPlyrsList;
QDateTime jsonCreatedDateTime;
signals: