diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-03 00:56:26 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-03 00:56:26 +0300 |
commit | 42dc3ed03f76f1064d6367a4d90f7cea895bcb6b (patch) | |
tree | 5923fa27324aef89b6539c69e8d4d242302097fd /launcher/minecraft/WorldList.h | |
parent | f6ed2036b34177d7f932007dc5b3cc3d59f99aea (diff) | |
parent | 64ba5e4ed1456bed159cfe7b41ed9175b8baf5c4 (diff) | |
download | PrismLauncher-42dc3ed03f76f1064d6367a4d90f7cea895bcb6b.tar.gz PrismLauncher-42dc3ed03f76f1064d6367a4d90f7cea895bcb6b.tar.bz2 PrismLauncher-42dc3ed03f76f1064d6367a4d90f7cea895bcb6b.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into Fix_Assert
Diffstat (limited to 'launcher/minecraft/WorldList.h')
-rw-r--r-- | launcher/minecraft/WorldList.h | 9 |
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; |