QtPass  1.2.3
Multi-platform GUI for pass, the standard unix password manager.
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
MainWindow Class Reference

The MainWindow class does way too much, not only is it a switchboard, configuration handler and more, it's also the process-manager. More...

#include <mainwindow.h>

+ Inheritance diagram for MainWindow:
+ Collaboration diagram for MainWindow:

Public Slots

void deselect ()
 MainWindow::deselect clear the selection, password and copy buffer. More...
 
void messageAvailable (QString message)
 MainWindow::messageAvailable we have some text/message/search to do. More...
 
void critical (QString, QString)
 MainWindow::critical critical message popup wrapper. More...
 
void executeWrapperStarted ()
 
void showStatusMessage (QString msg, int timeout=2000)
 Displays message in status bar. More...
 
void passShowHandler (const QString &)
 
void passOtpHandler (const QString &)
 
void onPush ()
 MainWindow::onPush do a git push. More...
 
void on_treeView_clicked (const QModelIndex &index)
 MainWindow::on_treeView_clicked read the selected password file. More...
 
void startReencryptPath ()
 MainWindow::startReencryptPath disable ui elements and treeview. More...
 
void endReencryptPath ()
 MainWindow::endReencryptPath re-enable ui elements. More...
 

Signals

void uiEnabled (bool state)
 
void passShowHandlerFinished (QString output)
 
void passGitInitNeeded ()
 
void generateGPGKeyPair (QString batch)
 

Public Member Functions

 MainWindow (const QString &searchText=QString(), QWidget *parent=nullptr)
 MainWindow::MainWindow handles all of the main functionality and also the main window. More...
 
 ~MainWindow ()
 
void restoreWindow ()
 
void generateKeyPair (QString, QDialog *)
 MainWindow::generateKeyPair internal gpg keypair generator . . More...
 
void userDialog (QString="")
 MainWindow::userDialog see MainWindow::onUsers() More...
 
void config ()
 MainWindow::config pops up the configuration screen and handles all inter-window communication. More...
 
void setTextTextBrowser (const QString &text)
 
void setUiElementsEnabled (bool state)
 MainWindow::setUiElementsEnabled enable or disable the relevant UI elements. More...
 
void flashText (const QString &text, const bool isError, const bool isHtml=false)
 
const QModelIndex getCurrentTreeViewIndex ()
 
QDialog * getKeygenDialog ()
 
void cleanKeygenDialog ()
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 MainWindow::closeEvent hide or quit. More...
 
void keyPressEvent (QKeyEvent *event)
 MainWindow::keyPressEvent did anyone press return, enter or escape? More...
 
void changeEvent (QEvent *event)
 MainWindow::changeEvent sets focus to the search box. More...
 
bool eventFilter (QObject *obj, QEvent *event)
 MainWindow::eventFilter filter out some events and focus the treeview. More...
 

Detailed Description

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.

Definition at line 39 of file mainwindow.h.

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( const QString &  searchText = QString(),
QWidget *  parent = nullptr 
)
explicit

MainWindow::MainWindow handles all of the main functionality and also the main window.

Parameters
searchTextfor searching from cli
parentpointer

Definition at line 36 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ ~MainWindow()

MainWindow::~MainWindow ( )

Definition at line 124 of file mainwindow.cpp.

Member Function Documentation

◆ changeEvent()

void MainWindow::changeEvent ( QEvent *  event)
protected

MainWindow::changeEvent sets focus to the search box.

Parameters
event

Definition at line 141 of file mainwindow.cpp.

◆ cleanKeygenDialog()

void MainWindow::cleanKeygenDialog ( )

Definition at line 201 of file mainwindow.cpp.

◆ closeEvent()

void MainWindow::closeEvent ( QCloseEvent *  event)
protected

MainWindow::closeEvent hide or quit.

Parameters
event

Definition at line 811 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ config()

void MainWindow::config ( )

MainWindow::config pops up the configuration screen and handles all inter-window communication.

Definition at line 230 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ critical

void MainWindow::critical ( QString  title,
QString  msg 
)
slot

MainWindow::critical critical message popup wrapper.

Parameters
title
msg

Definition at line 1125 of file mainwindow.cpp.

◆ deselect

void MainWindow::deselect ( )
slot

