Improve Password Generator Widget UI/UX

* Fix #5098 - Ensure advanced mode settings are saved distinctly from simple mode settings
* Make selected character groups pop out in the UI
* Improve layout of character options
This commit is contained in:
Jonathan White 2020-07-19 09:30:00 -04:00
parent a32147182a
commit 1f4c7cc22b
4 changed files with 527 additions and 772 deletions

View file

@ -22,6 +22,7 @@
#include <QDir>
#include <QKeyEvent>
#include <QLineEdit>
#include <QTimer>
#include "core/Config.h"
#include "core/PasswordGenerator.h"
@ -134,26 +135,25 @@ void PasswordGeneratorWidget::loadSettings()
{
// Password config
m_ui->checkBoxLower->setChecked(config()->get(Config::PasswordGenerator_LowerCase).toBool());
m_ui->checkBoxLowerAdv->setChecked(config()->get(Config::PasswordGenerator_LowerCase).toBool());
m_ui->checkBoxUpper->setChecked(config()->get(Config::PasswordGenerator_UpperCase).toBool());
m_ui->checkBoxUpperAdv->setChecked(config()->get(Config::PasswordGenerator_UpperCase).toBool());
m_ui->checkBoxNumbers->setChecked(config()->get(Config::PasswordGenerator_Numbers).toBool());
m_ui->checkBoxSpecialChars->setChecked(config()->get(Config::PasswordGenerator_SpecialChars).toBool());
m_ui->checkBoxNumbersAdv->setChecked(config()->get(Config::PasswordGenerator_Numbers).toBool());
m_ui->editAdditionalChars->setText(config()->get(Config::PasswordGenerator_AdditionalChars).toString());
m_ui->editExcludedChars->setText(config()->get(Config::PasswordGenerator_ExcludedChars).toString());
m_ui->buttonAdvancedMode->setChecked(config()->get(Config::PasswordGenerator_AdvancedMode).toBool());
setAdvancedMode(m_ui->buttonAdvancedMode->isChecked());
bool advanced = config()->get(Config::PasswordGenerator_AdvancedMode).toBool();
if (advanced) {
m_ui->checkBoxSpecialChars->setChecked(config()->get(Config::PasswordGenerator_Logograms).toBool());
} else {
m_ui->checkBoxSpecialChars->setChecked(config()->get(Config::PasswordGenerator_SpecialChars).toBool());
}
m_ui->checkBoxBraces->setChecked(config()->get(Config::PasswordGenerator_Braces).toBool());
m_ui->checkBoxQuotes->setChecked(config()->get(Config::PasswordGenerator_Quotes).toBool());
m_ui->checkBoxPunctuation->setChecked(config()->get(Config::PasswordGenerator_Punctuation).toBool());
m_ui->checkBoxDashes->setChecked(config()->get(Config::PasswordGenerator_Dashes).toBool());
m_ui->checkBoxMath->setChecked(config()->get(Config::PasswordGenerator_Math).toBool());
m_ui->checkBoxLogograms->setChecked(config()->get(Config::PasswordGenerator_Logograms).toBool());
m_ui->checkBoxExtASCII->setChecked(config()->get(Config::PasswordGenerator_EASCII).toBool());
m_ui->checkBoxExtASCIIAdv->setChecked(config()->get(Config::PasswordGenerator_EASCII).toBool());
m_ui->checkBoxExcludeAlike->setChecked(config()->get(Config::PasswordGenerator_ExcludeAlike).toBool());
m_ui->checkBoxEnsureEvery->setChecked(config()->get(Config::PasswordGenerator_EnsureEvery).toBool());
m_ui->spinBoxLength->setValue(config()->get(Config::PasswordGenerator_Length).toInt());
@ -166,30 +166,32 @@ void PasswordGeneratorWidget::loadSettings()
// Password or diceware?
m_ui->tabWidget->setCurrentIndex(config()->get(Config::PasswordGenerator_Type).toInt());
// Set advanced mode
m_ui->buttonAdvancedMode->setChecked(advanced);
setAdvancedMode(advanced);
}
void PasswordGeneratorWidget::saveSettings()
{
// Password config
if (m_ui->simpleBar->isVisible()) {
config()->set(Config::PasswordGenerator_LowerCase, m_ui->checkBoxLower->isChecked());
config()->set(Config::PasswordGenerator_UpperCase, m_ui->checkBoxUpper->isChecked());
config()->set(Config::PasswordGenerator_Numbers, m_ui->checkBoxNumbers->isChecked());
config()->set(Config::PasswordGenerator_EASCII, m_ui->checkBoxExtASCII->isChecked());
} else {
config()->set(Config::PasswordGenerator_LowerCase, m_ui->checkBoxLowerAdv->isChecked());
config()->set(Config::PasswordGenerator_UpperCase, m_ui->checkBoxUpperAdv->isChecked());
config()->set(Config::PasswordGenerator_Numbers, m_ui->checkBoxNumbersAdv->isChecked());
config()->set(Config::PasswordGenerator_EASCII, m_ui->checkBoxExtASCIIAdv->isChecked());
}
config()->set(Config::PasswordGenerator_AdvancedMode, m_ui->buttonAdvancedMode->isChecked());
if (m_ui->buttonAdvancedMode->isChecked()) {
config()->set(Config::PasswordGenerator_SpecialChars, m_ui->checkBoxSpecialChars->isChecked());
} else {
config()->set(Config::PasswordGenerator_Logograms, m_ui->checkBoxSpecialChars->isChecked());
}
config()->set(Config::PasswordGenerator_Braces, m_ui->checkBoxBraces->isChecked());
config()->set(Config::PasswordGenerator_Punctuation, m_ui->checkBoxPunctuation->isChecked());
config()->set(Config::PasswordGenerator_Quotes, m_ui->checkBoxQuotes->isChecked());
config()->set(Config::PasswordGenerator_Dashes, m_ui->checkBoxDashes->isChecked());
config()->set(Config::PasswordGenerator_Math, m_ui->checkBoxMath->isChecked());
config()->set(Config::PasswordGenerator_Logograms, m_ui->checkBoxLogograms->isChecked());
config()->set(Config::PasswordGenerator_AdditionalChars, m_ui->editAdditionalChars->text());
config()->set(Config::PasswordGenerator_ExcludedChars, m_ui->editExcludedChars->text());
config()->set(Config::PasswordGenerator_ExcludeAlike, m_ui->checkBoxExcludeAlike->isChecked());
@ -321,41 +323,48 @@ bool PasswordGeneratorWidget::isPasswordVisible() const
return m_ui->editNewPassword->isPasswordVisible();
}
void PasswordGeneratorWidget::setAdvancedMode(bool state)
void PasswordGeneratorWidget::setAdvancedMode(bool advanced)
{
if (state) {
m_ui->simpleBar->hide();
m_ui->advancedContainer->show();
m_ui->checkBoxUpperAdv->setChecked(m_ui->checkBoxUpper->isChecked());
m_ui->checkBoxLowerAdv->setChecked(m_ui->checkBoxLower->isChecked());
m_ui->checkBoxNumbersAdv->setChecked(m_ui->checkBoxNumbers->isChecked());
m_ui->checkBoxBraces->setChecked(m_ui->checkBoxSpecialChars->isChecked());
m_ui->checkBoxPunctuation->setChecked(m_ui->checkBoxSpecialChars->isChecked());
m_ui->checkBoxQuotes->setChecked(m_ui->checkBoxSpecialChars->isChecked());
m_ui->checkBoxMath->setChecked(m_ui->checkBoxSpecialChars->isChecked());
m_ui->checkBoxDashes->setChecked(m_ui->checkBoxSpecialChars->isChecked());
m_ui->checkBoxLogograms->setChecked(m_ui->checkBoxSpecialChars->isChecked());
m_ui->checkBoxExtASCIIAdv->setChecked(m_ui->checkBoxExtASCII->isChecked());
saveSettings();
if (advanced) {
m_ui->checkBoxSpecialChars->setText("# $ % && @ ^ ` ~");
m_ui->checkBoxSpecialChars->setToolTip(tr("Logograms"));
m_ui->checkBoxSpecialChars->setChecked(config()->get(Config::PasswordGenerator_Logograms).toBool());
} else {
m_ui->simpleBar->show();
m_ui->advancedContainer->hide();
m_ui->checkBoxUpper->setChecked(m_ui->checkBoxUpperAdv->isChecked());
m_ui->checkBoxLower->setChecked(m_ui->checkBoxLowerAdv->isChecked());
m_ui->checkBoxNumbers->setChecked(m_ui->checkBoxNumbersAdv->isChecked());
m_ui->checkBoxSpecialChars->setChecked(
m_ui->checkBoxBraces->isChecked() | m_ui->checkBoxPunctuation->isChecked()
| m_ui->checkBoxQuotes->isChecked() | m_ui->checkBoxMath->isChecked() | m_ui->checkBoxDashes->isChecked()
| m_ui->checkBoxLogograms->isChecked());
m_ui->checkBoxExtASCII->setChecked(m_ui->checkBoxExtASCIIAdv->isChecked());
m_ui->checkBoxSpecialChars->setText("/ * + && …");
m_ui->checkBoxSpecialChars->setToolTip(tr("Special Characters"));
m_ui->checkBoxSpecialChars->setChecked(config()->get(Config::PasswordGenerator_SpecialChars).toBool());
}
QApplication::processEvents();
adjustSize();
m_ui->advancedContainer->setVisible(advanced);
m_ui->checkBoxBraces->setVisible(advanced);
m_ui->checkBoxPunctuation->setVisible(advanced);
m_ui->checkBoxQuotes->setVisible(advanced);
m_ui->checkBoxMath->setVisible(advanced);
m_ui->checkBoxDashes->setVisible(advanced);
if (!m_standalone) {
QTimer::singleShot(50, this, [this] { adjustSize(); });
}
}
void PasswordGeneratorWidget::excludeHexChars()
{
m_ui->editExcludedChars->setText("GHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz");
m_ui->checkBoxNumbers->setChecked(true);
m_ui->checkBoxUpper->setChecked(true);
m_ui->checkBoxLower->setChecked(false);
m_ui->checkBoxSpecialChars->setChecked(false);
m_ui->checkBoxExtASCII->setChecked(false);
m_ui->checkBoxPunctuation->setChecked(false);
m_ui->checkBoxQuotes->setChecked(false);
m_ui->checkBoxDashes->setChecked(false);
m_ui->checkBoxMath->setChecked(false);
m_ui->checkBoxBraces->setChecked(false);
updateGenerator();
}
void PasswordGeneratorWidget::colorStrengthIndicator(const PasswordHealth& health)
@ -397,7 +406,6 @@ PasswordGenerator::CharClasses PasswordGeneratorWidget::charClasses()
{
PasswordGenerator::CharClasses classes;
if (m_ui->simpleBar->isVisible()) {
if (m_ui->checkBoxLower->isChecked()) {
classes |= PasswordGenerator::LowerLetters;
}
@ -410,26 +418,15 @@ PasswordGenerator::CharClasses PasswordGeneratorWidget::charClasses()
classes |= PasswordGenerator::Numbers;
}
if (m_ui->checkBoxSpecialChars->isChecked()) {
classes |= PasswordGenerator::SpecialCharacters;
}
if (m_ui->checkBoxExtASCII->isChecked()) {
classes |= PasswordGenerator::EASCII;
}
if (!m_ui->buttonAdvancedMode->isChecked()) {
if (m_ui->checkBoxSpecialChars->isChecked()) {
classes |= PasswordGenerator::SpecialCharacters;
}
} else {
if (m_ui->checkBoxLowerAdv->isChecked()) {
classes |= PasswordGenerator::LowerLetters;
}
if (m_ui->checkBoxUpperAdv->isChecked()) {
classes |= PasswordGenerator::UpperLetters;
}
if (m_ui->checkBoxNumbersAdv->isChecked()) {
classes |= PasswordGenerator::Numbers;
}
if (m_ui->checkBoxBraces->isChecked()) {
classes |= PasswordGenerator::Braces;
}
@ -450,13 +447,9 @@ PasswordGenerator::CharClasses PasswordGeneratorWidget::charClasses()
classes |= PasswordGenerator::Math;
}
if (m_ui->checkBoxLogograms->isChecked()) {
if (m_ui->checkBoxSpecialChars->isChecked()) {
classes |= PasswordGenerator::Logograms;
}
if (m_ui->checkBoxExtASCIIAdv->isChecked()) {
classes |= PasswordGenerator::EASCII;
}
}
return classes;

View file

@ -45,8 +45,10 @@ public:
Password = 0,
Diceware = 1
};
explicit PasswordGeneratorWidget(QWidget* parent = nullptr);
~PasswordGeneratorWidget();
void loadSettings();
void saveSettings();
void setPasswordLength(int length);
@ -69,7 +71,7 @@ signals:
private slots:
void updateButtonsEnabled(const QString& password);
void updatePasswordStrength(const QString& password);
void setAdvancedMode(bool state);
void setAdvancedMode(bool advanced);
void excludeHexChars();
void passwordLengthChanged(int length);

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>622</width>
<height>455</height>
<width>729</width>
<height>427</height>
</rect>
</property>
<property name="windowTitle">
@ -156,7 +156,7 @@ QProgressBar::chunk {
</widget>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="buttonGenerate">
<widget class="QPushButton" name="buttonGenerate">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
@ -169,7 +169,7 @@ QProgressBar::chunk {
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="buttonCopy">
<widget class="QPushButton" name="buttonCopy">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
@ -299,42 +299,132 @@ QProgressBar::chunk {
<property name="title">
<string>Character Types</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QWidget" name="simpleBar" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="checkBoxUpper">
<property name="minimumSize">
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>25</height>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QGridLayout" name="characterButtons">
<property name="bottomMargin">
<number>6</number>
</property>
<item row="0" column="3">
<widget class="QPushButton" name="checkBoxSpecialChars">
<property name="enabled">
<bool>true</bool>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Special characters</string>
</property>
<property name="accessibleName">
<string>Special characters</string>
</property>
<property name="text">
<string notr="true">/ * + &amp;&amp; …</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="checkBoxQuotes">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Quotes</string>
</property>
<property name="accessibleName">
<string>Quotes</string>
</property>
<property name="text">
<string notr="true">&quot; '</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="checkBoxPunctuation">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Punctuation</string>
</property>
<property name="accessibleName">
<string>Punctuation</string>
</property>
<property name="text">
<string notr="true">. , : ;</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="checkBoxDashes">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Dashes and Slashes</string>
</property>
<property name="accessibleName">
<string>Dashes and Slashes</string>
</property>
<property name="text">
<string notr="true">\ / | _ -</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="checkBoxUpper">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Upper-case letters</string>
</property>
<property name="accessibleName">
<string>Upper-case letters</string>
</property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text">
<string notr="true">A-Z</string>
</property>
@ -346,45 +436,8 @@ QProgressBar::chunk {
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxLower">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Lower-case letters</string>
</property>
<property name="accessibleName">
<string>Lower-case letters</string>
</property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text">
<string notr="true">a-z</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxNumbers">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<item row="0" column="2">
<widget class="QPushButton" name="checkBoxNumbers">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
@ -394,9 +447,6 @@ QProgressBar::chunk {
<property name="accessibleName">
<string>Numbers</string>
</property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text">
<string notr="true">0-9</string>
</property>
@ -408,28 +458,19 @@ QProgressBar::chunk {
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxSpecialChars">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>25</height>
</size>
</property>
<item row="0" column="1">
<widget class="QPushButton" name="checkBoxLower">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Special characters</string>
<string>Lower-case letters</string>
</property>
<property name="accessibleName">
<string>Special characters</string>
<string>Lower-case letters</string>
</property>
<property name="text">
<string notr="true">/*_&amp; ...</string>
<string notr="true">a-z</string>
</property>
<property name="checkable">
<bool>true</bool>
@ -439,14 +480,30 @@ QProgressBar::chunk {
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxExtASCII">
<property name="minimumSize">
<size>
<width>105</width>
<height>25</height>
</size>
<item row="1" column="3">
<widget class="QPushButton" name="checkBoxMath">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Math Symbols</string>
</property>
<property name="accessibleName">
<string>Math Symbols</string>
</property>
<property name="text">
<string notr="true">&lt; * + ! ? =</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item row="0" column="4">
<widget class="QPushButton" name="checkBoxExtASCII">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
@ -467,21 +524,42 @@ QProgressBar::chunk {
</attribute>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<item row="1" column="4">
<widget class="QPushButton" name="checkBoxBraces">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Braces</string>
</property>
<property name="accessibleName">
<string>Braces</string>
</property>
<property name="text">
<string notr="true">{ [ ( ) ] }</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item row="0" column="5">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="advancedContainer" native="true">
@ -498,369 +576,29 @@ QProgressBar::chunk {
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="advancedBar" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QToolButton" name="checkBoxUpperAdv">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Upper-case letters</string>
</property>
<property name="accessibleName">
<string>Upper-case letters</string>
</property>
<property name="text">
<string>A-Z</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxLowerAdv">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Lower-case letters</string>
</property>
<property name="accessibleName">
<string>Lower-case letters</string>
</property>
<property name="text">
<string>a-z</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QToolButton" name="checkBoxNumbersAdv">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Numbers</string>
</property>
<property name="text">
<string>0-9</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxBraces">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Braces</string>
</property>
<property name="accessibleName">
<string>Braces</string>
</property>
<property name="text">
<string>{[(</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QToolButton" name="checkBoxPunctuation">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Punctuation</string>
</property>
<property name="accessibleName">
<string>Punctuation</string>
</property>
<property name="text">
<string>.,:;</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxQuotes">
<property name="minimumSize">
<size>
<width>40</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Quotes</string>
</property>
<property name="text">
<string>&quot; '</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QToolButton" name="checkBoxMath">
<property name="minimumSize">
<size>
<width>60</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Math Symbols</string>
</property>
<property name="accessibleName">
<string>Math Symbols</string>
</property>
<property name="text">
<string>&lt;*+!?=</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxDashes">
<property name="minimumSize">
<size>
<width>60</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Dashes and Slashes</string>
</property>
<property name="accessibleName">
<string>Dashes and Slashes</string>
</property>
<property name="text">
<string>\_|-/</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QToolButton" name="checkBoxLogograms">
<property name="minimumSize">
<size>
<width>105</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Logograms</string>
</property>
<property name="accessibleName">
<string>Logograms</string>
</property>
<property name="text">
<string>#$%&amp;&amp;@^`~</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
<item>
<widget class="QToolButton" name="checkBoxExtASCIIAdv">
<property name="minimumSize">
<size>
<width>105</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Extended ASCII</string>
</property>
<property name="text">
<string>ExtendedASCII</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">optionButtons</string>
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="bottomMargin">
<number>0</number>
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<item row="1" column="0">
<widget class="QLabel" name="labelExcludedChars">
<property name="text">
<string>Also choose from:</string>
<string>Do not include:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="editAdditionalChars">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<width>375</width>
<height>0</height>
</size>
</property>
@ -872,35 +610,6 @@ QProgressBar::chunk {
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="editExcludedChars">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Character set to exclude from generated password</string>
</property>
<property name="accessibleName">
<string>Excluded characters</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelExcludedChars">
<property name="text">
<string>Do not include:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="buttonAddHex">
<property name="focusPolicy">
@ -917,6 +626,35 @@ QProgressBar::chunk {
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="editExcludedChars">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>375</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Character set to exclude from generated password</string>
</property>
<property name="accessibleName">
<string>Excluded characters</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Also choose from:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -945,26 +683,20 @@ QProgressBar::chunk {
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="excludedChars" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
@ -980,13 +712,6 @@ QProgressBar::chunk {
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="3" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="wordCaseLabel">
<property name="text">
<string>Word Case:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxWordList">
<property name="sizePolicy">
@ -997,23 +722,13 @@ QProgressBar::chunk {
</property>
</widget>
</item>
<item row="2" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordSeparator">
<item row="1" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordCount">
<property name="text">
<string>Word Separator:</string>
<string>Word Count:</string>
</property>
</widget>
</item>
<item row="0" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordList">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Wordlist:</string>
<property name="buddy">
<cstring>spinBoxLength</cstring>
</property>
</widget>
</item>
@ -1030,6 +745,33 @@ QProgressBar::chunk {
</property>
</spacer>
</item>
<item row="2" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordSeparator">
<property name="text">
<string>Word Separator:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QComboBox" name="wordCaseComboBox"/>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
@ -1075,30 +817,49 @@ QProgressBar::chunk {
</item>
</layout>
</item>
<item row="1" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordCount">
<item row="3" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="wordCaseLabel">
<property name="text">
<string>Word Count:</string>
<string>Word Case:</string>
</property>
<property name="buddy">
<cstring>spinBoxLength</cstring>
</widget>
</item>
<item row="0" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordList">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Wordlist:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLineEdit" name="editWordSeparator">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QComboBox" name="wordCaseComboBox"/>
</item>
<item>
<spacer name="horizontalSpacer_4">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -1216,22 +977,16 @@ QProgressBar::chunk {
<tabstop>sliderLength</tabstop>
<tabstop>spinBoxLength</tabstop>
<tabstop>buttonAdvancedMode</tabstop>
<tabstop>groupBox</tabstop>
<tabstop>checkBoxUpper</tabstop>
<tabstop>checkBoxLower</tabstop>
<tabstop>checkBoxNumbers</tabstop>
<tabstop>checkBoxSpecialChars</tabstop>
<tabstop>checkBoxExtASCII</tabstop>
<tabstop>checkBoxUpperAdv</tabstop>
<tabstop>checkBoxNumbersAdv</tabstop>
<tabstop>checkBoxPunctuation</tabstop>
<tabstop>checkBoxMath</tabstop>
<tabstop>checkBoxLogograms</tabstop>
<tabstop>checkBoxLowerAdv</tabstop>
<tabstop>checkBoxBraces</tabstop>
<tabstop>checkBoxQuotes</tabstop>
<tabstop>checkBoxDashes</tabstop>
<tabstop>checkBoxExtASCIIAdv</tabstop>
<tabstop>checkBoxMath</tabstop>
<tabstop>checkBoxBraces</tabstop>
<tabstop>editAdditionalChars</tabstop>
<tabstop>editExcludedChars</tabstop>
<tabstop>buttonAddHex</tabstop>

View file

@ -8,6 +8,11 @@ QPushButton:!default:hover {
background: palette(mid);
}
PasswordGeneratorWidget QPushButton:checked {
background: palette(highlight);
color: palette(highlighted-text);
}
QSpinBox {
min-width: 90px;
}