Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsmapoverviewcanvas.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmapoverviewcanvas.h
3  Map canvas subclassed for overview
4  -------------------
5  begin : 09/14/2005
6  copyright : (C) 2005 by Martin Dobias
7  email : won.der at centrum.sk
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 /* $Id$ */
19 
20 #ifndef QGSMAPOVERVIEWCANVAS_H
21 #define QGSMAPOVERVIEWCANVAS_H
22 
23 
24 #include <QMouseEvent>
25 #include <QWheelEvent>
26 #include <QWidget>
27 #include <QStringList>
28 #include <QPixmap>
29 
30 class QgsMapCanvas;
31 class QgsMapRenderer;
32 class QgsPanningWidget; // defined in .cpp
33 class QgsRectangle;
34 
38 class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
39 {
40  Q_OBJECT
41 
42  public:
43  QgsMapOverviewCanvas( QWidget * parent = 0, QgsMapCanvas* mapCanvas = NULL );
44 
46 
48  void drawExtentRect();
49 
51  void refresh();
52 
54  void setBackgroundColor( const QColor& color );
55 
57  void setLayerSet( const QStringList& layerSet );
58 
59  QStringList& layerSet();
60 
61  void enableAntiAliasing( bool flag ) { mAntiAliasing = flag; }
62 
63  void updateFullExtent( const QgsRectangle& rect );
64 
65  public slots:
66 
67  void hasCrsTransformEnabled( bool flag );
68 
69  void destinationSrsChanged();
70 
71  protected:
72 
74  void paintEvent( QPaintEvent * pe );
75 
77  void resizeEvent( QResizeEvent * e );
78 
80  void mouseMoveEvent( QMouseEvent * e );
81 
83  void mousePressEvent( QMouseEvent * e );
84 
86  void mouseReleaseEvent( QMouseEvent * e );
87 
89  void updatePanningWidget( const QPoint& pos );
90 
93 
96 
99 
102 
104  QPixmap mPixmap;
105 
107  QColor mBgColor;
108 
111 
113  QSize mNewSize;
114 };
115 
116 #endif