QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
auth
qgsauthcertificatemanager.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsauthcertificatemanager.cpp
3
---------------------
4
begin : September, 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
#include "
qgsauthcertificatemanager.h
"
18
19
#include "
qgssettings.h
"
20
21
#include <QDialog>
22
#include <QDialogButtonBox>
23
#include <QPushButton>
24
#include <QString>
25
26
#include "moc_qgsauthcertificatemanager.cpp"
27
28
using namespace
Qt::StringLiterals;
29
30
QgsAuthCertEditors::QgsAuthCertEditors
( QWidget *parent )
31
: QWidget( parent )
32
{
33
setupUi(
this
);
34
const
QgsSettings
settings;
35
tabWidget->setCurrentIndex( settings.
value
( u
"AuthCertEditorsSelectedTab"
_s, 0,
QgsSettings::Section::Auth
).toInt() );
36
}
37
38
QgsAuthCertEditors::~QgsAuthCertEditors
()
39
{
40
QgsSettings
settings;
41
settings.
setValue
( u
"AuthCertEditorsSelectedTab"
_s, tabWidget->currentIndex(),
QgsSettings::Section::Auth
);
42
}
43
44
45
QgsAuthCertManager::QgsAuthCertManager
( QWidget *parent )
46
: QDialog( parent )
47
{
48
setWindowTitle( tr(
"Certificate Manager"
) );
49
QVBoxLayout *layout =
new
QVBoxLayout(
this
);
50
layout->setContentsMargins( 6, 6, 6, 6 );
51
52
mCertEditors =
new
QgsAuthCertEditors
(
this
);
53
layout->addWidget( mCertEditors );
54
55
QDialogButtonBox *buttonBox =
new
QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal,
this
);
56
buttonBox->button( QDialogButtonBox::Close )->setDefault(
true
);
57
connect( buttonBox, &QDialogButtonBox::rejected,
this
, &QWidget::close );
58
layout->addWidget( buttonBox );
59
60
setLayout( layout );
61
}
QgsAuthCertEditors
Wrapper widget to manage available certificate editors.
Definition
qgsauthcertificatemanager.h:33
QgsAuthCertEditors::QgsAuthCertEditors
QgsAuthCertEditors(QWidget *parent=nullptr)
Construct a widget to contain various certificate editors.
Definition
qgsauthcertificatemanager.cpp:30
QgsAuthCertEditors::~QgsAuthCertEditors
~QgsAuthCertEditors() override
Destructor: store last selected tab.
Definition
qgsauthcertificatemanager.cpp:38
QgsAuthCertManager::QgsAuthCertManager
QgsAuthCertManager(QWidget *parent=nullptr)
Construct a dialog wrapper for widget to manage available certificate editors.
Definition
qgsauthcertificatemanager.cpp:45
QgsSettings
Stores settings for use within QGIS.
Definition
qgssettings.h:68
QgsSettings::value
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
Definition
qgssettings.cpp:169
QgsSettings::Auth
@ Auth
Definition
qgssettings.h:79
QgsSettings::setValue
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
Definition
qgssettings.cpp:300
qgsauthcertificatemanager.h
qgssettings.h
Generated on
for QGIS API Documentation by
1.17.0