#include <QBitmap>#include <QFileDialog>#include <QSignalMapper>#include <QAction>#include <constants.h>#include "resource_handler.h"#include "bombic/map.h"#include "bombic/map_background.h"#include "bombic/map_object.h"#include "generators/map_object_generator.h"#include "resource_handlers/resource_handler_functions.h"#include "resource_handlers/map_resource_handler.h"#include "resource_handlers/wall_resource_handler.h"#include "bombic/wall.h"#include "map_object_palette.h"#include "main_window.h"Definice maker | |
| #define | RESOURCE_HANDLER_EDITOR_FILE "map-editor" |
| Nazev souboru, ve kterem jsou systemova data pro map editor. | |
| #define | CREATE_AND_ADD(situation, tagName) |
| #define | RH_FOREACH_SUB_ELEMENT(itEl, name, parentEl) |
| Cyklus pres vsechny podelementy zadaneho jmena. | |
Funkce | |
| SINGLETON_INIT (ResourceHandler) | |
| #define CREATE_AND_ADD | ( | situation, | |||
| tagName | ) |
Hodnota:
do { \ QDomElement wallEl; \ bool success = getSubElement( \ rootEl, wallEl, tagName); \ if(!success) { \ delete mapBg; \ return 0; \ } \ BombicWall * bombicWall = wallRH.createWall("", wallEl); \ if(!bombicWall) { \ delete mapBg; \ return 0; \ } \ mapBg->setWall(bombicWall, situation); \ } while(0)
| #define RESOURCE_HANDLER_EDITOR_FILE "map-editor" |
Nazev souboru, ve kterem jsou systemova data pro map editor.
| #define RH_FOREACH_SUB_ELEMENT | ( | itEl, | |||
| name, | |||||
| parentEl | ) |
Hodnota:
for(QDomElement itEl = parentEl.namedItem(name).toElement(); \
!itEl.isNull() ; \
itEl = itEl.nextSiblingElement(name) )
Vytvori cyklus zacinajici prvnim podelementem, ktery postupne projde vsechny sousedni (sibling) elementy stejneho jmena. Promenna cyklu itEl by nemela byt definovana, protoze je definovana a inicializovana zde.
| itEl | jmeno iteracni promenne cyklu | |
| name | nazev elementu | |
| parentEl | rodicovsky element |
| SINGLETON_INIT | ( | ResourceHandler | ) |
1.5.6