7#include "ui_configdialog.h"
14#include <QSystemTrayIcon>
15#include <QTableWidgetItem>
40 ui->spinBoxAutoclearPanelSeconds->setValue(
49 if (QSystemTrayIcon::isSystemTrayAvailable()) {
53 ui->checkBoxUseTrayIcon->setEnabled(
false);
54 ui->checkBoxUseTrayIcon->setToolTip(tr(
"System tray is not available"));
55 ui->checkBoxHideOnClose->setEnabled(
false);
56 ui->checkBoxStartMinimized->setEnabled(
false);
64 ui->checkBoxTemplateAllFields->setChecked(
71 ui->checkBoxUseOtp->hide();
72 ui->checkBoxUseQrencode->hide();
76 if (!isPassOtpAvailable()) {
77 ui->checkBoxUseOtp->setEnabled(
false);
78 ui->checkBoxUseOtp->setToolTip(
79 tr(
"Pass OTP extension needs to be installed"));
82 if (!isQrencodeAvailable()) {
83 ui->checkBoxUseQrencode->setEnabled(
false);
84 ui->checkBoxUseQrencode->setToolTip(tr(
"qrencode needs to be installed"));
103 ui->profileTable->verticalHeader()->hide();
104 ui->profileTable->horizontalHeader()->setSectionResizeMode(
105 1, QHeaderView::Stretch);
106 ui->label->setText(ui->label->text() + VERSION);
107 ui->comboBoxClipboard->clear();
109 ui->comboBoxClipboard->addItem(tr(
"No Clipboard"));
110 ui->comboBoxClipboard->addItem(tr(
"Always copy to clipboard"));
111 ui->comboBoxClipboard->addItem(tr(
"On-demand copy to clipboard"));
114 ui->comboBoxClipboard->setCurrentIndex(currentIndex);
115 on_comboBoxClipboard_activated(currentIndex);
117 QClipboard *clip = QApplication::clipboard();
118 if (!clip->supportsSelection()) {
120 ui->checkBoxSelection->setVisible(
false);
128 ui->tabWidget->setCurrentIndex(1);
131 connect(ui->profileTable, &QTableWidget::itemChanged,
this,
132 &ConfigDialog::onProfileTableItemChanged);
133 connect(
this, &ConfigDialog::accepted,
this, &ConfigDialog::on_accepted);
151void ConfigDialog::setGitPath(
const QString &path) {
152 ui->gitPath->setText(path);
153 ui->checkBoxUseGit->setEnabled(!path.isEmpty());
154 if (path.isEmpty()) {
164void ConfigDialog::usePass(
bool usePass) {
165 ui->radioButtonNative->setChecked(!usePass);
166 ui->radioButtonPass->setChecked(usePass);
170void ConfigDialog::validate(QTableWidgetItem *item) {
173 if (item ==
nullptr) {
174 for (
int i = 0; i < ui->profileTable->rowCount(); i++) {
175 for (
int j = 0; j < ui->profileTable->columnCount(); j++) {
176 QTableWidgetItem *_item = ui->profileTable->item(i, j);
178 if (_item->text().isEmpty() && j != 2) {
179 _item->setBackground(Qt::red);
190 if (item->text().isEmpty() && item->column() != 2) {
191 item->setBackground(Qt::red);
196 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(status);
199void ConfigDialog::on_accepted() {
212 ui->spinBoxAutoclearPanelSeconds->value());
220 ui->checkBoxUseTrayIcon->isChecked());
222 ui->checkBoxHideOnClose->isChecked());
224 ui->checkBoxStartMinimized->isChecked());
239 ui->checkBoxTemplateAllFields->isChecked());
247void ConfigDialog::on_autodetectButton_clicked() {
249 if (!pass.isEmpty()) {
250 ui->passPath->setText(pass);
252 usePass(!pass.isEmpty());
257 if (!gpg.isEmpty()) {
258 ui->gpgPath->setText(gpg);
261 if (!git.isEmpty()) {
262 ui->gitPath->setText(git);
265 if (!pwgen.isEmpty()) {
266 ui->pwgenPath->setText(pwgen);
274void ConfigDialog::on_radioButtonNative_clicked() { setGroupBoxState(); }
280void ConfigDialog::on_radioButtonPass_clicked() { setGroupBoxState(); }
286auto ConfigDialog::getSecretKeys() -> QStringList {
303void ConfigDialog::setGroupBoxState() {
304 bool state = ui->radioButtonPass->isChecked();
305 ui->groupBoxNative->setEnabled(!state);
306 ui->groupBoxPass->setEnabled(state);
313auto ConfigDialog::selectExecutable() -> QString {
314 QFileDialog dialog(
this);
315 dialog.setFileMode(QFileDialog::ExistingFile);
316 dialog.setOption(QFileDialog::ReadOnly);
318 return dialog.selectedFiles().constFirst();
328auto ConfigDialog::selectFolder() -> QString {
329 QFileDialog dialog(
this);
330 dialog.setFileMode(QFileDialog::Directory);
331 dialog.setFilter(QDir::NoFilter);
332 dialog.setOption(QFileDialog::ShowDirsOnly);
334 return dialog.selectedFiles().constFirst();
344void ConfigDialog::on_toolButtonGit_clicked() {
345 QString git = selectExecutable();
346 bool state = !git.isEmpty();
348 ui->gitPath->setText(git);
353 ui->checkBoxUseGit->setEnabled(state);
359void ConfigDialog::on_toolButtonGpg_clicked() {
360 QString gpg = selectExecutable();
361 if (!gpg.isEmpty()) {
362 ui->gpgPath->setText(gpg);
369void ConfigDialog::on_toolButtonPass_clicked() {
370 QString pass = selectExecutable();
371 if (!pass.isEmpty()) {
372 ui->passPath->setText(pass);
380void ConfigDialog::on_toolButtonStore_clicked() {
381 QString store = selectFolder();
382 if (!store.isEmpty()) {
383 ui->storePath->setText(store);
391void ConfigDialog::on_comboBoxClipboard_activated(
int index) {
392 bool state = index > 0;
394 ui->checkBoxSelection->setEnabled(state);
395 ui->checkBoxAutoclear->setEnabled(state);
396 ui->checkBoxHidePassword->setEnabled(state);
397 ui->checkBoxHideContent->setEnabled(state);
399 ui->spinBoxAutoclearSeconds->setEnabled(ui->checkBoxAutoclear->isChecked());
400 ui->labelSeconds->setEnabled(ui->checkBoxAutoclear->isChecked());
402 ui->spinBoxAutoclearSeconds->setEnabled(
false);
403 ui->labelSeconds->setEnabled(
false);
411void ConfigDialog::on_checkBoxAutoclearPanel_clicked() {
412 bool state = ui->checkBoxAutoclearPanel->isChecked();
413 ui->spinBoxAutoclearPanelSeconds->setEnabled(state);
414 ui->labelPanelSeconds->setEnabled(state);
424 on_checkBoxSelection_clicked();
434 on_checkBoxAutoclear_clicked();
444 on_checkBoxAutoclearPanel_clicked();
451void ConfigDialog::on_checkBoxSelection_clicked() {
452 on_comboBoxClipboard_activated(ui->comboBoxClipboard->currentIndex());
459void ConfigDialog::on_checkBoxAutoclear_clicked() {
460 on_comboBoxClipboard_activated(ui->comboBoxClipboard->currentIndex());
480void ConfigDialog::setProfiles(QHash<QString, QHash<QString, QString>> profiles,
481 const QString ¤tProfile) {
483 if (profiles.contains(
"")) {
488 ui->profileTable->setRowCount(profiles.count());
489 QHashIterator<QString, QHash<QString, QString>> i(profiles);
491 while (i.hasNext()) {
493 if (!i.value().isEmpty() && !i.key().isEmpty()) {
494 ui->profileTable->setItem(n, 0,
new QTableWidgetItem(i.key()));
495 ui->profileTable->setItem(n, 1,
496 new QTableWidgetItem(i.value().value(
"path")));
497 ui->profileTable->setItem(
498 n, 2,
new QTableWidgetItem(i.value().value(
"signingKey")));
500 if (i.key() == currentProfile) {
501 ui->profileTable->selectRow(n);
513 QHash<QString, QHash<QString, QString>> profiles;
515 for (
int i = 0; i < ui->profileTable->rowCount(); ++i) {
516 QHash<QString, QString> profile;
517 QTableWidgetItem *pathItem = ui->profileTable->item(i, 1);
518 if (
nullptr != pathItem) {
519 QTableWidgetItem *item = ui->profileTable->item(i, 0);
520 if (item ==
nullptr) {
523 profile[
"path"] = pathItem->text();
524 QTableWidgetItem *signingKeyItem = ui->profileTable->item(i, 2);
525 if (
nullptr != signingKeyItem) {
526 profile[
"signingKey"] = signingKeyItem->text();
528 profiles.insert(item->text(), profile);
537void ConfigDialog::on_addButton_clicked() {
538 int n = ui->profileTable->rowCount();
539 ui->profileTable->insertRow(n);
540 ui->profileTable->setItem(n, 0,
new QTableWidgetItem());
541 ui->profileTable->setItem(n, 1,
new QTableWidgetItem(ui->storePath->text()));
542 ui->profileTable->setItem(n, 2,
new QTableWidgetItem());
543 ui->profileTable->selectRow(n);
544 ui->deleteButton->setEnabled(
true);
552void ConfigDialog::on_deleteButton_clicked() {
553 QSet<int> selectedRows;
554 QList<QTableWidgetItem *> itemList = ui->profileTable->selectedItems();
555 if (itemList.count() == 0) {
556 QMessageBox::warning(
this, tr(
"No profile selected"),
557 tr(
"No profile selected to delete"));
560 QTableWidgetItem *item;
561 foreach (item, itemList)
562 selectedRows.insert(item->row());
564 QList<int> rows = selectedRows.values();
565 std::sort(rows.begin(), rows.end());
567 foreach (
int row, rows)
568 ui->profileTable->removeRow(row);
569 if (ui->profileTable->rowCount() < 1) {
570 ui->deleteButton->setEnabled(
false);
582void ConfigDialog::criticalMessage(
const QString &title,
const QString &text) {
583 QMessageBox::critical(
this, title, text, QMessageBox::Ok, QMessageBox::Ok);
586auto ConfigDialog::isQrencodeAvailable() ->
bool {
591 which.start(
"which", QStringList() <<
"qrencode");
592 which.waitForFinished();
594 which.readAllStandardOutput().trimmed());
595 return which.exitCode() == 0;
599auto ConfigDialog::isPassOtpAvailable() ->
bool {
606 pass.waitForFinished(2000);
607 return pass.exitCode() == 0;
617 on_autodetectButton_clicked();
619 if (!checkGpgExistence()) {
622 if (!checkSecretKeys()) {
625 if (!checkPasswordStore()) {
630 ui->checkBoxHidePassword->setCheckState(Qt::Checked);
633auto ConfigDialog::checkGpgExistence() ->
bool {
634 QString gpg = ui->gpgPath->text();
635 if (!gpg.startsWith(
"wsl ") && !QFile(gpg).exists()) {
637 tr(
"GnuPG not found"),
640 tr(
"Please install GnuPG on your system.<br>Install "
641 "<strong>Ubuntu</strong> from the Microsoft Store to get it.<br>"
642 "If you already did so, make sure you started it once and<br>"
643 "click \"Autodetect\" in the next dialog.")
645 tr(
"Please install GnuPG on your system.<br>Install "
646 "<strong>Ubuntu</strong> from the Microsoft Store<br>or <a "
647 "href=\"https://www.gnupg.org/download/#sec-1-2\">download</a> it "
651 tr(
"Please install GnuPG on your system.<br>Install "
652 "<strong>gpg</strong> using your favorite package manager<br>or "
654 "href=\"https://www.gnupg.org/download/#sec-1-2\">download</a> it "
663auto ConfigDialog::checkSecretKeys() ->
bool {
664 QString gpg = ui->gpgPath->text();
665 QStringList names = getSecretKeys();
671 if ((gpg.startsWith(
"wsl ") || QFile(gpg).exists()) && names.empty()) {
678auto ConfigDialog::checkPasswordStore() ->
bool {
679 QString passStore = ui->storePath->text();
681 if (!QFile(passStore).exists()) {
682 if (QMessageBox::question(
683 this, tr(
"Create password-store?"),
684 tr(
"Would you like to create a password-store at %1?")
686 QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
687 if (!QDir().mkdir(passStore)) {
688 QMessageBox::warning(
690 tr(
"Failed to create password-store at: %1").arg(passStore));
694 SetFileAttributes(passStore.toStdWString().c_str(),
695 FILE_ATTRIBUTE_HIDDEN);
697 if (ui->checkBoxUseGit->isChecked()) {
698 emit mainWindow->passGitInitNeeded();
700 mainWindow->userDialog(passStore);
706void ConfigDialog::handleGpgIdFile() {
707 QString passStore = ui->storePath->text();
708 if (!QFile(QDir(passStore).filePath(
".gpg-id")).exists()) {
710 dbg() <<
".gpg-id file does not exist";
712 criticalMessage(tr(
"Password store not initialised"),
713 tr(
"The folder %1 doesn't seem to be a password store or "
714 "is not yet initialised.")
717 while (!QFile(passStore).exists()) {
718 on_toolButtonStore_clicked();
719 if (passStore == ui->storePath->text()) {
722 passStore = ui->storePath->text();
724 if (!QFile(passStore +
".gpg-id").exists()) {
726 dbg() <<
".gpg-id file still does not exist :/";
739 if (QSystemTrayIcon::isSystemTrayAvailable()) {
740 ui->checkBoxUseTrayIcon->setChecked(useSystray);
741 ui->checkBoxHideOnClose->setEnabled(useSystray);
742 ui->checkBoxStartMinimized->setEnabled(useSystray);
745 ui->checkBoxHideOnClose->setChecked(
false);
746 ui->checkBoxStartMinimized->setChecked(
false);
755void ConfigDialog::on_checkBoxUseTrayIcon_clicked() {
756 bool state = ui->checkBoxUseTrayIcon->isChecked();
757 ui->checkBoxHideOnClose->setEnabled(state);
758 ui->checkBoxStartMinimized->setEnabled(state);
775 ui->checkBoxUseGit->setChecked(
useGit);
776 on_checkBoxUseGit_clicked();
784 ui->checkBoxUseOtp->setChecked(
useOtp);
799void ConfigDialog::on_checkBoxUseGit_clicked() {
800 ui->checkBoxAddGPGId->setEnabled(ui->checkBoxUseGit->isChecked());
801 ui->checkBoxAutoPull->setEnabled(ui->checkBoxUseGit->isChecked());
802 ui->checkBoxAutoPush->setEnabled(ui->checkBoxUseGit->isChecked());
809void ConfigDialog::on_toolButtonPwgen_clicked() {
810 QString pwgen = selectExecutable();
811 if (!pwgen.isEmpty()) {
812 ui->pwgenPath->setText(pwgen);
813 ui->checkBoxUsePwgen->setEnabled(
true);
815 ui->checkBoxUsePwgen->setEnabled(
false);
816 ui->checkBoxUsePwgen->setChecked(
false);
826 ui->pwgenPath->setText(pwgen);
827 if (pwgen.isEmpty()) {
828 ui->checkBoxUsePwgen->setChecked(
false);
829 ui->checkBoxUsePwgen->setEnabled(
false);
831 on_checkBoxUsePwgen_clicked();
838void ConfigDialog::on_checkBoxUsePwgen_clicked() {
839 bool usePwgen = ui->checkBoxUsePwgen->isChecked();
840 ui->checkBoxAvoidCapitals->setEnabled(
usePwgen);
841 ui->checkBoxAvoidNumbers->setEnabled(
usePwgen);
842 ui->checkBoxLessRandom->setEnabled(
usePwgen);
843 ui->checkBoxUseSymbols->setEnabled(
usePwgen);
844 ui->lineEditPasswordChars->setEnabled(!
usePwgen);
845 ui->labelPasswordChars->setEnabled(!
usePwgen);
846 ui->passwordCharTemplateSelector->setEnabled(!
usePwgen);
857 if (ui->pwgenPath->text().isEmpty()) {
860 ui->checkBoxUsePwgen->setChecked(
usePwgen);
861 on_checkBoxUsePwgen_clicked();
866 ui->spinBoxPasswordLength->setValue(config.
length);
867 ui->passwordCharTemplateSelector->setCurrentIndex(config.
selected);
869 ui->lineEditPasswordChars->setEnabled(
false);
876 config.
length = ui->spinBoxPasswordLength->value();
878 ui->passwordCharTemplateSelector->currentIndex());
880 ui->lineEditPasswordChars->text();
890void ConfigDialog::on_passwordCharTemplateSelector_activated(
int index) {
891 ui->lineEditPasswordChars->setText(
894 ui->lineEditPasswordChars->setEnabled(
true);
896 ui->lineEditPasswordChars->setEnabled(
false);
904void ConfigDialog::on_checkBoxUseTemplate_clicked() {
905 ui->plainTextEditTemplate->setEnabled(ui->checkBoxUseTemplate->isChecked());
906 ui->checkBoxTemplateAllFields->setEnabled(
907 ui->checkBoxUseTemplate->isChecked());
910void ConfigDialog::onProfileTableItemChanged(QTableWidgetItem *item) {
920 on_checkBoxUseTemplate_clicked();
The ConfigDialog handles the configuration interface.
void setPasswordConfiguration(const PasswordConfiguration &config)
auto getProfiles() -> QHash< QString, QHash< QString, QString > >
ConfigDialog::getProfiles return profile list.
void useOtp(bool useOtp)
ConfigDialog::useOtp set preference for using otp plugin.
~ConfigDialog()
ConfigDialog::~ConfigDialog config destructor, makes sure the mainWindow knows about git,...
void useGit(bool useGit)
ConfigDialog::useGit set preference for using git.
void useAutoclearPanel(bool useAutoclearPanel)
ConfigDialog::useAutoclearPanel set the panel autoclear use from MainWindow.
void useAutoclear(bool useAutoclear)
ConfigDialog::useAutoclear set the clipboard autoclear use from MainWindow.
void useQrencode(bool useQrencode)
ConfigDialog::useOtp set preference for using otp plugin.
void useTemplate(bool useTemplate)
ConfigDialog::useTemplate set preference for using templates.
ConfigDialog(MainWindow *parent)
ConfigDialog::ConfigDialog this sets up the configuration screen.
void setPwgenPath(const QString &)
ConfigDialog::setPwgenPath set pwgen executable path. Enable or disable related options in the interf...
auto getPasswordConfiguration() -> PasswordConfiguration
void closeEvent(QCloseEvent *event)
ConfigDialog::closeEvent close this window.
void useTrayIcon(bool useSystray)
ConfigDialog::useTrayIcon set preference for using trayicon. Enable or disable related checkboxes acc...
void usePwgen(bool usePwgen)
ConfigDialog::usePwgen set preference for using pwgen (can be overruled buy empty pwgenPath)....
void wizard()
ConfigDialog::wizard first-time use wizard.
void useSelection(bool useSelection)
ConfigDialog::useSelection set the clipboard type use from MainWindow.
void genKey(const QString &, QDialog *)
ConfigDialog::genKey tunnel function to make MainWindow generate a gpg key pair.
Handles GPG keypair generation.
The MainWindow class does way too much, not only is it a switchboard, configuration handler and more,...
void generateKeyPair(const QString &, QDialog *)
MainWindow::generateKeyPair internal gpg keypair generator . .
void userDialog(const QString &="")
MainWindow::userDialog see MainWindow::onUsers()
static auto isUseSelection(const bool &defaultValue=QVariant().toBool()) -> bool
static void setStartMinimized(const bool &startMinimized)
static auto isUseAutoclear(const bool &defaultValue=QVariant().toBool()) -> bool
static void setAutoclearPanelSeconds(const int &autoClearPanelSeconds)
static void setPassExecutable(const QString &passExecutable)
static auto isStartMinimized(const bool &defaultValue=QVariant().toBool()) -> bool
static auto getClipBoardTypeRaw(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER) -> int
static void setHidePassword(const bool &hidePassword)
static auto isUseOtp(const bool &defaultValue=QVariant().toBool()) -> bool
static void setPwgenExecutable(const QString &pwgenExecutable)
static auto getPwgenExecutable(const QString &defaultValue=QVariant().toString()) -> QString
static void setUseTrayIcon(const bool &useTrayIcon)
static auto isNoLineWrapping(const bool &defaultValue=QVariant().toBool()) -> bool
static void setPassStore(const QString &passStore)
static auto isHideContent(const bool &defaultValue=QVariant().toBool()) -> bool
static void setPasswordConfiguration(const PasswordConfiguration &config)
static void setHideOnClose(const bool &hideOnClose)
static auto getPass() -> Pass *
static auto getPasswordConfiguration() -> PasswordConfiguration
static auto isUseQrencode(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isUseAutoclearPanel(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isAutoPull(const bool &defaultValue=QVariant().toBool()) -> bool
static void setGitExecutable(const QString &gitExecutable)
static auto isUseGit(const bool &defaultValue=QVariant().toBool()) -> bool
static void setUseOtp(const bool &useOtp)
static void setProfiles(const QHash< QString, QHash< QString, QString > > &profiles)
static void setUsePwgen(const bool &usePwgen)
static auto isTemplateAllFields(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isUsePass(const bool &defaultValue=QVariant().toBool()) -> bool
static auto getPassStore(const QString &defaultValue=QVariant().toString()) -> QString
static auto isUseTemplate(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isUseTrayIcon(const bool &defaultValue=QVariant().toBool()) -> bool
static void setUseTemplate(const bool &useTemplate)
static auto isAvoidCapitals(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isAddGPGId(const bool &defaultValue=QVariant().toBool()) -> bool
static auto getGpgExecutable(const QString &defaultValue=QVariant().toString()) -> QString
static void setAutoPull(const bool &autoPull)
static void setPassTemplate(const QString &passTemplate)
static auto isUseSymbols(const bool &defaultValue=QVariant().toBool()) -> bool
static void setGpgExecutable(const QString &gpgExecutable)
static void setVersion(const QString &version)
static void setUseAutoclear(const bool &useAutoclear)
static auto isLessRandom(const bool &defaultValue=QVariant().toBool()) -> bool
static void setAlwaysOnTop(const bool &alwaysOnTop)
static auto getPassTemplate(const QString &defaultValue=QVariant().toString()) -> QString
static void setDisplayAsIs(const bool &displayAsIs)
static void setUseMonospace(const bool &useMonospace)
static void setAvoidCapitals(const bool &avoidCapitals)
static void setQrencodeExecutable(const QString &qrencodeExecutable)
static auto getProfile(const QString &defaultValue=QVariant().toString()) -> QString
static auto isUseMonospace(const bool &defaultValue=QVariant().toBool()) -> bool
static void setAddGPGId(const bool &addGPGId)
static void setUsePass(const bool &usePass)
static auto getAutoclearPanelSeconds(const int &defaultValue=QVariant().toInt()) -> int
static auto isUsePwgen(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isAlwaysOnTop(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isAvoidNumbers(const bool &defaultValue=QVariant().toBool()) -> bool
static auto isHidePassword(const bool &defaultValue=QVariant().toBool()) -> bool
static auto getPassExecutable(const QString &defaultValue=QVariant().toString()) -> QString
static void setUseAutoclearPanel(const bool &useAutoclearPanel)
static void setAutoclearSeconds(const int &autoClearSeconds)
static void setNoLineWrapping(const bool &noLineWrapping)
static void setUseQrencode(const bool &useQrencode)
static void setAvoidNumbers(const bool &avoidNumbers)
static auto isHideOnClose(const bool &defaultValue=QVariant().toBool()) -> bool
static void setAutoPush(const bool &autoPush)
static void setClipBoardType(const int &clipBoardType)
static auto getProfiles() -> QHash< QString, QHash< QString, QString > >
static void setLessRandom(const bool &lessRandom)
static auto getAutoclearSeconds(const int &defaultValue=QVariant().toInt()) -> int
static void setHideContent(const bool &hideContent)
static auto isAutoPush(const bool &defaultValue=QVariant().toBool()) -> bool
static void setUseSelection(const bool &useSelection)
static auto getGitExecutable(const QString &defaultValue=QVariant().toString()) -> QString
static void setTemplateAllFields(const bool &templateAllFields)
static void setUseSymbols(const bool &useSymbols)
static auto isDisplayAsIs(const bool &defaultValue=QVariant().toBool()) -> bool
static void setUseGit(const bool &useGit)
static auto normalizeFolderPath(QString path) -> QString
Util::normalizeFolderPath let's always end folders with a QDir::separator()
static auto checkConfig() -> bool
Util::checkConfig do we have prequisite settings?
static auto findBinaryInPath(QString binary) -> QString
Util::findBinaryInPath search for executables.
Holds the Password configuration settings.
int length
Length of the password.
enum PasswordConfiguration::characterSet selected
characterSet
The selected character set.
QString Characters[CHARSETS_COUNT]
The different character sets.
Stores key info lines including validity, creation date and more.
QString name
UserInfo::name full name.