Class: QgsAbstractDataSourceWidget¶
-
class
qgis.gui.
QgsAbstractDataSourceWidget
(parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.None)¶ Bases:
PyQt5.QtWidgets.QDialog
Constructor
Abstract base Data Source Widget to create connections and add layers This class provides common functionality and the interface for all source select dialogs used by data providers to configure data sources and add layers.
New in version 3.0.
- Parameters
parent (QWidget = None) –
fl (Union[Qt.WindowFlags) –
widgetMode –
-
actionEvent
()¶
-
addButton
(self) → QPushButton¶ Returns the add Button
- Return type
QPushButton
-
addButtonClicked
(self)¶ 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.
-
addDatabaseLayers
¶ Emitted when a DB layer has been selected for addition [signal]
-
addMeshLayer
¶ Emitted when a mesh layer has been selected for addition.
New in version 3.4: [signal]
-
addRasterLayer
¶ Emitted when a raster layer has been selected for addition [signal]
-
addVectorLayer
¶ Emitted when a vector layer has been selected for addition.
If
providerKey
is not specified, the default provider key associated with the source will be used. [signal]
-
addVectorLayers
¶ Emitted when one or more OGR supported layers are selected for addition
- Parameters
layerList – list of layers protocol URIs
encoding – encoding
dataSourceType – string (can be “file” or “database”) [signal]
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
connectionsChanged
¶ Emitted when the provider’s connections have changed This signal is normally forwarded the app and used to refresh browser items [signal]
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enableButtons
¶ Emitted when the ok/add buttons should be enabled/disabled [signal]
-
enterEvent
()¶
-
event
()¶
-
eventFilter
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
mapCanvas
(self) → QgsMapCanvas¶ Returns the map canvas (can be null)
- Return type
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
progress
¶ Emitted when a progress dialog is shown by the provider dialog.
Deprecated since version Since: QGIS 3.4 this signal is no longer used. Use
QgsProxyProgressTask
instead to show progress reports. [signal]
-
progressMessage
¶ Emitted when a progress dialog is shown by the provider dialog [signal]
-
receivers
()¶
-
refresh
(self)¶ Triggered when the provider’s connections need to be refreshed The default implementation does nothing
-
replaceVectorLayer
¶ Emitted when a layer needs to be replaced
- Parameters
oldId – old layer ID
source – URI of the layer
name – of the layer
provider – key [signal]
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setMapCanvas
(self, mapCanvas: QgsMapCanvas)¶ 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
- Parameters
mapCanvas (QgsMapCanvas) –
-
setupButtons
(self, buttonBox: QDialogButtonBox)¶ Connect the ok and apply/add buttons to the slots
- Parameters
buttonBox (QDialogButtonBox) –
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
widgetMode
(self) → QgsProviderRegistry.WidgetMode¶ Returns the widget mode
- Return type