QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
QgsMapTip Class Reference

A maptip is a class to display a tip on a map canvas when a mouse is hovered over a feature. More...

#include <qgsmaptip.h>

Public Member Functions

 QgsMapTip ()
 Default constructor. More...
 
virtual ~QgsMapTip ()
 Destructor. More...
 
void showMapTip (QgsMapLayer *thepLayer, QgsPoint &theMapPosition, QPoint &thePixelPosition, QgsMapCanvas *mpMapCanvas)
 Show a maptip at a given point on the map canvas. More...
 
void clear (QgsMapCanvas *mpMapCanvas)
 Clear the current maptip if it exists. More...
 

Detailed Description

A maptip is a class to display a tip on a map canvas when a mouse is hovered over a feature.

Constructor & Destructor Documentation

QgsMapTip::QgsMapTip ( )

Default constructor.

QgsMapTip::~QgsMapTip ( )
virtual

Destructor.

Member Function Documentation

void QgsMapTip::clear ( QgsMapCanvas mpMapCanvas)

Clear the current maptip if it exists.

Parameters
mpMapCanvasthe canvas from which the tip should be cleared.
void QgsMapTip::showMapTip ( QgsMapLayer thepLayer,
QgsPoint theMapPosition,
QPoint &  thePixelPosition,
QgsMapCanvas mpMapCanvas 
)

Show a maptip at a given point on the map canvas.

Parameters
thepLayera qgis vector map layer pointer that will be used to provide the attribute data for the map tip.
theMapPositiona reference to the position of the cursor in map coordinatess.
thePixelPositiona reference to the position of the cursor in pixel coordinates.
mpMapCanvasa map canvas on which the tip is drawn

The documentation for this class was generated from the following files: