mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-04 16:48:48 +00:00
PDF: Merge the certs settings page to the regular pdf settings page
This commit is contained in:
parent
9d0800a57a
commit
1f63f91dc4
Binary file not shown.
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 19 KiB |
|
@ -486,7 +486,7 @@ Context menu actions like Rename Bookmarks etc.)
|
|||
<listitem><para>The system-wide <filename>/etc/pki/nssdb</filename> certificate store.</para></listitem>
|
||||
<listitem><para>The current user <filename>$HOME/.pki/nssdb</filename></para></listitem>
|
||||
</itemizedlist>
|
||||
If you want to use a custom certificate store you can do so by setting it in the <link linkend="config-pdf-digital-signatures">PDF Digital Signature Certificates</link> section of the <link linkend="configure-backends">Configure Backends...</link> dialog.
|
||||
If you want to use a custom certificate store you can do so by setting it in the <link linkend="config-pdf-digital-signatures">&PDF; Backend Configuration</link> section of the <link linkend="configure-backends">Configure Backends...</link> dialog.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
|
@ -2463,8 +2463,7 @@ Context menu actions like Rename Bookmarks etc.)
|
|||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</sect1>
|
||||
<sect1 id="config-pdf-digital-signatures">
|
||||
<sect2 id="config-pdf-digital-signatures">
|
||||
<title>&PDF; Digital Signature Certificates</title>
|
||||
<para>
|
||||
<screenshot><mediaobject><imageobject><imagedata fileref="config-pdf-digital-signatures.png" format="PNG"/></imageobject></mediaobject></screenshot>
|
||||
|
@ -2473,6 +2472,7 @@ Context menu actions like Rename Bookmarks etc.)
|
|||
<para>
|
||||
It also lists the certificates available in the current Certificate Database (if any).
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
<chapter id="configure">
|
||||
|
|
|
@ -41,20 +41,14 @@ set(okularGenerator_poppler_PART_SRCS
|
|||
formfields.cpp
|
||||
annots.cpp
|
||||
pdfsignatureutils.cpp
|
||||
pdfsettingswidget.cpp
|
||||
)
|
||||
|
||||
if(HAVE_POPPLER_SIGNING)
|
||||
set(okularGenerator_poppler_PART_SRCS
|
||||
${okularGenerator_poppler_PART_SRCS} certificatetools.cpp)
|
||||
endif()
|
||||
|
||||
ki18n_wrap_ui(okularGenerator_poppler_PART_SRCS
|
||||
conf/pdfsettingswidget.ui
|
||||
conf/certsettingswidget.ui
|
||||
)
|
||||
|
||||
kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS conf/pdfsettings.kcfgc )
|
||||
kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS GENERATE_MOC conf/certsettings.kcfgc )
|
||||
kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS GENERATE_MOC conf/pdfsettings.kcfgc )
|
||||
|
||||
okular_add_generator(okularGenerator_poppler ${okularGenerator_poppler_PART_SRCS})
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name="okular-generator-popplercertsrc"/>
|
||||
<signal name="useDefaultDBChanged" />
|
||||
<signal name="dBCertificatePathChanged" />
|
||||
<group name="Signatures" >
|
||||
<entry key="UseDefaultDB" type="Bool">
|
||||
<default>true</default>
|
||||
<emit signal="useDefaultDBChanged" />
|
||||
</entry>
|
||||
<entry key="DBCertificatePath" type="String">
|
||||
<emit signal="dBCertificatePathChanged" />
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
<!-- vim:set ts=4 -->
|
|
@ -1,4 +0,0 @@
|
|||
File=certsettings.kcfg
|
||||
ClassName=CertificateSettings
|
||||
Mutators=true
|
||||
Singleton=true
|
|
@ -1,94 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DlgSignaturesBase</class>
|
||||
<widget class="QWidget" name="DlgSignaturesBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>675</width>
|
||||
<height>225</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="DBGroupBox">
|
||||
<property name="title">
|
||||
<string>Certificate Database</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="kcfg_UseDefaultDB">
|
||||
<property name="text">
|
||||
<string>Default:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="customRadioButton">
|
||||
<property name="text">
|
||||
<string>Custom:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="defaultLabel">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="certificatesGroup">
|
||||
<property name="title">
|
||||
<string>Available Certificates</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="certificatesPlaceholder"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loadSignaturesButton">
|
||||
<property name="text">
|
||||
<string>&Load Signatures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -4,6 +4,8 @@
|
|||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name="okular-generator-popplerrc"/>
|
||||
<signal name="useDefaultDBChanged" />
|
||||
<signal name="dBCertificatePathChanged" />
|
||||
<group name="General">
|
||||
<entry key="EnhanceThinLines" type="Enum" >
|
||||
<default>No</default>
|
||||
|
@ -14,5 +16,14 @@
|
|||
</choices>
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Signatures" >
|
||||
<entry key="UseDefaultCertDB" type="Bool">
|
||||
<default>true</default>
|
||||
<emit signal="useDefaultDBChanged" />
|
||||
</entry>
|
||||
<entry key="DBCertificatePath" type="String">
|
||||
<emit signal="dBCertificatePathChanged" />
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
||||
<!-- vim:set ts=4 -->
|
||||
|
|
|
@ -1,39 +1,125 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PDFSettingsWidget</class>
|
||||
<widget class="QWidget" name="PDFSettingsWidget">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Enhance thin lines:</string>
|
||||
<class>PDFSettingsWidgetBase</class>
|
||||
<widget class="QWidget" name="PDFSettingsWidgetBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>721</width>
|
||||
<height>431</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Enhance thin lines:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KComboBox" name="kcfg_EnhanceThinLines">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>No</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Solid</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Shape</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="certDBGroupBox">
|
||||
<property name="title">
|
||||
<string>Certificate Database</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="kcfg_UseDefaultCertDB">
|
||||
<property name="text">
|
||||
<string>Default:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="customRadioButton">
|
||||
<property name="text">
|
||||
<string>Custom:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="defaultLabel">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="certificatesGroup">
|
||||
<property name="title">
|
||||
<string>Available Certificates</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="certificatesPlaceholder"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loadSignaturesButton">
|
||||
<property name="text">
|
||||
<string>&Load Signatures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="kcfg_EnhanceThinLines">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>No</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Solid</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Shape</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include "core/action.h"
|
||||
|
||||
#include "certsettings.h"
|
||||
#include "pdfsignatureutils.h"
|
||||
|
||||
#include <poppler-qt5.h>
|
||||
|
|
|
@ -52,10 +52,6 @@
|
|||
#include <core/utils.h>
|
||||
|
||||
#include "pdfsettings.h"
|
||||
#include "ui_pdfsettingswidget.h"
|
||||
|
||||
#include "certificatetools.h"
|
||||
#include "certsettings.h"
|
||||
|
||||
#include <config-okular-poppler.h>
|
||||
|
||||
|
@ -65,6 +61,7 @@
|
|||
#include "annots.h"
|
||||
#include "debug_pdf.h"
|
||||
#include "formfields.h"
|
||||
#include "pdfsettingswidget.h"
|
||||
#include "pdfsignatureutils.h"
|
||||
#include "popplerembeddedfile.h"
|
||||
|
||||
|
@ -572,8 +569,8 @@ PDFGenerator::PDFGenerator(QObject *parent, const QVariantList &args)
|
|||
// so doing it all the time won't hurt either
|
||||
Poppler::setDebugErrorFunction(PDFGeneratorPopplerDebugFunction, QVariant());
|
||||
#ifdef HAVE_POPPLER_SIGNING
|
||||
if (!CertificateSettings::useDefaultDB()) {
|
||||
Poppler::setNSSDir(QUrl(CertificateSettings::dBCertificatePath()).toLocalFile());
|
||||
if (!PDFSettings::useDefaultCertDB()) {
|
||||
Poppler::setNSSDir(QUrl(PDFSettings::dBCertificatePath()).toLocalFile());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1478,15 +1475,9 @@ bool PDFGenerator::reparseConfig()
|
|||
|
||||
void PDFGenerator::addPages(KConfigDialog *dlg)
|
||||
{
|
||||
Ui_PDFSettingsWidget pdfsw;
|
||||
QWidget *w = new QWidget(dlg);
|
||||
pdfsw.setupUi(w);
|
||||
PDFSettingsWidget *w = new PDFSettingsWidget(dlg);
|
||||
;
|
||||
dlg->addPage(w, PDFSettings::self(), i18n("PDF"), QStringLiteral("application-pdf"), i18n("PDF Backend Configuration"));
|
||||
|
||||
#ifdef HAVE_POPPLER_SIGNING
|
||||
CertificateTools *certTools = new CertificateTools(dlg);
|
||||
dlg->addPage(certTools, CertificateSettings::self(), i18n("PDF Certificates"), QStringLiteral("application-pkcs7-signature"), i18n("PDF Digital Signature Certificates"));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool PDFGenerator::setDocumentRenderHints()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2019 by Bubli <Katarina.Behrens@cib.de> *
|
||||
* Copyright (C) 2020 by Albert Astals Cid <albert.astals.cid@kdab.com> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
|
@ -7,9 +8,9 @@
|
|||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "certificatetools.h"
|
||||
#include "pdfsettingswidget.h"
|
||||
|
||||
#include "certsettings.h"
|
||||
#include "pdfsettings.h"
|
||||
#include "pdfsignatureutils.h"
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
@ -21,76 +22,83 @@
|
|||
#include <QTreeWidget>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
CertificateTools::CertificateTools(QWidget *parent)
|
||||
PDFSettingsWidget::PDFSettingsWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_pdfsw.setupUi(this);
|
||||
#ifdef HAVE_POPPLER_SIGNING
|
||||
if (Poppler::hasNSSSupport()) {
|
||||
m_certsw.setupUi(this);
|
||||
m_certsw.loadSignaturesButton->hide();
|
||||
m_pdfsw.loadSignaturesButton->hide();
|
||||
|
||||
KUrlRequester *pDlg = new KUrlRequester();
|
||||
pDlg->setObjectName(QStringLiteral("kcfg_DBCertificatePath"));
|
||||
pDlg->setMode(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
|
||||
pDlg->setEnabled(false);
|
||||
m_certsw.formLayout->setWidget(1, QFormLayout::FieldRole, pDlg);
|
||||
m_pdfsw.formLayout->setWidget(1, QFormLayout::FieldRole, pDlg);
|
||||
|
||||
connect(m_certsw.customRadioButton, &QRadioButton::toggled, pDlg, &KUrlRequester::setEnabled);
|
||||
connect(m_pdfsw.customRadioButton, &QRadioButton::toggled, pDlg, &KUrlRequester::setEnabled);
|
||||
|
||||
if (!CertificateSettings::useDefaultDB()) {
|
||||
m_certsw.customRadioButton->setChecked(true);
|
||||
m_certsw.defaultLabel->setVisible(false);
|
||||
if (!PDFSettings::useDefaultCertDB()) {
|
||||
m_pdfsw.customRadioButton->setChecked(true);
|
||||
m_pdfsw.defaultLabel->setVisible(false);
|
||||
}
|
||||
|
||||
m_tree = new QTreeWidget(this);
|
||||
m_tree->setHeaderLabels({i18nc("Name of the person to whom the cerficate was issued", "Issued to"), i18n("E-mail"), i18nc("Certificate expiration date", "Expiration date")});
|
||||
m_tree->setRootIsDecorated(false);
|
||||
|
||||
m_certsw.certificatesPlaceholder->addWidget(m_tree);
|
||||
m_pdfsw.certificatesPlaceholder->addWidget(m_tree);
|
||||
|
||||
connect(CertificateSettings::self(), &CertificateSettings::useDefaultDBChanged, this, &CertificateTools::warnRestartNeeded);
|
||||
connect(CertificateSettings::self(), &CertificateSettings::dBCertificatePathChanged, this, [this] {
|
||||
if (!CertificateSettings::useDefaultDB()) {
|
||||
connect(PDFSettings::self(), &PDFSettings::useDefaultDBChanged, this, &PDFSettingsWidget::warnRestartNeeded);
|
||||
connect(PDFSettings::self(), &PDFSettings::dBCertificatePathChanged, this, [this] {
|
||||
if (!PDFSettings::useDefaultCertDB()) {
|
||||
warnRestartNeeded();
|
||||
}
|
||||
});
|
||||
connect(m_certsw.loadSignaturesButton, &QPushButton::clicked, this, [this] {
|
||||
connect(m_pdfsw.loadSignaturesButton, &QPushButton::clicked, this, [this] {
|
||||
m_certificatesAsked = false;
|
||||
update();
|
||||
});
|
||||
} else {
|
||||
m_tree = nullptr;
|
||||
QHBoxLayout *lay = new QHBoxLayout(this);
|
||||
QLabel *l = new QLabel(i18n("You are using a Poppler library built without NSS support.\nAdding Digital Signatures isn't available for that reason"));
|
||||
l->setWordWrap(true);
|
||||
lay->addWidget(l);
|
||||
}
|
||||
#else
|
||||
m_pdfsw.certDBGroupBox->hide();
|
||||
m_pdfsw.certificatesGroup->hide();
|
||||
m_pdfsw.loadSignaturesButton->hide();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CertificateTools::event(QEvent *e)
|
||||
bool PDFSettingsWidget::event(QEvent *e)
|
||||
{
|
||||
if (m_tree && e->type() == QEvent::Paint && !m_certificatesAsked) {
|
||||
m_certificatesAsked = true;
|
||||
|
||||
#ifdef HAVE_POPPLER_SIGNING
|
||||
PopplerCertificateStore st;
|
||||
bool userCancelled;
|
||||
const QList<Okular::CertificateInfo *> certs = st.signingCertificates(&userCancelled);
|
||||
|
||||
m_certsw.loadSignaturesButton->setVisible(userCancelled);
|
||||
m_pdfsw.loadSignaturesButton->setVisible(userCancelled);
|
||||
|
||||
for (auto cert : certs) {
|
||||
new QTreeWidgetItem(m_tree, {cert->subjectInfo(Okular::CertificateInfo::EntityInfoKey::CommonName), cert->subjectInfo(Okular::CertificateInfo::EntityInfoKey::EmailAddress), cert->validityEnd().toString("yyyy-MM-dd")});
|
||||
}
|
||||
qDeleteAll(certs);
|
||||
|
||||
m_certsw.defaultLabel->setText(Poppler::getNSSDir());
|
||||
m_pdfsw.defaultLabel->setText(Poppler::getNSSDir());
|
||||
|
||||
m_tree->resizeColumnToContents(1);
|
||||
m_tree->resizeColumnToContents(0);
|
||||
#endif
|
||||
}
|
||||
return QWidget::event(e);
|
||||
}
|
||||
|
||||
void CertificateTools::warnRestartNeeded()
|
||||
void PDFSettingsWidget::warnRestartNeeded()
|
||||
{
|
||||
if (!m_warnedAboutRestart) {
|
||||
m_warnedAboutRestart = true;
|
|
@ -1,5 +1,6 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2019 by Bubli <Katarina.Behrens@cib.de> *
|
||||
* Copyright (C) 2020 by Albert Astals Cid <albert.astals.cid@kdab.com> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
|
@ -7,30 +8,30 @@
|
|||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _CERTIFICATETOOLS_H_
|
||||
#define _CERTIFICATETOOLS_H_
|
||||
#ifndef PDFSETTINGSWIDGET_H
|
||||
#define PDFSETTINGSWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "ui_certsettingswidget.h"
|
||||
#include "ui_pdfsettingswidget.h"
|
||||
|
||||
class QTreeWidget;
|
||||
|
||||
class CertificateTools : public QWidget
|
||||
class PDFSettingsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CertificateTools(QWidget *parent = nullptr);
|
||||
explicit PDFSettingsWidget(QWidget *parent = nullptr);
|
||||
bool event(QEvent *e) override;
|
||||
|
||||
private:
|
||||
void warnRestartNeeded();
|
||||
|
||||
QTreeWidget *m_tree;
|
||||
QTreeWidget *m_tree = nullptr;
|
||||
bool m_certificatesAsked = false;
|
||||
bool m_warnedAboutRestart = false;
|
||||
Ui_DlgSignaturesBase m_certsw;
|
||||
Ui_PDFSettingsWidgetBase m_pdfsw;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user