File indexing completed on 2024-04-28 04:42:45

0001 /*
0002     SPDX-FileCopyrightText: 2009 Dawit Alemayehu <adawit@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PASSWORDBAR_H
0008 #define PASSWORDBAR_H
0009 
0010 #include <KMessageWidget>
0011 
0012 #include <QUrl>
0013 
0014 
0015 class PasswordBar : public KMessageWidget
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit PasswordBar(QWidget *parent = nullptr);
0020     ~PasswordBar() override;
0021 
0022     QUrl url() const;
0023     QString requestKey() const;
0024 
0025     void setUrl(const QUrl&);
0026     void setRequestKey(const QString&);
0027 
0028 Q_SIGNALS:
0029     void saveFormDataRejected(const QString &key);
0030     void saveFormDataAccepted(const QString &key);
0031     void done();
0032 
0033 private Q_SLOTS:
0034     void onNotNowButtonClicked();
0035     void onNeverButtonClicked();
0036     void onRememberButtonClicked();
0037 
0038 private:
0039     void clear();
0040 
0041     QUrl m_url;
0042     QString m_requestKey;
0043 };
0044 
0045 #endif // PASSWORDBAR_H