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

View file

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

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>622</width> <width>729</width>
<height>455</height> <height>427</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -156,7 +156,7 @@ QProgressBar::chunk {
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QToolButton" name="buttonGenerate"> <widget class="QPushButton" name="buttonGenerate">
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::TabFocus</enum> <enum>Qt::TabFocus</enum>
</property> </property>
@ -169,7 +169,7 @@ QProgressBar::chunk {
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QToolButton" name="buttonCopy"> <widget class="QPushButton" name="buttonCopy">
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::TabFocus</enum> <enum>Qt::TabFocus</enum>
</property> </property>
@ -299,42 +299,132 @@ QProgressBar::chunk {
<property name="title"> <property name="title">
<string>Character Types</string> <string>Character Types</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum> <enum>QLayout::SetMinimumSize</enum>
</property> </property>
<item> <item>
<widget class="QWidget" name="simpleBar" native="true"> <spacer name="horizontalSpacer">
<layout class="QHBoxLayout" name="horizontalLayout"> <property name="orientation">
<property name="leftMargin"> <enum>Qt::Horizontal</enum>
<number>0</number>
</property> </property>
<property name="topMargin"> <property name="sizeHint" stdset="0">
<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">
<size> <size>
<width>40</width> <width>40</width>
<height>25</height> <height>20</height>
</size> </size>
</property> </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"> <property name="toolTip">
<string>Upper-case letters</string> <string>Upper-case letters</string>
</property> </property>
<property name="accessibleName"> <property name="accessibleName">
<string>Upper-case letters</string> <string>Upper-case letters</string>
</property> </property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text"> <property name="text">
<string notr="true">A-Z</string> <string notr="true">A-Z</string>
</property> </property>
@ -346,45 +436,8 @@ QProgressBar::chunk {
</attribute> </attribute>
</widget> </widget>
</item> </item>
<item> <item row="0" column="2">
<widget class="QToolButton" name="checkBoxLower"> <widget class="QPushButton" name="checkBoxNumbers">
<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>
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::TabFocus</enum> <enum>Qt::TabFocus</enum>
</property> </property>
@ -394,9 +447,6 @@ QProgressBar::chunk {
<property name="accessibleName"> <property name="accessibleName">
<string>Numbers</string> <string>Numbers</string>
</property> </property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text"> <property name="text">
<string notr="true">0-9</string> <string notr="true">0-9</string>
</property> </property>
@ -408,28 +458,19 @@ QProgressBar::chunk {
</attribute> </attribute>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QToolButton" name="checkBoxSpecialChars"> <widget class="QPushButton" name="checkBoxLower">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>25</height>
</size>
</property>
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::TabFocus</enum> <enum>Qt::TabFocus</enum>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Special characters</string> <string>Lower-case letters</string>
</property> </property>
<property name="accessibleName"> <property name="accessibleName">
<string>Special characters</string> <string>Lower-case letters</string>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">/*_&amp; ...</string> <string notr="true">a-z</string>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
@ -439,14 +480,30 @@ QProgressBar::chunk {
</attribute> </attribute>
</widget> </widget>
</item> </item>
<item> <item row="1" column="3">
<widget class="QToolButton" name="checkBoxExtASCII"> <widget class="QPushButton" name="checkBoxMath">
<property name="minimumSize"> <property name="focusPolicy">
<size> <enum>Qt::TabFocus</enum>
<width>105</width>
<height>25</height>
</size>
</property> </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"> <property name="focusPolicy">
<enum>Qt::TabFocus</enum> <enum>Qt::TabFocus</enum>
</property> </property>
@ -467,21 +524,42 @@ QProgressBar::chunk {
</attribute> </attribute>
</widget> </widget>
</item> </item>
<item> <item row="1" column="4">
<spacer name="horizontalSpacer"> <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"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>40</width>
<height>0</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="advancedContainer" native="true"> <widget class="QWidget" name="advancedContainer" native="true">
@ -498,369 +576,29 @@ QProgressBar::chunk {
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </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> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>6</number>
</property> </property>
<item row="0" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="labelExcludedChars">
<property name="text"> <property name="text">
<string>Also choose from:</string> <string>Do not include:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="editAdditionalChars"> <widget class="QLineEdit" name="editAdditionalChars">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>375</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -872,35 +610,6 @@ QProgressBar::chunk {
</property> </property>
</widget> </widget>
</item> </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"> <item row="1" column="2">
<widget class="QPushButton" name="buttonAddHex"> <widget class="QPushButton" name="buttonAddHex">
<property name="focusPolicy"> <property name="focusPolicy">
@ -917,6 +626,35 @@ QProgressBar::chunk {
</property> </property>
</widget> </widget>
</item> </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> </layout>
</item> </item>
<item> <item>
@ -945,26 +683,20 @@ QProgressBar::chunk {
</layout> </layout>
</widget> </widget>
</item> </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> </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> </item>
</layout> </layout>
</widget> </widget>
@ -980,13 +712,6 @@ QProgressBar::chunk {
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<layout class="QGridLayout" name="gridLayout_3"> <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"> <item row="0" column="1">
<widget class="QComboBox" name="comboBoxWordList"> <widget class="QComboBox" name="comboBoxWordList">
<property name="sizePolicy"> <property name="sizePolicy">
@ -997,23 +722,13 @@ QProgressBar::chunk {
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" alignment="Qt::AlignRight"> <item row="1" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordSeparator"> <widget class="QLabel" name="labelWordCount">
<property name="text"> <property name="text">
<string>Word Separator:</string> <string>Word Count:</string>
</property> </property>
</widget> <property name="buddy">
</item> <cstring>spinBoxLength</cstring>
<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> </property>
</widget> </widget>
</item> </item>
@ -1030,6 +745,33 @@ QProgressBar::chunk {
</property> </property>
</spacer> </spacer>
</item> </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"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint"> <property name="sizeConstraint">
@ -1075,30 +817,49 @@ QProgressBar::chunk {
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0" alignment="Qt::AlignRight"> <item row="3" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="labelWordCount"> <widget class="QLabel" name="wordCaseLabel">
<property name="text"> <property name="text">
<string>Word Count:</string> <string>Word Case:</string>
</property> </property>
<property name="buddy"> </widget>
<cstring>spinBoxLength</cstring> </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> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLineEdit" name="editWordSeparator"> <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"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item> <item>
<widget class="QComboBox" name="wordCaseComboBox"/> <spacer name="horizontalSpacer_7">
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -1216,22 +977,16 @@ QProgressBar::chunk {
<tabstop>sliderLength</tabstop> <tabstop>sliderLength</tabstop>
<tabstop>spinBoxLength</tabstop> <tabstop>spinBoxLength</tabstop>
<tabstop>buttonAdvancedMode</tabstop> <tabstop>buttonAdvancedMode</tabstop>
<tabstop>groupBox</tabstop>
<tabstop>checkBoxUpper</tabstop> <tabstop>checkBoxUpper</tabstop>
<tabstop>checkBoxLower</tabstop> <tabstop>checkBoxLower</tabstop>
<tabstop>checkBoxNumbers</tabstop> <tabstop>checkBoxNumbers</tabstop>
<tabstop>checkBoxSpecialChars</tabstop> <tabstop>checkBoxSpecialChars</tabstop>
<tabstop>checkBoxExtASCII</tabstop> <tabstop>checkBoxExtASCII</tabstop>
<tabstop>checkBoxUpperAdv</tabstop>
<tabstop>checkBoxNumbersAdv</tabstop>
<tabstop>checkBoxPunctuation</tabstop> <tabstop>checkBoxPunctuation</tabstop>
<tabstop>checkBoxMath</tabstop>
<tabstop>checkBoxLogograms</tabstop>
<tabstop>checkBoxLowerAdv</tabstop>
<tabstop>checkBoxBraces</tabstop>
<tabstop>checkBoxQuotes</tabstop> <tabstop>checkBoxQuotes</tabstop>
<tabstop>checkBoxDashes</tabstop> <tabstop>checkBoxDashes</tabstop>
<tabstop>checkBoxExtASCIIAdv</tabstop> <tabstop>checkBoxMath</tabstop>
<tabstop>checkBoxBraces</tabstop>
<tabstop>editAdditionalChars</tabstop> <tabstop>editAdditionalChars</tabstop>
<tabstop>editExcludedChars</tabstop> <tabstop>editExcludedChars</tabstop>
<tabstop>buttonAddHex</tabstop> <tabstop>buttonAddHex</tabstop>

View file

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