passwordmanager/gui/passwordgeneratordialog.h

44 lines
886 B
C
Raw Permalink Normal View History

2016-08-29 20:21:24 +02:00
#ifndef PASSWORDGENERATORDIALOG_H
#define PASSWORDGENERATORDIALOG_H
#include <passwordfile/util/opensslrandomdevice.h>
#include <QDialog>
2018-03-14 00:15:12 +01:00
#include <memory>
2018-03-14 00:17:14 +01:00
#include <vector>
2016-08-29 20:21:24 +02:00
namespace QtGui {
namespace Ui {
class PasswordGeneratorDialog;
}
2017-05-01 03:26:04 +02:00
class PasswordGeneratorDialog : public QDialog {
2016-08-29 20:21:24 +02:00
Q_OBJECT
2017-05-01 03:26:04 +02:00
2016-08-29 20:21:24 +02:00
public:
2018-01-26 15:52:43 +01:00
explicit PasswordGeneratorDialog(QWidget *parent = nullptr);
2018-03-14 00:15:12 +01:00
~PasswordGeneratorDialog() override;
2017-05-01 03:26:04 +02:00
protected:
bool event(QEvent *event) override;
2016-08-29 20:21:24 +02:00
private Q_SLOTS:
void generateNewPassword();
void handleCheckedCategoriesChanged();
void handlePasswordChanged();
void updateStyleSheet();
#ifndef QT_NO_CLIPBOARD
2016-08-29 20:21:24 +02:00
void copyPassword();
#endif
2016-08-29 20:21:24 +02:00
private:
2018-03-14 00:15:12 +01:00
std::unique_ptr<Ui::PasswordGeneratorDialog> m_ui;
2016-08-29 20:21:24 +02:00
std::vector<char> m_charset;
Util::OpenSslRandomDevice m_random;
};
2017-09-29 17:17:12 +02:00
} // namespace QtGui
2016-08-29 20:21:24 +02:00
#endif // PASSWORDGENERATORDIALOG_H