2013-02-02 17:32:54 -05:00
|
|
|
#include "Command.h"
|
|
|
|
#include "ErrorMessage.h"
|
2011-02-18 22:53:06 -05:00
|
|
|
|
2012-07-08 15:04:30 -04:00
|
|
|
Command::Command(QObject *parent) : QObject(parent) {
|
2011-02-18 22:53:06 -05:00
|
|
|
}
|
|
|
|
|
2012-06-29 12:14:22 -04:00
|
|
|
QString Command::toString() const {
|
|
|
|
return metaObject()->className();
|
|
|
|
}
|
2012-12-12 01:47:54 -05:00
|
|
|
|
2013-02-11 18:31:41 -05:00
|
|
|
void Command::finish(bool success) {
|
2012-12-12 01:47:54 -05:00
|
|
|
emit finished(new Response(success, this));
|
|
|
|
}
|
|
|
|
|
2013-02-11 18:31:41 -05:00
|
|
|
void Command::finish(bool success, QString message) {
|
2012-12-12 01:47:54 -05:00
|
|
|
emit finished(new Response(success, message, this));
|
|
|
|
}
|
|
|
|
|
2013-02-11 18:31:41 -05:00
|
|
|
void Command::finish(bool success, QByteArray message) {
|
2012-12-30 17:47:16 -05:00
|
|
|
emit finished(new Response(success, message, this));
|
|
|
|
}
|
|
|
|
|
2013-02-11 18:31:41 -05:00
|
|
|
void Command::finish(bool success, ErrorMessage *message) {
|
2013-02-02 17:32:54 -05:00
|
|
|
emit finished(new Response(success, message, this));
|
|
|
|
}
|