api.h
author insilmaril
Mon, 19 Feb 2007 12:01:52 +0000
changeset 429 69a4c16bd85b
parent 395 7ced3733ba60
permissions -rw-r--r--
1.8.67 Bugfixes
     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