QtPass 1.5.1
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
passworddialog.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
3#ifndef SRC_PASSWORDDIALOG_H_
4#define SRC_PASSWORDDIALOG_H_
5
7#include <QDialog>
8
9namespace Ui {
10class PasswordDialog;
11}
12
13class QLineEdit;
14class QWidget;
15
22class PasswordDialog : public QDialog {
23 Q_OBJECT
24
25public:
26 explicit PasswordDialog(PasswordConfiguration passConfig,
27 QWidget *parent = nullptr);
28 PasswordDialog(QString file, const bool &isNew, QWidget *parent = nullptr);
30
35 void setPassword(const QString &password);
36
41 auto getPassword() -> QString;
42
47 void setTemplate(const QString &rawFields, bool useTemplate);
48
49 void templateAll(bool templateAll);
50 void setLength(int l);
51 void setPasswordCharTemplate(int t);
52 void usePwgen(bool usePwgen);
53
54public slots:
55 void setPass(const QString &output);
56
57private slots:
58 void on_checkBoxShow_stateChanged(int arg1);
59 void on_createPasswordButton_clicked();
60 void on_accepted();
61 void on_rejected();
62
63private:
64 Ui::PasswordDialog *ui;
65 PasswordConfiguration m_passConfig;
66 QStringList m_fields;
67 QString m_file;
68 bool m_templating{};
69 bool m_allFields{};
70 bool m_isNew;
71 QList<QLineEdit *> templateLines;
72 QList<QLineEdit *> otherLines;
73};
74
75#endif // SRC_PASSWORDDIALOG_H_
PasswordDialog Handles the inserting and editing of passwords.
void setPasswordCharTemplate(int t)
PasswordDialog::setPasswordCharTemplate PasswordDialog::setPasswordCharTemplate chose the template st...
void setPassword(const QString &password)
Sets content in the password field in the interface.
~PasswordDialog()
Pass{}{}wordDialog::~PasswordDialog basic destructor.
void usePwgen(bool usePwgen)
PasswordDialog::usePwgen PasswordDialog::usePwgen don't use own password generator.
void setTemplate(const QString &rawFields, bool useTemplate)
Sets content in the template for the interface.
void templateAll(bool templateAll)
PasswordDialog::templateAll basic setter for use in PasswordDialog::setPassword templating all tokeni...
void setLength(int l)
PasswordDialog::setLength PasswordDialog::setLength password length.
void setPass(const QString &output)
auto getPassword() -> QString
Returns the password as set in the password field in the interface.
Holds the Password configuration settings.