fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kio / kio / passworddialog.h
blobfb5c6b9f1d4d463d4262a00d0b586a2572610050
1 /* This file is part of the KDE libraries
2 Copyright (C) 2000 David Faure <faure@kde.org>
3 Copyright (C) 2000 Dawit Alemayehu <adawit@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with this library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 51 Franklin Street,
17 Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef kio_pass_word_dialog_h
21 #define kio_pass_word_dialog_h
23 #include <kio/kio_export.h>
24 #include <kpassworddialog.h>
27 namespace KIO {
29 /**
30 * @deprecated use KPasswordDialog
31 * A dialog for requesting a login and a password from the end user.
33 * KIO-Slave authors are encouraged to use SlaveBase::openPassDlg
34 * instead of directly instantiating this dialog.
35 * @short dialog for requesting login and password from the end user
37 class KIO_EXPORT_DEPRECATED PasswordDialog : public KPasswordDialog
39 Q_OBJECT
41 public:
42 /**
43 * Create a password dialog.
45 * @param prompt instructional text to be shown.
46 * @param user username, if known initially.
47 * @param enableKeep if true, shows checkbox that makes password persistent until KDE is shutdown.
48 * @param modal if true, the dialog will be modal (default:true).
49 * @param parent the parent widget (default:NULL).
51 PasswordDialog( const QString& prompt, const QString& user,
52 bool enableKeep = false, bool modal=true,
53 QWidget* parent=0 );
55 /**
56 * Destructor
58 ~PasswordDialog();
61 /**
62 * A convienence static method for obtaining authorization
63 * information from the end user.
66 * @param user username
67 * @param pass password
68 * @param keep pointer to flag that indicates whether to keep password (can be null)
69 * @param prompt text to display to user.
70 * @param readOnly make the username field read-only.
71 * @param caption set the title bar to given text.
72 * @param comment extra comment to display to user.
73 * @param label optinal label for extra comment.
75 * @return Accepted/Rejected based on the user choice.
77 static int getNameAndPassword( QString& user, QString& pass, bool* keep,
78 const QString& prompt = QString(),
79 bool readOnly = false,
80 const QString& caption = QString(),
81 const QString& comment = QString(),
82 const QString& label = QString() );
88 #endif