File indexing completed on 2024-04-21 05:48:25

0001 /**
0002  * SPDX-FileCopyrightText: (C) 2006 Petri Damsten <damu@iki.fi>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef PASSWORD_H
0007 #define PASSWORD_H
0008 
0009 #include <config.h>
0010 
0011 #ifdef HAVE_LIBGPGME
0012 
0013 #include "ui_passwordlayout.h"
0014 #include <QDialog>
0015 
0016 /**
0017     @author Petri Damsten <damu@iki.fi>
0018 */
0019 class Password : public QWidget, public Ui::PasswordLayout
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit Password(QWidget *parent = nullptr);
0024     ~Password();
0025 };
0026 
0027 class PasswordDlg : public QDialog
0028 {
0029     Q_OBJECT
0030 public:
0031     PasswordDlg(QWidget *parent = 0);
0032     ~PasswordDlg();
0033 
0034     QString key() const;
0035     int type() const;
0036     void setKey(const QString &key);
0037     void setType(int type);
0038 
0039     /** Reimplemented from {K,Q}Dialog
0040      */
0041     void accept() override;
0042 
0043 private:
0044     Password *w;
0045 };
0046 
0047 #endif // HAVE_LIBGPGME
0048 
0049 #endif // PASSWORD_H