QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsauthserverseditor.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthserverseditor.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 QGSAUTHSERVERSEDITOR_H
18#define QGSAUTHSERVERSEDITOR_H
19
20#include <QWidget>
21#include "qgis_sip.h"
22
23#include "ui_qgsauthserverseditor.h"
24#include "qgsauthmanager.h"
25#include "qgis_gui.h"
26
27class QgsMessageBar;
28
33class GUI_EXPORT QgsAuthServersEditor : public QWidget, private Ui::QgsAuthServersEditor
34{
35 Q_OBJECT
36
37 public:
38
43 explicit QgsAuthServersEditor( QWidget *parent SIP_TRANSFERTHIS = nullptr );
44
45 private slots:
46 void populateSslConfigsView();
47
48 void refreshSslConfigsView();
49
51 void selectionChanged( const QItemSelection &selected, const QItemSelection &deselected );
52
54 void checkSelection();
55
56 void handleDoubleClick( QTreeWidgetItem *item, int col );
57
58 void btnAddServer_clicked();
59
60 void btnRemoveServer_clicked();
61
62 void btnEditServer_clicked();
63
64 void btnGroupByOrg_toggled( bool checked );
65
67 void authMessageOut( const QString &message, const QString &authtag, QgsAuthManager::MessageLevel level );
68
69 protected:
70
71 void showEvent( QShowEvent *e ) override;
72
73 private:
74 enum ConfigType
75 {
76 Section = 1000,
77 OrgName = 1001,
78 ServerConfig = 1002,
79 };
80
81 void setupSslConfigsTree();
82
83 void populateSslConfigsSection( QTreeWidgetItem *item,
84 const QList<QgsAuthConfigSslServer> &configs,
85 QgsAuthServersEditor::ConfigType conftype );
86
87 void appendSslConfigsToGroup( const QList<QgsAuthConfigSslServer> &configs,
88 QgsAuthServersEditor::ConfigType conftype,
89 QTreeWidgetItem *parent = nullptr );
90
91 void appendSslConfigsToItem( const QList<QgsAuthConfigSslServer> &configs,
92 QgsAuthServersEditor::ConfigType conftype,
93 QTreeWidgetItem *parent = nullptr );
94
95 QgsMessageBar *messageBar();
96 int messageTimeout();
97
98 bool mDisabled = false;
99 QVBoxLayout *mAuthNotifyLayout = nullptr;
100 QLabel *mAuthNotify = nullptr;
101
102 QTreeWidgetItem *mRootSslConfigItem = nullptr;
103};
104
105#endif // QGSAUTHSERVERSEDITOR_H
MessageLevel
Message log level (mirrors that of QgsMessageLog, so it can also output there)
Widget for viewing and editing servers in authentication database.
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:61
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53