File indexing completed on 2024-06-16 05:01:29

0001 /*
0002    Copyright (C) 2013 by Glad Deschrijver <glad.deschrijver@gmail.com>
0003    Copyright (C) 2006 - 2016 Jan Kundrát <jkt@kde.org>
0004 
0005    This program is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU General Public License as
0007    published by the Free Software Foundation; either version 2 of
0008    the License or (at your option) version 3 or any later version
0009    accepted by the membership of KDE e.V. (or its successor approved
0010    by the membership of KDE e.V.), which shall act as a proxy
0011    defined in Section 14 of version 3 of the license.
0012 
0013    This program is distributed in the hope that it will be useful,
0014    but WITHOUT ANY WARRANTY; without even the implied warranty of
0015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016    GNU General Public License for more details.
0017 
0018    You should have received a copy of the GNU General Public License
0019    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0020 */
0021 
0022 #ifndef PASSWORDDIALOG_H
0023 #define PASSWORDDIALOG_H
0024 
0025 #include <QDialog>
0026 #include "ui_PasswordDialog.h"
0027 
0028 class QAction;
0029 class QKeySequence;
0030 
0031 namespace Gui
0032 {
0033 
0034 class PasswordDialog : public QDialog
0035 {
0036     Q_OBJECT
0037 
0038 public:
0039     ~PasswordDialog() override;
0040 
0041     static PasswordDialog *getPassword(QWidget *parent, const QString &windowTitle, const QString &description,
0042                                        const QString &errorMessage = QString());
0043 
0044 signals:
0045     void gotPassword(const QString &password);
0046 
0047 protected:
0048     explicit PasswordDialog(QWidget *parent = 0);
0049     void showEvent(QShowEvent *event) override;
0050 
0051     Ui::PasswordDialog ui;
0052 };
0053 
0054 } // namespace Gui
0055 
0056 #endif // PASSWORDDIALOG_H