api.h
author insilmaril
Tue, 24 Oct 2006 15:36:38 +0000
changeset 394 67cfa6e6b863
parent 377 5391ab620c95
child 395 7ced3733ba60
permissions -rw-r--r--
1.8.58 - More undoCommands, spanish translation of doc
     1 #ifndef API_H
     2 #define API_H
     3 
     4 #include <QStringList>
     5 
     6 enum ErrorLevel {NoError,Warning,Aborted};
     7 
     8 class API
     9 {
    10 public:
    11 	API();
    12 	void initCommand();
    13 	void parseInput (const QString &input);
    14 	QString command();
    15 	QStringList parameters();
    16 	int paramCount();
    17 	QString errorMessage();
    18 	QString errorDescription();
    19 	ErrorLevel errorLevel();
    20 	void setError (ErrorLevel level,const QString &description);
    21 	void resetError();
    22 	bool checkParamCount (QList <int> plist);
    23 	bool checkParamCount (const int &index);
    24 	bool checkParamIsInt (const int &index);
    25 	int parInt (bool &,const uint &index);
    26 	QString parString(bool &ok,const int &index);
    27 	bool parBool (bool &ok, const int &index);
    28 private:
    29 	QString input;
    30 	QString com;
    31 	QStringList paramList;
    32 	QString errMessage;
    33 	QString errDescription;
    34 	ErrorLevel errLevel;
    35 };
    36 
    37 #endif