QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSEXTENTWIDGET_H
17 #define QGSEXTENTWIDGET_H
24 #include "ui_qgsextentgroupboxwidget.h"
31 #include <QRegularExpression>
51 class 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();
231 void validationChanged(
bool valid );
237 void toggleDialogVisibility(
bool visible );
241 void dragEnterEvent( QDragEnterEvent *event )
override;
242 void dragLeaveEvent( QDragLeaveEvent *event )
override;
243 void dropEvent( QDropEvent *event )
override;
247 void layerMenuAboutToShow();
248 void layoutMenuAboutToShow();
249 void bookmarkMenuAboutToShow();
252 void mapToolDeactivated();
256 void setOutputExtentFromLineEdit();
257 void setOutputExtentFromCondensedLineEdit();
259 ExtentState mExtentState = OriginalExtent;
269 QMenu *mMenu =
nullptr;
271 QMenu *mLayerMenu =
nullptr;
272 QMenu *mLayoutMenu =
nullptr;
273 QMenu *mBookmarkMenu =
nullptr;
278 QList< QAction * > mLayerMenuActions;
279 QAction *mUseCanvasExtentAction =
nullptr;
280 QAction *mUseCurrentExtentAction =
nullptr;
281 QAction *mDrawOnCanvasAction =
nullptr;
283 QPointer< const QgsMapLayer > mExtentLayer;
284 QString mExtentLayerName;
286 std::unique_ptr< QgsMapToolExtent > mMapToolExtent;
287 QPointer< QgsMapTool > mMapToolPrevious =
nullptr;
291 bool mIsValid =
false;
292 bool mHasFixedOutputCrs =
false;
294 QRegularExpression mCondensedRe;
295 void setValid(
bool valid );
297 void setExtentToLayerExtent(
const QString &layerId );
299 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
301 friend class TestProcessingGui;
306 #endif // QGSEXTENTWIDGET_H
const QgsCoordinateReferenceSystem & outputCrs
const QgsCoordinateReferenceSystem & crs
Map canvas is a class for displaying all GIS data types on a canvas.
A rectangle specified with double values.
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widget...
This class represents a coordinate reference system (CRS).
Base class for all map layer types. This is the base class for all map layer types (vector,...
A QSortFilterProxyModel subclass for sorting the entries in a QgsBookmarkManagerModel.