~ubuntu-branches/ubuntu/quantal/qtmobility/quantal

« back to all changes in this revision

Viewing changes to src/location/maps/tiled/qgeotiledmapdata_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-16 16:18:07 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20101116161807-k2dzt2nyse975r3l
Tags: 1.1.0-0ubuntu1
* New upstream release
* Syncronise with Debian, no remaining changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
**
9
9
** $QT_BEGIN_LICENSE:LGPL$
10
10
** Commercial Usage
11
 
** Licensees holding valid Qt Commercial licenses may use this file in
12
 
** accordance with the Qt Solutions Commercial License Agreement provided
13
 
** with the Software or, alternatively, in accordance with the terms
 
11
** Licensees holding valid Qt Commercial licenses may use this file in 
 
12
** accordance with the Qt Commercial License Agreement provided with
 
13
** the Software or, alternatively, in accordance with the terms
14
14
** contained in a written agreement between you and Nokia.
15
15
**
16
16
** GNU Lesser General Public License Usage
33
33
** ensure the GNU General Public License version 3.0 requirements will be
34
34
** met: http://www.gnu.org/copyleft/gpl.html.
35
35
**
36
 
** Please note Third Party Software included with Qt Solutions may impose
37
 
** additional restrictions and it is the user's responsibility to ensure
38
 
** that they have met the licensing requirements of the GPL, LGPL, or Qt
39
 
** Solutions Commercial license and the relevant license of the Third
40
 
** Party Software they are using.
41
 
**
42
36
** If you are unsure which license is appropriate for your use, please
43
37
** contact the sales department at qt-sales@nokia.com.
44
38
** $QT_END_LICENSE$
82
76
class QGeoTiledMapDataPrivate : public QGeoMapDataPrivate
83
77
{
84
78
public:
85
 
    QGeoTiledMapDataPrivate(QGeoTiledMapData *parent, QGeoMappingManagerEngine *engine, QGraphicsGeoMap *geoMap);
 
79
    QGeoTiledMapDataPrivate(QGeoTiledMapData *parent, QGeoMappingManagerEngine *engine);
86
80
    ~QGeoTiledMapDataPrivate();
87
81
 
88
82
    void updateMapImage();
89
83
    void clearRequests();
90
84
 
91
85
    void paintMap(QPainter *painter, const QStyleOptionGraphicsItem *option);
92
 
    void paintMapObjects(QPainter *painter, const QStyleOptionGraphicsItem *option);
 
86
    void paintObjects(QPainter *painter, const QStyleOptionGraphicsItem *option);
93
87
 
94
88
    void cleanupCaches();
95
89
 
96
90
    bool intersects(QGeoMapObject *mapObject, const QRectF &rect);
 
91
 
 
92
    QRect screenRectForZoomFactor(int zoomFactor);
97
93
    void updateScreenRect();
98
94
 
99
95
    bool containedInScreen(const QPoint &point) const;
102
98
 
103
99
    int zoomFactor;
104
100
 
105
 
    QPoint maxZoomCenter;
106
 
    QSize maxZoomSize;
107
 
    QRect maxZoomScreenRect;
 
101
    QPoint worldReferenceViewportCenter;
 
102
    QSize worldReferenceSize;
 
103
    QRect worldReferenceViewportRect;
108
104
 
109
 
    QRect maxZoomScreenRectClippedLeft;
110
 
    QRect maxZoomScreenRectClippedRight;
 
105
    QRect worldReferenceViewportRectLeft;
 
106
    QRect worldReferenceViewportRectRight;
111
107
 
112
108
    QSet<QRect> requestRects;
113
109
    QSet<QRect> replyRects;
115
111
    QList<QGeoTiledMapRequest> requests;
116
112
    QSet<QGeoTiledMapReply*> replies;
117
113
 
118
 
    QCache<QGeoTiledMapRequest, QPixmap> cache;
 
114
    QCache<QGeoTiledMapRequest, QImage> cache;
119
115
    QCache<QGeoTiledMapRequest, QPixmap> zoomCache;
120
116
 
121
117
    QGraphicsScene *scene;
131
127
{
132
128
public:
133
129
    QGeoTileIterator(const QGeoTiledMapDataPrivate *mapData);
134
 
    QGeoTileIterator(QGeoTiledMapData *mapData, const QRect &screenRect, const QSize &tileSize, int zoomLevel);
 
130
    QGeoTileIterator(QGraphicsGeoMap::ConnectivityMode connectivityMode,
 
131
                     QGraphicsGeoMap::MapType mapType,
 
132
                     const QRect &screenRect,
 
133
                     const QSize &tileSize,
 
134
                     int zoomLevel);
135
135
 
136
136
    bool hasNext();
137
137
    QGeoTiledMapRequest next();
138
138
 
139
139
private:
140
 
    QGeoTiledMapData *mapData;
141
140
    bool atEnd;
142
141
    int row;
143
142
    int col;
144
143
    int width;
145
144
    QRect screenRect;
146
145
    QSize tileSize;
 
146
    QGraphicsGeoMap::MapType mapType;
 
147
    QGraphicsGeoMap::ConnectivityMode connectivityMode;
147
148
    int zoomLevel;
148
149
    QPoint currTopLeft;
149
150
    QRect tileRect;