Walls And Holes  1
AbstractTileMapTool Class Reference

#include <abstracttilemaptool.h>

Inheritance diagram for AbstractTileMapTool:
Collaboration diagram for AbstractTileMapTool:

Public Member Functions

 AbstractTileMapTool (TileMapPreviewGraphicsItem *previewItem)
 
void setTileMap (TileMap *tileMap)
 
void setTileTemplate (TileTemplate *tileTemplate)
 
virtual void toolTileMapChanged (TileMap *previous=nullptr)
 Called whenever mTileMap changes. Called in constructor. More...
 
virtual void cellActivated (int, int, QMouseEvent *)
 Called when the left mouse button is down over a new cell. More...
 
virtual void cellClicked (int, int, QMouseEvent *)
 Called the first time the left mouse button is pressed over a cell. More...
 
virtual void cellReleased (int, int, QMouseEvent *)
 Called when the left mouse button is released over a cell. More...
 
virtual void cellHovered (int, int, QMouseEvent *)
 Called when the mouse hovers over a new cell. More...
 
virtual void mouseExitedMap (QMouseEvent *)
 Called when the mouse is no longer hovering over a cell. More...
 
- Public Member Functions inherited from AbstractTool
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 *)
 

Protected Member Functions

TileMapgetTileMap () const
 
TileTemplategetTileTemplate () const
 

Protected Attributes

TileMapPreviewGraphicsItem *const mPreviewItem
 

Constructor & Destructor Documentation

◆ AbstractTileMapTool()

AbstractTileMapTool::AbstractTileMapTool ( TileMapPreviewGraphicsItem previewItem)
inline
Here is the call graph for this function:

Member Function Documentation

◆ cellActivated()

virtual void AbstractTileMapTool::cellActivated ( int  ,
int  ,
QMouseEvent *   
)
inlinevirtual

Called when the left mouse button is down over a new cell.

This function is invoked when the mouse button is pressed down or when the mouse moves over a new cell while pressed down.

Parameters
xThe cell's x position.
yThe cell's y position.

Reimplemented in AbstractShapeBrushTool, TileMapSelectionTool, and TileMapBrushTool.

Here is the caller graph for this function:

◆ cellClicked()

virtual void AbstractTileMapTool::cellClicked ( int  ,
int  ,
QMouseEvent *   
)
inlinevirtual

Called the first time the left mouse button is pressed over a cell.

Unlike cellActivated(), this function is called when the mouse button is first pressed and not called for other cells if the mouse is dragged afterward.

Parameters
xThe cell's x position.
yThe cell's y position.

Reimplemented in FillTool, AbstractShapeBrushTool, and TileMapSelectionTool.

Here is the caller graph for this function:

◆ cellHovered()

virtual void AbstractTileMapTool::cellHovered ( int  ,
int  ,
QMouseEvent *   
)
inlinevirtual

Called when the mouse hovers over a new cell.

Parameters
xThe cell's x position.
yThe cell's y position.

Reimplemented in FillTool, and TileMapBrushTool.

Here is the caller graph for this function:

◆ cellReleased()

virtual void AbstractTileMapTool::cellReleased ( int  ,
int  ,
QMouseEvent *   
)
inlinevirtual

Called when the left mouse button is released over a cell.

Parameters
xThe cell's x position.
yThe cell's y position.

Reimplemented in AbstractShapeBrushTool, TileMapBrushTool, and TileMapSelectionTool.

Here is the caller graph for this function:

◆ getTileMap()

TileMap* AbstractTileMapTool::getTileMap ( ) const
inlineprotected
Here is the caller graph for this function:

◆ getTileTemplate()

TileTemplate* AbstractTileMapTool::getTileTemplate ( ) const
inlineprotected
Here is the caller graph for this function:

◆ mouseExitedMap()

virtual void AbstractTileMapTool::mouseExitedMap ( QMouseEvent *  )
inlinevirtual

Called when the mouse is no longer hovering over a cell.

Reimplemented in FillTool, and TileMapBrushTool.

Here is the caller graph for this function:

◆ setTileMap()

void AbstractTileMapTool::setTileMap ( TileMap tileMap)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTileTemplate()

void AbstractTileMapTool::setTileTemplate ( TileTemplate tileTemplate)
inline
Here is the caller graph for this function:

◆ toolTileMapChanged()

virtual void AbstractTileMapTool::toolTileMapChanged ( TileMap previous = nullptr)
inlinevirtual

Called whenever mTileMap changes. Called in constructor.

Parameters
previousThe OLD mTileMap. The new one can be retreived using getTileMap().

Reimplemented in FillTool.

Here is the caller graph for this function:

Member Data Documentation

◆ mPreviewItem

TileMapPreviewGraphicsItem* const AbstractTileMapTool::mPreviewItem
protected

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