Walls And Holes  1
TileMapSelectionTool Class Reference

#include <tilemapselectiontool.h>

Inheritance diagram for TileMapSelectionTool:
Collaboration diagram for TileMapSelectionTool:

Public Member Functions

 TileMapSelectionTool (PropertyBrowser *propertyBrowser, TileMapPreviewGraphicsItem *previewItem, QUndoStack *undoStack)
 
void cellClicked (int x, int y, QMouseEvent *) override
 Called the first time the left mouse button is pressed over a cell. More...
 
void cellActivated (int x, int y, QMouseEvent *) override
 Called when the left mouse button is down over a new cell. More...
 
void cellReleased (int, int, QMouseEvent *event) override
 Called when the left mouse button is released over a cell. More...
 
- Public Member Functions inherited from AbstractTileSelectionTool
 AbstractTileSelectionTool (PropertyBrowser *propertyBrowser, TileMapPreviewGraphicsItem *previewItem)
 
void deactivate () override
 Deactivates the tool. This is called before the tool stops being used. More...
 
- Public Member Functions inherited from AbstractTileMapTool
 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 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 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 *)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractTileSelectionTool
static const QRegion & selection ()
 
- Protected Member Functions inherited from AbstractTileSelectionTool
void activateSelection ()
 activateSelection More...
 
void drawPreview (QRegion previewRegion)
 
- Protected Member Functions inherited from AbstractTileMapTool
TileMapgetTileMap () const
 
TileTemplategetTileTemplate () const
 
- Protected Attributes inherited from AbstractTileSelectionTool
PropertyBrowsermPropertyBrowser
 
- Protected Attributes inherited from AbstractTileMapTool
TileMapPreviewGraphicsItem *const mPreviewItem
 
- Static Protected Attributes inherited from AbstractTileSelectionTool
static QRegion mSelection
 

Constructor & Destructor Documentation

◆ TileMapSelectionTool()

TileMapSelectionTool::TileMapSelectionTool ( PropertyBrowser propertyBrowser,
TileMapPreviewGraphicsItem previewItem,
QUndoStack *  undoStack 
)

Member Function Documentation

◆ cellActivated()

void TileMapSelectionTool::cellActivated ( int  ,
int  ,
QMouseEvent *   
)
overridevirtual

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 from AbstractTileMapTool.

◆ cellClicked()

void TileMapSelectionTool::cellClicked ( int  ,
int  ,
QMouseEvent *   
)
overridevirtual

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 from AbstractTileMapTool.

Here is the call graph for this function:

◆ cellReleased()

void TileMapSelectionTool::cellReleased ( int  ,
int  ,
QMouseEvent *   
)
overridevirtual

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

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

Reimplemented from AbstractTileMapTool.

Here is the call graph for this function:

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