6#include <QFileSystemModel>
7#include <QItemSelectionModel>
15#define SingleApplication QApplication
20void qt_set_sequence_auto_mnemonic(
bool b);
41 explicit MainWindow(
const QString &searchText = QString(),
42 QWidget *parent =
nullptr);
51 void flashText(
const QString &text,
const bool isError,
52 const bool isHtml =
false);
93 void onUpdate(
bool block =
false);
96 void on_treeView_doubleClicked(
const QModelIndex &index);
97 void clearPanel(
bool notify =
true);
98 void on_lineEdit_textChanged(
const QString &arg1);
99 void on_lineEdit_returnPressed();
100 void on_profileBox_currentIndexChanged(QString);
101 void showContextMenu(
const QPoint &pos);
102 void showBrowserContextMenu(
const QPoint &pos);
105 void editPassword(
const QString &);
106 void renamePassword();
108 void copyPasswordFromTreeview();
109 void passwordFromFileToClipboard(
const QString &text);
110 void onTimeoutSearch();
114 QScopedPointer<Ui::MainWindow> ui;
115 QFileSystemModel model;
117 QScopedPointer<QItemSelectionModel> selectionModel;
118 QTimer clearPanelTimer, searchTimer;
123 void initToolBarButtons();
124 void initStatusBar();
127 void selectFirstFile();
128 QModelIndex firstFile(QModelIndex parentIndex);
129 QString getFile(
const QModelIndex &,
bool);
130 void setPassword(QString,
bool isNew =
true);
132 void updateProfileBox();
134 void destroyTrayIcon();
135 void clearTemplateWidgets();
136 void reencryptPath(QString dir);
137 void addToGridLayout(
int position,
const QString &field,
138 const QString &value);
140 void updateGitButtonVisibility();
141 void updateOtpButtonVisibility();
142 void enableGitButtons(
const bool &);
The MainWindow class does way too much, not only is it a switchboard, configuration handler and more,...
void startReencryptPath()
MainWindow::startReencryptPath disable ui elements and treeview.
void passShowHandler(const QString &)
void endReencryptPath()
MainWindow::endReencryptPath re-enable ui elements.
void executeWrapperStarted()
void showStatusMessage(QString msg, int timeout=2000)
Displays message in status bar.
void closeEvent(QCloseEvent *event)
MainWindow::closeEvent hide or quit.
void onPush()
MainWindow::onPush do a git push.
void critical(QString, QString)
MainWindow::critical critical message popup wrapper.
void generateGPGKeyPair(QString batch)
void passOtpHandler(const QString &)
void keyPressEvent(QKeyEvent *event)
MainWindow::keyPressEvent did anyone press return, enter or escape?
QDialog * getKeygenDialog()
bool eventFilter(QObject *obj, QEvent *event)
MainWindow::eventFilter filter out some events and focus the treeview.
const QModelIndex getCurrentTreeViewIndex()
void flashText(const QString &text, const bool isError, const bool isHtml=false)
void setUiElementsEnabled(bool state)
MainWindow::setUiElementsEnabled enable or disable the relevant UI elements.
void changeEvent(QEvent *event)
MainWindow::changeEvent sets focus to the search box.
void deselect()
MainWindow::deselect clear the selection, password and copy buffer.
void on_treeView_clicked(const QModelIndex &index)
MainWindow::on_treeView_clicked read the selected password file.
void generateKeyPair(QString, QDialog *)
MainWindow::generateKeyPair internal gpg keypair generator . .
void userDialog(QString="")
MainWindow::userDialog see MainWindow::onUsers()
void config()
MainWindow::config pops up the configuration screen and handles all inter-window communication.
void messageAvailable(QString message)
MainWindow::messageAvailable we have some text/message/search to do.
void passShowHandlerFinished(QString output)
The SingleApplication class is used for commandline intergration.
The QSortFilterProxyModel for handling filesystem searches.
Handles the systemtray icon and menu.