The MapView class Handles display of TileMap.
More...
#include <mapview.h>
|
| void | cellActivated (int x, int y, QMouseEvent *event) |
| | Emitted when the left mouse button is down over a new cell. More...
|
| |
| void | cellClicked (int x, int y, QMouseEvent *event) |
| | Emitted the first time the left mouse button is pressed over a cell. More...
|
| |
| void | cellReleased (int x, int y, QMouseEvent *event) |
| | Emitted when the left mouse button is released over a cell. More...
|
| |
| void | cellHovered (int x, int y, QMouseEvent *event) |
| | Emitted when the mouse hovers over a new cell. More...
|
| |
| void | mouseExitedMap (QMouseEvent *event) |
| | Emitted when the mouse exits the map. More...
|
| |
| void | mapViewChanged (QRectF rect) |
| | mapViewChanged More...
|
| |
The MapView class Handles display of TileMap.
◆ MapView()
| MapView::MapView |
( |
QWidget * |
parent | ) |
|
◆ ~MapView()
◆ cellActivated
| void MapView::cellActivated |
( |
int |
x, |
|
|
int |
y, |
|
|
QMouseEvent * |
event |
|
) |
| |
|
signal |
Emitted when the left mouse button is down over a new cell.
This signal is sent out when the mouse button is pressed down or when the mouse moves over a new cell while pressed down.
x and y are NOT required to be contained within the map!
- Parameters
-
| x | The cell's x position. |
| y | The cell's y position. |
◆ cellClicked
| void MapView::cellClicked |
( |
int |
x, |
|
|
int |
y, |
|
|
QMouseEvent * |
event |
|
) |
| |
|
signal |
Emitted the first time the left mouse button is pressed over a cell.
Unlike cellActivated(), this signal is sent out when the mouse button is first pressed and not sent out for other cells if the mouse is dragged afterward.
x and y are NOT required to be contained within the map!
- Parameters
-
| x | The cell's x position. |
| y | The cell's y position. |
◆ cellHovered
| void MapView::cellHovered |
( |
int |
x, |
|
|
int |
y, |
|
|
QMouseEvent * |
event |
|
) |
| |
|
signal |
Emitted when the mouse hovers over a new cell.
x and y ARE required to be contained within the map!
- Parameters
-
| x | The cell's x position. |
| y | The cell's y position. |
◆ cellReleased
| void MapView::cellReleased |
( |
int |
x, |
|
|
int |
y, |
|
|
QMouseEvent * |
event |
|
) |
| |
|
signal |
Emitted when the left mouse button is released over a cell.
x and y are NOT required to be contained within the map!
- Parameters
-
| x | The cell's x position. |
| y | The cell's y position. |
◆ clear()
◆ mapViewChanged
| void MapView::mapViewChanged |
( |
QRectF |
rect | ) |
|
|
signal |
mapViewChanged
emitted whenever the map changes position relative the the frame of this widget.
- Parameters
-
| rect | The corners of this rect are the tile cords under the corners of the widget Wont necessarily be in the bounds of the map. |
◆ mouseExitedMap
| void MapView::mouseExitedMap |
( |
QMouseEvent * |
event | ) |
|
|
signal |
Emitted when the mouse exits the map.
◆ mouseMoveEvent()
| void MapView::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ mousePressEvent()
| void MapView::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ mouseReleaseEvent()
| void MapView::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ previewItem()
◆ resizeEvent()
| void MapView::resizeEvent |
( |
QResizeEvent * |
| ) |
|
|
overrideprotected |
◆ setMap()
| void MapView::setMap |
( |
TileMap * |
tileMap | ) |
|
◆ setViewMode()
| void MapView::setViewMode |
( |
int |
viewMode | ) |
|
◆ tilesInFrame()
| QRectF MapView::tilesInFrame |
( |
| ) |
const |
tilesInFrame
The corners of the returned rect are the tile cords under the corners of the frame of this widget.
- Returns
◆ wheelEvent()
| void MapView::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
overrideprotected |
The documentation for this class was generated from the following files: