mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-21 20:49:00 -04:00
Reworked the PasswordGeneratorWidget.
It's loosely based on OS X PasswordAssistant. Generation happens as soon as a change is made, and on open of the widget. A combobox has been added to allow one to choose from some randomally-generated alternatives, and the UI is generally been made a bit more compact. Written by Michael Curtis <michael@moltenmercury.org> and revised by me. Closes #119 https://github.com/keepassx/keepassx/pull/38
This commit is contained in:
parent
29c997e1bc
commit
3af2307468
8 changed files with 449 additions and 197 deletions
|
@ -19,6 +19,7 @@
|
|||
#define KEEPASSX_PASSWORDGENERATORWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QComboBox>
|
||||
|
||||
#include "core/Global.h"
|
||||
#include "core/PasswordGenerator.h"
|
||||
|
@ -27,6 +28,8 @@ namespace Ui {
|
|||
class PasswordGeneratorWidget;
|
||||
}
|
||||
|
||||
class PasswordGenerator;
|
||||
|
||||
class PasswordGeneratorWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -43,14 +46,21 @@ Q_SIGNALS:
|
|||
private Q_SLOTS:
|
||||
void updateApplyEnabled(const QString& password);
|
||||
void togglePassword(bool checked);
|
||||
void generatePassword();
|
||||
|
||||
void emitNewPassword();
|
||||
void saveSettings();
|
||||
void sliderMoved();
|
||||
void spinBoxChanged();
|
||||
|
||||
void updateGenerator();
|
||||
|
||||
private:
|
||||
bool m_updatingSpinBox;
|
||||
|
||||
PasswordGenerator::CharClasses charClasses();
|
||||
PasswordGenerator::GeneratorFlags generatorFlags();
|
||||
|
||||
const QScopedPointer<PasswordGenerator> m_generator;
|
||||
const QScopedPointer<Ui::PasswordGeneratorWidget> m_ui;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue