]> git.sven.stormbind.net Git - sven/vym.git/blob - command.h
97b18899fc21a6cc8c73fb2c8bfd2cfb161b0ddb
[sven/vym.git] / command.h
1 #ifndef COMMAND_H
2 #define COMMAND_H
3
4 #include <QColor>
5 #include <QStringList>
6
7 class Command
8 {
9 public:
10     enum SelectionType {Any, TreeItem, Branch, BranchLike, Image, BranchOrImage, XLink}; 
11     enum ParameterType {Undefined,String, Int, Double, Color, Bool};
12     Command (const QString &n, SelectionType st);
13     QString getName();
14     QString getDescription();
15     QString getDescriptionLaTeX();
16     void addPar (ParameterType t, bool opt, const QString &c=QString() );
17     int parCount();
18     ParameterType getParType (int n);
19     QString getParTypeName (int n);
20     SelectionType getSelectionType ();
21     QString getSelectionTypeName ();
22     bool isParOptional (int n);
23     QString getParComment(int n);
24
25 private:
26         QString name;
27         SelectionType selectionType;
28         QList <ParameterType> parTypes;
29         QList <bool> parOpts;
30         QStringList parComments;
31 };
32
33 #endif