QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsmapcanvasmap.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmapcanvasmap.h - draws the map in map canvas
3  ----------------------
4  begin : February 2006
5  copyright : (C) 2006 by Martin Dobias
6  email : wonder.sk at gmail 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 
16 #ifndef QGSMAPCANVASMAP_H
17 #define QGSMAPCANVASMAP_H
18 
19 #include <QGraphicsRectItem>
20 #include <QPixmap>
21 #include <QTimer>
22 
23 #include <qgis.h>
24 #include <qgsmaptopixel.h>
25 
26 #include <qgsmapcanvasitem.h>
27 
28 class QgsMapSettings;
29 class QgsMapCanvas;
30 
34 class GUI_EXPORT QgsMapCanvasMap : public QgsMapCanvasItem // public QObject, public QGraphicsRectItem
35 {
36  public:
37 
39  QgsMapCanvasMap( QgsMapCanvas* canvas );
40 
41  ~QgsMapCanvasMap();
42 
44  void setContent( const QImage& image, const QgsRectangle& rect );
45 
47  QImage contentImage() const { return mImage; }
48 
49  virtual void paint( QPainter * painter );
50 
52  Q_DECL_DEPRECATED void refresh() {}
53 
55  Q_DECL_DEPRECATED void resize( QSize size ) { Q_UNUSED( size ); }
56 
58  Q_DECL_DEPRECATED void enableAntiAliasing( bool flag ) { Q_UNUSED( flag ); }
59 
61  Q_DECL_DEPRECATED void render() {}
62 
64  Q_DECL_DEPRECATED void setBackgroundColor( const QColor& color ) { Q_UNUSED( color ); }
65 
67  Q_DECL_DEPRECATED void setPanningOffset( const QPoint& point ) { Q_UNUSED( point ); }
68 
70  Q_DECL_DEPRECATED QPaintDevice& paintDevice();
71 
73  Q_DECL_DEPRECATED void updateContents() {}
74 
75  private:
76 
77  QImage mImage;
78 };
79 
80 #endif
Q_DECL_DEPRECATED void render()
A rectangle specified with double values.
Definition: qgsrectangle.h:35
Q_DECL_DEPRECATED void setBackgroundColor(const QColor &color)
An abstract class for items that can be placed on the map canvas.
Q_DECL_DEPRECATED void updateContents()
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:104
The QgsMapSettings class contains configuration for rendering of the map.
A rectangular graphics item representing the map on the canvas.
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
QImage contentImage() const
Q_DECL_DEPRECATED void setPanningOffset(const QPoint &point)
Q_DECL_DEPRECATED void resize(QSize size)
Q_DECL_DEPRECATED void enableAntiAliasing(bool flag)
double size
Definition: qgssvgcache.cpp:77
Q_DECL_DEPRECATED void refresh()