QgsMapTip Class Reference
[QGIS gui library.]

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>

List of all members.

Public Member Functions

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

Private Member Functions

QString fetchFeature (QgsMapLayer *thepLayer, QgsPoint &theMapPosition, QgsMapCanvas *thepMapCanvas)

Private Attributes

bool mMapTipVisible
QPoint mLastPosition


Detailed Description

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

Definition at line 28 of file qgsmaptip.h.


Constructor & Destructor Documentation

QgsMapTip::QgsMapTip (  ) 

Default constructor.

Definition at line 28 of file qgsmaptip.cpp.

References mMapTipVisible.

QgsMapTip::~QgsMapTip (  )  [virtual]

Destructor.

Definition at line 34 of file qgsmaptip.cpp.


Member Function Documentation

void QgsMapTip::showMapTip ( QgsMapLayer thepLayer,
QgsPoint theMapPosition,
QPoint &  thePixelPosition,
QgsMapCanvas mpMapCanvas 
)

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

Parameters:
thepLayer a qgis vector map layer pointer that will be used to provide the attribute data for the map tip.
theMapPosition a reference to the position of the cursor in map coordinatess.
thePixelPosition a reference to the position of the cursor in pixel coordinates.
mpMapCanvas a map canvas on which the tip is drawn

Definition at line 39 of file qgsmaptip.cpp.

References fetchFeature(), mLastPosition, and mMapTipVisible.

void QgsMapTip::clear ( QgsMapCanvas mpMapCanvas  ) 

Clear the current maptip if it exists.

Parameters:
mpMapCanvas the canvas from which the tip should be cleared.

Definition at line 68 of file qgsmaptip.cpp.

References mLastPosition, and mMapTipVisible.

QString QgsMapTip::fetchFeature ( QgsMapLayer thepLayer,
QgsPoint theMapPosition,
QgsMapCanvas thepMapCanvas 
) [private]


Member Data Documentation

bool QgsMapTip::mMapTipVisible [private]

Definition at line 61 of file qgsmaptip.h.

Referenced by clear(), QgsMapTip(), and showMapTip().

QPoint QgsMapTip::mLastPosition [private]

Definition at line 64 of file qgsmaptip.h.

Referenced by clear(), and showMapTip().


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

Generated on Sat Feb 4 19:17:39 2012 for Quantum GIS API Documentation by  doxygen 1.5.6