api.h
author insilmaril
Fri Jan 05 11:17:33 2007 +0000 (2007-01-05)
changeset 419 3988818e8087
parent 394 67cfa6e6b863
permissions -rw-r--r--
1.8.64 various fixes
     1 #ifndef API_H
     2 #define API_H
     3 
     4 #include <QColor>
     5 #include <QStringList>
     6 
     7 enum ErrorLevel {NoError,Warning,Aborted};
     8 
     9 class API
    10 {
    11 public:
    12 	API();
    13 	void initCommand();
    14 	void parseInput (const QString &input);
    15 	QString command();
    16 	QStringList parameters();
    17 	int paramCount();
    18 	QString errorMessage();
    19 	QString errorDescription();
    20 	ErrorLevel errorLevel();
    21 	void setError (ErrorLevel level,const QString &description);
    22 	void resetError();
    23 	bool checkParamCount (QList <int> plist);
    24 	bool checkParamCount (const int &index);
    25 	bool checkParamIsInt (const int &index);
    26 	int parInt (bool &,const uint &index);
    27 	QString parString(bool &ok,const int &index);
    28 	bool parBool (bool &ok, const int &index);
    29 	QColor parColor (bool &ok, const int &index);
    30 private:
    31 	QString input;
    32 	QString com;
    33 	QStringList paramList;
    34 	QString errMessage;
    35 	QString errDescription;
    36 	ErrorLevel errLevel;
    37 };
    38 
    39 #endif