Walls And Holes  1
tilemapselectiontool.h
Go to the documentation of this file.
1 #ifndef TILEMAPSELECTIONTOOL_H
2 #define TILEMAPSELECTIONTOOL_H
3 
4 #define MULTI_CLICK_TIME 200
5 
7 #include "changevaluecommand.h"
8 
10 {
11 public:
12  TileMapSelectionTool(PropertyBrowser *propertyBrowser,
13  TileMapPreviewGraphicsItem *previewItem,
14  QUndoStack *undoStack);
15 
16  void cellClicked(int x, int y, QMouseEvent *) override;
17  void cellActivated(int x, int y, QMouseEvent *) override;
18  void cellReleased(int, int, QMouseEvent *event) override;
19 
20 private:
21  void updatePreview(QPoint end);
22 
23  QPoint mStartPoint;
24  QRegion mCurrentRect;
25  QRegion mOriginalSelection;
26 
27  int mClickCount;
28  ulong mLastClickTime;
29 
30  QUndoStack *mUndoStack;
31 
33 };
34 
35 #endif // TILEMAPSELECTIONTOOL_H
Definition: abstracttileselectiontool.h:9
Definition: changevaluecommand.h:9
TileMapSelectionTool(PropertyBrowser *propertyBrowser, TileMapPreviewGraphicsItem *previewItem, QUndoStack *undoStack)
Definition: tilemapselectiontool.cpp:9
The PropertyBrowser class.
Definition: propertybrowser.h:17
Definition: tilemapselectiontool.h:9
void cellReleased(int, int, QMouseEvent *event) override
Called when the left mouse button is released over a cell.
Definition: tilemapselectiontool.cpp:30
Definition: tilemappreviewgraphicsitem.h:9
void cellClicked(int x, int y, QMouseEvent *) override
Called the first time the left mouse button is pressed over a cell.
Definition: tilemapselectiontool.cpp:17
void cellActivated(int x, int y, QMouseEvent *) override
Called when the left mouse button is down over a new cell.
Definition: tilemapselectiontool.cpp:25