1 /* -*- mode: c++; c-basic-offset:4 -*- 2 commands/createopenpgpkeyfromcardkeyscommand.h 3 4 This file is part of Kleopatra, the KDE keymanager 5 SPDX-FileCopyrightText: 2020 g10 Code GmbH 6 SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de> 7 8 SPDX-License-Identifier: GPL-2.0-or-later 9 */ 10 11 #pragma once 12 13 #include <commands/cardcommand.h> 14 15 namespace Kleo 16 { 17 namespace Commands 18 { 19 20 class CreateOpenPGPKeyFromCardKeysCommand : public CardCommand 21 { 22 Q_OBJECT 23 public: 24 explicit CreateOpenPGPKeyFromCardKeysCommand(const std::string &serialNumber, const std::string &appName, QWidget *parent = nullptr); 25 ~CreateOpenPGPKeyFromCardKeysCommand() override; 26 27 static bool isSupported(); 28 29 private: 30 void doStart() override; 31 void doCancel() override; 32 33 private: 34 class Private; 35 inline Private *d_func(); 36 inline const Private *d_func() const; 37 Q_PRIVATE_SLOT(d_func(), void slotDialogAccepted()) 38 Q_PRIVATE_SLOT(d_func(), void slotDialogRejected()) 39 Q_PRIVATE_SLOT(d_func(), void slotResult(GpgME::Error)) 40 }; 41 42 } // namespace Commands 43 } // namespace Kleo 44 45