mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
monitor files for changes
- add fileWatcher to project that monitors changes to most files
(except map and layout json files)
- add config setting whether to monitor files for changes (monitor_files)
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
this->metatilesZoom = 30;
|
||||
this->showPlayerView = false;
|
||||
this->showCursorTile = true;
|
||||
this->monitorFiles = true;
|
||||
this->regionMapDimensions = QSize(32, 20);
|
||||
this->theme = "default";
|
||||
}
|
||||
@@ -53,6 +54,7 @@ public:
|
||||
void setMetatilesZoom(int zoom);
|
||||
void setShowPlayerView(bool enabled);
|
||||
void setShowCursorTile(bool enabled);
|
||||
void setMonitorFiles(bool monitor);
|
||||
void setRegionMapDimensions(int width, int height);
|
||||
void setTheme(QString theme);
|
||||
QString getRecentProject();
|
||||
@@ -64,6 +66,7 @@ public:
|
||||
int getMetatilesZoom();
|
||||
bool getShowPlayerView();
|
||||
bool getShowCursorTile();
|
||||
bool getMonitorFiles();
|
||||
QSize getRegionMapDimensions();
|
||||
QString getTheme();
|
||||
protected:
|
||||
@@ -87,6 +90,7 @@ private:
|
||||
int metatilesZoom;
|
||||
bool showPlayerView;
|
||||
bool showCursorTile;
|
||||
bool monitorFiles;
|
||||
QSize regionMapDimensions;
|
||||
QString theme;
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <QPair>
|
||||
#include <QStandardItem>
|
||||
#include <QVariant>
|
||||
#include <QFileSystemWatcher>
|
||||
|
||||
static QString NONE_MAP_CONSTANT = "MAP_NONE";
|
||||
static QString NONE_MAP_NAME = "None";
|
||||
@@ -61,6 +62,7 @@ public:
|
||||
QMap<int, QString> metatileBehaviorMapInverse;
|
||||
QMap<QString, QString> facingDirections;
|
||||
ParseUtil parser;
|
||||
QFileSystemWatcher fileWatcher;
|
||||
|
||||
void set_root(QString);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user