MainWindow::deselect clear the selection, password and copy buffer.

Definition at line 353 of file mainwindow.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endReencryptPath

void MainWindow::endReencryptPath ( )
slot

MainWindow::endReencryptPath re-enable ui elements.

Definition at line 1092 of file mainwindow.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eventFilter()

bool MainWindow::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

MainWindow::eventFilter filter out some events and focus the treeview.

Parameters
obj
event
Returns

Definition at line 836 of file mainwindow.cpp.

◆ executeWrapperStarted

void MainWindow::executeWrapperStarted ( )
slot

Definition at line 365 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ flashText()

void MainWindow::flashText ( const QString &  text,
const bool  isError,
const bool  isHtml = false 
)

Definition at line 210 of file mainwindow.cpp.

◆ generateGPGKeyPair

void MainWindow::generateGPGKeyPair ( QString  batch)
signal
+ Here is the caller graph for this function:

◆ generateKeyPair()

void MainWindow::generateKeyPair ( QString  batch,
QDialog *  keygenWindow 
)

MainWindow::generateKeyPair internal gpg keypair generator . .

Parameters
batch
keygenWindow

Definition at line 726 of file mainwindow.cpp.

+ Here is the caller graph for this function:

◆ getCurrentTreeViewIndex()

const QModelIndex MainWindow::getCurrentTreeViewIndex ( )

Definition at line 197 of file mainwindow.cpp.

◆ getKeygenDialog()

QDialog* MainWindow::getKeygenDialog ( )
inline

Definition at line 59 of file mainwindow.h.

◆ keyPressEvent()

void MainWindow::keyPressEvent ( QKeyEvent *  event)
protected

MainWindow::keyPressEvent did anyone press return, enter or escape?

Parameters
event

Definition at line 850 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ messageAvailable

void MainWindow::messageAvailable ( QString  message)
slot

MainWindow::messageAvailable we have some text/message/search to do.

Parameters
message

Definition at line 709 of file mainwindow.cpp.

+ Here is the caller graph for this function:

◆ on_treeView_clicked

void MainWindow::on_treeView_clicked ( const QModelIndex &  index)
slot

MainWindow::on_treeView_clicked read the selected password file.

Parameters
index

Definition at line 319 of file mainwindow.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onPush

void MainWindow::onPush ( )
slot

MainWindow::onPush do a git push.

Definition at line 289 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ passGitInitNeeded

void MainWindow::passGitInitNeeded ( )
signal
+ Here is the caller graph for this function:

◆ passOtpHandler

void MainWindow::passOtpHandler ( const QString &  p_output)
slot

Definition at line 416 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ passShowHandler

void MainWindow::passShowHandler ( const QString &  p_output)
slot

Definition at line 372 of file mainwindow.cpp.

+ Here is the call graph for this function:

◆ passShowHandlerFinished

void MainWindow::passShowHandlerFinished ( QString  output)
signal

◆ restoreWindow()

void MainWindow::restoreWindow ( )

Definition at line 465 of file mainwindow.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTextTextBrowser()

void MainWindow::setTextTextBrowser ( const QString &  text)

Definition at line 206 of file mainwindow.cpp.

◆ setUiElementsEnabled()

void MainWindow::setUiElementsEnabled ( bool  state)

MainWindow::setUiElementsEnabled enable or disable the relevant UI elements.

Parameters
state

Definition at line 449 of file mainwindow.cpp.

+ Here is the caller graph for this function:

◆ showStatusMessage

void MainWindow::showStatusMessage ( QString  msg,
int  timeout = 2000 
)
slot

Displays message in status bar.

Parameters
msgtext to be displayed
timeouttime for which msg shall be visible

Definition at line 1077 of file mainwindow.cpp.

+ Here is the caller graph for this function:

◆ startReencryptPath

void MainWindow::startReencryptPath ( )
slot

MainWindow::startReencryptPath disable ui elements and treeview.

Definition at line 1084 of file mainwindow.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ uiEnabled

void MainWindow::uiEnabled ( bool  state)
signal

◆ userDialog()

void MainWindow::userDialog ( QString  dir = "")

MainWindow::userDialog see MainWindow::onUsers()

Parameters
dirfolder to edit users for.

Definition at line 684 of file mainwindow.cpp.

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: