1. Introduction
Map mouse events include mouse press MouseButtonPress (), bounce MouseButtonRelease (), moving MouseMove () events such operations can be dynamically map by these events, the status bar next to the map information specific example explains how to use these three events.
2. Functional Implementation Notes
2.1. The realization of ideas and Rationale
The first step: in the main event-capture header file
protected:
/**
* @Brief rewrite eventFilter event
* @Param [in] QObject * obj the object that triggered the event
* @Param [in] QEvent * ev event triggered
* @return
*/
bool eventFilter(QObject *obj, QEvent *ev) override;
Step Two: In the .cpp be achieved write code file
2.2 core interfaces and methods
Interface / class |
Methods / Properties |
Explanation |
SysDisplay::DisplayTransformationPtr |
ToMapPoint |
Screen coordinates to map coordinates |
SysGeometry::SpatialReferencePtr |
Name |
Gets or sets the spatial reference Name |
2.3. Sample Code
Project Path |
Under Baidu cloud disk address / PIE sample program / 02. Map operation / 06. Map Mouse Event Listener |
Data Path |
The disc address Baidu cloud / the PIE exemplary data / raster data /04.World/World.tif |
Video Path |
Under Baidu cloud disk address / PIE video tutorials / 02. Map operation / 06. Map Mouse Event Listener .avi |
Sample Code |
|
|
2.4. 示例截图