Another big change, rewriting things again.
Memo to self: Keep working on it, these long breaks between developing lead to too much structural changes...
This commit is contained in:
parent
8182e72a26
commit
691e387554
|
@ -4,16 +4,14 @@ set(HEADERS
|
|||
TreeNode.h
|
||||
BinaryPacketComposer.h
|
||||
APluginManager.h
|
||||
model/ARepositoryFactory.h
|
||||
model/ARepository.h
|
||||
model/AModelFactory.h
|
||||
model/AModel.h
|
||||
model/AStructureFactory.h
|
||||
model/AStructure.h
|
||||
model/AFieldFactory.h
|
||||
model/AField.h
|
||||
model/IModelPlugin.h
|
||||
model/ModelPluginManager.h
|
||||
model/Repository.h
|
||||
model/Model.h
|
||||
model/Structure.h
|
||||
model/Field.h
|
||||
control/ARepositoryFactory.h
|
||||
control/AFieldFactory.h
|
||||
control/AStructureFactory.h
|
||||
control/AModelFactory.h
|
||||
|
||||
schemaio/AStructureReaderFactory.h
|
||||
schemaio/AStructureWriterFactory.h
|
||||
|
@ -26,16 +24,14 @@ set(HEADERS
|
|||
set(SOURCES
|
||||
BinaryPacketComposer.cpp
|
||||
APluginManager.cpp
|
||||
model/ARepositoryFactory.cpp
|
||||
model/ARepository.cpp
|
||||
model/AModelFactory.cpp
|
||||
model/AModel.cpp
|
||||
model/AStructureFactory.cpp
|
||||
model/AStructure.cpp
|
||||
model/AFieldFactory.cpp
|
||||
model/AField.cpp
|
||||
model/IModelPlugin.cpp
|
||||
model/ModelPluginManager.cpp
|
||||
model/Repository.cpp
|
||||
model/Model.cpp
|
||||
model/Structure.cpp
|
||||
model/Field.cpp
|
||||
control/ARepositoryFactory.cpp
|
||||
control/AFieldFactory.cpp
|
||||
control/AStructureFactory.cpp
|
||||
control/AModelFactory.cpp
|
||||
|
||||
schemaio/AStructureReaderFactory.cpp
|
||||
schemaio/AStructureWriterFactory.cpp
|
||||
|
|
|
@ -171,50 +171,50 @@ bool RandomAccessBinary::getBit(uint64_t position)
|
|||
|
||||
const std::vector<bool> RandomAccessBinary::getBits(uint byteOffset, uint8_t bitOffset, uint64_t length)
|
||||
{
|
||||
|
||||
return std::vector<bool>();
|
||||
}
|
||||
|
||||
const std::vector<bool> RandomAccessBinary::getBits(uint64_t position, uint64_t length)
|
||||
{
|
||||
|
||||
return std::vector<bool>();
|
||||
}
|
||||
|
||||
uint16_t RandomAccessBinary::get_uint16(uint byteOffset)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t RandomAccessBinary::get_uint32(uint byteOffset)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t RandomAccessBinary::get_uint64(uint byteOffset)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
float RandomAccessBinary::get_float(uint byteOffset)
|
||||
{
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
double RandomAccessBinary::get_double(uint byteOffset)
|
||||
{
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
std::__cxx11::string RandomAccessBinary::get_string(uint byteOffset, uint length)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::__cxx11::string RandomAccessBinary::get_hex_string(uint byteOffset, uint length)
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
std::__cxx11::string RandomAccessBinary::get_hex_string()
|
||||
{
|
||||
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -22,12 +22,15 @@ public:
|
|||
explicit TreeNode(std::shared_ptr<T> data);
|
||||
virtual ~TreeNode();
|
||||
|
||||
std::shared_ptr<TreeNode<T>> copy(); // copy only this node, without children!
|
||||
std::shared_ptr<TreeNode<T>> rcopy(); // recursive copy
|
||||
|
||||
const std::shared_ptr<TreeNode<T>> nextSibling();
|
||||
|
||||
const std::shared_ptr<TreeNode<T>> next(TreeWalkStrategy walkStrategy = TreeWalkStrategy::depthFirst);
|
||||
const std::shared_ptr<TreeNode<T>> getRoot();
|
||||
void move(std::shared_ptr<TreeNode<T>> to); //as child
|
||||
void moveChildren(std::shared_ptr<TreeNode<T>> to); //all
|
||||
void moveChildren(std::shared_ptr<TreeNode<T>> to); //all children but not the 'executing' element
|
||||
|
||||
void addChild(std::shared_ptr<TreeNode<T>> child);
|
||||
void addChildren(std::shared_ptr<TreeNode<T>> nodeWithChildren);
|
||||
|
@ -87,6 +90,21 @@ TreeNode<T>::~TreeNode()
|
|||
|
||||
}
|
||||
|
||||
template<class T>
|
||||
std::shared_ptr<TreeNode<T> > TreeNode<T>::copy()
|
||||
{
|
||||
return std::make_shared<TreeNode<T>>(std::make_shared<T>(*this->getData()));
|
||||
}
|
||||
|
||||
template<class T>
|
||||
std::shared_ptr<TreeNode<T> > TreeNode<T>::rcopy()
|
||||
{
|
||||
auto n = std::make_shared<TreeNode<T>>(std::make_shared<T>(*this->getData()));
|
||||
for(auto c : this->getChildren())
|
||||
n->addChild(c->rcopy());
|
||||
return n;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
const std::shared_ptr<TreeNode<T>> TreeNode<T>::nextSibling()
|
||||
{
|
||||
|
@ -150,7 +168,7 @@ const std::shared_ptr<TreeNode<T>> TreeNode<T>::next(TreeWalkStrategy walkStrate
|
|||
if (parent != nullptr) {
|
||||
auto nextOnLvl = nextOnSameLevel();
|
||||
if (nextOnLvl == nullptr){
|
||||
for (auto n : this->getChildren())
|
||||
for (auto n : parent->getChildren())
|
||||
if (n->getChildren().size() > 0)
|
||||
return n->getChildren().front();
|
||||
//return n->getChildren().first();
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#include "FieldFactory.h"
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
AFieldFactory::AFieldFactory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::shared_ptr<Model::Field> AFieldFactory::createField(std::string name, std::shared_ptr<Model::AStructure> parentStructure)
|
||||
{
|
||||
auto f = std::make_shared<Model::Field>();
|
||||
f->setName(name);
|
||||
f->setParentStructure(parentStructure);
|
||||
return f;
|
||||
}
|
||||
|
||||
std::shared_ptr<Model::Field> AFieldFactory::createFieldFull(std::string name, std::map<std::string, std::string> syntaxes, std::shared_ptr<Model::AStructure> parentStructure)
|
||||
{
|
||||
auto f = std::make_shared<Model::Field>();
|
||||
f->setName(name);
|
||||
f->setSyntaxes(syntaxes);
|
||||
f->setParentStructure(parentStructure);
|
||||
return f;
|
||||
}
|
||||
}}
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef AFIELDFACTORY_H
|
||||
#define AFIELDFACTORY_H
|
||||
|
||||
#include "../model/Field.h"
|
||||
#include <memory>
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
class AFieldFactory
|
||||
{
|
||||
public:
|
||||
AFieldFactory();
|
||||
virtual ~AFieldFactory();
|
||||
|
||||
virtual std::shared_ptr<Model::Field> createField(std::string name, std::shared_ptr<Model::AStructure> parentStructure = nullptr);
|
||||
virtual std::shared_ptr<Model::Field> createFieldFull(std::string name, std::map<std::string, std::string> syntaxes, std::shared_ptr<Model::AStructure> parentStructure = nullptr);
|
||||
};
|
||||
}}
|
||||
#endif // AFIELDFACTORY_H
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef AFIELDFACTORY_H
|
||||
#define AFIELDFACTORY_H
|
||||
|
||||
#include "../model/Field.h"
|
||||
#include <memory>
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
class AFieldFactory
|
||||
{
|
||||
public:
|
||||
AFieldFactory();
|
||||
virtual ~AFieldFactory();
|
||||
|
||||
virtual std::shared_ptr<Model::Field> createField(std::string name, std::shared_ptr<Model::Structure> parentStructure = nullptr);
|
||||
virtual std::shared_ptr<Model::Field> createFieldFull(std::string name, std::map<std::string, std::string> syntaxes, std::shared_ptr<Model::Structure> parentStructure = nullptr);
|
||||
};
|
||||
}}
|
||||
#endif // AFIELDFACTORY_H
|
|
@ -1,6 +1,8 @@
|
|||
#include "AModelFactory.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
AModelFactory::AModelFactory()
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
|
@ -1,11 +1,12 @@
|
|||
#ifndef AMODELFACTORY_H
|
||||
#define AMODELFACTORY_H
|
||||
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
class AModelFactory
|
||||
{
|
||||
public:
|
||||
AModelFactory();
|
||||
};
|
||||
|
||||
#endif // AMODELFACTORY_H
|
||||
}}
|
||||
#endif // AMODELFACTORY_H
|
|
@ -1,6 +1,8 @@
|
|||
#include "ARepositoryFactory.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
ARepositoryFactory::ARepositoryFactory()
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
|
@ -1,11 +1,12 @@
|
|||
#ifndef AREPOSITORYFACTORY_H
|
||||
#define AREPOSITORYFACTORY_H
|
||||
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
class ARepositoryFactory
|
||||
{
|
||||
public:
|
||||
ARepositoryFactory();
|
||||
};
|
||||
|
||||
#endif // AREPOSITORYFACTORY_H
|
||||
}}
|
||||
#endif // AREPOSITORYFACTORY_H
|
|
@ -1,6 +1,8 @@
|
|||
#include "AStructureFactory.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
AStructureFactory::AStructureFactory()
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
|
@ -1,11 +1,12 @@
|
|||
#ifndef ASTRUCTUREFACTORY_H
|
||||
#define ASTRUCTUREFACTORY_H
|
||||
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Control {
|
||||
class AStructureFactory
|
||||
{
|
||||
public:
|
||||
AStructureFactory();
|
||||
};
|
||||
|
||||
#endif // ASTRUCTUREFACTORY_H
|
||||
}}
|
||||
#endif // ASTRUCTUREFACTORY_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "AField.h"
|
||||
|
||||
AField::AField()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef AFIELD_H
|
||||
#define AFIELD_H
|
||||
|
||||
|
||||
class AField
|
||||
{
|
||||
public:
|
||||
AField();
|
||||
};
|
||||
|
||||
#endif // AFIELD_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "AFieldFactory.h"
|
||||
|
||||
AFieldFactory::AFieldFactory()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef AFIELDFACTORY_H
|
||||
#define AFIELDFACTORY_H
|
||||
|
||||
|
||||
class AFieldFactory
|
||||
{
|
||||
public:
|
||||
AFieldFactory();
|
||||
};
|
||||
|
||||
#endif // AFIELDFACTORY_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "AModel.h"
|
||||
|
||||
AModel::AModel()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef AMODEL_H
|
||||
#define AMODEL_H
|
||||
|
||||
|
||||
class AModel
|
||||
{
|
||||
public:
|
||||
AModel();
|
||||
};
|
||||
|
||||
#endif // AMODEL_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "ARepository.h"
|
||||
|
||||
ARepository::ARepository()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef AREPOSITORY_H
|
||||
#define AREPOSITORY_H
|
||||
|
||||
|
||||
class ARepository
|
||||
{
|
||||
public:
|
||||
ARepository();
|
||||
};
|
||||
|
||||
#endif // AREPOSITORY_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "AStructure.h"
|
||||
|
||||
AStructure::AStructure()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef ASTRUCTURE_H
|
||||
#define ASTRUCTURE_H
|
||||
|
||||
#include <memory>
|
||||
#include <list>
|
||||
#include "AField.h"
|
||||
|
||||
class AStructure
|
||||
{
|
||||
public:
|
||||
AStructure();
|
||||
|
||||
private:
|
||||
std::list<std::shared_ptr<AField>> fields;
|
||||
};
|
||||
|
||||
#endif // ASTRUCTURE_H
|
|
@ -0,0 +1,51 @@
|
|||
#include "AField.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
Field::Field()
|
||||
{
|
||||
this->parentStructure = nullptr;
|
||||
}
|
||||
|
||||
std::string Field::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
void Field::setName(const std::string &value)
|
||||
{
|
||||
name = value;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> Field::getSyntaxes() const
|
||||
{
|
||||
return syntaxes;
|
||||
}
|
||||
|
||||
void Field::setSyntaxes(const std::map<std::string, std::string> &value)
|
||||
{
|
||||
syntaxes = value;
|
||||
}
|
||||
|
||||
std::string Field::getValue() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
void Field::setValue(const std::string &value)
|
||||
{
|
||||
value = value;
|
||||
}
|
||||
|
||||
std::shared_ptr<AStructure> Field::getParentStructure() const
|
||||
{
|
||||
return parentStructure;
|
||||
}
|
||||
|
||||
void Field::setParentStructure(const std::shared_ptr<AStructure> &value)
|
||||
{
|
||||
parentStructure = value;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef AFIELD_H
|
||||
#define AFIELD_H
|
||||
|
||||
#include "Structure.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
|
||||
class Structure;
|
||||
|
||||
class Field
|
||||
{
|
||||
public:
|
||||
Field();
|
||||
virtual ~Field();
|
||||
|
||||
std::string getName() const;
|
||||
void setName(const std::string &value);
|
||||
|
||||
std::map<std::string, std::string> getSyntaxes() const;
|
||||
void setSyntaxes(const std::map<std::string, std::string> &value);
|
||||
|
||||
std::string getValue() const;
|
||||
void setValue(const std::string &value);
|
||||
|
||||
std::shared_ptr<Structure> getParentStructure() const;
|
||||
void setParentStructure(const std::shared_ptr<Structure> &value);
|
||||
|
||||
protected:
|
||||
std::shared_ptr<Structure> parentStructure;
|
||||
std::string name;
|
||||
std::map<std::string, std::string> syntaxes; // example : regex; for validation
|
||||
std::string value;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // AFIELD_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "IModelPlugin.h"
|
||||
|
||||
IModelPlugin::IModelPlugin()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef IMODELPLUGIN_H
|
||||
#define IMODELPLUGIN_H
|
||||
|
||||
|
||||
class IModelPlugin
|
||||
{
|
||||
public:
|
||||
IModelPlugin();
|
||||
};
|
||||
|
||||
#endif // IMODELPLUGIN_H
|
|
@ -0,0 +1,8 @@
|
|||
#include "Model.h"
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
Model::Model()
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef AMODEL_H
|
||||
#define AMODEL_H
|
||||
|
||||
#include "../Tree.h"
|
||||
#include "Field.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
class Model
|
||||
{
|
||||
public:
|
||||
Model();
|
||||
virtual ~Model();
|
||||
|
||||
private:
|
||||
Tree<Field> stack;
|
||||
};
|
||||
}}
|
||||
#endif // AMODEL_H
|
|
@ -1,6 +0,0 @@
|
|||
#include "ModelPluginManager.h"
|
||||
|
||||
ModelPluginManager::ModelPluginManager()
|
||||
{
|
||||
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef MODELPLUGINMANAGER_H
|
||||
#define MODELPLUGINMANAGER_H
|
||||
|
||||
#include "../APluginManager.h"
|
||||
|
||||
class ModelPluginManager : public APluginManager
|
||||
{
|
||||
public:
|
||||
ModelPluginManager();
|
||||
};
|
||||
|
||||
#endif // MODELPLUGINMANAGER_H
|
|
@ -0,0 +1,8 @@
|
|||
#include "Repository.h"
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
Repository::Repository()
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef AREPOSITORY_H
|
||||
#define AREPOSITORY_H
|
||||
|
||||
#include <map>
|
||||
#include "Structure.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
class Repository
|
||||
{
|
||||
public:
|
||||
Repository();
|
||||
virtual ~Repository();
|
||||
|
||||
private:
|
||||
std::map<std::string, Structure> structures;
|
||||
};
|
||||
}}
|
||||
#endif // AREPOSITORY_H
|
|
@ -0,0 +1,8 @@
|
|||
#include "Structure.h"
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
AStructure::AStructure()
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
|
@ -0,0 +1,18 @@
|
|||
#include "Structure.h"
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
Structure::Structure()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::string Structure::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
void Structure::setName(const std::string &value)
|
||||
{
|
||||
name = value;
|
||||
}
|
||||
}}
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef ASTRUCTURE_H
|
||||
#define ASTRUCTURE_H
|
||||
|
||||
#include <memory>
|
||||
#include <list>
|
||||
#include "Field.h"
|
||||
#include "../Tree.h"
|
||||
|
||||
namespace NPC_core {
|
||||
namespace Model {
|
||||
|
||||
class Field;
|
||||
|
||||
class Structure
|
||||
{
|
||||
public:
|
||||
Structure();
|
||||
virtual ~Structure();
|
||||
|
||||
std::string getName() const;
|
||||
void setName(const std::string &value);
|
||||
|
||||
private:
|
||||
Tree<Field> elements;
|
||||
std::string name;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // ASTRUCTURE_H
|
|
@ -3,6 +3,7 @@ set(HEADERS editorelementdata.h
|
|||
guidededitorelementview.h
|
||||
flowlayout.h
|
||||
EditorElementValue.h
|
||||
StructureField.h
|
||||
)
|
||||
|
||||
set(SOURCES guidededitorelementview.cpp
|
||||
|
@ -10,7 +11,7 @@ set(SOURCES guidededitorelementview.cpp
|
|||
guidededitorview.cpp
|
||||
flowlayout.cpp
|
||||
EditorElementValue.cpp
|
||||
|
||||
StructureField.cpp
|
||||
)
|
||||
|
||||
add_library(editor ${HEADERS} ${SOURCES})
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
#include "StructureField.h"
|
||||
|
||||
namespace NPC_editor {
|
||||
|
||||
StructureField::StructureField(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
this->field = nullptr;
|
||||
this->validator = new QRegExpValidator();
|
||||
this->layout = new QVBoxLayout(this);
|
||||
this->setLayout(layout);
|
||||
this->edit = nullptr;
|
||||
this->line = nullptr;
|
||||
this->title = new QLabel(this);
|
||||
this->syntax = new QLabel(this);
|
||||
}
|
||||
|
||||
StructureField::StructureField(const std::shared_ptr<NPC_core::Model::Field> field, QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
this->field = field;
|
||||
}
|
||||
|
||||
void StructureField::render()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void StructureField::initialRender()
|
||||
{
|
||||
for (QObject* w : this->children())
|
||||
if (w->isWidgetType())
|
||||
this->layout->removeWidget((QWidget*)w);
|
||||
layout->addWidget(this->title);
|
||||
layout->addWidget(this->syntax);
|
||||
if (false ){// reference->getData()->isMultiLine()) {
|
||||
this->edit = new QTextEdit(this);
|
||||
layout->addWidget(this->edit);
|
||||
} else {
|
||||
this->line = new QLineEdit(this);
|
||||
layout->addWidget(this->line);
|
||||
}
|
||||
this->render();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef STRUCTUREFIELD_H
|
||||
#define STRUCTUREFIELD_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QTextEdit>
|
||||
#include <QLineEdit>
|
||||
#include <QVBoxLayout>
|
||||
#include <QRegExpValidator>
|
||||
#include "../core/model/AField.h"
|
||||
#include <memory>
|
||||
|
||||
namespace NPC_editor {
|
||||
|
||||
class StructureField : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit StructureField(QWidget *parent = nullptr);
|
||||
explicit StructureField(const std::shared_ptr<NPC_core::Model::Field> field, QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
public slots:
|
||||
void inputChanged();
|
||||
void dataChanged();
|
||||
void nodeChanged();
|
||||
void render();
|
||||
void initialRender();
|
||||
|
||||
private:
|
||||
std::shared_ptr<NPC_core::Model::Field> field;
|
||||
// layout
|
||||
QVBoxLayout* layout;
|
||||
QLabel* title;
|
||||
QTextEdit* edit;
|
||||
QLineEdit* line;
|
||||
QMap<QString, QWidget*> otherWidgets;
|
||||
QRegExpValidator* validator;
|
||||
QWidget* subContainer;
|
||||
};
|
||||
}
|
||||
#endif // STRUCTUREFIELD_H
|
Reference in New Issue