-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Identify: more selection modes (simple / polygon / freehand…
… / radius) This extends identify tool with the ability to switch to different selection modes (the ones offered also by the selection map tool)
- Loading branch information
Showing
28 changed files
with
1,153 additions
and
949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsmaptoolselectionhandler.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsMapToolSelectionHandler : QObject | ||
{ | ||
%Docstring | ||
Utility class for handling various methods to create geometry for selection in layers. | ||
|
||
.. versionadded:: 3.2 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsmaptoolselectionhandler.h" | ||
%End | ||
public: | ||
|
||
enum SelectionMode | ||
{ | ||
//! SelectSimple | ||
SelectSimple, | ||
//! SelectPolygon | ||
SelectPolygon, | ||
//! SelectFreehand | ||
SelectFreehand, | ||
//! SelectRadius | ||
SelectRadius | ||
}; | ||
|
||
QgsMapToolSelectionHandler( QgsMapCanvas *canvas, | ||
QgsMapToolSelectionHandler::SelectionMode selectionMode = QgsMapToolSelectionHandler::SelectionMode::SelectSimple ); | ||
%Docstring | ||
constructor | ||
%End | ||
|
||
~QgsMapToolSelectionHandler(); | ||
|
||
void setInterface( QgisInterface *iface ); | ||
%Docstring | ||
Configures QGIS interface - used to register selection radius widget | ||
%End | ||
|
||
QgsGeometry selectedGeometry(); | ||
%Docstring | ||
Returns most recently selected geometry (may be a point or a polygon) | ||
%End | ||
|
||
SelectionMode selectionMode(); | ||
%Docstring | ||
Sets the current selection mode | ||
%End | ||
void setSelectionMode( SelectionMode mode ); | ||
%Docstring | ||
Returns the current selection mode | ||
%End | ||
|
||
void deactivate(); | ||
%Docstring | ||
Deactivates handler (when map tool gets deactivated) | ||
%End | ||
|
||
void canvasMoveEvent( QgsMapMouseEvent *e ); | ||
%Docstring | ||
Handles mouse move event from map tool | ||
%End | ||
void canvasPressEvent( QgsMapMouseEvent *e ); | ||
%Docstring | ||
Handles mouse press event from map tool | ||
%End | ||
void canvasReleaseEvent( QgsMapMouseEvent *e ); | ||
%Docstring | ||
Handles mouse releasae event from map tool | ||
%End | ||
bool keyReleaseEvent( QKeyEvent *e ); | ||
%Docstring | ||
Handles escape press event - returns true if the even has been processed | ||
%End | ||
|
||
signals: | ||
void geometryChanged( Qt::KeyboardModifiers modifiers = Qt::NoModifier ); | ||
%Docstring | ||
emitted when a new geometry has been picked (selectedGeometry()) | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsmaptoolselectionhandler.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.