Quantum GIS API Documentation
1.7.5-Wroclaw
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
gui
qgsmaptip.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmaptip.h - Query a layer and show a maptip on the canvas
3
---------------------
4
begin : October 2007
5
copyright : (C) 2007 by Gary Sherman
6
email : sherman @ mrcc dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
#ifndef _QGSMAPTIP_H_
16
#define _QGSMAPTIP_H_
17
18
class
QgsMapLayer
;
19
class
QgsMapCanvas
;
20
class
QPoint;
21
class
QString;
22
23
28
class
GUI_EXPORT
QgsMapTip
29
{
30
public
:
33
QgsMapTip
();
36
virtual
~
QgsMapTip
();
46
void
showMapTip(
QgsMapLayer
* thepLayer,
47
QgsPoint
& theMapPosition,
48
QPoint & thePixelPosition,
49
QgsMapCanvas
*mpMapCanvas );
53
void
clear(
QgsMapCanvas
*mpMapCanvas );
54
private
:
55
// Fetch the feature to use for the maptip text. Only the first feature in the
56
// search radius is used
57
QString fetchFeature(
QgsMapLayer
* thepLayer,
58
QgsPoint
& theMapPosition,
59
QgsMapCanvas
*thepMapCanvas );
60
// Flag to indicate if a maptip is currently being displayed
61
bool
mMapTipVisible
;
62
// Last point on the map canvas when the maptip timer fired. This point is in widget pixel
63
// coordinates
64
QPoint
mLastPosition
;
65
66
};
67
#endif // _QGSMAPTIP_H_
Generated on Thu Sep 19 2013 17:30:56 for Quantum GIS API Documentation by
1.8.4