KDEUI
knewpassworddialog.h
Go to the documentation of this file.
00001 // vi: ts=8 sts=4 sw=4 00002 /* This file is part of the KDE libraries 00003 Copyright (C) 1998 Pietro Iglio <iglio@fub.it> 00004 Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org> 00005 Copyright (C) 2004,2005 Andrew Coles <andrew_coles@yahoo.co.uk> 00006 Copyright (C) 2006,2007 Olivier Goffart <ogoffart @ kde.org> 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License version 2 as published by the Free Software Foundation. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 #ifndef KNEWPASSWORDDIALOG_H 00023 #define KNEWPASSWORDDIALOG_H 00024 00025 // ### KDE 5: remove 00026 #include <QtGui/QLineEdit> 00027 00028 #include <kdialog.h> 00029 00030 class QWidget; 00031 00032 00064 class KDEUI_EXPORT KNewPasswordDialog 00065 : public KDialog 00066 { 00067 Q_OBJECT 00068 00069 public: 00075 explicit KNewPasswordDialog(QWidget *parent=0); 00076 00080 virtual ~KNewPasswordDialog(); 00081 00085 void setPrompt(const QString &prompt); 00086 00090 QString prompt() const; 00091 00097 void setPixmap(const QPixmap&); 00098 00102 QPixmap pixmap() const; 00103 00109 void setAllowEmptyPasswords(bool allowed); 00110 00116 bool allowEmptyPasswords() const; 00117 00125 void setMinimumPasswordLength(int minLength); 00126 00130 int minimumPasswordLength() const; 00131 00137 void setMaximumPasswordLength(int maxLength); 00138 00142 int maximumPasswordLength() const; 00143 00153 void setReasonablePasswordLength(int reasonableLength); 00154 00158 int reasonablePasswordLength() const; 00159 00169 void setPasswordStrengthWarningLevel(int warningLevel); 00170 00174 int passwordStrengthWarningLevel() const; 00175 00182 QString password() const; 00183 00187 virtual void accept(); 00188 00189 protected: 00190 00196 virtual bool checkPassword(const QString &) ; 00197 00205 bool checkAndGetPassword(QString *pwd); 00206 00207 Q_SIGNALS: 00208 00212 void newPassword(const QString &password); 00213 00214 00215 private: 00216 class KNewPasswordDialogPrivate; 00217 KNewPasswordDialogPrivate* const d; 00218 00219 Q_PRIVATE_SLOT( d, void _k_textChanged() ) 00220 }; 00221 00222 #endif // KNEWPASSWORDDIALOG_H 00223 00224 // kate: space-indent on; indent-width 4; encoding utf-8; replace-tabs on;
KDE 4.6 API Reference