This commit is contained in:
fourtf
2018-06-26 13:24:55 +02:00
parent ec04f10895
commit c9722b9780
301 changed files with 0 additions and 0 deletions
@@ -0,0 +1,44 @@
#pragma once
#include <QMap>
#include <memory>
#include <mutex>
#include "controllers/commands/command.hpp"
#include "util/signalvector2.hpp"
namespace chatterino {
class Channel;
namespace controllers {
namespace commands {
class CommandModel;
class CommandController
{
public:
CommandController();
QString execCommand(const QString &text, std::shared_ptr<Channel> channel, bool dryRun);
QStringList getDefaultTwitchCommandList();
void load();
void save();
CommandModel *createModel(QObject *parent);
util::UnsortedSignalVector<Command> items;
private:
QMap<QString, Command> commandsMap;
std::mutex mutex;
QString filePath;
QString execCustomCommand(const QStringList &words, const Command &command);
};
} // namespace commands
} // namespace controllers
} // namespace chatterino