QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSEXTENTWIDGET_H
17 #define QGSEXTENTWIDGET_H
24 #include "ui_qgsextentgroupboxwidget.h"
31 #include <QRegularExpression>
50 class GUI_EXPORT
QgsExtentWidget :
public QWidget,
private Ui::QgsExtentGroupBoxWidget
157 QSize
ratio()
const {
return mRatio; }
162 QString extentLayerName()
const;
167 bool isValid()
const;
176 void setNullValueAllowed(
bool allowed,
const QString ¬SetText = QString() );
183 void setOutputExtentFromOriginal();
188 void setOutputExtentFromCurrent();
198 void setOutputExtentFromLayer(
const QgsMapLayer *layer );
203 void setOutputExtentFromDrawOnCanvas();
237 void dragEnterEvent( QDragEnterEvent *event )
override;
238 void dragLeaveEvent( QDragLeaveEvent *event )
override;
239 void dropEvent( QDropEvent *event )
override;
243 void layerMenuAboutToShow();
249 void setOutputExtentFromLineEdit();
250 void setOutputExtentFromCondensedLineEdit();
262 QMenu *mMenu =
nullptr;
263 QMenu *mLayerMenu =
nullptr;
265 QList< QAction * > mLayerMenuActions;
266 QAction *mUseCanvasExtentAction =
nullptr;
267 QAction *mUseCurrentExtentAction =
nullptr;
268 QAction *mDrawOnCanvasAction =
nullptr;
270 QPointer< const QgsMapLayer > mExtentLayer;
271 QString mExtentLayerName;
273 std::unique_ptr< QgsMapToolExtent > mMapToolExtent;
274 QPointer< QgsMapTool > mMapToolPrevious =
nullptr;
278 bool mIsValid =
false;
279 bool mHasFixedOutputCrs =
false;
281 QRegularExpression mCondensedRe;
282 void setValid(
bool valid );
284 void setExtentToLayerExtent(
const QString &layerId );
286 QgsMapLayer *mapLayerFromMimeData(
const QMimeData *data )
const;
291 #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.
This class represents a coordinate reference system (CRS).
Base class for all map layer types.
The QgsMapLayerModel class is a model to display layers in widgets.