CLI: Use new 'Indexer' to add Commands
This commit is contained in:
@@ -3,22 +3,37 @@
|
||||
#include <QStringList>
|
||||
#include <QThreadStorage>
|
||||
#include <QVariant>
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
#include "utils.h"
|
||||
#include "sqlitedbservice.h"
|
||||
class Command
|
||||
class Command : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void finishedCmd(int retval);
|
||||
|
||||
protected:
|
||||
SqliteDbService *dbService;
|
||||
QString dbConnectionString;
|
||||
QStringList arguments;
|
||||
|
||||
bool autoFinish = true;
|
||||
|
||||
public:
|
||||
Command(SqliteDbService &dbService)
|
||||
{
|
||||
this->dbService = &dbService;
|
||||
}
|
||||
|
||||
void setArguments(QStringList arguments)
|
||||
{
|
||||
this->arguments = arguments;
|
||||
}
|
||||
virtual int handle(QStringList arguments) = 0;
|
||||
virtual ~Command(){};
|
||||
|
||||
public slots:
|
||||
void execute();
|
||||
};
|
||||
|
||||
#endif // COMMAND_H
|
||||
|
||||
Reference in New Issue
Block a user