QGIS API Documentation 3.41.0-Master (cea29feecf2)
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:
43 explicit QgsAuthIdentitiesEditor( QWidget *parent SIP_TRANSFERTHIS = nullptr );
44
45 private slots:
46 void populateIdentitiesView();
47
48 void refreshIdentitiesView();
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 btnAddIdentity_clicked();
61
62 void btnRemoveIdentity_clicked();
63
64 void btnInfoIdentity_clicked();
65
66 void btnGroupByOrg_toggled( bool checked );
67
69 void authMessageLog( const QString &message, const QString &authtag, Qgis::MessageLevel level );
70
71 protected:
73 void showEvent( QShowEvent *e ) override;
74
75 private:
76 enum IdentityType
77 {
78 Section = 1000,
79 OrgName = 1001,
80 CertIdentity = 1002,
81 };
82
83 void setupIdentitiesTree();
84
85 void populateIdentitiesSection( QTreeWidgetItem *item, const QList<QSslCertificate> &certs, QgsAuthIdentitiesEditor::IdentityType identype );
86
87 void appendIdentitiesToGroup( const QList<QSslCertificate> &certs, QgsAuthIdentitiesEditor::IdentityType identype, QTreeWidgetItem *parent = nullptr );
88
89 void appendIdentitiesToItem( const QList<QSslCertificate> &certs, QgsAuthIdentitiesEditor::IdentityType identype, QTreeWidgetItem *parent = nullptr );
90
91 QgsMessageBar *messageBar();
92 int messageTimeout();
93
94 bool mDisabled = false;
95 QVBoxLayout *mAuthNotifyLayout = nullptr;
96 QLabel *mAuthNotify = nullptr;
97
98 QTreeWidgetItem *mRootCertIdentItem = nullptr;
99};
100
101#endif // QGSAUTHIDENTITIESEDITOR_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:154
Widget for viewing and editing authentication identities database.
A bar for displaying non-blocking messages to the user.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53