Update properties methods and remove JSON information for mor generic definition formats
This commit is contained in:
parent
2459b2fbe1
commit
8a93fd8f68
@ -104,14 +104,14 @@ void ActionType::setParamTypes(const ParamTypes ¶mTypes)
|
|||||||
m_paramTypes = paramTypes;
|
m_paramTypes = paramTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of all valid JSON properties a ActionType JSON definition can have. */
|
/*! Returns a list of all valid properties a ActionType definition can have. */
|
||||||
QStringList ActionType::jsonProperties()
|
QStringList ActionType::typeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "paramTypes";
|
return QStringList() << "id" << "name" << "displayName" << "paramTypes";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of mandatory JSON properties a ActionType JSON definition must have. */
|
/*! Returns a list of mandatory properties a ActionType definition must have. */
|
||||||
QStringList ActionType::mandatoryJsonProperties()
|
QStringList ActionType::mandatoryTypeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName";
|
return QStringList() << "id" << "name" << "displayName";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,8 +49,8 @@ public:
|
|||||||
ParamTypes paramTypes() const;
|
ParamTypes paramTypes() const;
|
||||||
void setParamTypes(const ParamTypes ¶mTypes);
|
void setParamTypes(const ParamTypes ¶mTypes);
|
||||||
|
|
||||||
static QStringList jsonProperties();
|
static QStringList typeProperties();
|
||||||
static QStringList mandatoryJsonProperties();
|
static QStringList mandatoryTypeProperties();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ActionTypeId m_id;
|
ActionTypeId m_id;
|
||||||
|
|||||||
@ -472,7 +472,7 @@ bool DeviceClass::operator==(const DeviceClass &deviceClass) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of all valid JSON properties a DeviceClass JSON definition can have. */
|
/*! Returns a list of all valid JSON properties a DeviceClass JSON definition can have. */
|
||||||
QStringList DeviceClass::jsonProperties()
|
QStringList DeviceClass::typeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "createMethods" << "setupMethod" << "deviceIcon"
|
return QStringList() << "id" << "name" << "displayName" << "createMethods" << "setupMethod" << "deviceIcon"
|
||||||
<< "interfaces" << "basicTags" << "pairingInfo" << "criticalStateTypeId"
|
<< "interfaces" << "basicTags" << "pairingInfo" << "criticalStateTypeId"
|
||||||
@ -481,7 +481,7 @@ QStringList DeviceClass::jsonProperties()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of mandatory JSON properties a DeviceClass JSON definition must have. */
|
/*! Returns a list of mandatory JSON properties a DeviceClass JSON definition must have. */
|
||||||
QStringList DeviceClass::mandatoryJsonProperties()
|
QStringList DeviceClass::mandatoryTypeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName";
|
return QStringList() << "id" << "name" << "displayName";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -180,8 +180,8 @@ public:
|
|||||||
|
|
||||||
bool operator==(const DeviceClass &device) const;
|
bool operator==(const DeviceClass &device) const;
|
||||||
|
|
||||||
static QStringList jsonProperties();
|
static QStringList typeProperties();
|
||||||
static QStringList mandatoryJsonProperties();
|
static QStringList mandatoryTypeProperties();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DeviceClassId m_id;
|
DeviceClassId m_id;
|
||||||
|
|||||||
@ -131,13 +131,13 @@ bool EventType::isValid() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of all valid JSON properties a EventType JSON definition can have. */
|
/*! Returns a list of all valid JSON properties a EventType JSON definition can have. */
|
||||||
QStringList EventType::jsonProperties()
|
QStringList EventType::typeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "paramTypes" << "ruleRelevant" << "graphRelevant";
|
return QStringList() << "id" << "name" << "displayName" << "paramTypes" << "ruleRelevant" << "graphRelevant";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of mandatory JSON properties a EventType JSON definition must have. */
|
/*! Returns a list of mandatory JSON properties a EventType JSON definition must have. */
|
||||||
QStringList EventType::mandatoryJsonProperties()
|
QStringList EventType::mandatoryTypeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName";
|
return QStringList() << "id" << "name" << "displayName";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,8 +57,8 @@ public:
|
|||||||
|
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
static QStringList jsonProperties();
|
static QStringList typeProperties();
|
||||||
static QStringList mandatoryJsonProperties();
|
static QStringList mandatoryTypeProperties();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventTypeId m_id;
|
EventTypeId m_id;
|
||||||
|
|||||||
@ -212,14 +212,14 @@ bool ParamType::isValid() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of all valid JSON properties a ParamType JSON definition can have. */
|
/*! Returns a list of all valid JSON properties a ParamType JSON definition can have. */
|
||||||
QStringList ParamType::jsonProperties()
|
QStringList ParamType::typeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "type" << "defaultValue" << "inputType"
|
return QStringList() << "id" << "name" << "displayName" << "type" << "defaultValue" << "inputType"
|
||||||
<< "unit" << "minValue" << "maxValue" << "allowedValues" << "readOnly";
|
<< "unit" << "minValue" << "maxValue" << "allowedValues" << "readOnly";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of mandatory JSON properties a ParamType JSON definition must have. */
|
/*! Returns a list of mandatory JSON properties a ParamType JSON definition must have. */
|
||||||
QStringList ParamType::mandatoryJsonProperties()
|
QStringList ParamType::mandatoryTypeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "type";
|
return QStringList() << "id" << "name" << "displayName" << "type";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,8 +76,8 @@ public:
|
|||||||
|
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
static QStringList jsonProperties();
|
static QStringList typeProperties();
|
||||||
static QStringList mandatoryJsonProperties();
|
static QStringList mandatoryTypeProperties();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ParamTypeId m_id;
|
ParamTypeId m_id;
|
||||||
|
|||||||
@ -196,16 +196,16 @@ void StateType::setCached(bool cached)
|
|||||||
m_cached = cached;
|
m_cached = cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of all valid JSON properties a DeviceClass JSON definition can have. */
|
/*! Returns a list of all valid properties a DeviceClass definition can have. */
|
||||||
QStringList StateType::jsonProperties()
|
QStringList StateType::typeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "displayNameEvent" << "type" << "defaultValue"
|
return QStringList() << "id" << "name" << "displayName" << "displayNameEvent" << "type" << "defaultValue"
|
||||||
<< "cached" << "ruleRelevant" << "eventRuleRelevant" << "graphRelevant" << "unit"
|
<< "cached" << "ruleRelevant" << "eventRuleRelevant" << "graphRelevant" << "unit"
|
||||||
<< "minValue" << "maxValue" << "possibleValues" << "writable" << "displayNameAction";
|
<< "minValue" << "maxValue" << "possibleValues" << "writable" << "displayNameAction";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns a list of mandatory JSON properties a DeviceClass JSON definition must have. */
|
/*! Returns a list of mandatory properties a DeviceClass definition must have. */
|
||||||
QStringList StateType::mandatoryJsonProperties()
|
QStringList StateType::mandatoryTypeProperties()
|
||||||
{
|
{
|
||||||
return QStringList() << "id" << "name" << "displayName" << "displayNameEvent" << "type" << "defaultValue";
|
return QStringList() << "id" << "name" << "displayName" << "displayNameEvent" << "type" << "defaultValue";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,8 +73,8 @@ public:
|
|||||||
bool cached() const;
|
bool cached() const;
|
||||||
void setCached(bool cached);
|
void setCached(bool cached);
|
||||||
|
|
||||||
static QStringList jsonProperties();
|
static QStringList typeProperties();
|
||||||
static QStringList mandatoryJsonProperties();
|
static QStringList mandatoryTypeProperties();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StateTypeId m_id;
|
StateTypeId m_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user