]> Shamusworld >> Repos - warehouse-man-deluxe/blobdiff - src/editorwidget.h
Converted from Qt4 to Qt5.
[warehouse-man-deluxe] / src / editorwidget.h
index eb89e0dd8519e50b6f8ed99bb077c559f7a95662..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
 {
@@ -54,14 +35,14 @@ class EditorWidget: public QWidget
                bool Save(void);
                void SetNameOnCurrentLevel(const char *);
                void AddNewLevelAtCurrentPosition(void);
+               static void GetSizeAndCorner(Level *, Point &, Point &);
        private:
+               void CountBoxesAndSpots(int &, int &);
                void ShiftLevel(int, int);
-               void GetSizeAndCorner(Level *, Point &, Point &);
                void ResizeGrid(void);
                void Pause(int);
 
        public:
-               std::vector<Level> levelStorage;
                uint32_t currentLevel;
 
        private: