summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/mod/ModFolderLoadTask.h
blob: 8d720e65231032d1e99c9fe61a21159f22a2fec5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#include <QRunnable>
#include <QObject>
#include <QDir>
#include <QMap>
#include "Mod.h"
#include <memory>

class ModFolderLoadTask : public QObject, public QRunnable
{
    Q_OBJECT
public:
    struct Result {
        QMap<QString, Mod> mods;
    };
    using ResultPtr = std::shared_ptr<Result>;
    ResultPtr result() const {
        return m_result;
    }

public:
    ModFolderLoadTask(QDir dir);
    void run();
signals:
    void succeeded();
private:
    QDir m_dir;
    ResultPtr m_result;
};