diff options
| author | Xavier ASUS <xavi92psx@gmail.com> | 2018-11-23 12:46:39 +0100 |
|---|---|---|
| committer | Xavier ASUS <xavi92psx@gmail.com> | 2018-11-23 12:46:39 +0100 |
| commit | fa27014c9b78d13fe8720341ed73c249782c04d7 (patch) | |
| tree | c545c9681a9233c0620c9ff5220234478fd79fef /Source/MapEditor/mainwindow.h | |
| parent | e7e764e7aa6ab13e7c0bb7025da5031c8fef6e47 (diff) | |
| download | airport-fa27014c9b78d13fe8720341ed73c249782c04d7.tar.gz | |
Minor improvements and optimizations.
Diffstat (limited to 'Source/MapEditor/mainwindow.h')
| -rw-r--r-- | Source/MapEditor/mainwindow.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/MapEditor/mainwindow.h b/Source/MapEditor/mainwindow.h index 705404f..8cc4c8e 100644 --- a/Source/MapEditor/mainwindow.h +++ b/Source/MapEditor/mainwindow.h @@ -5,16 +5,18 @@ #include <QFileDialog>
#include <QSettings>
#include <QDebug>
+#include <QPixmap>
#include "mygraphicsscene.h"
#include "ui_mainwindow.h"
#define APP_NAME QString("Airport Map Editor")
-#define APP_VERSION_STRING QString("0.2")
+#define APP_VERSION_STRING QString("0.3")
+#define APP_FULL_NAME APP_NAME + " " + APP_VERSION_STRING
-#define TILE_SIZE 64
-#define DATA_HEADER_SIZE 0x3F
-#define TILE_MIRROR_FLAG ((char) 0x80)
+#define TILE_SIZE (64)
+#define DATA_HEADER_SIZE (0x3F)
+#define TILE_MIRROR_FLAG (0x80)
namespace Ui {
class MainWindow;
@@ -25,7 +27,7 @@ class MainWindow : public QMainWindow Q_OBJECT
public:
- explicit MainWindow(QWidget *parent = 0);
+ explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
void closeEvent(QCloseEvent*);
@@ -34,6 +36,7 @@ private: bool checkFile(QFile &f, QFile::OpenModeFlag flags = QFile::ReadOnly);
void appSettings(void);
void loadTilesetData(void);
+ void parseMapData(QDataStream &ds, const QPixmap &tileSet);
QString _last_dir;
MyGraphicsScene *gscene;
int level_size;
@@ -42,15 +45,16 @@ private: QHash<int, QString> tilesetData;
private slots:
- void onLoadMap(void);
+ void loadMap(void);
void onCreateMap(void);
- void onProcessMapFile(QByteArray);
+ void processMapFile(const QByteArray &);
void onMapItemClicked(QPointF);
void onNoItemSelected(void);
void onListItemSelected(void);
void onSaveMap(void);
void onShowNumbers(int);
void onAirportNameModified(QString);
+ void showError(const QString& error);
};
#endif // MAINWINDOW_H
|
