![]() |
Walls And Holes
1
|
The AbstractTool class represents a UI tool. A UI tool can be activated or deactivated. More...
#include <abstracttool.h>
Public Member Functions | |
virtual | ~AbstractTool () |
virtual void | activate () |
Activates the tool. This is called before the tool is used. More... | |
virtual void | deactivate () |
Deactivates the tool. This is called before the tool stops being used. More... | |
virtual QList< QAction * > | contextActions () |
Returns a vector of qactions which can be used to modify the behaviour of the tool. Will be used by the tool manager to add the actions to a context tool bar. More... | |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | wheelEvent (QWheelEvent *) |
The AbstractTool class represents a UI tool. A UI tool can be activated or deactivated.
The purpose of the AbstractTool class is to separate a tool's implementation from the implementation of the context in which it is used (e.g. separate the code of the brush tool from the grid rendering widget).
It is assumed that tools are used with a mouse. A tool can expect to receive mouse press, release, and move events from whatever widget it is assigned to.
A constructor of a subclass of AbstractTool should receive whatever data it needs to function. A Brush tool should have some way of accessing the TileMap and some way of determining the visual parameters of the grid.
|
inlinevirtual |
|
inlinevirtual |
Activates the tool. This is called before the tool is used.
Reimplemented in AbstractMeshViewCamera.
|
inlinevirtual |
Returns a vector of qactions which can be used to modify the behaviour of the tool. Will be used by the tool manager to add the actions to a context tool bar.
Reimplemented in TileMapBrushTool.
|
inlinevirtual |
Deactivates the tool. This is called before the tool stops being used.
Reimplemented in AbstractMeshViewCamera, FillTool, AbstractShapeBrushTool, and AbstractTileSelectionTool.
|
inlinevirtual |
Reimplemented in AbstractMeshViewCamera, MapViewMatcherCamera, and MeshViewCameraLikeBlender.
|
inlinevirtual |
Reimplemented in AbstractMeshViewCamera, MapViewMatcherCamera, and MeshViewCameraLikeBlender.
|
inlinevirtual |
Reimplemented in AbstractMeshViewCamera, and MapViewMatcherCamera.
|
inlinevirtual |
Reimplemented in AbstractMeshViewCamera, MapViewMatcherCamera, and MeshViewCameraLikeBlender.