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();
 
  227     void validationChanged( 
bool valid );
 
  233     void toggleDialogVisibility( 
bool visible );
 
  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();
 
  252     ExtentState mExtentState = OriginalExtent;
 
  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