32 mMapTipVisible =
false;
54 QString myTipText = fetchFeature( thepLayer, theMapPosition, thepMapCanvas );
55 mMapTipVisible = !myTipText.
isEmpty();
61 mLastPosition = thePixelPosition;
67 if ( !mMapTipVisible )
73 mMapTipVisible =
false;
A rectangle specified with double values.
Base class for all map layer types.
void setXMaximum(double x)
Set the maximum x value.
Use exact geometry intersection (slower) instead of bounding boxes.
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest())
Query the provider for features specified in request.
const QgsMapSettings & mapSettings() const
Get access to properties used for map rendering.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsPoint mapToLayerCoordinates(QgsMapLayer *theLayer, QgsPoint point) const
transform point coordinates from output CRS to layer's CRS
void showText(const QPoint &pos, const QString &text, QWidget *w)
virtual ~QgsMapTip()
Destructor.
Map canvas is a class for displaying all GIS data types on a canvas.
void setYMinimum(double y)
Set the minimum y value.
void showMapTip(QgsMapLayer *thepLayer, QgsPoint &theMapPosition, QPoint &thePixelPosition, QgsMapCanvas *mpMapCanvas)
Show a maptip at a given point on the map canvas.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
const QString displayField() const
Returns the primary display field name used in the identify results dialog.
A class to represent a point.
void clear(QgsMapCanvas *mpMapCanvas)
Clear the current maptip if it exists.
QVariant attribute(const QString &name) const
Lookup attribute value from attribute name.
void setYMaximum(double y)
Set the maximum y value.
QgsMapTip()
Default constructor.
bool nextFeature(QgsFeature &f)
Represents a vector layer which manages a vector based data sets.
int fieldNameIndex(const QString &fieldName) const
Returns the index of a field name or -1 if the field does not exist.
void setXMinimum(double x)
Set the minimum x value.
static QString replaceExpressionText(const QString &action, const QgsFeature *feat, QgsVectorLayer *layer, const QMap< QString, QVariant > *substitutionMap=0, const QgsDistanceArea *distanceArea=0)
This function currently replaces each expression between [% and %] in the string with the result of i...