QtPass 1.4.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
configdialog.h
Go to the documentation of this file.
1#ifndef CONFIGDIALOG_H_
2#define CONFIGDIALOG_H_
3
4#include "enums.h"
6
7#include <QDialog>
8
9namespace Ui {
10struct UserInfo;
11
12class ConfigDialog;
13} // namespace Ui
14
21class MainWindow;
22class QCloseEvent;
23class QTableWidgetItem;
24class ConfigDialog : public QDialog {
25 Q_OBJECT
26
27public:
28 explicit ConfigDialog(MainWindow *parent);
30
31 void useSelection(bool useSelection);
32 void useAutoclear(bool useAutoclear);
34 QHash<QString, QHash<QString, QString>> getProfiles();
35 void wizard();
36 void genKey(QString, QDialog *);
37 void useTrayIcon(bool useSystray);
38 void useGit(bool useGit);
39 void useOtp(bool useOtp);
40 void useQrencode(bool useQrencode);
41 void setPwgenPath(QString);
42 void usePwgen(bool usePwgen);
45 void useTemplate(bool useTemplate);
46
47protected:
48 void closeEvent(QCloseEvent *event);
49
50private slots:
51 void on_accepted();
52 void on_autodetectButton_clicked();
53 void on_radioButtonNative_clicked();
54 void on_radioButtonPass_clicked();
55 void on_toolButtonGit_clicked();
56 void on_toolButtonGpg_clicked();
57 void on_toolButtonPwgen_clicked();
58 void on_toolButtonPass_clicked();
59 void on_toolButtonStore_clicked();
60 void on_comboBoxClipboard_activated(int);
61 void on_passwordCharTemplateSelector_activated(int);
62 void on_checkBoxSelection_clicked();
63 void on_checkBoxAutoclear_clicked();
64 void on_checkBoxAutoclearPanel_clicked();
65 void on_addButton_clicked();
66 void on_deleteButton_clicked();
67 void on_checkBoxUseTrayIcon_clicked();
68 void on_checkBoxUseGit_clicked();
69 void on_checkBoxUsePwgen_clicked();
70 void on_checkBoxUseTemplate_clicked();
71 void onProfileTableItemChanged(QTableWidgetItem *item);
72
73private:
74 QScopedPointer<Ui::ConfigDialog> ui;
75
76 QStringList getSecretKeys();
77
78 void setGitPath(QString);
79 void setProfiles(QHash<QString, QHash<QString, QString>>, QString);
80 void usePass(bool usePass);
81
82 void setGroupBoxState();
83 QString selectExecutable();
84 QString selectFolder();
85 // QMessageBox::critical with hack to avoid crashes with
86 // Qt 5.4.1 when QApplication::exec was not yet called
87 void criticalMessage(const QString &title, const QString &text);
88
89 bool isPassOtpAvailable();
90 bool isQrencodeAvailable();
91 void validate(QTableWidgetItem *item = nullptr);
92
93 MainWindow *mainWindow;
94};
95
96#endif // CONFIGDIALOG_H_
The ConfigDialog handles the configuration interface.
Definition: configdialog.h:24
void setPasswordConfiguration(const PasswordConfiguration &config)
PasswordConfiguration getPasswordConfiguration()
void useOtp(bool useOtp)
ConfigDialog::useOtp set preference for using otp plugin.
void genKey(QString, QDialog *)
ConfigDialog::genKey tunnel function to make MainWindow generate a gpg key pair.
~ConfigDialog()
ConfigDialog::~ConfigDialog config destructor, makes sure the mainWindow knows about git,...
void useGit(bool useGit)
ConfigDialog::useGit set preference for using git.
void useAutoclearPanel(bool useAutoclearPanel)
ConfigDialog::useAutoclearPanel set the panel autoclear use from MainWindow.
QHash< QString, QHash< QString, QString > > getProfiles()
ConfigDialog::getProfiles return profile list.
void useAutoclear(bool useAutoclear)
ConfigDialog::useAutoclear set the clipboard autoclear use from MainWindow.
void useQrencode(bool useQrencode)
ConfigDialog::useOtp set preference for using otp plugin.
void useTemplate(bool useTemplate)
ConfigDialog::useTemplate set preference for using templates.
void closeEvent(QCloseEvent *event)
ConfigDialog::closeEvent close this window.
void useTrayIcon(bool useSystray)
ConfigDialog::useTrayIcon set preference for using trayicon. Enable or disable related checkboxes acc...
void usePwgen(bool usePwgen)
ConfigDialog::usePwgen set preference for using pwgen (can be overruled buy empty pwgenPath)....
void wizard()
ConfigDialog::wizard first-time use wizard.
void setPwgenPath(QString)
ConfigDialog::setPwgenPath set pwgen executable path. Enable or disable related options in the interf...
void useSelection(bool useSelection)
ConfigDialog::useSelection set the clipboard type use from MainWindow.
The MainWindow class does way too much, not only is it a switchboard, configuration handler and more,...
Definition: mainwindow.h:37
Definition: configdialog.h:9
Holds the Password configuration settings.
Stores key info lines including validity, creation date and more.
Definition: userinfo.h:11