QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
PasswordDialog Class Reference

Dialog for inserting and editing passwords, optionally using templates. More...

#include <passworddialog.h>

Inheritance diagram for PasswordDialog:
Collaboration diagram for PasswordDialog:

Public Slots

void setPass (const QString &output)
 Populate the dialog's password field from pass show output.

Public Member Functions

 PasswordDialog (PasswordConfiguration passConfig, QWidget *parent=nullptr)
 Construct a PasswordDialog for entering a new password.
 PasswordDialog (QString file, const bool &isNew, QWidget *parent=nullptr)
 Construct a PasswordDialog for editing an existing password file.
void setPassword (const QString &password)
 Populate the dialog's password field with the given text.
auto getPassword () -> QString
 Retrieve the current text from the dialog's password field.
void setTemplate (const QString &rawFields, bool useTemplate)
 Set the template fields and whether templating is enabled.
void templateAll (bool templateAll)
 Enable or disable applying the template to all applicable fields.
void setLength (int length)
 Set the desired password length shown in the dialog.
void setPasswordCharTemplate (int templateIndex)
 Set the password character template index.
void usePwgen (bool usePwgen)
 Enable or disable pwgen-style password generation mode.

Detailed Description

Dialog for inserting and editing passwords, optionally using templates.

Manages UI for entering, generating, and templating password-related fields.

Definition at line 23 of file passworddialog.h.

Constructor & Destructor Documentation

◆ PasswordDialog() [1/2]

PasswordDialog::PasswordDialog ( PasswordConfiguration passConfig,
QWidget * parent = nullptr )
explicit

Construct a PasswordDialog for entering a new password.

Parameters
passConfigPassword generation configuration.
parentOptional parent widget.
Here is the caller graph for this function:

◆ PasswordDialog() [2/2]

PasswordDialog::PasswordDialog ( QString file,
const bool & isNew,
QWidget * parent = nullptr )

Construct a PasswordDialog for editing an existing password file.

Parameters
filePath to the password file being edited.
isNewtrue if creating a new entry, false if editing existing.
parentOptional parent widget.
Here is the call graph for this function:

Member Function Documentation

◆ getPassword()

auto PasswordDialog::getPassword ( ) -> QString

Retrieve the current text from the dialog's password field.

Returns
Current password as a QString.
See also
setPassword

◆ setLength()

void PasswordDialog::setLength ( int length)

Set the desired password length shown in the dialog.

Parameters
lengthDesired password length.

◆ setPass

void PasswordDialog::setPass ( const QString & output)
slot

Populate the dialog's password field from pass show output.

Parameters
outputOutput from the pass show command.

◆ setPassword()

void PasswordDialog::setPassword ( const QString & password)

Populate the dialog's password field with the given text.

Parameters
passwordPassword text to display.
See also
getPassword

◆ setPasswordCharTemplate()

void PasswordDialog::setPasswordCharTemplate ( int templateIndex)

Set the password character template index.

Parameters
templateIndexIndex identifying the character template to use.

◆ setTemplate()

void PasswordDialog::setTemplate ( const QString & rawFields,
bool useTemplate )

Set the template fields and whether templating is enabled.

Parameters
rawFieldsTemplate text containing field definitions.
useTemplatetrue to enable the template, false to disable.

◆ templateAll()

void PasswordDialog::templateAll ( bool templateAll)

Enable or disable applying the template to all applicable fields.

Parameters
templateAlltrue to apply templating to all fields.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ usePwgen()

void PasswordDialog::usePwgen ( bool usePwgen)

Enable or disable pwgen-style password generation mode.

Parameters
usePwgentrue to enable pwgen mode, false to disable.
Here is the call graph for this function:
Here is the caller graph for this function:

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