2017-07-11 17:21:34 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-07-17 10:16:12 +02:00
|
|
|
* src/gui/qgsabstractdatasourcewidget.h *
|
2017-07-11 17:21:34 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-18 09:12:44 +02:00
|
|
|
|
2017-07-17 10:16:12 +02:00
|
|
|
class QgsAbstractDataSourceWidget : QDialog
|
2017-07-11 17:21:34 +02:00
|
|
|
{
|
|
|
|
%Docstring
|
2017-07-14 18:55:34 +02:00
|
|
|
Abstract base Data Source Widget to create connections and add layers
|
2017-07-17 16:59:33 +02:00
|
|
|
This class provides common functionality and the interface for all
|
2017-07-11 17:21:34 +02:00
|
|
|
source select dialogs used by data providers to configure data sources
|
|
|
|
and add layers.
|
2017-07-11 17:44:44 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-07-11 17:21:34 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
2017-07-17 10:16:12 +02:00
|
|
|
#include "qgsabstractdatasourcewidget.h"
|
2017-07-11 17:21:34 +02:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
~QgsAbstractDataSourceWidget();
|
2017-07-11 17:21:34 +02:00
|
|
|
%Docstring
|
2017-07-17 16:59:33 +02:00
|
|
|
Destructor
|
2017-07-11 17:21:34 +02:00
|
|
|
%End
|
|
|
|
|
2017-07-18 09:12:44 +02:00
|
|
|
void setMapCanvas( const QgsMapCanvas *mapCanvas );
|
2017-07-17 16:59:33 +02:00
|
|
|
%Docstring
|
2017-07-18 09:12:44 +02:00
|
|
|
Store a pointer to the map canvas to retrieve extent and CRS
|
|
|
|
Used to select an appropriate CRS and possibly to retrieve data only in the current extent
|
2017-07-17 16:59:33 +02:00
|
|
|
%End
|
|
|
|
|
2017-07-11 17:21:34 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
virtual void refresh();
|
2017-07-11 17:21:34 +02:00
|
|
|
%Docstring
|
2017-07-17 16:59:33 +02:00
|
|
|
Triggered when the provider's connections need to be refreshed
|
|
|
|
The default implementation does nothing
|
2017-07-11 17:21:34 +02:00
|
|
|
%End
|
|
|
|
|
2017-08-04 22:06:07 +02:00
|
|
|
virtual void addButtonClicked();
|
2017-08-04 17:43:23 +02:00
|
|
|
%Docstring
|
|
|
|
Triggered when the add button is clicked, the add layer signal is emitted
|
|
|
|
Concrete classes should implement the right behavior depending on the layer
|
|
|
|
being added.
|
|
|
|
%End
|
|
|
|
|
2017-08-04 22:06:07 +02:00
|
|
|
virtual void okButtonClicked();
|
2017-08-04 17:43:23 +02:00
|
|
|
%Docstring
|
2017-08-04 22:06:07 +02:00
|
|
|
Triggered when the dialog is accepted, call addButtonClicked() and
|
|
|
|
emit the accepted() signal
|
2017-08-04 17:43:23 +02:00
|
|
|
%End
|
|
|
|
|
2017-07-11 17:21:34 +02:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void connectionsChanged();
|
|
|
|
%Docstring
|
2017-07-17 16:59:33 +02:00
|
|
|
Emitted when the provider's connections have changed
|
|
|
|
This signal is normally forwarded the app and used to refresh browser items
|
|
|
|
%End
|
|
|
|
|
|
|
|
void addDatabaseLayers( const QStringList &paths, const QString &providerKey );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a DB layer has been selected for addition
|
|
|
|
%End
|
|
|
|
|
|
|
|
void addRasterLayer( const QString &rasterLayerPath, const QString &baseName, const QString &providerKey );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a raster layer has been selected for addition
|
|
|
|
%End
|
|
|
|
|
|
|
|
void addVectorLayer( const QString &uri, const QString &layerName );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a vector layer has been selected for addition
|
2017-07-18 12:15:57 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
void progress( int, int );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a progress dialog is shown by the provider dialog
|
|
|
|
%End
|
|
|
|
|
|
|
|
void progressMessage( QString message );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a progress dialog is shown by the provider dialog
|
2017-07-17 16:59:33 +02:00
|
|
|
%End
|
|
|
|
|
2017-08-04 17:43:23 +02:00
|
|
|
void enableButtons( bool enable );
|
|
|
|
%Docstring
|
|
|
|
Emitted when the ok/add buttons should be enabled/disabled
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
2017-07-17 16:59:33 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
QgsAbstractDataSourceWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );
|
|
|
|
%Docstring
|
|
|
|
Constructor
|
2017-07-11 17:21:34 +02:00
|
|
|
%End
|
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
QgsProviderRegistry::WidgetMode widgetMode() const;
|
2017-07-18 09:12:44 +02:00
|
|
|
%Docstring
|
|
|
|
Return the widget mode
|
|
|
|
:rtype: QgsProviderRegistry.WidgetMode
|
|
|
|
%End
|
|
|
|
|
2017-07-19 09:19:37 +02:00
|
|
|
const QgsMapCanvas *mapCanvas() const;
|
2017-07-18 09:12:44 +02:00
|
|
|
%Docstring
|
2017-08-04 17:43:23 +02:00
|
|
|
Return the map canvas (can be null)
|
2017-07-18 09:12:44 +02:00
|
|
|
:rtype: QgsMapCanvas
|
|
|
|
%End
|
|
|
|
|
2017-08-04 17:43:23 +02:00
|
|
|
void setupButtons( QDialogButtonBox *buttonBox );
|
|
|
|
%Docstring
|
|
|
|
Connect the ok and apply/add buttons to the slots
|
|
|
|
%End
|
|
|
|
|
2017-08-04 22:06:07 +02:00
|
|
|
QPushButton *addButton( ) const;
|
2017-08-04 17:43:23 +02:00
|
|
|
%Docstring
|
|
|
|
Return the add Button
|
|
|
|
:rtype: QPushButton
|
|
|
|
%End
|
|
|
|
|
2017-07-11 17:21:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-07-17 10:16:12 +02:00
|
|
|
* src/gui/qgsabstractdatasourcewidget.h *
|
2017-07-11 17:21:34 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|