Subgroup: Auth

Class: QgsAuthSettingsWidget

class qgis.gui.QgsAuthSettingsWidget

Bases: PyQt5.QtWidgets.QWidget

Widget for entering authentication credentials both in the form username/password and by using QGIS Authentication Database and its authentication configurations.

The widget also offers the functionality to convert username/password credentials to an authentication configuration.

New in version 3.0: Methods

acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
autoFillBackground
backgroundRole
baseSize
blockSignals
btnConvertToEncryptedIsEnabled convertButtonEnabled, mainly useful for unit tests
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
close
closeEvent
colorCount
configId configId
configurationTabIsSelected configurationTabIsSelected
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
convertToEncrypted convertToEncrypted is called when the convert to encrypted button is
create
createWindowContainer
cursor
customEvent
dataprovider dataprovider
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
find
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
formattedWarning warning text message based upon where credentials are stored
frameGeometry
frameSize
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse grabMouse(self, Union[QCursor, Qt.CursorShape])
grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
initPainter
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
password password
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
receivers
rect
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
repaint repaint(self, int, int, int, int)
resize resize(self, int, int)
resizeEvent
restoreGeometry
saveGeometry
scroll scroll(self, int, int, QRect)
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setBasicText setBasicText set the text of the warning label
setConfigId setConfigId set the authentication configuration id
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCursor
setDataprovider setDataprovider set the data provider key for filtering compatible authentication configurations
setDisabled
setEnabled
setFixedHeight
setFixedSize setFixedSize(self, int, int)
setFixedWidth
setFocus setFocus(self, Qt.FocusReason)
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry setGeometry(self, int, int, int, int)
setGraphicsEffect
setHidden
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask setMask(self, QRegion)
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setMouseTracking
setObjectName
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setPassword setPassword set the password
setProperty
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setStatusTip
setStorePasswordChecked setStorePasswordCheched check the “Store” checkbox for the password
setStoreUsernameChecked setStoreUsernameChecked check the “Store” checkbox for the username
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setUsername setUsername set the username
setVisible
setWarningText setWarningText set the text of the warning label
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
showStoreCheckboxes showStoreCheckboxes show the “Store” checkboxes for basic auth.
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
storePasswordIsChecked storePassword
storeUsernameIsChecked storeUsername
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update update(self, QRect)
updateGeometry
updateMicroFocus
updatesEnabled
username username
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y

Attributes

DrawChildren
DrawWindowBackground
IgnoreMask
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
ProjectFile
UserSettings
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
staticMetaObject
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
ProjectFile = 0
UserSettings = 1
class WarningType

Bases: int

actionEvent()
btnConvertToEncryptedIsEnabled(self) → bool

convertButtonEnabled, mainly useful for unit tests

Returns:true if the convert button is enabled
changeEvent()
childEvent()
closeEvent()
configId(self) → str

configId

Returns:authentication configuration id
configurationTabIsSelected(self) → bool

configurationTabIsSelected

Returns:true if the configuration tab is the currently selected tab
connectNotify()
contextMenuEvent()
convertToEncrypted(self) → bool

convertToEncrypted is called when the convert to encrypted button is clicked and it creates a Basic authentication configuration from username and password specified in the Basic tab

Returns:return true on success
create()
customEvent()
dataprovider(self) → str

dataprovider

Returns:the data provider key used to filter compatible authentication configurations
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
formattedWarning(warning: QgsAuthSettingsWidget.WarningType) → str

warning text message based upon where credentials are stored

Parameters:warning – enum of warning type
Returns:pre-formatted warning text
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
password(self) → str

password

Returns:basic authentication password
receivers()
resizeEvent()
sender()
senderSignalIndex()
setBasicText(self, basicText: str)

setBasicText set the text of the warning label

Parameters:basicText – the text of the basic tab label
setConfigId(self, configId: str)

setConfigId set the authentication configuration id param configId the authentication configuration id

setDataprovider(self, dataprovider: str)

setDataprovider set the data provider key for filtering compatible authentication configurations

Parameters:dataprovider – data provider key
setPassword(self, password: str)

setPassword set the password

Parameters:password – the password
setStorePasswordChecked(self, checked: bool)

setStorePasswordCheched check the “Store” checkbox for the password

Parameters:checked
setStoreUsernameChecked(self, checked: bool)

setStoreUsernameChecked check the “Store” checkbox for the username

Parameters:checked
setUsername(self, username: str)

setUsername set the username

Parameters:username – the user name
setWarningText(self, warningText: str)

setWarningText set the text of the warning label

Parameters:warningText – the text of the warning label
sharedPainter()
showEvent()
showStoreCheckboxes(self, enabled: bool)

showStoreCheckboxes show the “Store” checkboxes for basic auth. Some connection configurations allow the user to enter credentials for testing the connection without storing them in the project. “Store” checkboxes are disabled by default.

Parameters:enabled
storePasswordIsChecked(self) → bool

storePassword

Returns:true if “Store” checkbox for the password is checked
storeUsernameIsChecked(self) → bool

storeUsername

Returns:true if “Store” checkbox for the username is checked
tabletEvent()
timerEvent()
updateMicroFocus()
username(self) → str

username

Returns:basic authentication username
wheelEvent()