mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-12 02:45:40 -05:00
redesign layout dimension change window
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <QUndoCommand>
|
||||
#include <QList>
|
||||
#include <QPointer>
|
||||
#include <QMargins>
|
||||
|
||||
class Map;
|
||||
class Layout;
|
||||
@@ -203,7 +204,12 @@ private:
|
||||
/// Implements a command to commit a map or border resize action.
|
||||
class ResizeLayout : public QUndoCommand {
|
||||
public:
|
||||
ResizeLayout(Layout *layout, QSize oldLayoutDimensions, QSize newLayoutDimensions,
|
||||
// ResizeLayout(Layout *layout, QSize oldLayoutDimensions, QSize newLayoutDimensions,
|
||||
// const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
|
||||
// QSize oldBorderDimensions, QSize newBorderDimensions,
|
||||
// const Blockdata &oldBorder, const Blockdata &newBorder,
|
||||
// QUndoCommand *parent = nullptr);
|
||||
ResizeLayout(Layout *layout, QSize oldLayoutDimensions, QMargins newLayoutMargins,
|
||||
const Blockdata &oldMetatiles, const Blockdata &newMetatiles,
|
||||
QSize oldBorderDimensions, QSize newBorderDimensions,
|
||||
const Blockdata &oldBorder, const Blockdata &newBorder,
|
||||
@@ -220,8 +226,7 @@ private:
|
||||
|
||||
int oldLayoutWidth;
|
||||
int oldLayoutHeight;
|
||||
int newLayoutWidth;
|
||||
int newLayoutHeight;
|
||||
QMargins newLayoutMargins;
|
||||
|
||||
int oldBorderWidth;
|
||||
int oldBorderHeight;
|
||||
|
||||
@@ -103,6 +103,7 @@ public:
|
||||
void setBlock(int x, int y, Block block, bool enableScriptCallback = false);
|
||||
void setBlockdata(Blockdata blockdata, bool enableScriptCallback = false);
|
||||
|
||||
void adjustDimensions(QMargins margins, bool setNewBlockdata = true, bool enableScriptCallback = false);
|
||||
void setDimensions(int newWidth, int newHeight, bool setNewBlockdata = true, bool enableScriptCallback = false);
|
||||
void setBorderDimensions(int newWidth, int newHeight, bool setNewBlockdata = true, bool enableScriptCallback = false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user