feat: Implement feature graph and JSON document save/load
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
28
src/Feature.cpp
Normal file
28
src/Feature.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "Feature.h"
|
||||
|
||||
Feature::Feature(const QString& name) : m_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
QString Feature::name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
void Feature::setName(const QString& name)
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
void Feature::read(const QJsonObject& json)
|
||||
{
|
||||
if (json.contains("name") && json["name"].isString()) {
|
||||
m_name = json["name"].toString();
|
||||
}
|
||||
}
|
||||
|
||||
void Feature::write(QJsonObject& json) const
|
||||
{
|
||||
json["type"] = type();
|
||||
json["name"] = m_name;
|
||||
}
|
||||
Reference in New Issue
Block a user