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"
|
|
|
|
|
2022-08-10 18:46:28 +01:00
|
|
|
class ResourcePackFolderModel : public ResourceFolderModel
|
2021-06-19 00:59:48 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-08-29 02:33:44 +01:00
|
|
|
enum Columns
|
|
|
|
{
|
|
|
|
ActiveColumn = 0,
|
|
|
|
NameColumn,
|
|
|
|
PackFormatColumn,
|
|
|
|
DateColumn,
|
|
|
|
NUM_COLUMNS
|
|
|
|
};
|
|
|
|
|
2023-04-30 03:38:51 +01:00
|
|
|
explicit ResourcePackFolderModel(const QString &dir, std::shared_ptr<const BaseInstance> instance);
|
2022-08-10 18:48:34 +01:00
|
|
|
|
2022-08-29 02:33:44 +01:00
|
|
|
[[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
|
|
|
|
|
|
[[nodiscard]] QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
|
|
|
[[nodiscard]] int columnCount(const QModelIndex &parent) const override;
|
|
|
|
|
|
|
|
[[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
|
|
|
};
|