Ejemplo n.º 1
0
void MapView::DrawMap()
{
     Width = (dm->mapset->Max_XLine - dm->mapset->Min_XLine) + 60;
     Height= (dm->mapset->Max_YLine - dm->mapset->Min_YLine) + 60;
     scene->setSceneRect(-Width/2.0,-Height/2.0,Width,Height);
     MapItem *item = new MapItem(dm);
     scene->addItem(item);
     item->setPos(0,0);
}
Ejemplo n.º 2
0
MapItem* MapView::createMapItem(const AIStateWorld& state) {
	MapItem* item = new MapItem(nullptr, state, _debugger);
	item->setPos((qreal)state.getPosition().x, (qreal)state.getPosition().z);
	if (_debugger.isSelected(state)) {
		item->setZValue(std::numeric_limits<qreal>::max());
	} else {
		item->setZValue((qreal)state.getPosition().y);
	}
	return item;
}