2017-11-16 21:17:15 -05:00
|
|
|
/**
|
|
|
|
* SDRangel
|
|
|
|
* This is the web API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube
|
|
|
|
*
|
|
|
|
* OpenAPI spec version: 4.0.0
|
|
|
|
* Contact: f4exb06@gmail.com
|
|
|
|
*
|
|
|
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
|
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
|
|
* Do not edit the class manually.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "SWGLoggingInfo.h"
|
|
|
|
|
|
|
|
#include "SWGHelpers.h"
|
|
|
|
|
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonArray>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
namespace Swagger {
|
|
|
|
|
|
|
|
SWGLoggingInfo::SWGLoggingInfo(QString* json) {
|
|
|
|
init();
|
|
|
|
this->fromJson(*json);
|
|
|
|
}
|
|
|
|
|
|
|
|
SWGLoggingInfo::SWGLoggingInfo() {
|
|
|
|
init();
|
|
|
|
}
|
|
|
|
|
|
|
|
SWGLoggingInfo::~SWGLoggingInfo() {
|
|
|
|
this->cleanup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGLoggingInfo::init() {
|
2017-11-17 08:51:16 -05:00
|
|
|
console_level = new QString("");
|
|
|
|
file_level = new QString("");
|
|
|
|
dump_to_file = false;
|
|
|
|
file_name = new QString("");
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGLoggingInfo::cleanup() {
|
2017-11-17 08:51:16 -05:00
|
|
|
|
|
|
|
if(console_level != nullptr) {
|
|
|
|
delete console_level;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
2017-11-17 08:51:16 -05:00
|
|
|
|
|
|
|
if(file_level != nullptr) {
|
|
|
|
delete file_level;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
2017-11-17 08:51:16 -05:00
|
|
|
|
|
|
|
if(file_name != nullptr) {
|
|
|
|
delete file_name;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SWGLoggingInfo*
|
|
|
|
SWGLoggingInfo::fromJson(QString &json) {
|
|
|
|
QByteArray array (json.toStdString().c_str());
|
|
|
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
|
|
|
QJsonObject jsonObject = doc.object();
|
|
|
|
this->fromJsonObject(jsonObject);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGLoggingInfo::fromJsonObject(QJsonObject &pJson) {
|
2017-11-17 08:51:16 -05:00
|
|
|
::Swagger::setValue(&console_level, pJson["consoleLevel"], "QString", "QString");
|
|
|
|
::Swagger::setValue(&file_level, pJson["fileLevel"], "QString", "QString");
|
|
|
|
::Swagger::setValue(&dump_to_file, pJson["dumpToFile"], "bool", "");
|
|
|
|
::Swagger::setValue(&file_name, pJson["fileName"], "QString", "QString");
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
|
|
|
SWGLoggingInfo::asJson ()
|
|
|
|
{
|
|
|
|
QJsonObject* obj = this->asJsonObject();
|
|
|
|
|
|
|
|
QJsonDocument doc(*obj);
|
|
|
|
QByteArray bytes = doc.toJson();
|
|
|
|
return QString(bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
QJsonObject*
|
|
|
|
SWGLoggingInfo::asJsonObject() {
|
|
|
|
QJsonObject* obj = new QJsonObject();
|
|
|
|
|
2017-11-17 08:51:16 -05:00
|
|
|
toJsonValue(QString("consoleLevel"), console_level, obj, QString("QString"));
|
2017-11-16 21:17:15 -05:00
|
|
|
|
2017-11-17 08:51:16 -05:00
|
|
|
toJsonValue(QString("fileLevel"), file_level, obj, QString("QString"));
|
2017-11-16 21:17:15 -05:00
|
|
|
|
2017-11-17 08:51:16 -05:00
|
|
|
obj->insert("dumpToFile", QJsonValue(dump_to_file));
|
|
|
|
|
|
|
|
toJsonValue(QString("fileName"), file_name, obj, QString("QString"));
|
2017-11-16 21:17:15 -05:00
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
|
|
|
SWGLoggingInfo::getConsoleLevel() {
|
2017-11-17 08:51:16 -05:00
|
|
|
return console_level;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
void
|
2017-11-17 08:51:16 -05:00
|
|
|
SWGLoggingInfo::setConsoleLevel(QString* console_level) {
|
|
|
|
this->console_level = console_level;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
|
|
|
SWGLoggingInfo::getFileLevel() {
|
2017-11-17 08:51:16 -05:00
|
|
|
return file_level;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
void
|
2017-11-17 08:51:16 -05:00
|
|
|
SWGLoggingInfo::setFileLevel(QString* file_level) {
|
|
|
|
this->file_level = file_level;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
SWGLoggingInfo::getDumpToFile() {
|
2017-11-17 08:51:16 -05:00
|
|
|
return dump_to_file;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
void
|
2017-11-17 08:51:16 -05:00
|
|
|
SWGLoggingInfo::setDumpToFile(bool dump_to_file) {
|
|
|
|
this->dump_to_file = dump_to_file;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
|
|
|
SWGLoggingInfo::getFileName() {
|
2017-11-17 08:51:16 -05:00
|
|
|
return file_name;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
void
|
2017-11-17 08:51:16 -05:00
|
|
|
SWGLoggingInfo::setFileName(QString* file_name) {
|
|
|
|
this->file_name = file_name;
|
2017-11-16 21:17:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-17 08:51:16 -05:00
|
|
|
}
|
2017-11-16 21:17:15 -05:00
|
|
|
|