QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
QgsDataSourceManagerDialog Class Reference

The QgsDataSourceManagerDialog class embeds the browser panel and all the provider dialogs. More...

#include <qgsdatasourcemanagerdialog.h>

Inheritance diagram for QgsDataSourceManagerDialog:
Inheritance graph
[legend]

Public Slots

void rasterLayerAdded (QString const &uri, QString const &baseName, QString const &providerKey)
 A raster layer was added: for signal forwarding to QgisApp TODO: use this with an internal source select dialog instead of forwarding the whole raster selection to app. More...
 
void refresh ()
 Refresh the browser view. More...
 
void setCurrentPage (int index)
 Sync current page with the leftbar list. More...
 
void setPreviousPage ()
 Reset current page to previously selected page. More...
 
void vectorLayerAdded (const QString &vectorLayerPath, const QString &baseName, const QString &providerKey)
 A vector layer was added: for signal forwarding to QgisApp. More...
 
void vectorLayersAdded (const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType)
 One or more vector layer were added: for signal forwarding to QgisApp. More...
 
- Public Slots inherited from QgsOptionsDialogBase
void searchText (const QString &text)
 searchText searches for a text in all the pages of the stacked widget and highlight the results More...
 

Signals

void addDatabaseLayers (const QStringList &layerPathList, const QString &providerKey)
 Emitted when a DB layer was selected for addition: for signal forwarding to QgisApp. More...
 
void addRasterLayer (const QString &uri, const QString &baseName, const QString &providerKey)
 Emitted when a raster layer was selected for addition: for signal forwarding to QgisApp. More...
 
void addRasterLayer ()
 Emitted when the user wants to select a raster layer: for signal forwarding to QgisApp. More...
 
void addVectorLayer (const QString &vectorLayerPath, const QString &baseName, const QString &providerKey)
 Emitted when a vector layer was selected for addition: for signal forwarding to QgisApp. More...
 
void addVectorLayers (const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType)
 Emitted when a one or more layer were selected for addition: for signal forwarding to QgisApp. More...
 
void connectionsChanged ()
 Emitted when a connection has changed inside the provider dialogs This signal is normally forwarded to the application to notify other browsers that they need to refresh their connections list. More...
 
void handleDropUriList (const QgsMimeDataUtils::UriList &)
 Emitted when drop uri list needs to be handled from the browser. More...
 
void openFile (const QString &fileName, const QString &fileTypeHint=QString())
 Emitted when a file needs to be opened. More...
 
void providerDialogsRefreshRequested ()
 One or more provider connections have changed and the dialogs should be refreshed. More...
 
void replaceSelectedVectorLayer (const QString &oldId, const QString &uri, const QString &layerName, const QString &provider)
 Replace the selected layer by a vector layer defined by uri, layer name, data source uri. More...
 
void showProgress (int progress, int totalSteps)
 Emitted when the dialog is busy: for signal forwarding to QgisApp. More...
 
void showStatusMessage (const QString &message)
 Emitted when a status message needs to be shown: for signal forwarding to QgisApp. More...
 
void updateProjectHome ()
 Update project home directory. More...
 

