QGIS API Documentation 3.41.0-Master (57ec4277f5e)
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 <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:
42 explicit QgsAuthServersEditor( QWidget *parent SIP_TRANSFERTHIS = nullptr );
43
44 private slots:
45 void populateSslConfigsView();
46
47 void refreshSslConfigsView();
48
50 void selectionChanged( const QItemSelection &selected, const QItemSelection &deselected );
51
53 void checkSelection();
54
55 void handleDoubleClick( QTreeWidgetItem *item, int col );
56
57 void btnAddServer_clicked();
58
59 void btnRemoveServer_clicked();
60
61 void btnEditServer_clicked();
62
63 void btnGroupByOrg_toggled( bool checked );
64
66 void authMessageLog( const QString &message, const QString &authtag, Qgis::MessageLevel level );
67
68 protected:
69 void showEvent( QShowEvent *e ) override;
70
71 private:
72 enum ConfigType
73 {
74 Section = 1000,
75 OrgName = 1001,
76 ServerConfig = 1002,
77 };
78
79 void setupSslConfigsTree();
80
81 void populateSslConfigsSection( QTreeWidgetItem *item, const QList<QgsAuthConfigSslServer> &configs, QgsAuthServersEditor::ConfigType conftype );
82
83 void appendSslConfigsToGroup( const QList<QgsAuthConfigSslServer> &configs, QgsAuthServersEditor::ConfigType conftype, QTreeWidgetItem *parent = nullptr );
84
85 void appendSslConfigsToItem( const QList<QgsAuthConfigSslServer> &configs, QgsAuthServersEditor::ConfigType conftype, QTreeWidgetItem *parent = nullptr );
86
87 QgsMessageBar *messageBar();
88 int messageTimeout();
89
90 bool mDisabled = false;
91 QVBoxLayout *mAuthNotifyLayout = nullptr;
92 QLabel *mAuthNotify = nullptr;
93
94 QTreeWidgetItem *mRootSslConfigItem = nullptr;
95};
96
97#endif // QGSAUTHSERVERSEDITOR_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 servers in authentication database.
A bar for displaying non-blocking messages to the user.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53