/usr/include/qgis/qgsmapoverviewcanvas.h is in libqgis-dev 2.8.6+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | /***************************************************************************
qgsmapoverviewcanvas.h
Map canvas subclassed for overview
-------------------
begin : 09/14/2005
copyright : (C) 2005 by Martin Dobias
email : won.der at centrum.sk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSMAPOVERVIEWCANVAS_H
#define QGSMAPOVERVIEWCANVAS_H
#include <QMouseEvent>
#include <QWheelEvent>
#include <QWidget>
#include <QStringList>
#include <QPixmap>
class QgsMapCanvas;
class QgsPanningWidget; // defined in .cpp
class QgsRectangle;
class QgsMapRendererQImageJob;
#include "qgsmapsettings.h"
/** \ingroup gui
* A widget that displays an overview map.
*/
class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
{
Q_OBJECT
public:
QgsMapOverviewCanvas( QWidget * parent = 0, QgsMapCanvas* mapCanvas = NULL );
~QgsMapOverviewCanvas();
//! renders overview and updates panning widget
void refresh();
//! changes background color
void setBackgroundColor( const QColor& color );
//! updates layer set for overview
void setLayerSet( const QStringList& layerSet );
QStringList layerSet() const;
void enableAntiAliasing( bool flag ) { mSettings.setFlag( QgsMapSettings::Antialiasing, flag ); }
void updateFullExtent();
public slots:
// ### QGIS 3: make protected
//! used for overview canvas to reflect changed extent in main map canvas
void drawExtentRect();
// ### QGIS 3: rename so it does not look like getter, make protected
void hasCrsTransformEnabled( bool flag );
// ### QGIS 3: rename Srs to Crs, make protected
void destinationSrsChanged();
protected slots:
void mapRenderingFinished();
void layerRepaintRequested();
protected:
//! Overridden paint event
void paintEvent( QPaintEvent * pe ) override;
//! Overridden resize event
void resizeEvent( QResizeEvent * e ) override;
//! Overridden mouse move event
void mouseMoveEvent( QMouseEvent * e ) override;
//! Overridden mouse press event
void mousePressEvent( QMouseEvent * e ) override;
//! Overridden mouse release event
void mouseReleaseEvent( QMouseEvent * e ) override;
//! called when panning to reflect mouse movement
void updatePanningWidget( const QPoint& pos );
//! widget for panning map in overview
QgsPanningWidget* mPanningWidget;
//! position of cursor inside panning widget
QPoint mPanningCursorOffset;
//! main map canvas - used to get/set extent
QgsMapCanvas* mMapCanvas;
//! pixmap where the map is stored
QPixmap mPixmap;
//! map settings used for rendering of the overview map
QgsMapSettings mSettings;
//! for rendering overview
QgsMapRendererQImageJob* mJob;
};
#endif
|