mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Remove executeExport* methods from QgsWindowManagerInterface
No longer required, and of limited value anyway
This commit is contained in:
parent
f455b9ed34
commit
a890622996
@ -45,40 +45,6 @@ existing instance to the foreground.
|
||||
|
||||
Returns the dialog if shown, or None if the dialog either could not be
|
||||
created or is not supported by the window manager implementation.
|
||||
%End
|
||||
|
||||
virtual QString executeExportVectorLayerDialog( QgsVectorLayer *layer );
|
||||
%Docstring
|
||||
Executes the standard "Export Vector Layer" dialog for the specified ``layer``,
|
||||
and performs an export using the settings accepted in the dialog.
|
||||
|
||||
The created vector file name is returned.
|
||||
|
||||
Depending on the window manager implementation the actual export of the
|
||||
layer may occur in a background task, in which case calling this method
|
||||
will immediately return after the dialog has been accepted, but before
|
||||
the exported layer has been finalized.
|
||||
|
||||
.. seealso:: :py:func:`executeExportRasterLayerDialog`
|
||||
|
||||
.. versionadded:: 3.6
|
||||
%End
|
||||
|
||||
virtual QString executeExportRasterLayerDialog( QgsRasterLayer *layer );
|
||||
%Docstring
|
||||
Executes the standard "Export Raster Layer" dialog for the specified ``layer``,
|
||||
and performs an export using the settings accepted in the dialog.
|
||||
|
||||
The created raster file name is returned.
|
||||
|
||||
Depending on the window manager implementation the actual export of the
|
||||
layer may occur in a background task, in which case calling this method
|
||||
will immediately return after the dialog has been accepted, but before
|
||||
the exported layer has been finalized.
|
||||
|
||||
.. seealso:: :py:func:`executeExportVectorLayerDialog`
|
||||
|
||||
.. versionadded:: 3.6
|
||||
%End
|
||||
|
||||
};
|
||||
|
@ -335,7 +335,7 @@ void QgsLayerItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu *men
|
||||
std::unique_ptr<QgsVectorLayer> layer( new QgsVectorLayer( layerItem->uri(), layerItem->name(), layerItem->providerKey() ) );
|
||||
if ( layer && layer->isValid() )
|
||||
{
|
||||
QgsGui::instance()->windowManager()->executeExportVectorLayerDialog( layer.get() );
|
||||
QgisApp::instance()->saveAsFile( layer.get(), false, false );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -345,7 +345,7 @@ void QgsLayerItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu *men
|
||||
std::unique_ptr<QgsRasterLayer> layer( new QgsRasterLayer( layerItem->uri(), layerItem->name(), layerItem->providerKey() ) );
|
||||
if ( layer && layer->isValid() )
|
||||
{
|
||||
QgsGui::instance()->windowManager()->executeExportRasterLayerDialog( layer.get() );
|
||||
QgisApp::instance()->saveAsFile( layer.get(), false, false );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -47,16 +47,6 @@ QWidget *QgsAppWindowManager::openStandardDialog( QgsWindowManagerInterface::Sta
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString QgsAppWindowManager::executeExportVectorLayerDialog( QgsVectorLayer *layer )
|
||||
{
|
||||
return QgisApp::instance()->saveAsFile( layer, false, false );
|
||||
}
|
||||
|
||||
QString QgsAppWindowManager::executeExportRasterLayerDialog( QgsRasterLayer *layer )
|
||||
{
|
||||
return QgisApp::instance()->saveAsFile( layer, false, false );
|
||||
}
|
||||
|
||||
QWidget *QgsAppWindowManager::openApplicationDialog( QgsAppWindowManager::ApplicationDialog dialog )
|
||||
{
|
||||
switch ( dialog )
|
||||
|
@ -41,8 +41,6 @@ class QgsAppWindowManager : public QgsWindowManagerInterface
|
||||
~QgsAppWindowManager();
|
||||
|
||||
QWidget *openStandardDialog( QgsWindowManagerInterface::StandardDialog dialog ) override;
|
||||
QString executeExportVectorLayerDialog( QgsVectorLayer *layer ) override;
|
||||
QString executeExportRasterLayerDialog( QgsRasterLayer *layer ) override;
|
||||
|
||||
/**
|
||||
* Opens an instance of a application QGIS dialog. Depending on the dialog,
|
||||
|
@ -56,48 +56,6 @@ class GUI_EXPORT QgsWindowManagerInterface
|
||||
*/
|
||||
virtual QWidget *openStandardDialog( StandardDialog dialog ) = 0;
|
||||
|
||||
/**
|
||||
* Executes the standard "Export Vector Layer" dialog for the specified \a layer,
|
||||
* and performs an export using the settings accepted in the dialog.
|
||||
*
|
||||
* The created vector file name is returned.
|
||||
*
|
||||
* Depending on the window manager implementation the actual export of the
|
||||
* layer may occur in a background task, in which case calling this method
|
||||
* will immediately return after the dialog has been accepted, but before
|
||||
* the exported layer has been finalized.
|
||||
*
|
||||
* \see executeExportRasterLayerDialog()
|
||||
*
|
||||
* \since QGIS 3.6
|
||||
*/
|
||||
virtual QString executeExportVectorLayerDialog( QgsVectorLayer *layer )
|
||||
{
|
||||
Q_UNUSED( layer );
|
||||
return QString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the standard "Export Raster Layer" dialog for the specified \a layer,
|
||||
* and performs an export using the settings accepted in the dialog.
|
||||
*
|
||||
* The created raster file name is returned.
|
||||
*
|
||||
* Depending on the window manager implementation the actual export of the
|
||||
* layer may occur in a background task, in which case calling this method
|
||||
* will immediately return after the dialog has been accepted, but before
|
||||
* the exported layer has been finalized.
|
||||
*
|
||||
* \see executeExportVectorLayerDialog()
|
||||
*
|
||||
* \since QGIS 3.6
|
||||
*/
|
||||
virtual QString executeExportRasterLayerDialog( QgsRasterLayer *layer )
|
||||
{
|
||||
Q_UNUSED( layer );
|
||||
return QString();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
///@endcond
|
||||
|
Loading…
x
Reference in New Issue
Block a user