Imported existing sources
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user