1 /* -*- mode: c++; c-basic-offset:4 -*- 2 commands/setinitialpincommand.h 3 4 This file is part of Kleopatra, the KDE keymanager 5 SPDX-FileCopyrightText: 2009 Klarälvdalens Datakonsult AB 6 7 SPDX-License-Identifier: GPL-2.0-or-later 8 */ 9 10 #pragma once 11 12 #include <commands/cardcommand.h> 13 14 namespace Kleo 15 { 16 namespace Commands 17 { 18 19 class SetInitialPinCommand : public CardCommand 20 { 21 Q_OBJECT 22 public: 23 SetInitialPinCommand(const std::string &serialNumber); 24 ~SetInitialPinCommand() override; 25 restrictions()26 /* reimp */ static Restrictions restrictions() 27 { 28 return AnyCardHasNullPin; 29 } 30 31 QDialog *dialog() const; 32 33 private: 34 void doStart() override; 35 void doCancel() override; 36 37 private: 38 class Private; 39 inline Private *d_func(); 40 inline const Private *d_func() const; 41 Q_PRIVATE_SLOT(d_func(), void slotDialogRejected()) 42 Q_PRIVATE_SLOT(d_func(), void slotDialogAccepted()) 43 Q_PRIVATE_SLOT(d_func(), void slotNksPinRequested()) 44 Q_PRIVATE_SLOT(d_func(), void slotSigGPinRequested()) 45 }; 46 47 } 48 } 49 50