QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
qgscoordinateboundspreviewmapwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 * qgscoordinateboundspreviewmapwidget.h *
3 * Copyright (C) 2019 by Nyall Dawson *
4 * nyall dot dawson at gmail dot com *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 ***************************************************************************/
11#ifndef QGSCOORDINATEBOUNDSPREVIEWWIDGET_H
12#define QGSCOORDINATEBOUNDSPREVIEWWIDGET_H
13
14#include "qgsmapcanvas.h"
15#include "qgis_sip.h"
16#include "qgis_gui.h"
17
18class QgsVertexMarker;
19class QgsMapToolPan;
20
29{
30 Q_OBJECT
31
32 public:
33
37 QgsCoordinateBoundsPreviewMapWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
38
40
47 void setCanvasRect( const QgsRectangle &rect );
48
53 QgsRectangle canvasRect() const;
54
59 void setPreviewRect( const QgsRectangle &rect );
60
61 private:
62
63 QgsRubberBand *mPreviewBand = nullptr;
64 QgsRubberBand *mCanvasPreviewBand = nullptr;
65 QgsVertexMarker *mCanvasCenterMarker = nullptr;
66 QgsMapToolPan *mPanTool = nullptr;
67
68 QList<QgsMapLayer *> mLayers;
69
70 QgsRectangle mCanvasRect;
71
72};
73
74#endif // QGSCOORDINATEBOUNDSPREVIEWWIDGET_H
A widget for showing the bounds of a rectangular region on an interactive map.
Map canvas is a class for displaying all GIS data types on a canvas.
A map tool for panning the map.
A rectangle specified with double values.
A class for drawing transient features (e.g.
A class for marking vertices of features using e.g.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53