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: 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, QActionEvent)¶
- addButton(self) QPushButton ¶
Returns the add Button
- browserModel(self) QgsBrowserModel ¶
Returns the associated browser model (may be
None
).Added in version 3.18.
- changeEvent(self, QEvent)¶
- childEvent(self, QChildEvent)¶
- closeEvent(self, QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, bool) bool ¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) bool ¶
- hideEvent(self, QHideEvent)¶
- init(self, model: QgsAbstractDbTableModel, delegate: QItemDelegate = None)¶
Sets the source model for the table and optionally a delegate
- Parameters:
model (QgsAbstractDbTableModel)
delegate (QItemDelegate = None)
- initPainter(self, QPainter)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- proxyModel(self) QSortFilterProxyModel ¶
Returns the proxy model used to filter the results
- Return type:
QSortFilterProxyModel
- receivers(self, PYQT_SIGNAL) int ¶
- resizeEvent(self, QResizeEvent)¶
- sender(self) QObject ¶
- 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)¶
Connect the ok and apply/add buttons to the slots
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- 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, QWheelEvent)¶
- widgetMode(self) QgsProviderRegistry.WidgetMode ¶
Returns the widget mode