File indexing completed on 2025-01-05 05:09:30
0001 /* 0002 SPDX-FileCopyrightText: 2010-2012 Daniel Nicoletti <dantti12@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KCUPSPASSWORDDIALOG_H 0008 #define KCUPSPASSWORDDIALOG_H 0009 0010 #include <QObject> 0011 #include <QWidget> 0012 0013 class KCupsPasswordDialog : public QObject 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit KCupsPasswordDialog(QObject *parent = nullptr); 0018 void setMainWindow(WId mainwindow); 0019 void setPromptText(const QString &promptText); 0020 0021 public slots: 0022 void exec(const QString &username, bool wrongPassword); 0023 0024 bool accepted() const; 0025 QString username() const; 0026 QString password() const; 0027 0028 private: 0029 bool m_accepted; 0030 WId m_mainwindow; 0031 QString m_username; 0032 QString m_password; 0033 QString m_promptText; 0034 }; 0035 0036 #endif // KCUPSPASSWORDDIALOG_H