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