The TileTemplateSetsManager class Handles the active tileTemplateSets of the application. Can create dialogs to interact with the user. May modify the attached TileMap when removing templateSets.
More...
#include <tiletemplatesetsmanager.h>
|
| TileTemplateSetsManager (QUndoStack *undoStack, TileMap *tileMap=nullptr, QObject *parent=nullptr) |
|
void | newTileTemplateSet () |
| newTileTemplateSet Opens dialogs to create a new tileTemplateSet More...
|
|
void | addTileTemplateSet (SavableTileTemplateSet *tileTemplateSet) |
| addTileTemplateSet Adds the given tileTemplateSet to the application More...
|
|
bool | removeTileTemplateSet (SavableTileTemplateSet *tileTemplateSet) |
| removeTileTemplateSet Attempts to remove the given templateSet from the application. If any of the templates of the set are in use, the user will be presented with a dialog, if they confirm the removal, then any tiles using templates from the set will be erased. If the set is not saved, the user will be prompted to save the set before it is removed. More...
|
|
bool | removeTileTemplateSet (int index) |
| removeTileTemplateSet Attempt to remove a templateSet at the given index. More...
|
|
bool | removeTileTemplate (int templateSetIndex, int templateIndex) |
| removeTileTemplate Attempts to remove the template specified at this index. If mTileMap uses that template, the user will be prompted that removal will alter the map. True is returned if the template is removed (the user doesn't cancel). More...
|
|
void | addTileTemplate (int templateSetIndex, TileTemplate *newTemplate) |
| addTileTemplate Adds a new tile template to the given template set. More...
|
|
void | saveAllTileTemplateSets () |
| saveAllTileTemplateSets Saves all unsaved tileTemplateSets More...
|
|
SavableTileTemplateSet * | loadTileTemplateSet (bool tryToRelocateOnFail=false) |
| loadTileTemplateSet Opens dialogs to locate the templateSet to load, then loads it More...
|
|
SavableTileTemplateSet * | loadTileTemplateSet (QString path, bool tryToRelocateOnFail=false) |
| loadTileTemplateSet Loads a tileTemplateSet at the given path. If the file can't be loaded for any reason, the user will be given dialogs to relocate the file. More...
|
|
SavableTileTemplateSet * | tileTemplateSetAt (int i) |
|
const QList< SavableTileTemplateSet * > & | tileTemplateSets () |
|
void | setTileMap (TileMap *tileMap) |
|
The TileTemplateSetsManager class Handles the active tileTemplateSets of the application. Can create dialogs to interact with the user. May modify the attached TileMap when removing templateSets.
◆ TileTemplateSetsManager()
TileTemplateSetsManager::TileTemplateSetsManager |
( |
QUndoStack * |
undoStack, |
|
|
TileMap * |
tileMap = nullptr , |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ addTileTemplate()
void TileTemplateSetsManager::addTileTemplate |
( |
int |
templateSetIndex, |
|
|
TileTemplate * |
newTemplate |
|
) |
| |
addTileTemplate Adds a new tile template to the given template set.
- Parameters
-
templateSetIndex | The index of the template set that should be modified. |
newTemplate | The TileTemplate that should be added. |
◆ addTileTemplateSet()
addTileTemplateSet Adds the given tileTemplateSet to the application
- Parameters
-
◆ loadTileTemplateSet() [1/2]
loadTileTemplateSet Opens dialogs to locate the templateSet to load, then loads it
- Returns
◆ loadTileTemplateSet() [2/2]
SavableTileTemplateSet * TileTemplateSetsManager::loadTileTemplateSet |
( |
QString |
path, |
|
|
bool |
tryToRelocateOnFail = false |
|
) |
| |
loadTileTemplateSet Loads a tileTemplateSet at the given path. If the file can't be loaded for any reason, the user will be given dialogs to relocate the file.
- Parameters
-
◆ newTileTemplateSet()
void TileTemplateSetsManager::newTileTemplateSet |
( |
| ) |
|
newTileTemplateSet Opens dialogs to create a new tileTemplateSet
◆ removeTileTemplate()
bool TileTemplateSetsManager::removeTileTemplate |
( |
int |
templateSetIndex, |
|
|
int |
templateIndex |
|
) |
| |
removeTileTemplate Attempts to remove the template specified at this index. If mTileMap uses that template, the user will be prompted that removal will alter the map. True is returned if the template is removed (the user doesn't cancel).
- Parameters
-
templateSetIndex | |
templateIndex | |
- Returns
◆ removeTileTemplateSet() [1/2]
removeTileTemplateSet Attempts to remove the given templateSet from the application. If any of the templates of the set are in use, the user will be presented with a dialog, if they confirm the removal, then any tiles using templates from the set will be erased. If the set is not saved, the user will be prompted to save the set before it is removed.
- Parameters
-
- Returns
◆ removeTileTemplateSet() [2/2]
bool TileTemplateSetsManager::removeTileTemplateSet |
( |
int |
index | ) |
|
removeTileTemplateSet Attempt to remove a templateSet at the given index.
- Parameters
-
- Returns
◆ saveAllTileTemplateSets()
void TileTemplateSetsManager::saveAllTileTemplateSets |
( |
| ) |
|
saveAllTileTemplateSets Saves all unsaved tileTemplateSets
◆ setTileMap()
void TileTemplateSetsManager::setTileMap |
( |
TileMap * |
tileMap | ) |
|
|
inline |
◆ tileTemplateSetAboutToBeRemoved
tileTemplateSetAboutToBeRemoved emitted right before the given tileTemplateSet is removed and deleted.
- Parameters
-
◆ tileTemplateSetAdded
tileTemplateSetAdded Emitted whenever a new TileTemplateSet is added to the manager: Either by loading, new dialog, or somewhere in code.
- Parameters
-
◆ tileTemplateSetAt()
◆ tileTemplateSets()
The documentation for this class was generated from the following files: