#include <arenacontroller.h>
Public Member Functions | |
ArenaController (Arena *arena, ArenaScene *scene) | |
void | cancelInsertion () |
void | dragBy (const QPointF &by) |
void | dragTo (const QPointF &to) |
void | draw (QPainter *painter, const QRectF &rect) |
void | endOperation () |
bool | operationInProgress () const |
void | setAutoRotateWalls (bool autoRotate) |
void | setSnapToGrid (bool snap) |
void | startDrag (ArenaSceneElement *sceneElement) |
void | startDrag (QList< ArenaSceneElement * > sceneElements) |
void | startInsertion (const QString &elementType, const QPointF &pos) |
Private Member Functions | |
void | dragTo (ArenaSceneElement *sceneElement, const QPointF &to) |
Private Attributes | |
QList< ArenaSceneElement * > | m_activeElements |
SceneElement currently being manipulated through this controller. More... | |
Arena * | m_arena |
bool | m_autoRotateWalls |
bool | m_lastDragFinished |
True iff. endDrag() has been called after last startDrag() More... | |
QMap< ArenaSceneElement *, QPointF > | m_origPositions |
ArenaScene * | m_scene |
bool | m_snapToGrid |
QPointF | m_totalMouseOffset |
Definition at line 14 of file arenacontroller.h.
ArenaController::ArenaController | ( | Arena * | arena, |
ArenaScene * | scene | ||
) |
Definition at line 14 of file arenacontroller.cpp.
void ArenaController::cancelInsertion | ( | ) |
Definition at line 122 of file arenacontroller.cpp.
void ArenaController::dragBy | ( | const QPointF & | by | ) |
Definition at line 146 of file arenacontroller.cpp.
void ArenaController::dragTo | ( | const QPointF & | to | ) |
Definition at line 160 of file arenacontroller.cpp.
|
private |
Definition at line 168 of file arenacontroller.cpp.
void ArenaController::draw | ( | QPainter * | painter, |
const QRectF & | rect | ||
) |
Definition at line 188 of file arenacontroller.cpp.
void ArenaController::endOperation | ( | ) |
Definition at line 135 of file arenacontroller.cpp.
bool ArenaController::operationInProgress | ( | ) | const |
Definition at line 141 of file arenacontroller.cpp.
|
inline |
If set to true, walls are automatically rotated to best fit the current position of the mouse cursor
Definition at line 31 of file arenacontroller.h.
|
inline |
Definition at line 28 of file arenacontroller.h.
void ArenaController::startDrag | ( | ArenaSceneElement * | sceneElement | ) |
Definition at line 81 of file arenacontroller.cpp.
void ArenaController::startDrag | ( | QList< ArenaSceneElement * > | sceneElements | ) |
Definition at line 86 of file arenacontroller.cpp.
void ArenaController::startInsertion | ( | const QString & | elementType, |
const QPointF & | pos | ||
) |
Definition at line 103 of file arenacontroller.cpp.
|
private |
SceneElement currently being manipulated through this controller.
Definition at line 45 of file arenacontroller.h.
|
private |
Definition at line 42 of file arenacontroller.h.
|
private |
Definition at line 49 of file arenacontroller.h.
|
private |
True iff. endDrag() has been called after last startDrag()
Definition at line 53 of file arenacontroller.h.
|
private |
Definition at line 46 of file arenacontroller.h.
|
private |
Definition at line 43 of file arenacontroller.h.
|
private |
Definition at line 50 of file arenacontroller.h.
|
private |
Definition at line 47 of file arenacontroller.h.