QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
QgsAuthGuiUtils Class Reference

Utility functions for use by authentication GUI widgets or standalone apps. More...

#include <qgsauthguiutils.h>

Static Public Member Functions

static void clearCachedAuthenticationConfigs (QgsMessageBar *msgbar)
 Clear all cached authentication configs for session.
 
static void clearCachedMasterPassword (QgsMessageBar *msgbar)
 Clear the currently cached master password (not its hash in database)
 
static void eraseAuthenticationDatabase (QgsMessageBar *msgbar, QWidget *parent=nullptr)
 Completely clear out the authentication database (configs and master password)
 
static void exportSelectedAuthenticationConfigs (QStringList authenticationConfigIds, QgsMessageBar *msgbar)
 Exports selected authentication configurations to a XML file.
 
static void fileFound (bool found, QWidget *widget)
 Color a widget via a stylesheet if a file path is found or not.
 
static QString getOpenFileName (QWidget *parent, const QString &title, const QString &extfilter)
 Open file dialog for auth associated widgets.
 
static QColor greenColor ()
 Green color representing valid, trusted, etc. certificate.
 
static QString greenTextStyleSheet (const QString &selector="*")
 Green text stylesheet representing valid, trusted, etc. certificate.
 
static void importAuthenticationConfigs (QgsMessageBar *msgbar)
 Import authentication configurations from a XML file.
 
static bool isDisabled (QgsMessageBar *msgbar)
 Verify the authentication system is active, else notify user.
 
static QColor orangeColor ()
 Orange color representing loaded component, but not stored in database.
 
static QString orangeTextStyleSheet (const QString &selector="*")
 Orange text stylesheet representing loaded component, but not stored in database.
 
static void passwordHelperDelete (QgsMessageBar *msgbar, QWidget *parent=nullptr)
 Remove master password from wallet.
 
static void passwordHelperEnable (bool enabled, QgsMessageBar *msgbar)
 Sets password helper enabled (enable/disable)
 
static void passwordHelperLoggingEnable (bool enabled, QgsMessageBar *msgbar, int timeout=0)
 Sets password helper logging enabled (enable/disable)
 
static void passwordHelperSync (QgsMessageBar *msgbar)
 Store master password into the wallet.
 
static QColor redColor ()
 Red color representing invalid, untrusted, etc. certificate.
 
static QString redTextStyleSheet (const QString &selector="*")
 Red text stylesheet representing invalid, untrusted, etc. certificate.
 
static void removeAuthenticationConfigs (QgsMessageBar *msgbar, QWidget *parent=nullptr)
 Remove all authentication configs.
 
static void removeChildren (QTreeWidgetItem *item)
 Remove the children of the passed item.
 
static void resetMasterPassword (QgsMessageBar *msgbar, QWidget *parent=nullptr)
 Reset the cached master password, updating its hash in authentication database and resetting all existing configs to use it.
 
static void setItemBold (QTreeWidgetItem *item)
 Call setFirstColumnSpanned(true) on the item and make its font bold.
 
static void setMasterPassword (QgsMessageBar *msgbar)
 Sets the cached master password (and verifies it if its hash is in authentication database)
 
static QColor yellowColor ()
 Yellow color representing caution regarding action.
 

Detailed Description

Utility functions for use by authentication GUI widgets or standalone apps.

Note
not available in Python bindings

Definition at line 35 of file qgsauthguiutils.h.

Member Function Documentation

◆ clearCachedAuthenticationConfigs()

void QgsAuthGuiUtils::clearCachedAuthenticationConfigs ( QgsMessageBar msgbar)
static

Clear all cached authentication configs for session.

Definition at line 225 of file qgsauthguiutils.cpp.

◆ clearCachedMasterPassword()

void QgsAuthGuiUtils::clearCachedMasterPassword ( QgsMessageBar msgbar)
static

Clear the currently cached master password (not its hash in database)

Definition at line 157 of file qgsauthguiutils.cpp.

◆ eraseAuthenticationDatabase()

void QgsAuthGuiUtils::eraseAuthenticationDatabase ( QgsMessageBar msgbar,
QWidget *  parent = nullptr 
)
static

Completely clear out the authentication database (configs and master password)

Definition at line 262 of file qgsauthguiutils.cpp.

◆ exportSelectedAuthenticationConfigs()

void QgsAuthGuiUtils::exportSelectedAuthenticationConfigs ( QStringList  authenticationConfigIds,
QgsMessageBar msgbar 
)
static

Exports selected authentication configurations to a XML file.

Since
QGIS 3.20

Definition at line 79 of file qgsauthguiutils.cpp.

◆ fileFound()

void QgsAuthGuiUtils::fileFound ( bool  found,
QWidget *  widget 
)
static

Color a widget via a stylesheet if a file path is found or not.

Definition at line 306 of file qgsauthguiutils.cpp.

