Public Member Functions | Private Member Functions | Private Attributes | List of all members
ArenaController Class Reference

#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...
 
Arenam_arena
 
bool m_autoRotateWalls
 
bool m_lastDragFinished
 True iff. endDrag() has been called after last startDrag() More...
 
QMap< ArenaSceneElement *, QPointF > m_origPositions
 
ArenaScenem_scene
 
bool m_snapToGrid
 
QPointF m_totalMouseOffset
 

Detailed Description

Definition at line 14 of file arenacontroller.h.

Constructor & Destructor Documentation

ArenaController::ArenaController ( Arena arena,
ArenaScene scene 
)

Definition at line 14 of file arenacontroller.cpp.

Member Function Documentation

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.

void ArenaController::dragTo ( ArenaSceneElement sceneElement,
const QPointF &  to 
)
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.

void ArenaController::setAutoRotateWalls ( bool  autoRotate)
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.

void ArenaController::setSnapToGrid ( bool  snap)
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.

Member Data Documentation

QList<ArenaSceneElement*> ArenaController::m_activeElements
private

SceneElement currently being manipulated through this controller.

Definition at line 45 of file arenacontroller.h.

Arena* ArenaController::m_arena
private

Definition at line 42 of file arenacontroller.h.

bool ArenaController::m_autoRotateWalls
private

Definition at line 49 of file arenacontroller.h.

bool ArenaController::m_lastDragFinished
private

True iff. endDrag() has been called after last startDrag()

Definition at line 53 of file arenacontroller.h.

QMap<ArenaSceneElement*, QPointF> ArenaController::m_origPositions
private

Definition at line 46 of file arenacontroller.h.

ArenaScene* ArenaController::m_scene
private

Definition at line 43 of file arenacontroller.h.

bool ArenaController::m_snapToGrid
private

Definition at line 50 of file arenacontroller.h.

QPointF ArenaController::m_totalMouseOffset
private

Definition at line 47 of file arenacontroller.h.


The documentation for this class was generated from the following files:


hector_nist_arena_designer
Author(s): Stefan Kohlbrecher , Johannes Simon
autogenerated on Fri Aug 21 2020 10:45:27