1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-07 15:10:43 +02:00
vcmi/mapeditor/mainwindow.h

54 lines
829 B
C
Raw Normal View History

2022-08-29 01:28:36 +04:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QGraphicsScene>
2022-08-30 02:44:02 +04:00
#include "maphandler.h"
class CMap;
2022-08-29 01:28:36 +04:00
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
2022-08-31 01:24:12 +04:00
void setMapRaw(std::unique_ptr<CMap> cmap);
void setMap();
void reloadMap(int level = 0);
void saveMap();
2022-08-30 17:08:33 +04:00
2022-08-29 01:28:36 +04:00
private slots:
void on_actionOpen_triggered();
2022-08-30 17:08:33 +04:00
void on_actionSave_as_triggered();
void on_actionNew_triggered();
2022-08-31 01:24:12 +04:00
void on_actionLevel_triggered();
void on_actionSave_triggered();
2022-08-29 01:28:36 +04:00
private:
Ui::MainWindow *ui;
QGraphicsScene * scene;
2022-08-30 17:08:33 +04:00
QGraphicsScene * sceneMini;
QPixmap minimap;
2022-08-30 02:44:02 +04:00
std::unique_ptr<CMap> map;
2022-08-30 17:08:33 +04:00
QString filename;
bool unsaved = false;
2022-08-31 01:24:12 +04:00
int mapLevel = 0;
2022-08-29 01:28:36 +04:00
};
#endif // MAINWINDOW_H