-
Notifications
You must be signed in to change notification settings - Fork 0
/
globalvararea.h
41 lines (34 loc) · 1.02 KB
/
globalvararea.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef GLOBALVARAREA_H
#define GLOBALVARAREA_H
#include <QMap>
#include <QString>
#include <QGroupBox>
#include "Vars/var.h"
struct VarTextDescription{
QString type;
QString id;
QString value;
};
class GlobalVarArea
{
public:
GlobalVarArea();
~GlobalVarArea();
static int addVar(Var *var);
static QString toText();
static void varRegister(QString title, VarCreator *creator);
static QList<QString> getVarTitles();
static Var* createVarAt(int index, QString name);
static void createAndAddVarAt(int index, QString name);
static QList<QString> getIds();
static void deleteById(QString id);
static Var* getVarById(QString id);
static QList<VarTextDescription> getVarTextDescriptions();
static QList<QString> getIdVarsByClass(ClassVar classVar);
private:
static void deleteVarTable();
static QMap<QString, Var*> varTable; //id = var
static QList<QPair<QString, VarCreator*> > availableVars;
static QList<QString> availableVarTitles;
};
#endif // GLOBALVARAREA_H