#ifndef TOOL_H
#define TOOL_H

#include <QString>
#include <QMap>
#include <QList>
#include <QStringList>

#include "switcher.h"

class Tool
{
private:
    QString name;
    QString command;
    QString homepage;
    QString info;
    bool isProcess;
    QMap<QString, QList<Switcher*> > groups;
    QList<QString> groupsOrder;

public:
    Tool();
    ~Tool();

    QStringList getCommandArgs();

    QString getName() const {
        return name;
    }

    QString getCommand() const {
        return command;
    }

    QString getHomepage() const {
        return homepage;
    }

    QString getInfo() const {
        return info;
    }

    bool getProcess() const {
        return isProcess;
    }

    QMap<QString, QList<Switcher*> >& getGroups() {
        return groups;
    }

    QList<QString>& getGroupsOrder() {
        return groupsOrder;
    }

    void setName(QString n) {
        this->name = n;
    }

    void setGroups(QMap<QString,QList<Switcher*> > groups){
        this->groups = groups;
    }

    void setCommand(QString n) {
         this->command = n;
    }

    void setHomepage(QString n) {
        this->homepage = n;
    }

    void setInfo(QString n) {
        this->info = n;
    }

    void setProcess(bool n) {
        this->isProcess = n;
    }

    QList<QString> checkValidity();
};

#endif // TOOL_H
