QtPass 1.6.0
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: 2015 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
22
27
32
40
46
52
58
63
68
73
77
81
85class PasswordDialog : public QDialog {
86 Q_OBJECT
87
88public:
89 explicit PasswordDialog(PasswordConfiguration passConfig,
90 QWidget *parent = nullptr);
91 PasswordDialog(QString file, const bool &isNew, QWidget *parent = nullptr);
92 ~PasswordDialog() override;
93
98 void setPassword(const QString &password);
99
104 auto getPassword() -> QString;
105
110 void setTemplate(const QString &rawFields, bool useTemplate);
111
112 void templateAll(bool templateAll);
113 void setLength(int l);
114 void setPasswordCharTemplate(int t);
115 void usePwgen(bool usePwgen);
116
117public slots:
118 void setPass(const QString &output);
119
120private slots:
121 void on_checkBoxShow_stateChanged(int arg1);
122 void on_createPasswordButton_clicked();
123 void on_accepted();
124 void on_rejected();
125
126private:
127 Ui::PasswordDialog *ui;
128 PasswordConfiguration m_passConfig;
129 QStringList m_fields;
130 QString m_file;
131 bool m_templating{};
132 bool m_allFields{};
133 bool m_isNew;
134 QList<QLineEdit *> templateLines;
135 QList<QLineEdit *> otherLines;
136};
137
138#endif // SRC_PASSWORDDIALOG_H_
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(PasswordConfiguration passConfig, QWidget *parent=nullptr)
PasswordDialog::PasswordDialog basic constructor.
~PasswordDialog() override
PasswordDialog::~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)
Sets the password from pass show output.
auto getPassword() -> QString
Returns the password as set in the password field in the interface.
Holds the Password configuration settings.