QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
33 QList < QPair<QgsAuthCertUtils::CertTrustPolicy, QString> > policies;
35 defaultTrustText( defaultpolicy ) )
41 for (
int i = 0; i < policies.size(); i++ )
44 QString name = policies.at( i ).second;
45 addItem( name, QVariant(
static_cast<int>( polcy ) ) );
55 connect(
this,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
56 this, &QgsAuthCertTrustPolicyComboBox::highlightCurrentIndex );
74 int idx = findData( QVariant(
static_cast<int>( policy ) ) );
75 setCurrentIndex( idx == -1 ? 0 : idx );
81 setItemText( idx, defaultTrustText( defaultpolicy ) );
84 void QgsAuthCertTrustPolicyComboBox::highlightCurrentIndex(
int indx )
104 QgsDebugMsg( QStringLiteral(
"Set Stylesheet to : %1" ).arg( ss ) );
122 return QStringLiteral(
"%1 (%2)" )
static QColor greenColor()
Green color representing valid, trusted, etc. certificate.
QgsAuthCertUtils::CertTrustPolicy defaultCertTrustPolicy()
Gets the default certificate trust policy preferred by user.
static QString greenTextStyleSheet(const QString &selector="*")
Green text stylesheet representing valid, trusted, etc. certificate.
CertTrustPolicy
Type of certificate trust policy.
QgsAuthCertUtils::CertTrustPolicy trustPolicy()
Gets currently set trust policy.
QgsAuthCertTrustPolicyComboBox(QWidget *parent=nullptr, QgsAuthCertUtils::CertTrustPolicy policy=QgsAuthCertUtils::DefaultTrust, QgsAuthCertUtils::CertTrustPolicy defaultpolicy=QgsAuthCertUtils::DefaultTrust)
Construct a combo box for defining certificate trust policy.
static QgsAuthManager * authManager()
Returns the application's authentication manager instance.
static QString redTextStyleSheet(const QString &selector="*")
Red text stylesheet representing invalid, untrusted, etc. certificate.
static QString getCertTrustName(QgsAuthCertUtils::CertTrustPolicy trust)
Gets the general name for certificate trust.
void setTrustPolicy(QgsAuthCertUtils::CertTrustPolicy policy)
Sets current trust policy.
QgsAuthCertUtils::CertTrustPolicy trustPolicyForIndex(int indx)
Gets trust policy for a given index of combobox.
static QColor redColor()
Red color representing invalid, untrusted, etc. certificate.
void setDefaultTrustPolicy(QgsAuthCertUtils::CertTrustPolicy defaultpolicy)
Sets default trust policy.