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:
2026-02-09 17:16:32 -07:00
parent bc851585f7
commit d2d49726d6
9 changed files with 340 additions and 0 deletions

28
src/Feature.cpp Normal file
View 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;
}