QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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
18#include "moc_qgsauthcertificatemanager.cpp"
19#include "qgssettings.h"
20
21#include <QDialog>
22#include <QDialogButtonBox>
23#include <QPushButton>
24
26 : QWidget( parent )
27{
28 setupUi( this );
29 const QgsSettings settings;
30 tabWidget->setCurrentIndex( settings.value( QStringLiteral( "AuthCertEditorsSelectedTab" ), 0, QgsSettings::Section::Auth ).toInt() );
31}
32
34{
35 QgsSettings settings;
36 settings.setValue( QStringLiteral( "AuthCertEditorsSelectedTab" ), tabWidget->currentIndex(), QgsSettings::Section::Auth );
37}
38
39
41 : QDialog( parent )
42{
43 setWindowTitle( tr( "Certificate Manager" ) );
44 QVBoxLayout *layout = new QVBoxLayout( this );
45 layout->setContentsMargins( 6, 6, 6, 6 );
46
47 mCertEditors = new QgsAuthCertEditors( this );
48 layout->addWidget( mCertEditors );
49
50 QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Close,
51 Qt::Horizontal, this );
52 buttonBox->button( QDialogButtonBox::Close )->setDefault( true );
53 connect( buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close );
54 layout->addWidget( buttonBox );
55
56 setLayout( layout );
57}
Wrapper widget to manage available certificate editors.
QgsAuthCertEditors(QWidget *parent=nullptr)
Construct a widget to contain various certificate editors.
~QgsAuthCertEditors() override
Destructor: store last selected tab.
QgsAuthCertManager(QWidget *parent=nullptr)
Construct a dialog wrapper for widget to manage available certificate editors.
This class is a composition of two QSettings instances:
Definition qgssettings.h:64
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.