json parser now part of SnapmaticPicture
This commit is contained in:
parent
4050358462
commit
a3c66786eb
5 changed files with 77 additions and 34 deletions
|
@ -19,6 +19,7 @@
|
|||
#ifndef SNAPMATICPICTURE_H
|
||||
#define SNAPMATICPICTURE_H
|
||||
|
||||
#include <QStringList>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
|
@ -34,10 +35,16 @@ public:
|
|||
void setPixmap(QPixmap pixmap);
|
||||
void resetValues();
|
||||
QPixmap getPixmap();
|
||||
QString getJsonStr();
|
||||
QString getLastStep();
|
||||
QString getPictureStr();
|
||||
|
||||
// JSON
|
||||
QString getJsonStr();
|
||||
double getLocationX();
|
||||
double getLocationY();
|
||||
double getLocationZ();
|
||||
QStringList getPlayers();
|
||||
|
||||
private:
|
||||
QString getSnapmaticPictureString(QByteArray snapmaticHeader);
|
||||
QString getSnapmaticJSONString(QByteArray jsonBytes);
|
||||
|
@ -47,7 +54,14 @@ private:
|
|||
QString picFileName;
|
||||
QString pictureStr;
|
||||
QString lastStep;
|
||||
|
||||
// JSON
|
||||
void parseJsonContent();
|
||||
QString jsonStr;
|
||||
double jsonLocX;
|
||||
double jsonLocY;
|
||||
double jsonLocZ;
|
||||
QStringList jsonPlyrsList;
|
||||
|
||||
signals:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue