Class: QgsAbstractDbSourceSelect¶
- class qgis.gui.QgsAbstractDbSourceSelect¶
Bases:
QgsAbstractDataSourceWidget
The
QgsAbstractDbSourceSelect
class is a base class for database source widget selectorAdded in version 3.24.
QgsAbstractDbSourceSelect(parent: Optional[QWidget] = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.None) Constructor
Methods
Returns the add Button
Returns the associated browser model (may be
None
).Sets the source model for the table and optionally a delegate
Returns the proxy model used to filter the results
This is called to define the SQL query and must be re-implemented.
Connect the ok and apply/add buttons to the slots
Called on click for the source
index
Called on double-click for the source
index
Returns the widget mode
- actionEvent(self, a0: QActionEvent | None)¶
- addButton(self) QPushButton | None ¶
Returns the add Button
- browserModel(self) QgsBrowserModel | None ¶
Returns the associated browser model (may be
None
).Added in version 3.18.
- changeEvent(self, a0: QEvent | None)¶
- childEvent(self, a0: QChildEvent | None)¶
- closeEvent(self, a0: QCloseEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- contextMenuEvent(self, a0: QContextMenuEvent | None)¶
- create(self, window: PyQt5.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, a0: QEvent | None)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, signal: QMetaMethod)¶
- dragEnterEvent(self, a0: QDragEnterEvent | None)¶
- dragLeaveEvent(self, a0: QDragLeaveEvent | None)¶
- dragMoveEvent(self, a0: QDragMoveEvent | None)¶
- dropEvent(self, a0: QDropEvent | None)¶
- enterEvent(self, a0: QEvent | None)¶
- event(self, a0: QEvent | None) bool ¶
- eventFilter(self, a0: QObject | None, a1: QEvent | None) bool ¶
- focusInEvent(self, a0: QFocusEvent | None)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, next: bool) bool ¶
- focusOutEvent(self, a0: QFocusEvent | None)¶
- focusPreviousChild(self) bool ¶
- hideEvent(self, a0: QHideEvent | None)¶
- init(self, model: QgsAbstractDbTableModel | None, delegate: QItemDelegate | None = None)¶
Sets the source model for the table and optionally a delegate
- Parameters:
model (Optional[QgsAbstractDbTableModel])
delegate (Optional[QItemDelegate] = None)
- initPainter(self, painter: QPainter | None)¶
- inputMethodEvent(self, a0: QInputMethodEvent | None)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- keyPressEvent(self, a0: QKeyEvent | None)¶
- keyReleaseEvent(self, a0: QKeyEvent | None)¶
- leaveEvent(self, a0: QEvent | None)¶
- metric(self, a0: QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, a0: QMouseEvent | None)¶
- mouseMoveEvent(self, a0: QMouseEvent | None)¶
- mousePressEvent(self, a0: QMouseEvent | None)¶
- mouseReleaseEvent(self, a0: QMouseEvent | None)¶
- moveEvent(self, a0: QMoveEvent | None)¶
- nativeEvent(self, eventType: QByteArray | bytes | bytearray, message: PyQt5.sip.voidptr | None)¶
- paintEvent(self, a0: QPaintEvent | None)¶
- proxyModel(self) QSortFilterProxyModel | None ¶
Returns the proxy model used to filter the results
- Return type:
Optional[QSortFilterProxyModel]
- receivers(self, signal: PYQT_SIGNAL) int ¶
- resizeEvent(self, a0: QResizeEvent | None)¶
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setSql(self, index: QModelIndex)¶
This is called to define the SQL query and must be re-implemented. The implementation should call
QgsAbstractDbTableModel
.setSql The index is in the source model.- Parameters:
index (QModelIndex)
- setupButtons(self, buttonBox: QDialogButtonBox | None)¶
Connect the ok and apply/add buttons to the slots
- showEvent(self, a0: QShowEvent | None)¶
- tabletEvent(self, a0: QTabletEvent | None)¶
- timerEvent(self, a0: QTimerEvent | None)¶
- treeviewClicked(self, index: QModelIndex)¶
Called on click for the source
index
- Parameters:
index (QModelIndex)
- treeviewDoubleClicked(self, index: QModelIndex)¶
Called on double-click for the source
index
- Parameters:
index (QModelIndex)
- updateMicroFocus(self)¶
- wheelEvent(self, a0: QWheelEvent | None)¶
- widgetMode(self) QgsProviderRegistry.WidgetMode ¶
Returns the widget mode