diff options
Diffstat (limited to 'logic/minecraft/WorldList.h')
-rw-r--r-- | logic/minecraft/WorldList.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/logic/minecraft/WorldList.h b/logic/minecraft/WorldList.h index 7f119e81..90c7c6ed 100644 --- a/logic/minecraft/WorldList.h +++ b/logic/minecraft/WorldList.h @@ -19,6 +19,7 @@ #include <QString> #include <QDir> #include <QAbstractListModel> +#include <QMimeData> #include "minecraft/World.h" #include "multimc_logic_export.h" @@ -71,16 +72,28 @@ public: /// Reloads the mod list and returns true if the list changed. virtual bool update(); + /// Install a world from location + void installWorld(QFileInfo filename); + /// Deletes the mod at the given index. virtual bool deleteWorld(int index); /// Deletes all the selected mods virtual bool deleteWorlds(int first, int last); + /// flags, mostly to support drag&drop + virtual Qt::ItemFlags flags(const QModelIndex &index) const; /// get data for drag action virtual QMimeData *mimeData(const QModelIndexList &indexes) const; /// get the supported mime types virtual QStringList mimeTypes() const; + /// process data from drop action + virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); + /// what drag actions do we support? + virtual Qt::DropActions supportedDragActions() const; + + /// what drop actions do we support? + virtual Qt::DropActions supportedDropActions() const; void startWatching(); void stopWatching(); @@ -97,8 +110,6 @@ public: return worlds; } -private: - void internalSort(QList<World> &what); private slots: void directoryChanged(QString path); |