QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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 "ui_qgsauthserverseditor.h"
21
22#include "qgis_gui.h"
23#include "qgis_sip.h"
24#include "qgsauthmanager.h"
25
26#include <QWidget>
27
28class QgsMessageBar;
29
34class GUI_EXPORT QgsAuthServersEditor : public QWidget, private Ui::QgsAuthServersEditor
35{
36 Q_OBJECT
37
38 public:
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 authMessageLog( const QString &message, const QString &authtag, Qgis::MessageLevel level );
68
69 protected:
70 void showEvent( QShowEvent *e ) override;
71
72 private:
73 enum ConfigType
74 {
75 Section = 1000,
76 OrgName = 1001,
77 ServerConfig = 1002,
78 };
79
80 void setupSslConfigsTree();
81
82 void populateSslConfigsSection( QTreeWidgetItem *item, const QList<QgsAuthConfigSslServer> &configs, QgsAuthServersEditor::ConfigType conftype );
83
84 void appendSslConfigsToGroup( const QList<QgsAuthConfigSslServer> &configs, QgsAuthServersEditor::ConfigType conftype, QTreeWidgetItem *parent = nullptr );
85
86 void appendSslConfigsToItem( const QList<QgsAuthConfigSslServer> &configs, QgsAuthServersEditor::ConfigType conftype, QTreeWidgetItem *parent = nullptr );
87
88 QgsMessageBar *messageBar();
89 int messageTimeout();
90
91 bool mDisabled = false;
92 QVBoxLayout *mAuthNotifyLayout = nullptr;
93 QLabel *mAuthNotify = nullptr;
94
95 QTreeWidgetItem *mRootSslConfigItem = nullptr;
96};
97
98#endif // QGSAUTHSERVERSEDITOR_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:156
QgsAuthServersEditor(QWidget *parent=nullptr)
Widget for editing authentication configurations directly in database.
void showEvent(QShowEvent *e) override
A bar for displaying non-blocking messages to the user.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53