1 /***************************************************************************
2 * Copyright (C) 2005 by Tarek Saidi *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; version 2 of the License. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
24 #include "ui_PasswordGenDlg.h"
25 #include "EditEntryDlg.h"
27 class CGenPwDialog : public QDialog, public Ui_GenPwDlg
31 CGenPwDialog(QWidget* parent, bool StandAloneMode, Qt::WFlags fl = 0);
39 void AddToAssoctable(QList<QChar>& table,int start,int end,int& pos);
40 PwGroup AddToAssoctableGroup(QList<QChar>& table,int start,int end,int& pos);
41 void paintEvent(QPaintEvent* event);
42 QString generatePasswordInternal(int length);
44 static bool EntropyCollected;
45 QPushButton* AcceptButton;
51 void estimateQuality();
52 void OnCollectEntropyChanged(int);
54 void setGenerateEnabled();
55 void setAcceptEnabled(const QString& str);
58 class PassCharValidator : public QValidator
63 PassCharValidator(QObject* parent);
64 State validate(QString& input, int& pos) const;