diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-01 15:04:58 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-01 15:04:58 +0200 |
commit | 5ef8b38e55c1883224fe1f01f47aba45b7b42666 (patch) | |
tree | 67a873c6a7c5263d202793314c3b3a61543fbb40 /action.h | |
download | tapasboard-5ef8b38e55c1883224fe1f01f47aba45b7b42666.tar.gz tapasboard-5ef8b38e55c1883224fe1f01f47aba45b7b42666.zip |
initial import
Diffstat (limited to 'action.h')
-rw-r--r-- | action.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/action.h b/action.h new file mode 100644 index 0000000..421adea --- /dev/null +++ b/action.h @@ -0,0 +1,32 @@ +#ifndef ACTION_H +#define ACTION_H + +#include <QObject> +#include <QtSql/QSqlError> +#include <QtSql/QSqlQuery> + +class Board; + +class Action : public QObject +{ + Q_OBJECT +public: + explicit Action(Board *board); + +signals: + void finished(Action *self); + void error(Action *self, const QString& messsage); + +public slots: + virtual void execute() = 0; + +protected: + void handleDatabaseError(const char *what, const QSqlError& err); + void handleDatabaseError(const char *what, const QSqlQuery& query); + +protected: + Board *_board; + +}; + +#endif // ACTION_H |