passdlg.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef __kio_pass_dlg_h__
00021
#define __kio_pass_dlg_h__
00022
00023
#include <kdialogbase.h>
00024
00025
class QGridLayout;
00026
00027
namespace KIO {
00028
00036 class PasswordDialog :
public KDialogBase
00037 {
00038 Q_OBJECT
00039
00040
public:
00051
PasswordDialog(
const QString& prompt,
const QString& user,
00052
bool enableKeep =
false,
bool modal=
true,
00053
QWidget* parent=0,
const char* name=0 );
00054
00058
~PasswordDialog();
00059
00064
void setPrompt(
const QString& prompt );
00065
00076
void addCommentLine(
const QString& label,
const QString comment );
00077
00082
QString password()
const;
00083
00088
QString username()
const;
00089
00095
bool keepPassword()
const;
00096
00103
void setKeepPassword(
bool b );
00104
00111
void setUserReadOnly(
bool readOnly );
00112
00116 KDE_DEPRECATED
void setEnableUserField(
bool enable,
bool=
false ) {
00117 setUserReadOnly( !enable );
00118 };
00119
00125
void setPassword(
const QString& password );
00126
00143
static int getNameAndPassword(
QString& user,
QString& pass,
bool* keep,
00144
const QString& prompt = QString::null,
00145
bool readOnly =
false,
00146
const QString& caption = QString::null,
00147
const QString& comment = QString::null,
00148
const QString& label = QString::null );
00149
00150
private slots:
00151
void slotKeep(
bool );
00152
00153
private:
00154
void init(
const QString&,
const QString&,
bool );
00155
00156
protected:
00157
virtual void virtual_hook(
int id,
void* data );
00158
private:
00159
struct PasswordDialogPrivate;
00160 PasswordDialogPrivate* d;
00161 };
00162
00163 }
00164
00165
#endif
This file is part of the documentation for kio Library Version 3.2.3.