#include <arenascene.h>
Public Member Functions | |
ArenaScene (Arena *arena) | |
ArenaSceneElement * | sceneElementFor (ArenaElement *element) |
QList< ArenaSceneElement * > | selectedElements () |
Static Public Member Functions | |
static QPointF | gridToScene (QPointF gridPos) |
static QPointF | nearestGridPoint (QPointF scenePos) |
static QPoint | sceneToGrid (QPointF scenePos) |
static QPointF | sceneToGridF (QPointF scenePos) |
Private Slots | |
void | slotElementAdded (ArenaElement *element) |
void | slotElementRemoved (ArenaElement *element) |
void | updateViewMargin () |
Private Member Functions | |
void | createGround () |
Private Attributes | |
Arena *const | m_arena |
QMap< ArenaElement *, ArenaSceneElement * > | m_elements |
Definition at line 17 of file arenascene.h.
ArenaScene::ArenaScene | ( | Arena * | arena | ) | [explicit] |
Definition at line 17 of file arenascene.cpp.
void ArenaScene::createGround | ( | ) | [private] |
QPointF ArenaScene::gridToScene | ( | QPointF | gridPos | ) | [static] |
Definition at line 50 of file arenascene.cpp.
QPointF ArenaScene::nearestGridPoint | ( | QPointF | scenePos | ) | [static] |
Definition at line 56 of file arenascene.cpp.
ArenaSceneElement * ArenaScene::sceneElementFor | ( | ArenaElement * | element | ) |
Definition at line 74 of file arenascene.cpp.
QPoint ArenaScene::sceneToGrid | ( | QPointF | scenePos | ) | [static] |
Definition at line 33 of file arenascene.cpp.
QPointF ArenaScene::sceneToGridF | ( | QPointF | scenePos | ) | [static] |
Definition at line 39 of file arenascene.cpp.
QList< ArenaSceneElement * > ArenaScene::selectedElements | ( | ) |
Definition at line 61 of file arenascene.cpp.
void ArenaScene::slotElementAdded | ( | ArenaElement * | element | ) | [private, slot] |
Definition at line 99 of file arenascene.cpp.
void ArenaScene::slotElementRemoved | ( | ArenaElement * | element | ) | [private, slot] |
Definition at line 109 of file arenascene.cpp.
void ArenaScene::updateViewMargin | ( | ) | [private, slot] |
Definition at line 79 of file arenascene.cpp.
Arena* const ArenaScene::m_arena [private] |
Definition at line 42 of file arenascene.h.
QMap<ArenaElement*, ArenaSceneElement*> ArenaScene::m_elements [private] |
Definition at line 43 of file arenascene.h.