Files

32 lines
603 B
C++
Raw Permalink Normal View History

2018-09-16 06:05:23 +02:00
#include "bitmap.h"
#include <QJsonValue>
#include <QJsonObject>
#include "containerfactory.h"
#include "msjsonfilereference.h"
Bitmap::Bitmap(QObject *parent) :
Layer(parent),
m_image(Q_NULLPTR)
{
}
MSJSONFileReference *Bitmap::image() const
{
return m_image;
}
bool Bitmap::parseProperty(const QString &key, const QJsonValue &value)
{
if(key == QStringLiteral("image"))
{
Q_ASSERT(value.isObject());
m_image = ContainerFactory::createContainer<MSJSONFileReference>(value.toObject());
return true;
}
return Layer::parseProperty(key, value);
}