added created datetime
This commit is contained in:
parent
3ac7f4c611
commit
419cd98cba
2 changed files with 14 additions and 0 deletions
|
@ -342,6 +342,12 @@ void SnapmaticPicture::parseJsonContent()
|
||||||
{
|
{
|
||||||
jsonCrewID = jsonMap["crewid"].toInt();
|
jsonCrewID = jsonMap["crewid"].toInt();
|
||||||
}
|
}
|
||||||
|
if (jsonMap.contains("creat"))
|
||||||
|
{
|
||||||
|
QDateTime createdTimestamp;
|
||||||
|
createdTimestamp.setTime_t(jsonMap["creat"].toUInt());
|
||||||
|
jsonCreatedDateTime = createdTimestamp;
|
||||||
|
}
|
||||||
if (jsonMap.contains("plyrs"))
|
if (jsonMap.contains("plyrs"))
|
||||||
{
|
{
|
||||||
jsonPlyrsList = jsonMap["plyrs"].toStringList();
|
jsonPlyrsList = jsonMap["plyrs"].toStringList();
|
||||||
|
@ -389,3 +395,8 @@ QStringList SnapmaticPicture::getPlayers()
|
||||||
{
|
{
|
||||||
return jsonPlyrsList;
|
return jsonPlyrsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDateTime SnapmaticPicture::getCreatedDateTime()
|
||||||
|
{
|
||||||
|
return jsonCreatedDateTime;
|
||||||
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define SNAPMATICPICTURE_H
|
#define SNAPMATICPICTURE_H
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QDateTime>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
@ -41,6 +42,7 @@ public:
|
||||||
QString getPictureSortStr();
|
QString getPictureSortStr();
|
||||||
QString getPictureFileName();
|
QString getPictureFileName();
|
||||||
QString getExportPictureFileName();
|
QString getExportPictureFileName();
|
||||||
|
QDateTime getCreatedDateTime();
|
||||||
void setPicture(const QImage &picture);
|
void setPicture(const QImage &picture);
|
||||||
void setPicFileName(QString picFileName_);
|
void setPicFileName(QString picFileName_);
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ private:
|
||||||
double jsonLocZ;
|
double jsonLocZ;
|
||||||
QString jsonArea;
|
QString jsonArea;
|
||||||
QStringList jsonPlyrsList;
|
QStringList jsonPlyrsList;
|
||||||
|
QDateTime jsonCreatedDateTime;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue