QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
auth
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 "ui_qgsauthconfigeditor.h"
21
22
#include "qgis_gui.h"
23
#include "
qgis_sip.h
"
24
#include "
qgsauthmanager.h
"
25
26
#include <QSqlTableModel>
27
#include <QWidget>
28
29
class
QgsMessageBar
;
30
35
class
GUI_EXPORT
QgsAuthConfigEditor
:
public
QWidget,
private
Ui::QgsAuthConfigEditor
36
{
37
Q_OBJECT
38
39
public
:
46
explicit
QgsAuthConfigEditor
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
bool
showUtilities =
true
,
bool
relayMessages =
true
);
47
49
void
toggleTitleVisibility
(
bool
visible );
50
55
QStringList
selectedAuthenticationConfigIds
()
const
;
56
57
public
slots:
59
void
setShowUtilitiesButton
(
bool
show =
true
);
60
62
void
setRelayMessages
(
bool
relay =
true
);
63
64
private
slots:
66
void
refreshTableView();
67
69
void
importAuthenticationConfigs();
70
72
void
exportSelectedAuthenticationConfigs();
73
75
void
setMasterPassword();
76
78
void
clearCachedMasterPassword();
79
81
void
resetMasterPassword();
82
84
void
clearCachedAuthenticationConfigs();
85
87
void
removeAuthenticationConfigs();
88
90
void
eraseAuthenticationDatabase();
91
93
void
authMessageLog(
const
QString &message,
const
QString &authtag,
Qgis::MessageLevel
level );
94
96
void
selectionChanged(
const
QItemSelection &selected,
const
QItemSelection &deselected );
97
99
void
checkSelection();
100
101
void
btnAddConfig_clicked();
102
103
void
btnEditConfig_clicked();
104
105
void
btnRemoveConfig_clicked();
106
107
private
:
108
bool
mRelayMessages;
109
QgsMessageBar
*messageBar();
110
QString selectedConfigId();
111
112
QSqlTableModel *mConfigModel =
nullptr
;
113
114
QMenu *mAuthUtilitiesMenu =
nullptr
;
115
QAction *mActionImportAuthenticationConfigs =
nullptr
;
116
QAction *mActionExportSelectedAuthenticationConfigs =
nullptr
;
117
QAction *mActionSetMasterPassword =
nullptr
;
118
QAction *mActionClearCachedMasterPassword =
nullptr
;
119
QAction *mActionResetMasterPassword =
nullptr
;
120
QAction *mActionClearCachedAuthConfigs =
nullptr
;
121
QAction *mActionRemoveAuthConfigs =
nullptr
;
122
QAction *mActionEraseAuthDatabase =
nullptr
;
123
124
bool
mDisabled =
false
;
125
QVBoxLayout *mAuthNotifyLayout =
nullptr
;
126
QLabel *mAuthNotify =
nullptr
;
127
bool
mIsReadOnly =
false
;
128
};
129
130
#endif
// QGSAUTHCONFIGEDITOR_H
Qgis::MessageLevel
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition
qgis.h:160
QgsAuthConfigEditor::QgsAuthConfigEditor
QgsAuthConfigEditor(QWidget *parent=nullptr, bool showUtilities=true, bool relayMessages=true)
Widget for editing authentication configurations directly in database.
Definition
qgsauthconfigeditor.cpp:36
QgsAuthConfigEditor::setRelayMessages
void setRelayMessages(bool relay=true)
Sets whether to relay auth manager messages to internal message bar, e.g. when embedding.
Definition
qgsauthconfigeditor.cpp:247
QgsAuthConfigEditor::setShowUtilitiesButton
void setShowUtilitiesButton(bool show=true)
Sets whether to show the widget's utilities button, e.g. when embedding.
Definition
qgsauthconfigeditor.cpp:239
QgsAuthConfigEditor::selectedAuthenticationConfigIds
QStringList selectedAuthenticationConfigIds() const
Returns the list of selected authentication configuration IDs.
Definition
qgsauthconfigeditor.cpp:228
QgsAuthConfigEditor::toggleTitleVisibility
void toggleTitleVisibility(bool visible)
Hide the widget's title, e.g. when embedding.
Definition
qgsauthconfigeditor.cpp:220
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition
qgsmessagebar.h:61
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsauthmanager.h
Generated on
for QGIS API Documentation by
1.17.0