34 lines
742 B
C++
34 lines
742 B
C++
// neuratemplatemanager.h
|
|
#ifndef NEURALTEMPLATEMANAGER_H
|
|
#define NEURALTEMPLATEMANAGER_H
|
|
|
|
#include "qtablewidget.h"
|
|
#include <QObject>
|
|
#include <QVector>
|
|
#include <QString>
|
|
|
|
class NeuralTemplateManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
struct Template {
|
|
QString name;
|
|
QString templateText;
|
|
};
|
|
|
|
explicit NeuralTemplateManager(QObject *parent = nullptr);
|
|
|
|
void addTemplate(const QString &name, const QString &templateText);
|
|
QString getTemplateText(const QString &name) const;
|
|
void clear();
|
|
void loadFromTableWidget(QTableWidget *table);
|
|
|
|
const QVector<Template>& templates() const { return m_templates; }
|
|
|
|
private:
|
|
QVector<Template> m_templates;
|
|
};
|
|
|
|
#endif // NEURALTEMPLATEMANAGER_H
|