passdlg.h
/* This file is part of the KDE libraries
Copyright (C) 2000 David Faure <faure@kde.org>
Copyright (C) 2000 Dawit Alemayehu <adawit@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __kio_pass_dlg_h__
#define __kio_pass_dlg_h__
#include <kdialogbase.h>
class QGridLayout;
namespace KIO {
class KIO_EXPORT PasswordDialog : public KDialogBase
{
Q_OBJECT
public:
PasswordDialog( const QString& prompt, const QString& user,
bool enableKeep = false, bool modal=true,
QWidget* parent=0, const char* name=0 );
~PasswordDialog();
void setPrompt( const QString& prompt );
void addCommentLine( const QString& label, const QString comment );
QString password() const;
QString username() const;
bool keepPassword() const;
void setKeepPassword( bool b );
void setUserReadOnly( bool readOnly );
KDE_DEPRECATED void setEnableUserField( bool enable, bool=false ) {
setUserReadOnly( !enable );
};
void setPassword( const QString& password );
void setKnownLogins( const QMap<QString, QString>& knownLogins );
static int getNameAndPassword( QString& user, QString& pass, bool* keep,
const QString& prompt = QString::null,
bool readOnly = false,
const QString& caption = QString::null,
const QString& comment = QString::null,
const QString& label = QString::null );
private slots:
void slotKeep( bool );
void slotActivated( const QString& userName );
private:
void init( const QString&, const QString&, bool );
protected:
virtual void virtual_hook( int id, void* data );
private:
struct PasswordDialogPrivate;
PasswordDialogPrivate* d;
};
}
#endif
KIO::PasswordDialog
A dialog for requesting a login and a password from the end user.
Definition: passdlg.h:36
KIO::PasswordDialog::setEnableUserField
KDE_DEPRECATED void setEnableUserField(bool enable, bool=false)
Definition: passdlg.h:116

KDE Home | KDE Accessibility Home | Description of Access Keys