Dokumentace souboru map_scene.cpp

#include "map_scene.h"
#include <QApplication>
#include <QBrush>
#include <QPen>
#include <QGraphicsItem>
#include <QGraphicsRectItem>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsSceneDragDropEvent>
#include <QPoint>
#include <QRectF>
#include <QAction>
#include <QWizard>
#include <constants.h>
#include "map_object_palette.h"
#include "map_view.h"
#include "main_window.h"
#include "bombic/map.h"
#include "bombic/map_background.h"
#include "bombic/map_object.h"
#include "generators/map_object_generator.h"
#include "generators/generated_boxes_wizard.h"
#include "generators/generated_creatures_wizard.h"
#include "generators/generated_bonuses_wizard.h"

Definice maker

#define GENERATING_TOOLS(tools, generatedObjects, wizardClassName, menuAction)
#define CONNECT_MAP(addedSignal, addSlot, removedSignal, removeSlot)
#define MAP_SCENE_FOREACH_MAP_FIELD(field)
 Smycka pres vsechny policka mapy ve scene.

Dokumentace k definicím maker

#define CONNECT_MAP ( addedSignal,
addSlot,
removedSignal,
removeSlot   ) 

Hodnota:

do { \
      connect(map_, \
        SIGNAL(addedSignal(BombicMapObject *)), \
        this, SLOT(addSlot(BombicMapObject *)) ); \
      connect(map_, \
        SIGNAL(removedSignal(BombicMapObject *)), \
        this, SLOT(removeSlot(BombicMapObject *)) ); \
    } while(0)

#define GENERATING_TOOLS ( tools,
generatedObjects,
wizardClassName,
menuAction   ) 

Hodnota:

do { \
      tools.toGenerate = \
        map->generatedObjects(); \
      tools.generatedObjectsWizard = \
        new wizardClassName(map, MAIN_WINDOW); \
      connect( \
        MAIN_WINDOW->action(MainWindow::menuAction), \
        SIGNAL(triggered()), \
        tools.generatedObjectsWizard, \
        SLOT(show()) ); \
    } while(0)

#define MAP_SCENE_FOREACH_MAP_FIELD ( field   ) 

Hodnota:

for(BombicMap::Field field = map_->fieldsRect().topLeft() ; \
      field.x() <= map_->fieldsRect().right() ; \
      ++field.rx()) \
    for(field.ry() = map_->fieldsRect().top() ; \
        field.y() <= map_->fieldsRect().bottom() ; \
        ++field.ry())
Smycka pres vsechny policka mapy ve scene.

Iteruje pres vsechny policka mapy map_ promennou cyklu field Zacina v hornim levem rohu, pokracuje pres vsechny sloupce a v kazdem sloupci postupuje dolu. Promenna cyklu field by nemela byt definovana, protoze je definovana a inicializovana zde.

Parametry:
field jmeno promenne cyklu


Generováno Mon May 24 21:58:33 2010 pro projekt Bombic 2 map editor programem  doxygen 1.5.6