Walls And Holes
1
filltool.h
Go to the documentation of this file.
1
#ifndef FILLTOOL_H
2
#define FILLTOOL_H
3
4
#include <QSet>
5
#include <QPoint>
6
#include <QUndoStack>
7
8
#include "
abstracttilemaptool.h
"
9
#include "
mapview.h
"
10
11
class
FillTool
:
public
AbstractTileMapTool
{
12
Q_OBJECT
13
14
public
:
15
FillTool
(
TileMapPreviewGraphicsItem
*previewItem, QUndoStack *undoStack);
16
22
void
cellClicked
(
int
x,
int
y, QMouseEvent *)
override
;
23
24
28
void
cellHovered
(
int
x,
int
y, QMouseEvent *)
override
;
29
30
void
toolTileMapChanged
(
TileMap
*prev)
override
;
31
32
33
void
mouseExitedMap
(QMouseEvent *)
override
;
34
void
deactivate
()
override
;
35
36
public
slots:
37
void
invalidateSelection
();
38
39
protected
:
42
void
updateSelection
(
int
x,
int
y);
43
45
QSet<QPoint>
mSelection
;
46
48
void
drawOverlay
(
int
endX,
int
endY);
49
51
void
clearOverlay
();
52
53
54
QUndoStack *
mUndoStack
;
55
};
56
57
#endif // FILLTOOL_H
abstracttilemaptool.h
FillTool::cellClicked
void cellClicked(int x, int y, QMouseEvent *) override
This will immediately fill an area.
Definition:
filltool.cpp:14
FillTool::clearOverlay
void clearOverlay()
Clears the overlay.
Definition:
filltool.cpp:85
FillTool
Definition:
filltool.h:11
FillTool::toolTileMapChanged
void toolTileMapChanged(TileMap *prev) override
Called whenever mTileMap changes. Called in constructor.
Definition:
filltool.cpp:44
AbstractTileMapTool
Definition:
abstracttilemaptool.h:9
FillTool::FillTool
FillTool(TileMapPreviewGraphicsItem *previewItem, QUndoStack *undoStack)
Definition:
filltool.cpp:10
FillTool::updateSelection
void updateSelection(int x, int y)
Definition:
filltool.cpp:65
FillTool::cellHovered
void cellHovered(int x, int y, QMouseEvent *) override
This will show a preview for the selected area.
Definition:
filltool.cpp:38
mapview.h
FillTool::mSelection
QSet< QPoint > mSelection
The set of points that will be filled in.
Definition:
filltool.h:45
FillTool::invalidateSelection
void invalidateSelection()
Definition:
filltool.cpp:59
FillTool::deactivate
void deactivate() override
Deactivates the tool. This is called before the tool stops being used.
Definition:
filltool.cpp:117
FillTool::drawOverlay
void drawOverlay(int endX, int endY)
Draws an overlay previewing the area that will be filled.
Definition:
filltool.cpp:91
FillTool::mUndoStack
QUndoStack * mUndoStack
Definition:
filltool.h:54
FillTool::mouseExitedMap
void mouseExitedMap(QMouseEvent *) override
Called when the mouse is no longer hovering over a cell.
Definition:
filltool.cpp:111
TileMapPreviewGraphicsItem
Definition:
tilemappreviewgraphicsitem.h:9
TileMap
Definition:
tilemap.h:14
WallsAndHoles
filltool.h
Generated by
1.8.14