PIVX Core  5.6.99
P2P Digital Currency
Public Types | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
AskPassphraseDialog Class Reference

Multifunctional dialog to ask for passphrases. More...

#include <askpassphrasedialog.h>

Inheritance diagram for AskPassphraseDialog:
[legend]
Collaboration diagram for AskPassphraseDialog:
[legend]

Public Types

enum class  Mode {
  Encrypt , UnlockAnonymize , Unlock , ChangePass ,
  Decrypt
}
 
enum class  Context {
  Unlock_Menu , Unlock_Full , Encrypt , ToggleLock ,
  ChangePass , Send_PIV , BIP_38 , Multi_Sig ,
  Sign_Message , UI_Vote
}
 

Public Member Functions

 AskPassphraseDialog (Mode mode, QWidget *parent, WalletModel *model, Context context)
 
 ~AskPassphraseDialog ()
 
void showEvent (QShowEvent *event) override
 
void accept () override
 

Protected Member Functions

bool event (QEvent *event) override
 
bool eventFilter (QObject *object, QEvent *event) override
 

Private Slots

void onWatchClicked ()
 
void textChanged ()
 
void warningMessage ()
 
void errorEncryptingWallet ()
 
bool openStandardDialog (QString title="", QString body="", QString okBtn="OK", QString cancelBtn="")
 

Private Member Functions

void updateWarningsLabel ()
 
void run (int type) override
 
void onError (QString error, int type) override
 
void initWatch (QWidget *parent)
 

Private Attributes

Ui::AskPassphraseDialog * ui
 
Mode mode
 
WalletModelmodel
 
Context context
 
bool fCapsLock
 
SecureString newpassCache = ""
 
QCheckBox * btnWatch
 

Detailed Description

Multifunctional dialog to ask for passphrases.

Used for encryption, unlocking, and changing the passphrase.

Definition at line 25 of file askpassphrasedialog.h.

Member Enumeration Documentation

◆ Context

Enumerator
Unlock_Menu 
Unlock_Full 

Unlock wallet from menu

Encrypt 

Wallet needs to be fully unlocked.

ToggleLock 

Encrypt unencrypted wallet.

ChangePass 

Toggle wallet lock state.

Send_PIV 

Change passphrase.

BIP_38 

Send PIV.

Multi_Sig 

BIP38 menu.

Sign_Message 

Multi-Signature dialog.

UI_Vote 

Sign/verify message dialog.

Definition at line 40 of file askpassphrasedialog.h.

◆ Mode

Enumerator
Encrypt 

Ask passphrase twice and encrypt.

UnlockAnonymize 

Ask passphrase and unlock only for anonymization.

Unlock 

Ask passphrase and unlock.

ChangePass 

Ask old passphrase + new passphrase twice.

Decrypt 

Ask passphrase and decrypt wallet.

Definition at line 30 of file askpassphrasedialog.h.

Constructor & Destructor Documentation

◆ AskPassphraseDialog()

AskPassphraseDialog::AskPassphraseDialog ( Mode  mode,
QWidget *  parent,
WalletModel model,
Context  context 
)
explicit

Definition at line 27 of file askpassphrasedialog.cpp.

Here is the call graph for this function:

◆ ~AskPassphraseDialog()

AskPassphraseDialog::~AskPassphraseDialog ( )

Definition at line 151 of file askpassphrasedialog.cpp.

Member Function Documentation

◆ accept()

void AskPassphraseDialog::accept ( )
override
Todo:
: get rid of this .c_str() by implementing SecureString::operator=(std::string)

Definition at line 166 of file askpassphrasedialog.cpp.

Here is the caller graph for this function:

◆ errorEncryptingWallet

void AskPassphraseDialog::errorEncryptingWallet ( )
privateslot

Definition at line 365 of file askpassphrasedialog.cpp.

◆ event()

bool AskPassphraseDialog::event ( QEvent *  event)
overrideprotected

Definition at line 268 of file askpassphrasedialog.cpp.

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

◆ eventFilter()

bool AskPassphraseDialog::eventFilter ( QObject *  object,
QEvent *  event 
)
overrideprotected

Definition at line 287 of file askpassphrasedialog.cpp.

Here is the call graph for this function:

◆ initWatch()

void AskPassphraseDialog::initWatch ( QWidget *  parent)
private

Definition at line 393 of file askpassphrasedialog.cpp.

Here is the call graph for this function:

◆ onError()

void AskPassphraseDialog::onError ( QString  error,
int  type 
)
overrideprivatevirtual

Implements Runnable.

Definition at line 386 of file askpassphrasedialog.cpp.

◆ onWatchClicked

void AskPassphraseDialog::onWatchClicked ( )
privateslot

Definition at line 143 of file askpassphrasedialog.cpp.

◆ openStandardDialog

bool AskPassphraseDialog::openStandardDialog ( QString  title = "",
QString  body = "",
QString  okBtn = "OK",
QString  cancelBtn = "" 
)
privateslot

Definition at line 313 of file askpassphrasedialog.cpp.

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

◆ run()

void AskPassphraseDialog::run ( int  type)
overrideprivatevirtual

Implements Runnable.

Definition at line 371 of file askpassphrasedialog.cpp.

Here is the call graph for this function:

◆ showEvent()

void AskPassphraseDialog::showEvent ( QShowEvent *  event)
override

Definition at line 160 of file askpassphrasedialog.cpp.

◆ textChanged

void AskPassphraseDialog::textChanged ( )
privateslot

Definition at line 245 of file askpassphrasedialog.cpp.

◆ updateWarningsLabel()

void AskPassphraseDialog::updateWarningsLabel ( )
private

Definition at line 325 of file askpassphrasedialog.cpp.

Here is the caller graph for this function:

◆ warningMessage

void AskPassphraseDialog::warningMessage ( )
privateslot

Definition at line 345 of file askpassphrasedialog.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ btnWatch

QCheckBox* AskPassphraseDialog::btnWatch
private

Definition at line 70 of file askpassphrasedialog.h.

◆ context

Context AskPassphraseDialog::context
private

Definition at line 63 of file askpassphrasedialog.h.

◆ fCapsLock

bool AskPassphraseDialog::fCapsLock
private

Definition at line 64 of file askpassphrasedialog.h.

◆ mode

Mode AskPassphraseDialog::mode
private

Definition at line 61 of file askpassphrasedialog.h.

◆ model

WalletModel* AskPassphraseDialog::model
private

Definition at line 62 of file askpassphrasedialog.h.

◆ newpassCache

SecureString AskPassphraseDialog::newpassCache = ""
private

Definition at line 65 of file askpassphrasedialog.h.

◆ ui

Ui::AskPassphraseDialog* AskPassphraseDialog::ui
private

Definition at line 60 of file askpassphrasedialog.h.


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