Class: QgsDataSourceSelectDialog¶
-
class
qgis.gui.
QgsDataSourceSelectDialog
(browserModel: QgsBrowserModel = None, setFilterByLayerType: bool = False, layerType: QgsMapLayer.LayerType = QgsMapLayer.LayerType.VectorLayer, parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QDialog
Constructs a QgsDataSourceSelectDialog, optionally filtering by layer type
- Parameters
browserModel – an existing browser model (typically from app), if null an instance will be created
setFilterByLayerType – activates filtering by layer type
layerType – sets the layer type filter, this is in effect only if filtering by layer type is also active
parent – the object
The QgsDataSourceSelectDialog class embeds the browser view to select an existing data source.
By default any layer type can be chosen, the valid layer type can be restricted by setting a layer type filter with setLayerTypeFilter(layerType) or by activating the filter directly from the constructor.
To retrieve the selected data source, uri() can be called and it will return a (possibly invalid) QgsMimeDataUtils.Uri.
New in version 3.6: Enums
Methods
Sets filter case sensitivity
Apply filter to the model
Sets filter syntax
Sets layer type filter to
layerType
and activates the filteringScroll to last selected index and expand it’s children
Show/hide filter widget
Returns the (possibly invalid) uri of the selected data source
Signals
Attributes
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
eventFilter
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setCaseSensitive
(self, caseSensitive: bool)¶ Sets filter case sensitivity
-
setFilter
(self)¶ Apply filter to the model
-
setFilterSyntax
(self, QAction)¶ Sets filter syntax
-
setLayerTypeFilter
(self, layerType: QgsMapLayer.LayerType)¶ Sets layer type filter to
layerType
and activates the filtering
-
showEvent
(self, e: QShowEvent)¶ Scroll to last selected index and expand it’s children
-
showFilterWidget
(self, visible: bool)¶ Show/hide filter widget
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
uri
(self) → QgsMimeDataUtils.Uri¶ Returns the (possibly invalid) uri of the selected data source
-
wheelEvent
()¶