api.h
author insilmaril
Mon Nov 20 12:12:05 2006 +0000 (2006-11-20)
changeset 405 a4532e5c2ce3
parent 394 67cfa6e6b863
permissions -rw-r--r--
historywindow moved to mainwindow. Started to get rid of Q3PtrList finally
     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