From d884f849d60db44f05a6a6b22f4ffcf520900389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 25 Aug 2013 01:32:42 +0200 Subject: All kinds of incremental improvements Redone the instance action toolbar: * Removed all the dead actions * Change icon and Rename are now morphed into a header * Added button for opening the config folder Implemented support for loose files and folders as legacy jar mods Added texture pack support --- logic/ModList.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'logic/ModList.h') diff --git a/logic/ModList.h b/logic/ModList.h index 61f3d596..5395e9ae 100644 --- a/logic/ModList.h +++ b/logic/ModList.h @@ -15,9 +15,10 @@ class BaseInstance; #include #include #include - #include "Mod.h" +class QFileSystemWatcher; + /** * A legacy mod list. * Backed by a folder. @@ -86,6 +87,9 @@ public: /// what drop actions do we support? virtual Qt::DropActions supportedDropActions() const; + void startWatching(); + void stopWatching(); + virtual bool isValid(); QDir dir() @@ -95,10 +99,14 @@ public: private: QStringList readListFile(); bool saveListFile(); +private slots: + void directoryChanged(QString path); signals: void changed(); protected: + QFileSystemWatcher * m_watcher; + bool is_watching; QDir m_dir; QString m_list_file; QString m_list_id; -- cgit v1.2.3