◆ getOpenFileName()

QString QgsAuthGuiUtils::getOpenFileName ( QWidget *  parent,
const QString &  title,
const QString &  extfilter 
)
static

Open file dialog for auth associated widgets.

Definition at line 320 of file qgsauthguiutils.cpp.

◆ greenColor()

QColor QgsAuthGuiUtils::greenColor ( )
static

Green color representing valid, trusted, etc. certificate.

Definition at line 33 of file qgsauthguiutils.cpp.

◆ greenTextStyleSheet()

QString QgsAuthGuiUtils::greenTextStyleSheet ( const QString &  selector = "*")
static

Green text stylesheet representing valid, trusted, etc. certificate.

Definition at line 53 of file qgsauthguiutils.cpp.

◆ importAuthenticationConfigs()

void QgsAuthGuiUtils::importAuthenticationConfigs ( QgsMessageBar msgbar)
static

Import authentication configurations from a XML file.

Since
QGIS 3.20

Definition at line 102 of file qgsauthguiutils.cpp.

◆ isDisabled()

bool QgsAuthGuiUtils::isDisabled ( QgsMessageBar msgbar)
static

Verify the authentication system is active, else notify user.

Definition at line 68 of file qgsauthguiutils.cpp.

◆ orangeColor()

QColor QgsAuthGuiUtils::orangeColor ( )
static

Orange color representing loaded component, but not stored in database.

Definition at line 38 of file qgsauthguiutils.cpp.

◆ orangeTextStyleSheet()

QString QgsAuthGuiUtils::orangeTextStyleSheet ( const QString &  selector = "*")
static

Orange text stylesheet representing loaded component, but not stored in database.

Definition at line 58 of file qgsauthguiutils.cpp.

◆ passwordHelperDelete()

void QgsAuthGuiUtils::passwordHelperDelete ( QgsMessageBar msgbar,
QWidget *  parent = nullptr 
)
static

Remove master password from wallet.

Definition at line 332 of file qgsauthguiutils.cpp.

◆ passwordHelperEnable()

void QgsAuthGuiUtils::passwordHelperEnable ( bool  enabled,
QgsMessageBar msgbar 
)
static

Sets password helper enabled (enable/disable)

Definition at line 382 of file qgsauthguiutils.cpp.

◆ passwordHelperLoggingEnable()

void QgsAuthGuiUtils::passwordHelperLoggingEnable ( bool  enabled,
QgsMessageBar msgbar,
int  timeout = 0 
)
static

Sets password helper logging enabled (enable/disable)

Definition at line 393 of file qgsauthguiutils.cpp.

◆ passwordHelperSync()

void QgsAuthGuiUtils::passwordHelperSync ( QgsMessageBar msgbar)
static

Store master password into the wallet.

Definition at line 356 of file qgsauthguiutils.cpp.

◆ redColor()

QColor QgsAuthGuiUtils::redColor ( )
static

Red color representing invalid, untrusted, etc. certificate.

Definition at line 43 of file qgsauthguiutils.cpp.

◆ redTextStyleSheet()

QString QgsAuthGuiUtils::redTextStyleSheet ( const QString &  selector = "*")
static

Red text stylesheet representing invalid, untrusted, etc. certificate.

Definition at line 63 of file qgsauthguiutils.cpp.

◆ removeAuthenticationConfigs()

void QgsAuthGuiUtils::removeAuthenticationConfigs ( QgsMessageBar msgbar,
QWidget *  parent = nullptr 
)
static

Remove all authentication configs.

Definition at line 236 of file qgsauthguiutils.cpp.

◆ removeChildren()

void QgsAuthGuiUtils::removeChildren ( QTreeWidgetItem *  item)
static

Remove the children of the passed item.

Definition at line 408 of file qgsauthguiutils.cpp.

◆ resetMasterPassword()

void QgsAuthGuiUtils::resetMasterPassword ( QgsMessageBar msgbar,
QWidget *  parent = nullptr 
)
static

Reset the cached master password, updating its hash in authentication database and resetting all existing configs to use it.

Definition at line 180 of file qgsauthguiutils.cpp.

◆ setItemBold()

void QgsAuthGuiUtils::setItemBold ( QTreeWidgetItem *  item)
static

Call setFirstColumnSpanned(true) on the item and make its font bold.

Definition at line 400 of file qgsauthguiutils.cpp.

◆ setMasterPassword()

void QgsAuthGuiUtils::setMasterPassword ( QgsMessageBar msgbar)
static

Sets the cached master password (and verifies it if its hash is in authentication database)

Definition at line 143 of file qgsauthguiutils.cpp.

◆ yellowColor()

QColor QgsAuthGuiUtils::yellowColor ( )
static

Yellow color representing caution regarding action.

Definition at line 48 of file qgsauthguiutils.cpp.


The documentation for this class was generated from the following files: