QtPass  1.2.3
Multi-platform GUI for pass, the standard unix password manager.
qtpass.h
Go to the documentation of this file.
1 #ifndef QTPASS_H
2 #define QTPASS_H
3 
4 #include <QObject>
5 #include <QProcess>
6 #include <QTimer>
7 
8 class MainWindow;
9 class Pass;
10 class QtPass : public QObject {
11  Q_OBJECT
12 
13 public:
14  QtPass();
15  ~QtPass();
16 
17  void setMainWindow(MainWindow *mW);
18  void setClippedText(const QString &, const QString &p_output = QString());
19  void clearClippedText();
20  void setClipboardTimer();
21  bool isFreshStart() { return this->freshStart; }
22  void setFreshStart(const bool &fs) { this->freshStart = fs; }
23 
24 private:
25  MainWindow *m_mainWindow;
26 
27  QProcess fusedav;
28 
29  QTimer clearClipboardTimer;
30  QString clippedText;
31  bool freshStart;
32 
33  bool setup();
34  void connectPassSignalHandlers(Pass *pass);
35  void mountWebDav();
36 
37 signals:
38 
39 public slots:
40  void clearClipboard();
41  void copyTextToClipboard(const QString &text);
42 
43 private slots:
44  void processError(QProcess::ProcessError);
45  void processErrorExit(int exitCode, const QString &);
46  void processFinished(const QString &, const QString &);
47 
48  void passStoreChanged(const QString &, const QString &);
49  void passShowHandlerFinished(QString output);
50 
51  void doGitPush();
52  void finishedInsert(const QString &, const QString &);
53  void onKeyGenerationComplete(const QString &p_output,
54  const QString &p_errout);
55 
56  void showInTextBrowser(QString toShow, QString prefix = QString(),
57  QString postfix = QString());
58 };
59 
60 #endif // QTPASS_H
void setFreshStart(const bool &fs)
Definition: qtpass.h:22
void clearClippedText()
Definition: qtpass.cpp:360
Acts as an abstraction for pass or pass imitation.
Definition: pass.h:25
void setClipboardTimer()
Definition: qtpass.cpp:362
void setClippedText(const QString &, const QString &p_output=QString())
Definition: qtpass.cpp:352
~QtPass()
QtPass::~QtPass destroy!
Definition: qtpass.cpp:42
Definition: qtpass.h:10
void copyTextToClipboard(const QString &text)
MainWindow::copyTextToClipboard copies text to your clipboard.
Definition: qtpass.cpp:393
bool isFreshStart()
Definition: qtpass.h:21
The MainWindow class does way too much, not only is it a switchboard, configuration handler and more...
Definition: mainwindow.h:39
void clearClipboard()
MainWindow::clearClipboard remove clipboard contents.
Definition: qtpass.cpp:369
void setMainWindow(MainWindow *mW)
Definition: qtpass.cpp:112
QtPass()
Definition: qtpass.cpp:23