File indexing completed on 2024-06-23 05:13:40

0001 /* -*- mode: c++; c-basic-offset:4 -*-
0002     exportcertificatecommand.h
0003 
0004     This file is part of Kleopatra, the KDE keymanager
0005     SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 #include "command.h"
0013 
0014 namespace Kleo
0015 {
0016 class ExportCertificateCommand : public Command
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit ExportCertificateCommand(QAbstractItemView *view, KeyListController *parent);
0021     explicit ExportCertificateCommand(KeyListController *parent);
0022     explicit ExportCertificateCommand(const GpgME::Key &key);
0023     ~ExportCertificateCommand() override;
0024 
0025     /* reimp */ static Restrictions restrictions()
0026     {
0027         return NeedSelection;
0028     }
0029 
0030     void setOpenPGPFileName(const QString &fileName);
0031     QString openPGPFileName() const;
0032 
0033     void setX509FileName(const QString &fileName);
0034     QString x509FileName() const;
0035 
0036 private:
0037     void doStart() override;
0038     void doCancel() override;
0039 
0040 private:
0041     class Private;
0042     inline Private *d_func();
0043     inline const Private *d_func() const;
0044 };
0045 }