Menu

[efa3d9]: / src / command.h  Maximize  Restore  History

Download this file

70 lines (64 with data), 1.6 kB

 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef COMMAND_H
#define COMMAND_H
#include <QColor>
#include <QStringList>
class Command {
public:
enum ObjectType{
VymObject,
MapObject,
BranchObject,
ImageObject,
XLinkObject
};
enum ParameterType {
ArrayPar,
AttributePar,
BoolPar,
BranchPar,
ColorPar,
DoublePar,
ImagePar,
IntPar,
StringPar,
StringListPar,
UndefinedPar,
VoidPar,
XLinkPar
};
enum SelectionType {
AnySel,
TreeItemSel, // used 14x
BranchSel,
BranchLikeSel, // used 2x
ImageSel, // used 9x
BranchOrImageSel, // used 14x
XLinkSel
};
Command(const QString &n, SelectionType st = Command::AnySel, ParameterType retType = VoidPar);
QString name();
QString description();
QString descriptionLaTeX();
void addParameter(ParameterType t, bool opt, const QString &c = QString());
int parameterCount();
ParameterType parameterType(int n);
SelectionType selectionType();
QString selectionTypeName();
QString typeToString(const ParameterType &type);
bool isParameterOptional(int n);
QString parameterComment(int n);
void setObjectType(const ObjectType &);
QString objectTypeName();
void setComment(const QString&);
QString comment();
private:
QString nameInt;
QString commentInt;
SelectionType selectionTypeInt;
QList<ParameterType> parTypes;
ParameterType returnType;
ObjectType objectTypeInt;
QList<bool> parOpts;
QStringList parComments;
};
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.