QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgsauthidentitieseditor.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthidentitieseditor.h
3 ---------------------
4 begin : April 26, 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 QGSAUTHIDENTITIESEDITOR_H
18#define QGSAUTHIDENTITIESEDITOR_H
19
20#include <QWidget>
21#include "qgis_sip.h"
22#include <QSslCertificate>
23
24#include "ui_qgsauthidentitieseditor.h"
25#include "qgsauthmanager.h"
26#include "qgis_gui.h"
27
28class QgsMessageBar;
29
34class GUI_EXPORT QgsAuthIdentitiesEditor : public QWidget, private Ui::QgsAuthIdentitiesEditor
35{
36 Q_OBJECT
37
38 public:
39
44 explicit QgsAuthIdentitiesEditor( QWidget *parent SIP_TRANSFERTHIS = nullptr );
45
46 private slots:
47 void populateIdentitiesView();
48
49 void refreshIdentitiesView();
50
51 void showCertInfo( QTreeWidgetItem *item );
52
54 void selectionChanged( const QItemSelection &selected, const QItemSelection &deselected );
55
57 void checkSelection();
58
59 void handleDoubleClick( QTreeWidgetItem *item, int col );
60
61 void btnAddIdentity_clicked();
62
63 void btnRemoveIdentity_clicked();
64
65 void btnInfoIdentity_clicked();
66
67 void btnGroupByOrg_toggled( bool checked );
68
70 void authMessageOut( const QString &message, const QString &authtag, QgsAuthManager::MessageLevel level );
71
72 protected:
74 void showEvent( QShowEvent *e ) override;
75
76 private:
77 enum IdentityType
78 {
79 Section = 1000,
80 OrgName = 1001,
81 CertIdentity = 1002,
82 };
83
84 void setupIdentitiesTree();
85
86 void populateIdentitiesSection( QTreeWidgetItem *item, const QList<QSslCertificate> &certs,
87 QgsAuthIdentitiesEditor::IdentityType identype );
88
89 void appendIdentitiesToGroup( const QList<QSslCertificate> &certs,
90 QgsAuthIdentitiesEditor::IdentityType identype,
91 QTreeWidgetItem *parent = nullptr );
92
93 void appendIdentitiesToItem( const QList<QSslCertificate> &certs,
94 QgsAuthIdentitiesEditor::IdentityType identype,
95 QTreeWidgetItem *parent = nullptr );
96
97 QgsMessageBar *messageBar();
98 int messageTimeout();
99
100 bool mDisabled = false;
101 QVBoxLayout *mAuthNotifyLayout = nullptr;
102 QLabel *mAuthNotify = nullptr;
103
104 QTreeWidgetItem *mRootCertIdentItem = nullptr;
105};
106
107#endif // QGSAUTHIDENTITIESEDITOR_H
Widget for viewing and editing authentication identities database.
MessageLevel
Message log level (mirrors that of QgsMessageLog, so it can also output there)
A bar for displaying non-blocking messages to the user.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53