diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2016-12-13 00:05:58 +0100 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2016-12-13 00:05:58 +0100 |
commit | 109958c1a14bbfab79bb30e72f2a706bcada4c60 (patch) | |
tree | 26de8388b1587c962a039c42efc93361a70f09c8 /mainwindow.h | |
parent | 641598e971bda056aea618bb67c8ab88e7b9da26 (diff) |
Moved sources to src
Diffstat (limited to 'mainwindow.h')
-rw-r--r-- | mainwindow.h | 150 |
1 files changed, 0 insertions, 150 deletions
diff --git a/mainwindow.h b/mainwindow.h deleted file mode 100644 index f09d4e98..00000000 --- a/mainwindow.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef MAINWINDOW_H_ -#define MAINWINDOW_H_ - -#include "datahelpers.h" -#include "enums.h" -#include "imitatepass.h" -#include "pass.h" -#include "realpass.h" -#include "storemodel.h" -#include "trayicon.h" -#include <QFileSystemModel> -#include <QMainWindow> -#include <QProcess> -#include <QQueue> -#include <QTimer> -#include <QTreeView> - -#if SINGLE_APP -#include "singleapplication.h" -#else -#define SingleApplication QApplication -#endif - -namespace Ui { -class MainWindow; -} - -/*! - \class MainWindow - \brief The MainWindow class does way too much, not only is it a switchboard, - configuration handler and more, it's also the process-manager. - - This class could really do with an overhaul. - */ -class MainWindow : public QMainWindow { - Q_OBJECT - - enum actionType { GPG, GIT, EDIT, REMOVE, GPG_INTERNAL, PWGEN }; - -public: - explicit MainWindow(QWidget *parent = 0); - ~MainWindow(); - bool checkConfig(); - void setApp(SingleApplication *app); - void setText(QString); - QStringList getSecretKeys(); - void generateKeyPair(QString, QDialog *); - void userDialog(QString = ""); - void config(); - void executePassGitInit(); - - /** - * @brief MainWindow::pwdConfig instance of passwordConfiguration. - * @sa MainWindow::passwordConfiguration - */ - passwordConfiguration pwdConfig; - -protected: - void closeEvent(QCloseEvent *event); - void keyPressEvent(QKeyEvent *event); - void changeEvent(QEvent *event); - bool eventFilter(QObject *obj, QEvent *event); - -public slots: - void deselect(); - -private slots: - void on_updateButton_clicked(bool block = false); - void on_pushButton_clicked(); - void on_treeView_clicked(const QModelIndex &index); - void on_treeView_doubleClicked(const QModelIndex &index); - void on_configButton_clicked(); - void readyRead(const QString &, const QString &); - void processFinished(int, const QString &, const QString &); - void processError(QProcess::ProcessError); - void clearClipboard(); - void clearPanel(bool notify); - void clearPanel(); - void on_lineEdit_textChanged(const QString &arg1); - void on_lineEdit_returnPressed(); - void on_addButton_clicked(); - void on_deleteButton_clicked(); - void on_editButton_clicked(); - void on_usersButton_clicked(); - void messageAvailable(QString message); - void on_profileBox_currentIndexChanged(QString); - void showContextMenu(const QPoint &pos); - void showBrowserContextMenu(const QPoint &pos); - void addFolder(); - void editPassword(); - void focusInput(); - void copyTextToClipboard(const QString &text); - - void executeWrapperStarted(); - void showStatusMessage(QString msg, int timeout); - void startReencryptPath(); - void endReencryptPath(); - void critical(QString, QString); - void setLastDecrypt(QString); - void passShowHandler(const QString &); - - void processErrorExit(const QString &); - -private: - QAction *actionAddPassword; - QAction *actionAddFolder; - - QApplication *QtPass; - QScopedPointer<Ui::MainWindow> ui; - QFileSystemModel model; - StoreModel proxyModel; - QScopedPointer<QItemSelectionModel> selectionModel; - QTreeView *treeView; - QProcess fusedav; - QString clippedText; - QTimer clearPanelTimer; - QTimer clearClipboardTimer; - actionType currentAction; - QString lastDecrypt; - bool freshStart; - QDialog *keygen; - QString currentDir; - bool startupPhase; - TrayIcon *tray; - Pass *pass; - RealPass rpass; - ImitatePass ipass; - - void updateText(); - void enableUiElements(bool state); - void selectFirstFile(); - QModelIndex firstFile(QModelIndex parentIndex); - QString getDir(const QModelIndex &, bool); - QString getFile(const QModelIndex &, bool); - void setPassword(QString, bool, bool); - QList<UserInfo> listKeys(QString keystring = "", bool secret = false); - - void mountWebDav(); - void updateProfileBox(); - void initTrayIcon(); - void destroyTrayIcon(); - void clearTemplateWidgets(); - void reencryptPath(QString dir); - void addToGridLayout(int position, const QString &field, - const QString &value); - void DisplayInTextBrowser(QString toShow, QString prefix = QString(), - QString postfix = QString()); -}; - -#endif // MAINWINDOW_H_ |