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
154 void setMapCanvas(
QgsMapCanvas *canvas,
bool drawOnCanvasOption =
true );
160 QSize
ratio()
const {
return mRatio; }
165 QString extentLayerName()
const;
170 bool isValid()
const;
179 void setNullValueAllowed(
bool allowed,
const QString ¬SetText = QString() );
186 void setOutputExtentFromOriginal();
191 void setOutputExtentFromCurrent();
201 void setOutputExtentFromLayer(
const QgsMapLayer *layer );
206 void setOutputExtentFromDrawOnCanvas();
239 void dragEnterEvent( QDragEnterEvent *event )
override;
240 void dragLeaveEvent( QDragLeaveEvent *event )
override;
241 void dropEvent( QDropEvent *event )
override;
242 void showEvent( QShowEvent *event )
override;
246 void layerMenuAboutToShow();
247 void layoutMenuAboutToShow();
248 void bookmarkMenuAboutToShow();
251 void mapToolDeactivated();
255 void setOutputExtentFromLineEdit();
256 void setOutputExtentFromCondensedLineEdit();
268 QMenu *mMenu =
nullptr;
270 QMenu *mLayerMenu =
nullptr;
271 QMenu *mLayoutMenu =
nullptr;
272 QMenu *mBookmarkMenu =
nullptr;
277 QList<QAction *> mLayerMenuActions;
278 QAction *mUseCanvasExtentAction =
nullptr;
279 QAction *mUseCurrentExtentAction =
nullptr;
280 QAction *mDrawOnCanvasAction =
nullptr;
282 QPointer<const QgsMapLayer> mExtentLayer;
283 QString mExtentLayerName;
285 std::unique_ptr<QgsMapToolExtent> mMapToolExtent;
286 QPointer<QgsMapTool> mMapToolPrevious =
nullptr;
290 bool mIsValid =
false;
291 bool mHasFixedOutputCrs =
false;
293 QRegularExpression mCondensedRe;
295 bool mFirstShow =
true;
296 bool mBlockDrawOnCanvas =
false;
298 void setValid(
bool valid );
300 void setExtentToLayerExtent(
const QString &layerId );
302 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
304 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