Loading...
Searching...
No Matches
pappso::ProjectParam Struct Reference

`#include <projectparameters.h>`

## Public Member Functions

QJsonObject | toJsonObject () const

## Public Attributes

ProjectParamCategory | category
QString | name
QVariant | value

## Detailed Description

Definition at line 53 of file projectparameters.h.

## Member Function Documentation

## toJsonObject()

QJsonObject pappso::ProjectParam::toJsonObject | ( |  | ) | const

Definition at line 411 of file projectparameters.cpp.

{
QJsonObject param;
param.insert("category", (int)category);
int type = value.metaType().id();
switch(type)
{
case QMetaType::Void:
param.insert("value", "");
break;
case QMetaType::Bool:
param.insert("value", value.toBool());
break;
case QMetaType::Double:
case QMetaType::Float:
param.insert("value", value.toDouble());
break;
case QMetaType::Int:
param.insert("value", value.toInt());
break;
case QMetaType::QDate:
param.insert("value", value.toDate().toString(Qt::ISODate));
break;
case QMetaType::QDateTime:
param.insert("value", value.toDateTime().toString(Qt::ISODate));
break;
case QMetaType::QString:
param.insert("value", value.toString());
break;
case QMetaType::QUrl:
param.insert("value", value.toString());
break;
default:
param.insert("value", value.toString());
}
return param;
}
pappso::ProjectParam::value
QVariant value
Definition projectparameters.h:59
pappso::ProjectParam::category
ProjectParamCategory category
Definition projectparameters.h:57

References category, and value.

## Member Data Documentation

## category

ProjectParamCategory pappso::ProjectParam::category

Definition at line 57 of file projectparameters.h.

Referenced by pappso::ProjectParameters::ProjectParameters(), pappso::ProjectParameters::setProjectParam(), toJsonObject(), and pappso::ProjectParameters::writeXmlParameter().

## name

QString pappso::ProjectParam::name

Definition at line 58 of file projectparameters.h.

Referenced by pappso::ProjectParameters::ProjectParameters(), pappso::masschroq::JsonInput::action(), pappso::masschroq::AlignmentMethod::getProjectParameters(), pappso::masschroq::QuantificationMethod::getProjectParameters(), pappso::ProjectParameters::setProjectParam(), and pappso::ProjectParameters::writeXmlParameter().

## value

QVariant pappso::ProjectParam::value

Definition at line 59 of file projectparameters.h.

Referenced by pappso::ProjectParameters::ProjectParameters(), toJsonObject(), and pappso::ProjectParameters::writeXmlParameter().

The documentation for this struct was generated from the following files:

- pappsomspp/core/processing/project/projectparameters.h
- pappsomspp/core/processing/project/projectparameters.cpp