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
 
  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();
 
  240     void dragEnterEvent( QDragEnterEvent *event ) 
override;
 
  241     void dragLeaveEvent( QDragLeaveEvent *event ) 
override;
 
  242     void dropEvent( QDropEvent *event ) 
override;
 
  246     void layerMenuAboutToShow();
 
  249     void mapToolDeactivated();
 
  253     void setOutputExtentFromLineEdit();
 
  254     void setOutputExtentFromCondensedLineEdit();
 
  266     QMenu *mMenu = 
nullptr;
 
  267     QMenu *mLayerMenu = 
nullptr;
 
  269     QList< QAction * > mLayerMenuActions;
 
  270     QAction *mUseCanvasExtentAction = 
nullptr;
 
  271     QAction *mUseCurrentExtentAction = 
nullptr;
 
  272     QAction *mDrawOnCanvasAction = 
nullptr;
 
  274     QPointer< const QgsMapLayer > mExtentLayer;
 
  275     QString mExtentLayerName;
 
  277     std::unique_ptr< QgsMapToolExtent > mMapToolExtent;
 
  278     QPointer< QgsMapTool > mMapToolPrevious = 
nullptr;
 
  282     bool mIsValid = 
false;
 
  283     bool mHasFixedOutputCrs = 
false;
 
  285     QRegularExpression mCondensedRe;
 
  286     void setValid( 
bool valid );
 
  288     void setExtentToLayerExtent( 
const QString &layerId );
 
  290     QgsMapLayer *mapLayerFromMimeData( 
const QMimeData *data ) 
const;
 
This class represents a coordinate reference system (CRS).
Map canvas is a class for displaying all GIS data types on a canvas.
The QgsMapLayerModel class is a model to display layers in widgets.
Base class for all map layer types.
A rectangle specified with double values.
const QgsCoordinateReferenceSystem & outputCrs
const QgsCoordinateReferenceSystem & crs