Imported existing sources

This commit is contained in:
0xFEEDC0DE64
2018-09-16 06:05:23 +02:00
parent 522ad6ee77
commit 8ff2754dd3
91 changed files with 4988 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#include "rulerdata.h"
#include <QDebug>
#include <QJsonValue>
#include <QJsonArray>
RulerData::RulerData(QObject *parent) :
BaseContainer(parent),
m_base(0.)
{
}
double RulerData::base() const
{
return m_base;
}
bool RulerData::parseProperty(const QString &key, const QJsonValue &value)
{
if(key == QStringLiteral("base"))
{
Q_ASSERT(value.isDouble());
m_base = value.toDouble();
return true;
}
if(key == QStringLiteral("guides"))
{
Q_ASSERT(value.isArray());
for(auto guideValue : value.toArray())
{
//TODO
//qWarning() << "guides not implemented";
}
return true;
}
return BaseContainer::parseProperty(key, value);
}