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();
245 void dragEnterEvent( QDragEnterEvent *event )
override;
246 void dragLeaveEvent( QDragLeaveEvent *event )
override;
247 void dropEvent( QDropEvent *event )
override;
248 void showEvent( QShowEvent *event )
override;
252 void layerMenuAboutToShow();
253 void layoutMenuAboutToShow();
254 void bookmarkMenuAboutToShow();
257 void mapToolDeactivated();
261 void setOutputExtentFromLineEdit();
262 void setOutputExtentFromCondensedLineEdit();
274 QMenu *mMenu =
nullptr;
276 QMenu *mLayerMenu =
nullptr;
277 QMenu *mLayoutMenu =
nullptr;
278 QMenu *mBookmarkMenu =
nullptr;
283 QList<QAction *> mLayerMenuActions;
284 QAction *mUseCanvasExtentAction =
nullptr;
285 QAction *mUseCurrentExtentAction =
nullptr;
286 QAction *mDrawOnCanvasAction =
nullptr;
288 QPointer<const QgsMapLayer> mExtentLayer;
289 QString mExtentLayerName;
291 std::unique_ptr<QgsMapToolExtent> mMapToolExtent;
292 QPointer<QgsMapTool> mMapToolPrevious =
nullptr;
296 bool mIsValid =
false;
297 bool mHasFixedOutputCrs =
false;
299 QRegularExpression mCondensedRe;
301 bool mFirstShow =
true;
302 bool mBlockDrawOnCanvas =
false;
304 void setValid(
bool valid );
306 void setExtentToLayerExtent(
const QString &layerId );
308 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
310 friend class TestProcessingGui;
51class GUI_EXPORT
QgsExtentWidget :
public QWidget,
private Ui::QgsExtentGroupBoxWidget {
…};
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