2021-06-19 00:59:48 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-10 18:46:28 +01:00
|
|
|
#include "ResourceFolderModel.h"
|
2021-06-19 00:59:48 +01:00
|
|
|
|
2022-08-10 18:48:34 +01:00
|
|
|
#include "ResourcePack.h"
|
|
|
|
|
2023-08-14 17:16:53 +01:00
|
|
|
class ResourcePackFolderModel : public ResourceFolderModel {
|
2021-06-19 00:59:48 +01:00
|
|
|
Q_OBJECT
|
2023-08-14 17:16:53 +01:00
|
|
|
public:
|
|
|
|
enum Columns { ActiveColumn = 0, ImageColumn, NameColumn, PackFormatColumn, DateColumn, NUM_COLUMNS };
|
|
|
|
|
|
|
|
explicit ResourcePackFolderModel(const QString& dir, BaseInstance* instance);
|
2022-08-10 18:48:34 +01:00
|
|
|
|
2023-05-25 04:15:34 +01:00
|
|
|
virtual QString id() const override { return "resourcepacks"; }
|
|
|
|
|
2023-08-14 17:16:53 +01:00
|
|
|
[[nodiscard]] QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
2022-08-29 02:33:44 +01:00
|
|
|
|
|
|
|
[[nodiscard]] QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
2023-08-14 17:16:53 +01:00
|
|
|
[[nodiscard]] int columnCount(const QModelIndex& parent) const override;
|
2022-08-29 02:33:44 +01:00
|
|
|
|
|
|
|
[[nodiscard]] Task* createUpdateTask() override;
|
|
|
|
[[nodiscard]] Task* createParseTask(Resource&) override;
|
|
|
|
|
2022-08-10 18:48:34 +01:00
|
|
|
RESOURCE_HELPERS(ResourcePack)
|
2021-06-19 00:59:48 +01:00
|
|
|
};
|