aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/TexturePackFolderModel.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-06-23 17:29:58 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-06-23 17:29:58 +0300
commit90df092174c86bf3328146f4da7908ecbcfbc0b2 (patch)
treea58d51624febc5ceef1724ca204930e20f852fa8 /launcher/minecraft/mod/TexturePackFolderModel.h
parent85495c794de2b7c9ae64bbf43156b3e4e6ecfed0 (diff)
parent8df5ab8aa7ec32ee3c44e2b57dc9c9f04e093d9d (diff)
downloadPrismLauncher-90df092174c86bf3328146f4da7908ecbcfbc0b2.tar.gz
PrismLauncher-90df092174c86bf3328146f4da7908ecbcfbc0b2.tar.bz2
PrismLauncher-90df092174c86bf3328146f4da7908ecbcfbc0b2.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into curse
Diffstat (limited to 'launcher/minecraft/mod/TexturePackFolderModel.h')
-rw-r--r--launcher/minecraft/mod/TexturePackFolderModel.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/TexturePackFolderModel.h b/launcher/minecraft/mod/TexturePackFolderModel.h
index 425a71e4..71a8bdd1 100644
--- a/launcher/minecraft/mod/TexturePackFolderModel.h
+++ b/launcher/minecraft/mod/TexturePackFolderModel.h
@@ -38,12 +38,35 @@
#include "ResourceFolderModel.h"
+#include "TexturePack.h"
+
class TexturePackFolderModel : public ResourceFolderModel
{
Q_OBJECT
public:
+
+ enum Columns
+ {
+ ActiveColumn = 0,
+ ImageColumn,
+ NameColumn,
+ DateColumn,
+ NUM_COLUMNS
+ };
+
+ explicit TexturePackFolderModel(const QString &dir, std::shared_ptr<const BaseInstance> instance);
+
+ virtual QString id() const override { return "texturepacks"; }
+
+ [[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;
+
explicit TexturePackFolderModel(const QString &dir, BaseInstance* instance);
[[nodiscard]] Task* createUpdateTask() override;
[[nodiscard]] Task* createParseTask(Resource&) override;
+
+ RESOURCE_HELPERS(TexturePack)
};