QtPass  1.2.0-pre
Multi-platform GUI for pass, the standard unix password manager.
configdialog.h
Go to the documentation of this file.
1 #ifndef CONFIGDIALOG_H_
2 #define CONFIGDIALOG_H_
3 
4 #include "mainwindow.h"
5 #include <QCloseEvent>
6 #include <QDialog>
7 #include <QFileDialog>
8 #include <QTableWidgetItem>
9 
10 namespace Ui {
11 struct UserInfo;
12 
13 class ConfigDialog;
14 }
15 
22 class ConfigDialog : public QDialog {
23  Q_OBJECT
24 
25 public:
26  explicit ConfigDialog(MainWindow *parent);
27  ~ConfigDialog();
28  void setPassPath(QString);
29  void setGitPath(QString);
30  void setGpgPath(QString);
31  void setStorePath(QString);
32  void setProfiles(QHash<QString, QString>, QString);
33  void usePass(bool usePass);
34  void useClipboard(Enums::clipBoardType);
35  void useSelection(bool useSelection);
36  void useAutoclear(bool useAutoclear);
37  void setAutoclear(int seconds);
38  void useAutoclearPanel(bool useAutoclearPanel);
39  void setAutoclearPanel(int seconds);
40  void hidePassword(bool hidePassword);
41  void hideContent(bool hideContent);
42  void addGPGId(bool addGPGId);
43  QString getPassPath();
44  QString getGitPath();
45  QString getGpgPath();
46  QString getStorePath();
47  QHash<QString, QString> getProfiles();
48  bool usePass();
49  Enums::clipBoardType useClipboard();
50  bool useSelection();
51  bool useAutoclear();
52  int getAutoclear();
53  bool useAutoclearPanel();
54  int getAutoclearPanel();
55  bool hidePassword();
56  bool hideContent();
57  bool addGPGId();
58  void wizard();
59  void genKey(QString, QDialog *);
60  bool useTrayIcon();
61  bool hideOnClose();
62  bool startMinimized();
63  void useTrayIcon(bool useTrayIdon);
64  void hideOnClose(bool hideOnClose);
65  void startMinimized(bool startMinimized);
66  void useGit(bool useGit);
67  bool useGit();
68  QString getPwgenPath();
69  void setPwgenPath(QString);
70  void usePwgen(bool usePwgen);
71  void avoidCapitals(bool avoidCapitals);
72  void avoidNumbers(bool avoidNumbers);
73  void lessRandom(bool lessRandom);
74  void useSymbols(bool useSymbols);
75  void setPasswordLength(int pwLen);
76  void setPasswordChars(QString);
77  void setPwdTemplateSelector(int selection);
78  void setLineEditEnabled(bool b);
79  int getPwdTemplateSelector();
80  bool usePwgen();
81  bool avoidCapitals();
82  bool avoidNumbers();
83  bool lessRandom();
84  bool useSymbols();
85  int getPasswordLength();
86  QString getPasswordChars();
87  bool useTemplate();
88  void useTemplate(bool useTemplate);
89  QString getTemplate();
90  void setTemplate(QString);
91  void templateAllFields(bool templateAllFields);
92  bool templateAllFields();
93  bool autoPull();
94  void autoPull(bool autoPull);
95  bool autoPush();
96  void autoPush(bool autoPush);
97  bool alwaysOnTop();
98  void alwaysOnTop(bool alwaysOnTop);
99 
100 protected:
101  void closeEvent(QCloseEvent *event);
102 
103 private slots:
104  void on_radioButtonNative_clicked();
105  void on_radioButtonPass_clicked();
106  void on_toolButtonGit_clicked();
107  void on_toolButtonGpg_clicked();
108  void on_toolButtonPwgen_clicked();
109  void on_toolButtonPass_clicked();
110  void on_toolButtonStore_clicked();
111  void on_comboBoxClipboard_activated(int);
112  void on_passwordCharTemplateSelector_activated(int);
113  void on_checkBoxSelection_clicked();
114  void on_checkBoxAutoclear_clicked();
115  void on_checkBoxAutoclearPanel_clicked();
116  void on_addButton_clicked();
117  void on_deleteButton_clicked();
118  void on_checkBoxUseTrayIcon_clicked();
119  void on_checkBoxUseGit_clicked();
120  void on_checkBoxUsePwgen_clicked();
121  void on_checkBoxUseTemplate_clicked();
122 
123 private:
124  QScopedPointer<Ui::ConfigDialog> ui;
125  void setGroupBoxState();
126  QString selectExecutable();
127  QString selectFolder();
128  // QMessageBox::critical with hack to avoid crashes with
129  // Qt 5.4.1 when QApplication::exec was not yet called
130  void criticalMessage(const QString &title, const QString &text);
131  MainWindow *mainWindow;
132 };
133 
134 #endif // CONFIGDIALOG_H_
clipBoardType
Definition: enums.h:10
The ConfigDialog handles the configuration interface.
Definition: configdialog.h:22
Stores key info lines including validity, creation date and more.
Definition: datahelpers.h:46
The MainWindow class does way too much, not only is it a switchboard, configuration handler and more...
Definition: mainwindow.h:42