summaryrefslogtreecommitdiffstats
path: root/src/passworddialog.h
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2016-12-13 00:05:58 +0100
committerAnne Jan Brouwer <brouwer@annejan.com>2016-12-13 00:05:58 +0100
commit109958c1a14bbfab79bb30e72f2a706bcada4c60 (patch)
tree26de8388b1587c962a039c42efc93361a70f09c8 /src/passworddialog.h
parent641598e971bda056aea618bb67c8ab88e7b9da26 (diff)
Moved sources to src
Diffstat (limited to 'src/passworddialog.h')
-rw-r--r--src/passworddialog.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/passworddialog.h b/src/passworddialog.h
new file mode 100644
index 00000000..1deb1543
--- /dev/null
+++ b/src/passworddialog.h
@@ -0,0 +1,69 @@
+#ifndef PASSWORDDIALOG_H_
+#define PASSWORDDIALOG_H_
+
+#include "datahelpers.h"
+#include "pass.h"
+#include <QDialog>
+#include <QWidget>
+
+namespace Ui {
+class PasswordDialog;
+}
+
+/*!
+ \class PasswordDialog
+ \brief PasswordDialog Handles the inserting and editing of passwords.
+
+ Includes templated views.
+ */
+class PasswordDialog : public QDialog {
+ Q_OBJECT
+
+public:
+ explicit PasswordDialog(const passwordConfiguration &passConfig, Pass &pass,
+ QWidget *parent = 0);
+ ~PasswordDialog();
+
+ /*! Sets content in the password field in the interface.
+ \param password the password as a QString
+ \sa getPassword
+ */
+ void setPassword(QString password);
+
+ /*! Returns the password as set in the password field in the interface.
+ \return password as a QString
+ \sa setPassword
+ */
+ QString getPassword();
+
+ /*! Sets content in the template for the interface.
+ \param rawFields is the template as a QString
+ */
+ void setTemplate(QString);
+
+ /*! Sets the file (name) in the interface.
+ \param file name as a QString
+ */
+ void setFile(QString);
+
+ void useTemplate(bool useTemplate);
+ void templateAll(bool templateAll);
+ void setLength(int l);
+ void setPasswordCharTemplate(int t);
+ void usePwgen(bool usePwgen);
+
+private slots:
+ void on_checkBoxShow_stateChanged(int arg1);
+ void on_createPasswordButton_clicked();
+
+private:
+ Ui::PasswordDialog *ui;
+ const passwordConfiguration &m_passConfig;
+ Pass &m_pass;
+ QString passTemplate;
+ QStringList fields;
+ bool templating;
+ bool allFields;
+};
+
+#endif // PASSWORDDIALOG_H_