Public Member Functions

 QgsDataSourceManagerDialog (QgsBrowserModel *browserModel, QWidget *parent=nullptr, QgsMapCanvas *canvas=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
 QgsDataSourceManagerDialog constructor. More...
 
 ~QgsDataSourceManagerDialog () override
 
void openPage (const QString &pageName)
 Open a given page in the dialog. More...
 
- Public Member Functions inherited from QgsOptionsDialogBase
 QgsOptionsDialogBase (const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=nullptr, QgsSettings *settings=nullptr)
 Constructor. More...
 
 ~QgsOptionsDialogBase () override
 
bool iconOnly ()
 Determine if the options list is in icon only mode. More...
 
void initOptionsBase (bool restoreUi=true, const QString &title=QString())
 Set up the base ui connections for vertical tabs. More...
 
void restoreOptionsBaseUi (const QString &title=QString())
 Restore the base ui. More...
 
void setSettings (QgsSettings *settings)
 

Protected Member Functions

void showEvent (QShowEvent *event) override
 
- Protected Member Functions inherited from QgsOptionsDialogBase
void paintEvent (QPaintEvent *e) override
 
void registerTextSearchWidgets ()
 register widgets in the dialog to search for text in it it is automatically called if a line edit has "mSearchLineEdit" as object name. More...
 
void showEvent (QShowEvent *e) override
 
virtual void updateWindowTitle ()
 

Additional Inherited Members

- Protected Slots inherited from QgsOptionsDialogBase
virtual void optionsStackedWidget_CurrentChanged (int index)
 Select relevant tab on current page change. More...
 
virtual void optionsStackedWidget_WidgetRemoved (int index)
 Remove tab and unregister widgets on page remove. More...
 
virtual void updateOptionsListVerticalTabs ()
 Update tabs on the splitter move. More...
 
void warnAboutMissingObjects ()
 
- Protected Attributes inherited from QgsOptionsDialogBase
bool mDelSettings
 
QString mDialogTitle
 
bool mIconOnly
 
bool mInit
 
QDialogButtonBox * mOptButtonBox = nullptr
 
QListWidget * mOptListWidget = nullptr
 
QString mOptsKey
 
QSplitter * mOptSplitter = nullptr
 
QStackedWidget * mOptStackedWidget = nullptr
 
QList< QPair< QgsOptionsDialogHighlightWidget *, int > > mRegisteredSearchWidgets
 
QgsFilterLineEditmSearchLineEdit = nullptr
 
QPointer< QgsSettingsmSettings
 

Detailed Description

The QgsDataSourceManagerDialog class embeds the browser panel and all the provider dialogs.

The dialog does not handle layer addition directly but emits signals that need to be forwarded to the QGIS application to be handled.

Note
not available in Python bindings
Since
QGIS 3.0

Definition at line 46 of file qgsdatasourcemanagerdialog.h.

Constructor & Destructor Documentation

◆ QgsDataSourceManagerDialog()

QgsDataSourceManagerDialog::QgsDataSourceManagerDialog ( QgsBrowserModel browserModel,
QWidget *  parent = nullptr,
QgsMapCanvas canvas = nullptr,
Qt::WindowFlags  fl = QgsGuiUtils::ModalDialogFlags 
)
explicit

QgsDataSourceManagerDialog constructor.

Parameters
browserModelinstance of the (shared) browser model
parentthe object
canvasa pointer to the map canvas
flwindow flags

Definition at line 31 of file qgsdatasourcemanagerdialog.cpp.

◆ ~QgsDataSourceManagerDialog()

QgsDataSourceManagerDialog::~QgsDataSourceManagerDialog ( )
override

Definition at line 76 of file qgsdatasourcemanagerdialog.cpp.

Member Function Documentation

◆ addDatabaseLayers

void QgsDataSourceManagerDialog::addDatabaseLayers ( const QStringList &  layerPathList,
const QString &  providerKey 
)
signal

Emitted when a DB layer was selected for addition: for signal forwarding to QgisApp.

◆ addRasterLayer [1/2]

void QgsDataSourceManagerDialog::addRasterLayer ( const QString &  uri,
const QString &  baseName,
const QString &  providerKey 
)
signal

Emitted when a raster layer was selected for addition: for signal forwarding to QgisApp.

◆ addRasterLayer [2/2]

void QgsDataSourceManagerDialog::addRasterLayer ( )
signal

Emitted when the user wants to select a raster layer: for signal forwarding to QgisApp.

◆ addVectorLayer

void QgsDataSourceManagerDialog::addVectorLayer ( const QString &  vectorLayerPath,
const QString &  baseName,
const QString &  providerKey 
)
signal

Emitted when a vector layer was selected for addition: for signal forwarding to QgisApp.

◆ addVectorLayers

void QgsDataSourceManagerDialog::addVectorLayers ( const QStringList &  layerQStringList,
const QString &  enc,
const QString &  dataSourceType 
)
signal

Emitted when a one or more layer were selected for addition: for signal forwarding to QgisApp.

◆ connectionsChanged

void QgsDataSourceManagerDialog::connectionsChanged ( )
signal

Emitted when a connection has changed inside the provider dialogs This signal is normally forwarded to the application to notify other browsers that they need to refresh their connections list.

◆ handleDropUriList

void QgsDataSourceManagerDialog::handleDropUriList ( const QgsMimeDataUtils::UriList )
signal

Emitted when drop uri list needs to be handled from the browser.

◆ openFile

void QgsDataSourceManagerDialog::openFile ( const QString &  fileName,
const QString &  fileTypeHint = QString() 
)
signal

Emitted when a file needs to be opened.

◆ openPage()

void QgsDataSourceManagerDialog::openPage ( const QString &  pageName)

Open a given page in the dialog.

Parameters
pageNamethe page name, usually the provider name or "browser" (for the browser panel) or "ogr" (vector layers) or "raster" (raster layers)

Definition at line 81 of file qgsdatasourcemanagerdialog.cpp.

◆ providerDialogsRefreshRequested

void QgsDataSourceManagerDialog::providerDialogsRefreshRequested ( )
signal

One or more provider connections have changed and the dialogs should be refreshed.

◆ rasterLayerAdded

void QgsDataSourceManagerDialog::rasterLayerAdded ( QString const &  uri,
QString const &  baseName,
QString const &  providerKey 
)
slot

A raster layer was added: for signal forwarding to QgisApp TODO: use this with an internal source select dialog instead of forwarding the whole raster selection to app.

Definition at line 109 of file qgsdatasourcemanagerdialog.cpp.

◆ refresh

void QgsDataSourceManagerDialog::refresh ( )
slot

Refresh the browser view.

Definition at line 103 of file qgsdatasourcemanagerdialog.cpp.

◆ replaceSelectedVectorLayer

void QgsDataSourceManagerDialog::replaceSelectedVectorLayer ( const QString &  oldId,
const QString &  uri,
const QString &  layerName,
const QString &  provider 
)
signal

Replace the selected layer by a vector layer defined by uri, layer name, data source uri.

◆ setCurrentPage

void QgsDataSourceManagerDialog::setCurrentPage ( int  index)
slot

Sync current page with the leftbar list.

Definition at line 90 of file qgsdatasourcemanagerdialog.cpp.

◆ setPreviousPage

void QgsDataSourceManagerDialog::setPreviousPage ( )
slot

Reset current page to previously selected page.

Definition at line 97 of file qgsdatasourcemanagerdialog.cpp.

◆ showEvent()

void QgsDataSourceManagerDialog::showEvent ( QShowEvent *  event)
overrideprotected

Definition at line 173 of file qgsdatasourcemanagerdialog.cpp.

◆ showProgress

void QgsDataSourceManagerDialog::showProgress ( int  progress,
int  totalSteps 
)
signal

Emitted when the dialog is busy: for signal forwarding to QgisApp.

◆ showStatusMessage

void QgsDataSourceManagerDialog::showStatusMessage ( const QString &  message)
signal

Emitted when a status message needs to be shown: for signal forwarding to QgisApp.

◆ updateProjectHome

void QgsDataSourceManagerDialog::updateProjectHome ( )
signal

Update project home directory.

◆ vectorLayerAdded

void QgsDataSourceManagerDialog::vectorLayerAdded ( const QString &  vectorLayerPath,
const QString &  baseName,
const QString &  providerKey 
)
slot

A vector layer was added: for signal forwarding to QgisApp.

Definition at line 114 of file qgsdatasourcemanagerdialog.cpp.

◆ vectorLayersAdded

void QgsDataSourceManagerDialog::vectorLayersAdded ( const QStringList &  layerQStringList,
const QString &  enc,
const QString &  dataSourceType 
)
slot

One or more vector layer were added: for signal forwarding to QgisApp.

Definition at line 119 of file qgsdatasourcemanagerdialog.cpp.


The documentation for this class was generated from the following files: