]> Shamusworld >> Repos - warehouse-man-deluxe/blobdiff - src/editorwidget.h
Converted from Qt4 to Qt5.
[warehouse-man-deluxe] / src / editorwidget.h
index 0b29acb0ae7f78f1769a25f74fd4ab6d03fce028..6bd9c7bf9550c4c60317b5110d5ea25404e6002e 100644 (file)
@@ -1,28 +1,9 @@
 #ifndef __EDITORWIDGET_H__
 #define __EDITORWIDGET_H__
 
-#include <QtGui>
+#include <QtWidgets>
 #include <stdint.h>
-#include <vector>
-
-#define BOARDSIZE 128
-
-struct Point
-{
-       Point(int xx = 0, int yy = 0) { x = xx; y = yy; }
-       int x, y;
-};
-
-struct Level
-{
-       uint8_t board[BOARDSIZE][BOARDSIZE];
-       char name[41];
-       Point corner;           // Corner dimensions on screen
-       Point cursor;           // Cursor location
-// This stuff will go into the save file, but we don't need it here...
-//     Point size;                     // Actual dimensions of the level
-//     Point boardCorner;      // Where on the gird the UL corner of the level is
-};
+#include "boards.h"
 
 class EditorWidget: public QWidget
 {
@@ -53,13 +34,15 @@ class EditorWidget: public QWidget
                bool Load(void);
                bool Save(void);
                void SetNameOnCurrentLevel(const char *);
+               void AddNewLevelAtCurrentPosition(void);
+               static void GetSizeAndCorner(Level *, Point &, Point &);
        private:
-               void GetSizeAndCorner(Level *, Point &, Point &);
+               void CountBoxesAndSpots(int &, int &);
+               void ShiftLevel(int, int);
                void ResizeGrid(void);
                void Pause(int);
 
        public:
-               std::vector<Level> levelStorage;
                uint32_t currentLevel;
 
        private: