Remember window sizes, add new map popup window (#54)

* save window state on app close

* new map popup window

* window title, groupItem fix

* fix new map heal location generation

* fix newmappopup form size

* empty map name check, increase max dimensions

* tool tips

* delete new window

* fix mainwindow.ui new map action

* use new config for window state

* clean window restore config settings

* extend "Add New Map" to different MapSortOrders

* fix crash when creating new map from unloaded layout

* fix new map from layout extra files
This commit is contained in:
garak
2019-01-07 18:14:44 -05:00
committed by huderlem
parent aa0709243d
commit d13a4da50a
14 changed files with 736 additions and 31 deletions

40
include/ui/newmappopup.h Normal file
View File

@@ -0,0 +1,40 @@
#ifndef NEWMAPPOPUP_H
#define NEWMAPPOPUP_H
#include <QMainWindow>
#include <QString>
#include "editor.h"
#include "project.h"
#include "map.h"
namespace Ui {
class NewMapPopup;
}
class NewMapPopup : public QMainWindow
{
Q_OBJECT
public:
explicit NewMapPopup(QWidget *parent = nullptr, Project *project = nullptr);
~NewMapPopup();
Map *map;
int group;
bool changeLayout;
QString layoutName;
void init(int, int, QString, QString);
void useLayout(QString);
signals:
void applied();
private:
Ui::NewMapPopup *ui;
Project *project;
void setDefaultValues(int, QString);
private slots:
void on_pushButton_NewMap_Accept_clicked();
void on_lineEdit_NewMap_Name_textChanged(const QString &);
};
#endif // NEWMAPPOPUP_H