QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsauthconfigeditor.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthconfigeditor.h
3 ---------------------
4 begin : October 5, 2014
5 copyright : (C) 2014 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 QGSAUTHCONFIGEDITOR_H
18#define QGSAUTHCONFIGEDITOR_H
19
20#include <QSqlTableModel>
21#include "qgis_sip.h"
22#include <QWidget>
23
24#include "ui_qgsauthconfigeditor.h"
25#include "qgsauthmanager.h"
26#include "qgis_gui.h"
27
28class QgsMessageBar;
29
34class GUI_EXPORT QgsAuthConfigEditor : public QWidget, private Ui::QgsAuthConfigEditor
35{
36 Q_OBJECT
37
38 public:
45 explicit QgsAuthConfigEditor( QWidget *parent SIP_TRANSFERTHIS = nullptr, bool showUtilities = true, bool relayMessages = true );
46
48 void toggleTitleVisibility( bool visible );
49
54 QStringList selectedAuthenticationConfigIds() const;
55
56 public slots:
58 void setShowUtilitiesButton( bool show = true );
59
61 void setRelayMessages( bool relay = true );
62
63 private slots:
65 void refreshTableView();
66
68 void importAuthenticationConfigs();
69
71 void exportSelectedAuthenticationConfigs();
72
74 void setMasterPassword();
75
77 void clearCachedMasterPassword();
78
80 void resetMasterPassword();
81
83 void clearCachedAuthenticationConfigs();
84
86 void removeAuthenticationConfigs();
87
89 void eraseAuthenticationDatabase();
90
92 void authMessageLog( const QString &message, const QString &authtag, Qgis::MessageLevel level );
93
95 void selectionChanged( const QItemSelection &selected, const QItemSelection &deselected );
96
98 void checkSelection();
99
100 void btnAddConfig_clicked();
101
102 void btnEditConfig_clicked();
103
104 void btnRemoveConfig_clicked();
105
106 private:
107 bool mRelayMessages;
108 QgsMessageBar *messageBar();
109 QString selectedConfigId();
110
111 QSqlTableModel *mConfigModel = nullptr;
112
113 QMenu *mAuthUtilitiesMenu = nullptr;
114 QAction *mActionImportAuthenticationConfigs = nullptr;
115 QAction *mActionExportSelectedAuthenticationConfigs = nullptr;
116 QAction *mActionSetMasterPassword = nullptr;
117 QAction *mActionClearCachedMasterPassword = nullptr;
118 QAction *mActionResetMasterPassword = nullptr;
119 QAction *mActionClearCachedAuthConfigs = nullptr;
120 QAction *mActionRemoveAuthConfigs = nullptr;
121 QAction *mActionEraseAuthDatabase = nullptr;
122
123 bool mDisabled = false;
124 QVBoxLayout *mAuthNotifyLayout = nullptr;
125 QLabel *mAuthNotify = nullptr;
126 bool mIsReadOnly = false;
127};
128
129#endif // QGSAUTHCONFIGEDITOR_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:154
Widget for editing authentication configuration database.
A bar for displaying non-blocking messages to the user.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53