34 defaultTrustText( defaultpolicy ) )
40 for (
int i = 0; i < policies.
size(); i++ )
55 this, SLOT( highlightCurrentIndex(
int ) ) );
84 setItemText( idx, defaultTrustText( defaultpolicy ) );
87 void QgsAuthCertTrustPolicyComboBox::highlightCurrentIndex(
int indx )
static QgsAuthManager * instance()
Enforce singleton pattern.
QgsAuthCertUtils::CertTrustPolicy trustPolicy()
Get currently set trust policy.
const T & at(int i) const
~QgsAuthCertTrustPolicyComboBox()
void setItemText(int index, const QString &text)
void addItem(const QString &text, const QVariant &userData)
const char * name() const
static QColor redColor()
Red color representing invalid, untrusted, etc.
static QColor greenColor()
Green color representing valid, trusted, etc.
int toInt(bool *ok) const
static QString greenTextStyleSheet(const QString &selector="*")
Green text stylesheet representing valid, trusted, etc.
QgsAuthCertTrustPolicyComboBox(QWidget *parent=nullptr, QgsAuthCertUtils::CertTrustPolicy policy=QgsAuthCertUtils::DefaultTrust, QgsAuthCertUtils::CertTrustPolicy defaultpolicy=QgsAuthCertUtils::DefaultTrust)
Construct a combo box for defining certificate trust policy.
QVariant itemData(int index, int role) const
static QString redTextStyleSheet(const QString &selector="*")
Red text stylesheet representing invalid, untrusted, etc.
int findData(const QVariant &data, int role, QFlags< Qt::MatchFlag > flags) const
QgsAuthCertUtils::CertTrustPolicy trustPolicyForIndex(int indx)
Get trust policy for a given index of combobox.
void setItemData(int index, const QVariant &value, int role)
void setDefaultTrustPolicy(QgsAuthCertUtils::CertTrustPolicy defaultpolicy)
Set default trust policy.
CertTrustPolicy
Type of certificate trust policy.
QgsAuthCertUtils::CertTrustPolicy defaultCertTrustPolicy()
Get the default certificate trust policy perferred by user.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static QString getCertTrustName(QgsAuthCertUtils::CertTrustPolicy trust)
Get the general name for certificate trust.
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void setTrustPolicy(QgsAuthCertUtils::CertTrustPolicy policy)
Set current trust policy.
void currentIndexChanged(int index)