16#ifndef QGSEXTENTWIDGET_H
17#define QGSEXTENTWIDGET_H
24#include "ui_qgsextentgroupboxwidget.h"
31#include <QRegularExpression>
51class GUI_EXPORT
QgsExtentWidget :
public QWidget,
private Ui::QgsExtentGroupBoxWidget
155 void setMapCanvas(
QgsMapCanvas *canvas,
bool drawOnCanvasOption =
true );
161 QSize
ratio()
const {
return mRatio; }
166 QString extentLayerName()
const;
171 bool isValid()
const;
180 void setNullValueAllowed(
bool allowed,
const QString ¬SetText = QString() );
187 void setOutputExtentFromOriginal();
192 void setOutputExtentFromCurrent();
202 void setOutputExtentFromLayer(
const QgsMapLayer *layer );
207 void setOutputExtentFromDrawOnCanvas();
241 void dragEnterEvent( QDragEnterEvent *event )
override;
242 void dragLeaveEvent( QDragLeaveEvent *event )
override;
243 void dropEvent( QDropEvent *event )
override;
244 void showEvent( QShowEvent *event )
override;
248 void layerMenuAboutToShow();
249 void layoutMenuAboutToShow();
250 void bookmarkMenuAboutToShow();
253 void mapToolDeactivated();
257 void setOutputExtentFromLineEdit();
258 void setOutputExtentFromCondensedLineEdit();
270 QMenu *mMenu =
nullptr;
272 QMenu *mLayerMenu =
nullptr;
273 QMenu *mLayoutMenu =
nullptr;
274 QMenu *mBookmarkMenu =
nullptr;
279 QList< QAction * > mLayerMenuActions;
280 QAction *mUseCanvasExtentAction =
nullptr;
281 QAction *mUseCurrentExtentAction =
nullptr;
282 QAction *mDrawOnCanvasAction =
nullptr;
284 QPointer< const QgsMapLayer > mExtentLayer;
285 QString mExtentLayerName;
287 std::unique_ptr< QgsMapToolExtent > mMapToolExtent;
288 QPointer< QgsMapTool > mMapToolPrevious =
nullptr;
292 bool mIsValid =
false;
293 bool mHasFixedOutputCrs =
false;
295 QRegularExpression mCondensedRe;
297 bool mFirstShow =
true;
298 bool mBlockDrawOnCanvas =
false;
300 void setValid(
bool valid );
302 void setExtentToLayerExtent(
const QString &layerId );
304 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
306 friend class TestProcessingGui;
A QSortFilterProxyModel subclass for sorting the entries in a QgsBookmarkManagerModel.
This class represents a coordinate reference system (CRS).
Map canvas is a class for displaying all GIS data types on a canvas.
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widget...
Base class for all map layer types.
A rectangle specified with double values.
const QgsCoordinateReferenceSystem & outputCrs
const QgsCoordinateReferenceSystem & crs