QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsauthtrustedcasdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthtrustedcasdialog.h
3 ---------------------
4 begin : May 9, 2015
5 copyright : (C) 2015 by Boundless Spatial, Inc. USA
6 author : Larry Shaffer
7 email : lshaffer at boundlessgeo dot com
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSAUTHTRUSTEDCASDIALOG_H
18#define QGSAUTHTRUSTEDCASDIALOG_H
19
20#include <QDialog>
21#include "qgis_sip.h"
22#include "ui_qgsauthtrustedcasdialog.h"
23
24#include <QSslCertificate>
25
26#include "qgsauthmanager.h"
27#include "qgis_gui.h"
28
29class QgsMessageBar;
30
35class GUI_EXPORT QgsAuthTrustedCAsDialog : public QDialog, private Ui::QgsAuthTrustedCAsDialog
36{
37 Q_OBJECT
38
39 public:
45 explicit QgsAuthTrustedCAsDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QList<QSslCertificate> &trustedCAs = QList<QSslCertificate>() );
46
47 private slots:
48 void populateCaCertsView();
49
50 void showCertInfo( QTreeWidgetItem *item );
51
53 void selectionChanged( const QItemSelection &selected, const QItemSelection &deselected );
54
56 void checkSelection();
57
58 void handleDoubleClick( QTreeWidgetItem *item, int col );
59
60 void btnInfoCa_clicked();
61
62 void btnGroupByOrg_toggled( bool checked );
63
65 void authMessageLog( const QString &message, const QString &authtag, Qgis::MessageLevel level );
66
67 protected:
68 void showEvent( QShowEvent *e ) override;
69
70 private:
71 enum CaType
72 {
73 Section = 1000,
74 OrgName = 1001,
75 CaCert = 1002,
76 };
77
78 void setupCaCertsTree();
79
80 void populateCaCertsSection( QTreeWidgetItem *item, const QList<QSslCertificate> &certs, QgsAuthTrustedCAsDialog::CaType catype );
81
82 void appendCertsToGroup( const QList<QSslCertificate> &certs, QgsAuthTrustedCAsDialog::CaType catype, QTreeWidgetItem *parent = nullptr );
83
84 void appendCertsToItem( const QList<QSslCertificate> &certs, QgsAuthTrustedCAsDialog::CaType catype, QTreeWidgetItem *parent = nullptr );
85
86 QgsMessageBar *messageBar();
87 int messageTimeout();
88
89 QList<QSslCertificate> mTrustedCAs;
90 bool mDisabled = false;
91 QVBoxLayout *mAuthNotifyLayout = nullptr;
92 QLabel *mAuthNotify = nullptr;
93
94 QTreeWidgetItem *mRootCaSecItem = nullptr;
95};
96
97#endif // QGSAUTHTRUSTEDCASDIALOG_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:154
Widget for listing trusted Certificate (Intermediate) Authorities used in secure connections.
A bar for displaying non-blocking messages to the user.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53