mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-25 10:05:46 -05:00
Add porymap config file
This commit is contained in:
33
include/config.h
Normal file
33
include/config.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
enum MapSortOrder {
|
||||
Group = 0,
|
||||
Area = 1,
|
||||
Layout = 2,
|
||||
};
|
||||
|
||||
class Config
|
||||
{
|
||||
public:
|
||||
static void save();
|
||||
static void load();
|
||||
static void setRecentProject(QString project);
|
||||
static void setRecentMap(QString map);
|
||||
static void setMapSortOrder(MapSortOrder order);
|
||||
static void setPrettyCursors(bool enabled);
|
||||
static QString getRecentProject();
|
||||
static QString getRecentMap();
|
||||
static MapSortOrder getMapSortOrder();
|
||||
static bool getPrettyCursors();
|
||||
private:
|
||||
static void parseConfigKeyValue(QString key, QString value);
|
||||
static QString recentProject;
|
||||
static QString recentMap;
|
||||
static MapSortOrder mapSortOrder;
|
||||
static bool prettyCursors;
|
||||
};
|
||||
|
||||
#endif // CONFIG_H
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QAbstractItemModel>
|
||||
#include "project.h"
|
||||
#include "config.h"
|
||||
#include "map.h"
|
||||
#include "editor.h"
|
||||
#include "tileseteditor.h"
|
||||
@@ -164,11 +165,7 @@ private:
|
||||
|
||||
bool isProgrammaticEventTabChange;
|
||||
|
||||
enum MapSortOrder {
|
||||
Group = 0,
|
||||
Name = 1,
|
||||
Layout = 2,
|
||||
} mapSortOrder;
|
||||
MapSortOrder mapSortOrder;
|
||||
|
||||
bool setMap(QString, bool scrollTreeView = false);
|
||||
void redrawMapScene();
|
||||
|
||||
Reference in New Issue
Block a user