create dynamic map tab icon

This commit is contained in:
garak
2023-02-08 09:31:39 -05:00
parent f7f06dab29
commit 72eb8f873f
10 changed files with 99 additions and 142 deletions

View File

@@ -19,14 +19,12 @@ class Layout : public QObject {
public:
Layout() {}
void copyAttributesFrom(Layout *other);
static QString layoutConstantFromName(QString mapName);
bool loaded = false;
/// !TODO
/* NEW */
QList<Map *> maps;
QString id;
QString name;
@@ -126,6 +124,4 @@ signals:
void needsRedrawing();
};
using MapLayout = Layout;
#endif // MAPLAYOUT_H

View File

@@ -10,6 +10,7 @@
#include <QCheckBox>
#include <QCursor>
#include <QUndoGroup>
#include <QPointer>
#include "mapconnection.h"
#include "metatileselector.h"
@@ -45,8 +46,8 @@ public:
QObject *parent = nullptr;
Project *project = nullptr;
Map *map = nullptr;
Layout *layout = nullptr; /* NEW */
QPointer<Map> map = nullptr; // !TODO: since removed onMapCacheCleared, make sure this works as intended
QPointer<Layout> layout = nullptr; /* NEW */
QUndoGroup editGroup; // Manages the undo history for each map

View File

@@ -187,7 +187,6 @@ private slots:
void onWildMonDataChanged();
void openNewMapPopupWindow();
void onNewMapCreated();
void onMapCacheCleared();
void importMapFromAdvanceMap1_92();
void onMapRulerStatusChanged(const QString &);
void applyUserShortcuts();

View File

@@ -58,7 +58,7 @@ public:
QString layoutsLabel;
QMap<QString, QString> layoutIdsToNames;
QMap<QString, Layout*> mapLayouts;
QMap<QString, Layout*> mapLayoutsMaster;
// QMap<QString, Layout*> mapLayoutsMaster;
QMap<QString, QString> mapSecToMapHoverName;
QMap<QString, int> mapSectionNameToValue;
QMap<int, QString> mapSectionValueToName;
@@ -95,6 +95,7 @@ public:
void clearMapCache();
void clearTilesetCache();
void clearLayoutsTable();
struct DataQualifiers
{
@@ -265,7 +266,6 @@ private:
signals:
void reloadProject();
void uncheckMonitorFilesAction();
void mapCacheCleared();
void disableWildEncountersUI();
};