Implement the GUI for the password generator.

Closes #52
This commit is contained in:
Felix Geyer 2013-03-12 22:42:06 +01:00
parent 2ed3201b14
commit 5dadedbf70
5 changed files with 270 additions and 6 deletions

View file

@ -21,6 +21,7 @@
#include <QtGui/QWidget>
#include "core/Global.h"
#include "core/PasswordGenerator.h"
namespace Ui {
class PasswordGeneratorWidget;
@ -33,8 +34,21 @@ class PasswordGeneratorWidget : public QWidget
public:
explicit PasswordGeneratorWidget(QWidget* parent = Q_NULLPTR);
~PasswordGeneratorWidget();
void reset();
Q_SIGNALS:
void newPassword(const QString& password);
private Q_SLOTS:
void updateApplyEnabled(const QString& password);
void togglePassword(bool checked);
void generatePassword();
void emitNewPassword();
private:
PasswordGenerator::CharClasses charClasses();
PasswordGenerator::GeneratorFlags generatorFlags();
const QScopedPointer<Ui::PasswordGeneratorWidget> m_ui;
};