#include "Task.h"

namespace nemo_interface {

Task::Task(const Task::Functor &onExec) : _onExec(onExec) {}

Task::Task(Task::Functor &&onExec) : _onExec(std::move(onExec)) {}

QVariant Task::exec() { return this->_onExec(); }

void Task::setOnExec(const Task::Functor &onExec) { _onExec = onExec; }

void Task::setOnExec(Task::Functor &&onExec) { _onExec = std::move(onExec); }

} // namespace nemo_interface
