diff options
author | tezeb <tezeb+github@outoftheblue.pl> | 2016-11-22 23:52:58 +0100 |
---|---|---|
committer | tezeb <tezeb+github@outoftheblue.pl> | 2016-11-22 23:52:58 +0100 |
commit | 1e06efd1bdfc55a4d03d454137256b46e4389b26 (patch) | |
tree | 24340eb0aec8edb524135b8bbaf23ff10d4b7c5d /mainwindow.h | |
parent | e15c93f56640ef6810d3304a07fd1e0fd4bfe350 (diff) |
refactor process mgmt and split Pass into subclasses
Diffstat (limited to 'mainwindow.h')
-rw-r--r-- | mainwindow.h | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/mainwindow.h b/mainwindow.h index cfbb3976..8a542be6 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -10,6 +10,9 @@ #include <QQueue> #include <QTimer> #include <QTreeView> +#include "pass.h" +#include "realpass.h" +#include "imitatepass.h" #if SINGLE_APP #include "singleapplication.h" @@ -21,25 +24,6 @@ namespace Ui { class MainWindow; } -/*! - \struct execQueueItem - \brief Execution queue items for non-interactive ordered execution. - */ -struct execQueueItem { - /** - * @brief app executable path. - */ - QString app; - /** - * @brief args arguments for executable. - */ - QString args; - /** - * @brief input stdio input. - */ - QString input; -}; - struct UserInfo; /*! @@ -142,6 +126,13 @@ private slots: void focusInput(); void copyTextByButtonClick(bool checked = false); + void executeWrapperStarted(); + void showStatusMessage(QString msg, int timeout); + void startReencryptPath(); + void endReencryptPath(); + void critical(QString,QString); + void setLastDecrypt(QString); + private: QAction *actionAddPassword; QAction *actionAddFolder; @@ -151,7 +142,6 @@ private: QFileSystemModel model; StoreModel proxyModel; QScopedPointer<QItemSelectionModel> selectionModel; - QScopedPointer<QProcess> process; QTreeView *treeView; QProcess fusedav; QString clippedText; @@ -159,17 +149,17 @@ private: QTimer *autoclearTimer; actionType currentAction; QString lastDecrypt; - bool wrapperRunning; - QStringList env; QQueue<execQueueItem> *execQueue; bool freshStart; QDialog *keygen; QString currentDir; bool startupPhase; TrayIcon *tray; + Pass *pass; + RealPass rpass; + ImitatePass ipass; + void updateText(); - void executePass(QString, QString = QString()); - void executeWrapper(QString, QString, QString = QString()); void enableUiElements(bool state); void selectFirstFile(); QModelIndex firstFile(QModelIndex parentIndex); @@ -177,16 +167,11 @@ private: QString getFile(const QModelIndex &, bool); void setPassword(QString, bool, bool); QList<UserInfo> listKeys(QString keystring = "", bool secret = false); - QStringList getRecipientList(QString for_file); - QString getRecipientString(QString for_file, QString separator = " ", - int *count = NULL); + void mountWebDav(); - void updateEnv(); void updateProfileBox(); void initTrayIcon(); void destroyTrayIcon(); - bool removeDir(const QString &dirName); - void waitFor(uint seconds); void clearTemplateWidgets(); void reencryptPath(QString dir); void addToGridLayout(int position, const QString &field, |