aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/WorldList.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-05-04 20:29:33 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-05-04 20:29:33 +0300
commit9fbec3793f02f6bb3e692f98f2d86cad12c52190 (patch)
tree9f375cbb5e46020f172fd01acd92988fe17655bc /launcher/minecraft/WorldList.h
parentb2ecb9ac09573d13c6edf8f6ea0924c1f7006b4b (diff)
parent64ba5e4ed1456bed159cfe7b41ed9175b8baf5c4 (diff)
downloadPrismLauncher-9fbec3793f02f6bb3e692f98f2d86cad12c52190.tar.gz
PrismLauncher-9fbec3793f02f6bb3e692f98f2d86cad12c52190.tar.bz2
PrismLauncher-9fbec3793f02f6bb3e692f98f2d86cad12c52190.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Diffstat (limited to 'launcher/minecraft/WorldList.h')
-rw-r--r--launcher/minecraft/WorldList.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/launcher/minecraft/WorldList.h b/launcher/minecraft/WorldList.h
index 08294755..10fb4e3c 100644
--- a/launcher/minecraft/WorldList.h
+++ b/launcher/minecraft/WorldList.h
@@ -21,6 +21,7 @@
#include <QAbstractListModel>
#include <QMimeData>
#include "minecraft/World.h"
+#include "BaseInstance.h"
class QFileSystemWatcher;
@@ -33,7 +34,8 @@ public:
NameColumn,
GameModeColumn,
LastPlayedColumn,
- SizeColumn
+ SizeColumn,
+ InfoColumn
};
enum Roles
@@ -48,7 +50,7 @@ public:
IconFileRole
};
- WorldList(const QString &dir);
+ WorldList(const QString &dir, std::shared_ptr<const BaseInstance> instance);
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
@@ -112,6 +114,8 @@ public:
return m_dir;
}
+ QString instDirPath() const;
+
const QList<World> &allWorlds() const
{
return worlds;
@@ -124,6 +128,7 @@ signals:
void changed();
protected:
+ std::shared_ptr<const BaseInstance> m_instance;
QFileSystemWatcher *m_watcher;
bool is_watching;
QDir m_dir;