Walls And Holes  1
TileTemplateChangeCommand Class Reference

#include <tiletemplatechangecommand.h>

Inheritance diagram for TileTemplateChangeCommand:
Collaboration diagram for TileTemplateChangeCommand:

Public Member Functions

void undo () override
 
void redo () override
 
int id () const override
 
bool mergeWith (const QUndoCommand *other)
 

Static Public Member Functions

static TileTemplateChangeCommandmake (TileMap *tileMap, QRegion changedPoints, TileTemplate *newTileTemplate, const QString &text="Changed templates for tiles.", QUndoCommand *parent=nullptr, int id=-1, bool canMerge=false)
 make Creates the TileTemplateChangeCommand. This will automatically crop the given region so that it is within the bounds of the TileMap. More...
 
template<typename QPointIterable >
static TileTemplateChangeCommandmake (TileMap *tileMap, QPointIterable changedPoints, TileTemplate *newTileTemplate, const QString &text="Changed templates for tiles.", QUndoCommand *parent=nullptr)
 make Creates the TileTemplateChangeCommand. This will automatically crop the given region so that it is within the bounds of the TileMap. More...
 

Member Function Documentation

◆ id()

int TileTemplateChangeCommand::id ( ) const
inlineoverride
Here is the caller graph for this function:

◆ make() [1/2]

TileTemplateChangeCommand * TileTemplateChangeCommand::make ( TileMap tileMap,
QRegion  changedPoints,
TileTemplate newTileTemplate,
const QString &  text = "Changed templates for tiles.",
QUndoCommand *  parent = nullptr,
int  id = -1,
bool  canMerge = false 
)
static

make Creates the TileTemplateChangeCommand. This will automatically crop the given region so that it is within the bounds of the TileMap.

Parameters
tileMapThe tile map on which to change tiles.
changedPointsThe positions of the tiles that should be changed.
newTileTemplateThe new tile template for those tiles.
textShort description for the command.
parentThe parent command.
Returns
The command that was performed. Calling undo() will undo it.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make() [2/2]

template<typename QPointIterable >
static TileTemplateChangeCommand* TileTemplateChangeCommand::make ( TileMap tileMap,
QPointIterable  changedPoints,
TileTemplate newTileTemplate,
const QString &  text = "Changed templates for tiles.",
QUndoCommand *  parent = nullptr 
)
inlinestatic

make Creates the TileTemplateChangeCommand. This will automatically crop the given region so that it is within the bounds of the TileMap.

Parameters
tileMapThe tile map on which to change tiles.
changedPointsThe positions of the tiles that should be changed.
newTileTemplateThe new tile template for those tiles.
textShort description for the command.
parentThe parent command.
Returns
The command that was performed. Calling undo() will undo it.
Here is the call graph for this function:

◆ mergeWith()

bool TileTemplateChangeCommand::mergeWith ( const QUndoCommand *  other)
Here is the call graph for this function:

◆ redo()

void TileTemplateChangeCommand::redo ( )
override
Here is the call graph for this function:

◆ undo()

void TileTemplateChangeCommand::undo ( )
override
Here is the call graph for this function:

The documentation for this class was generated from the following files: