From ef37cc8b4bba3ab5b99775a743fb19863c573c9c Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Wed, 30 Oct 2024 14:08:14 +0200 Subject: [PATCH] Update to new UI Signed-off-by: Raul Metsma --- client/Application.cpp | 40 - client/Application.h | 5 - client/Settings.cpp | 1 + client/Settings.h | 4 + client/dialogs/SettingsDialog.cpp | 586 ++++----- client/dialogs/SettingsDialog.h | 7 +- client/dialogs/SettingsDialog.ui | 1312 +++++++++++-------- client/images/icon_checkbox.png | Bin 691 -> 0 bytes client/images/icon_checkbox_check.png | Bin 887 -> 0 bytes client/images/icon_help hover.svg | 16 - client/images/icon_help.svg | 18 +- client/images/icon_radio.png | Bin 691 -> 0 bytes client/images/icon_radio.svg | 4 + client/images/icon_radio_active.svg | 4 + client/images/icon_radio_check.svg | 5 + client/images/icon_radio_check_active.svg | 5 + client/images/icon_radio_check_disabled.svg | 5 + client/images/icon_radio_check_hover.svg | 18 + client/images/icon_radio_checked.png | Bin 691 -> 0 bytes client/images/icon_radio_disabled.svg | 4 + client/images/icon_radio_hover.svg | 17 + client/images/images.qrc | 13 +- client/translations/en.ts | 104 +- client/translations/et.ts | 104 +- client/translations/ru.ts | 104 +- client/widgets/CheckBox.cpp | 54 - client/widgets/CheckBox.h | 32 - client/widgets/RadioButton.cpp | 50 - client/widgets/RadioButton.h | 32 - 29 files changed, 1136 insertions(+), 1408 deletions(-) delete mode 100644 client/images/icon_checkbox.png delete mode 100644 client/images/icon_checkbox_check.png delete mode 100644 client/images/icon_help hover.svg delete mode 100644 client/images/icon_radio.png create mode 100644 client/images/icon_radio.svg create mode 100644 client/images/icon_radio_active.svg create mode 100644 client/images/icon_radio_check.svg create mode 100644 client/images/icon_radio_check_active.svg create mode 100644 client/images/icon_radio_check_disabled.svg create mode 100644 client/images/icon_radio_check_hover.svg delete mode 100644 client/images/icon_radio_checked.png create mode 100644 client/images/icon_radio_disabled.svg create mode 100644 client/images/icon_radio_hover.svg delete mode 100644 client/widgets/CheckBox.cpp delete mode 100644 client/widgets/CheckBox.h delete mode 100644 client/widgets/RadioButton.cpp delete mode 100644 client/widgets/RadioButton.h diff --git a/client/Application.cpp b/client/Application.cpp index 94132d38b..97e7b4ac7 100644 --- a/client/Application.cpp +++ b/client/Application.cpp @@ -148,15 +148,6 @@ class DigidocConf final: public digidoc::XmlConfCurrent #ifdef Q_OS_MAC std::string TSLCache() const final { return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation).toStdString(); } - - void setProxyHost( const std::string &host ) final - { Settings::PROXY_HOST = host; } - void setProxyPort( const std::string &port ) final - { Settings::PROXY_PORT = port; } - void setProxyUser( const std::string &user ) final - { Settings::PROXY_USER = user; } - void setProxyPass( const std::string &pass ) final - { Settings::PROXY_PASS = pass; } #endif std::vector TSCerts() const final @@ -609,10 +600,6 @@ QVariant Application::confValue( ConfParameter parameter, const QVariant &value switch( parameter ) { case SiVaUrl: r = i->verifyServiceUri().c_str(); break; - case ProxyHost: r = i->proxyHost().c_str(); break; - case ProxyPort: r = i->proxyPort().c_str(); break; - case ProxyUser: r = i->proxyUser().c_str(); break; - case ProxyPass: r = i->proxyPass().c_str(); break; case TSAUrl: r = i->TSUrl().c_str(); break; case TSLUrl: r = i->TSLUrl().c_str(); break; case TSLCache: r = i->TSLCache().c_str(); break; @@ -884,33 +871,6 @@ int Application::run() return exec(); } -void Application::setConfValue( ConfParameter parameter, const QVariant &value ) -{ - try - { - auto *i = dynamic_cast(digidoc::Conf::instance()); - if(!i) - return; - QByteArray v = value.toString().toUtf8(); - switch( parameter ) - { - case ProxyHost: i->setProxyHost( v.isEmpty()? std::string() : v.constData() ); break; - case ProxyPort: i->setProxyPort( v.isEmpty()? std::string() : v.constData() ); break; - case ProxyUser: i->setProxyUser( v.isEmpty()? std::string() : v.constData() ); break; - case ProxyPass: i->setProxyPass( v.isEmpty()? std::string() : v.constData() ); break; - case TSAUrl: - case SiVaUrl: - case TSLCerts: - case TSLUrl: - case TSLCache: break; - } - } - catch( const digidoc::Exception &e ) - { - showWarning(tr("Caught exception!"), e); - } -} - void Application::showClient(const QStringList ¶ms, bool crypto, bool sign, bool newWindow) { if(sign) diff --git a/client/Application.h b/client/Application.h index b0c028698..e764c1976 100644 --- a/client/Application.h +++ b/client/Application.h @@ -46,10 +46,6 @@ class Application final: public BaseApplication enum ConfParameter : quint8 { SiVaUrl, - ProxyHost, - ProxyPort, - ProxyUser, - ProxyPass, TSAUrl, TSLUrl, TSLCerts, @@ -77,7 +73,6 @@ class Application final: public BaseApplication static QWidget* mainWindow(); static void openHelp(); static uint readTSLVersion(const QString &path); - static void setConfValue( ConfParameter parameter, const QVariant &value ); static void showClient(const QStringList ¶ms = {}, bool crypto = false, bool sign = false, bool newWindow = false); static void updateTSLCache(const QDateTime &tslTime); diff --git a/client/Settings.cpp b/client/Settings.cpp index 24ca80f6b..560c2f406 100644 --- a/client/Settings.cpp +++ b/client/Settings.cpp @@ -33,6 +33,7 @@ const Option Settings::CDOC2_DEFAULT_KEYSERVER { QString return Application::confValue(QLatin1String("CDOC2-DEFAULT-KEYSERVER")) .toString(QStringLiteral("00000000-0000-0000-0000-000000000000")); }}; +const Option Settings::CDOC2_UUID { QStringLiteral("CDOC2-UUID"), QStringLiteral("00000000-0000-0000-0000-000000000002") }; const Option Settings::CDOC2_GET { QStringLiteral("CDOC2-GET"), QStringLiteral(CDOC2_GET_URL) }; const Option Settings::CDOC2_GET_CERT { QStringLiteral("CDOC2-GET-CERT") }; const Option Settings::CDOC2_POST { QStringLiteral("CDOC2-POST"), QStringLiteral(CDOC2_POST_URL) }; diff --git a/client/Settings.h b/client/Settings.h index 4b85525c8..af777bc70 100644 --- a/client/Settings.h +++ b/client/Settings.h @@ -46,6 +46,9 @@ struct Settings void operator =(const T &value) const { operator =(QVariant(value)); } + void operator() (const T &value) const { + operator =(QVariant(value)); + } template > void operator =(const std::string &value) const { operator =(QString::fromStdString(value)); @@ -101,6 +104,7 @@ struct Settings static const Option CDOC2_NOTIFICATION; static const Option CDOC2_USE_KEYSERVER; static const Option CDOC2_DEFAULT_KEYSERVER; + static const Option CDOC2_UUID; static const Option CDOC2_GET; static const Option CDOC2_GET_CERT; static const Option CDOC2_POST; diff --git a/client/dialogs/SettingsDialog.cpp b/client/dialogs/SettingsDialog.cpp index 87c62c3e7..4a5e78a38 100644 --- a/client/dialogs/SettingsDialog.cpp +++ b/client/dialogs/SettingsDialog.cpp @@ -30,17 +30,15 @@ #include "FileDialog.h" #include "QSigner.h" #include "Settings.h" -#include "Styles.h" #include "SslCertificate.h" #include "TokenData.h" #include "dialogs/CertificateDetails.h" #include "dialogs/FirstRun.h" #include "dialogs/WarningDialog.h" -#include "effects/ButtonHoverFilter.h" #include "effects/Overlay.h" #include "effects/FadeInNotification.h" -#include +#include #include #include @@ -70,248 +68,6 @@ SettingsDialog::SettingsDialog(int page, QWidget *parent) for(QCheckBox *w: findChildren()) w->setAttribute(Qt::WA_MacShowFocusRect, false); - QFont headerFont = Styles::font(Styles::Regular, 18, QFont::Bold); - QFont regularFont = Styles::font(Styles::Regular, 14); - QFont condensed12 = Styles::font(Styles::Condensed, 12); - headerFont.setPixelSize(18); - regularFont.setPixelSize(14); - condensed12.setPixelSize(12); - - // Menu - ui->lblMenuSettings->setFont(headerFont); - ui->btnMenuGeneral->setFont(condensed12); - ui->btnMenuCertificate->setFont(condensed12); - ui->btnMenuValidation->setFont(condensed12); - ui->btnMenuProxy->setFont(condensed12); - ui->btnMenuDiagnostics->setFont(condensed12); - ui->btnMenuInfo->setFont(condensed12); - - // pageGeneral - ui->lblGeneralLang->setFont(headerFont); - ui->lblDefaultDirectory->setFont(headerFont); - - ui->rdGeneralEstonian->setFont(regularFont); - ui->rdGeneralRussian->setFont(regularFont); - ui->rdGeneralEnglish->setFont(regularFont); - - ui->rdGeneralSameDirectory->setFont(regularFont); - ui->rdGeneralSpecifyDirectory->setFont(regularFont); - ui->btGeneralChooseDirectory->setFont(regularFont); - ui->txtGeneralDirectory->setFont(regularFont); - - ui->chkShowPrintSummary->setFont(regularFont); - ui->chkRoleAddressInfo->setFont(regularFont); - ui->chkLibdigidocppDebug->setFont(regularFont); - - ui->lblGeneralCDoc2->setFont(headerFont); - - ui->chkCdoc2KeyServer->setFont(regularFont); - ui->lblCdoc2Name->setFont(regularFont); - ui->lblCdoc2UUID->setFont(regularFont); - ui->lblCdoc2Fetch->setFont(regularFont); - ui->lblCdoc2Post->setFont(regularFont); - ui->cmbCdoc2Name->setFont(regularFont); - ui->txtCdoc2UUID->setFont(regularFont); - ui->txtCdoc2Fetch->setFont(regularFont); - ui->txtCdoc2Post->setFont(regularFont); - - // pageServices - ui->lblTimeStamp->setFont(headerFont); - ui->rdTimeStampDefault->setFont(regularFont); - ui->rdTimeStampCustom->setFont(regularFont); - ui->txtTimeStamp->setFont(regularFont); - ui->lblTSACert->setFont(regularFont); - ui->txtTSACert->setFont(regularFont); - ui->btInstallTSACert->setFont(condensed12); - ui->btShowTSACert->setFont(condensed12); -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - ui->btInstallTSACert->setStyleSheet("background-color: #d3d3d3"); - ui->btShowTSACert->setStyleSheet("background-color: #d3d3d3"); -#endif - ui->lblMID->setFont(headerFont); - ui->rdMIDUUIDDefault->setFont(regularFont); - ui->rdMIDUUIDCustom->setFont(regularFont); - ui->txtMIDUUID->setFont(regularFont); - ui->helpTimeStamp->installEventFilter(new ButtonHoverFilter(QStringLiteral(":/images/icon_Abi.svg"), QStringLiteral(":/images/icon_Abi_hover.svg"), this)); - ui->helpMID->installEventFilter(new ButtonHoverFilter(QStringLiteral(":/images/icon_Abi.svg"), QStringLiteral(":/images/icon_Abi_hover.svg"), this)); - - // pageValidation - ui->lblSiVa->setFont(headerFont); - ui->txtSiVa->setFont(regularFont); - ui->rdSiVaDefault->setFont(regularFont); - ui->rdSiVaCustom->setFont(regularFont); - ui->lblSiVaCert->setFont(regularFont); - ui->txtSiVaCert->setFont(regularFont); - ui->btInstallSiVaCert->setFont(condensed12); - ui->btShowSiVaCert->setFont(condensed12); -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - ui->btInstallSiVaCert->setStyleSheet("background-color: #d3d3d3"); - ui->btShowSiVaCert->setStyleSheet("background-color: #d3d3d3"); -#endif - ui->helpSiVa->installEventFilter(new ButtonHoverFilter(QStringLiteral(":/images/icon_Abi.svg"), QStringLiteral(":/images/icon_Abi_hover.svg"), this)); - - // pageProxy - ui->rdProxyNone->setFont(regularFont); - ui->rdProxySystem->setFont(regularFont); - ui->rdProxyManual->setFont(regularFont); - - ui->lblProxyHost->setFont(regularFont); - ui->lblProxyPort->setFont(regularFont); - ui->lblProxyUsername->setFont(regularFont); - ui->lblProxyPassword->setFont(regularFont); - ui->txtProxyHost->setFont(regularFont); - ui->txtProxyPort->setFont(regularFont); - ui->txtProxyUsername->setFont(regularFont); - ui->txtProxyPassword->setFont(regularFont); - - // pageDiagnostics - ui->structureFunds->load(QStringLiteral(":/images/Struktuurifondid.svg")); - ui->contact->setFont(regularFont); - ui->txtDiagnostics->setFont(regularFont); - - // pageInfo - ui->txtInfo->setFont(regularFont); - - // navigationArea - ui->txtNavVersion->setFont(Styles::font( Styles::Regular, 12 )); - ui->btnNavFromHistory->setFont(condensed12); - - ui->btnNavUseByDefault->setFont(condensed12); - ui->btnFirstRun->setFont(condensed12); - ui->btnRefreshConfig->setFont(condensed12); - ui->btnNavSaveReport->setFont(condensed12); - ui->btnNavSaveLibdigidocpp->setFont(condensed12); - ui->btnCheckConnection->setFont(condensed12); - - ui->btNavClose->setFont(Styles::font( Styles::Condensed, 14 )); - - changePage(ui->btnMenuGeneral); - -#ifdef CONFIG_URL - connect(qApp->conf(), &Configuration::finished, this, [=](bool /*update*/, const QString &error){ - if(!error.isEmpty()) { - WarningDialog::show(this, tr("Checking updates has failed.") + "
" + tr("Please try again."), error); - return; - } - auto *dlg = WarningDialog::show(this, tr("DigiDoc4 Client configuration update was successful.")); - new Overlay(dlg); -#ifdef Q_OS_WIN - QString path = QApplication::applicationDirPath() + QLatin1String("/id-updater.exe"); - if (QFile::exists(path)) - QProcess::startDetached(path, {}); -#endif - }); -#endif - - connect( ui->btNavClose, &QPushButton::clicked, this, &SettingsDialog::accept ); - connect( this, &SettingsDialog::finished, this, &SettingsDialog::close ); - - connect(ui->btnCheckConnection, &QPushButton::clicked, this, &SettingsDialog::checkConnection); - connect(ui->btnFirstRun, &QPushButton::clicked, this, [this] { - auto *dlg = new FirstRun(this); - connect(dlg, &FirstRun::langChanged, this, [this](const QString &lang) { - retranslate(lang); - selectLanguage(); - }); - dlg->open(); - }); - connect(ui->btnRefreshConfig, &QPushButton::clicked, this, [] { -#ifdef CONFIG_URL - qApp->conf()->update(true); -#endif - Application::updateTSLCache({}); - }); - connect( ui->btnNavUseByDefault, &QPushButton::clicked, this, &SettingsDialog::useDefaultSettings ); - connect( ui->btnNavSaveReport, &QPushButton::clicked, this, [=]{ - saveFile(QStringLiteral("diagnostics.txt"), ui->txtDiagnostics->toPlainText().toUtf8()); - }); - connect(ui->btnNavSaveLibdigidocpp, &QPushButton::clicked, this, [=]{ - Settings::LIBDIGIDOCPP_DEBUG = false; - QString log = QStringLiteral("%1/libdigidocpp.log").arg(QDir::tempPath()); - saveFile(QStringLiteral("libdigidocpp.txt"), log); - saveFile(QStringLiteral("qdigidoc4.txt"), qdigidoc4log); - QFile::remove(log); - ui->btnNavSaveLibdigidocpp->hide(); - }); -#ifdef Q_OS_WIN - connect(ui->btnNavFromHistory, &QPushButton::clicked, this, [this] { - // remove certificates from browsing history of Internet Explorer and/or Google Chrome, and do it for all users. - QList cache = qApp->signer()->cache(); - CertStore s; - for(const QSslCertificate &c: s.list()) - { - if(std::any_of(cache.cbegin(), cache.cend(), [&](const TokenData &token) { return token.cert() == c; })) - continue; - if(c.issuerInfo(QSslCertificate::CommonName).join(QString()).contains(QStringLiteral("KLASS3-SK"), Qt::CaseInsensitive) || - c.issuerInfo(QSslCertificate::Organization).contains(QStringLiteral("SK ID Solutions AS"), Qt::CaseInsensitive)) - s.remove( c ); - } - WarningDialog::show(this, tr("Redundant certificates have been successfully removed.")); - }); -#endif - - ui->pageGroup->setId(ui->btnMenuGeneral, GeneralSettings); - ui->pageGroup->setId(ui->btnMenuCertificate, SigningSettings); - ui->pageGroup->setId(ui->btnMenuValidation, ValidationSettings); - ui->pageGroup->setId(ui->btnMenuProxy, NetworkSettings); - ui->pageGroup->setId(ui->btnMenuDiagnostics, DiagnosticsSettings); - ui->pageGroup->setId(ui->btnMenuInfo, LicenseSettings); - connect(ui->pageGroup, qOverload(&QButtonGroup::buttonClicked), this, &SettingsDialog::changePage); - - initFunctionality(); - updateVersion(); - updateDiagnostics(); - showPage(page); -} - -SettingsDialog::~SettingsDialog() -{ - QApplication::restoreOverrideCursor(); - delete ui; -} - -QString SettingsDialog::certInfo(const SslCertificate &c) -{ - return tr("Issued to: %1
Valid to: %2 %3").arg( - c.subjectInfo(QSslCertificate::CommonName), - c.expiryDate().toString(QStringLiteral("dd.MM.yyyy")), - !c.isValid() ? QStringLiteral("(%1)").arg(tr("expired")) : QString()); -} - -void SettingsDialog::checkConnection() -{ - QApplication::setOverrideCursor( Qt::WaitCursor ); - saveProxy(); - if(CheckConnection connection; !connection.check()) - { - Application::restoreOverrideCursor(); - QString error; - QString details = connection.errorDetails(); - QTextStream s(&error); - s << connection.errorString(); - if (!details.isEmpty()) - s << "\n\n" << details << "."; - FadeInNotification::error(this, error, 120); - } - else - { - Application::restoreOverrideCursor(); - FadeInNotification::success(this, tr("The connection to certificate status service is successful!")); - } -} - -void SettingsDialog::retranslate(const QString& lang) -{ - emit langChanged(lang); - - qApp->loadTranslation( lang ); - ui->retranslateUi(this); - updateVersion(); - updateDiagnostics(); -} - -void SettingsDialog::initFunctionality() -{ // pageGeneral selectLanguage(); connect(ui->langGroup, qOverload(&QButtonGroup::buttonClicked), this, @@ -319,15 +75,11 @@ void SettingsDialog::initFunctionality() ui->chkShowPrintSummary->setChecked(Settings::SHOW_PRINT_SUMMARY); connect(ui->chkShowPrintSummary, &QCheckBox::toggled, this, &SettingsDialog::togglePrinting); - connect(ui->chkShowPrintSummary, &QCheckBox::toggled, this, [](bool checked) { - Settings::SHOW_PRINT_SUMMARY = checked; - }); + connect(ui->chkShowPrintSummary, &QCheckBox::toggled, this, Settings::SHOW_PRINT_SUMMARY); ui->chkRoleAddressInfo->setChecked(Settings::SHOW_ROLE_ADDRESS_INFO); - connect(ui->chkRoleAddressInfo, &QCheckBox::toggled, this, [](bool checked) { - Settings::SHOW_ROLE_ADDRESS_INFO = checked; - }); + connect(ui->chkRoleAddressInfo, &QCheckBox::toggled, this, Settings::SHOW_ROLE_ADDRESS_INFO); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS ui->lblDefaultDirectory->hide(); ui->rdGeneralSameDirectory->hide(); ui->txtGeneralDirectory->hide(); @@ -352,77 +104,22 @@ void SettingsDialog::initFunctionality() ui->txtGeneralDirectory->setText(Settings::DEFAULT_DIR); if(ui->txtGeneralDirectory->text().isEmpty()) ui->rdGeneralSameDirectory->setChecked(true); - connect(ui->txtGeneralDirectory, &QLineEdit::textChanged, this, [](const QString &text) { - Settings::DEFAULT_DIR = text; - }); + connect(ui->txtGeneralDirectory, &QLineEdit::textChanged, this, Settings::DEFAULT_DIR); #endif - ui->chkCdoc2KeyServer->setChecked(Settings::CDOC2_USE_KEYSERVER); - auto setCDoc2KeyServerEnabled = [this](bool checked) { - ui->cmbCdoc2Name->setEnabled(checked); - ui->txtCdoc2UUID->setEnabled(checked); - ui->txtCdoc2Fetch->setEnabled(checked); - ui->txtCdoc2Post->setEnabled(checked); - }; - setCDoc2KeyServerEnabled(ui->chkCdoc2KeyServer->isChecked()); - connect(ui->chkCdoc2KeyServer, &QCheckBox::toggled, this, [this, setCDoc2KeyServerEnabled](bool checked) { - Settings::CDOC2_USE_KEYSERVER = checked; - setCDoc2KeyServerEnabled(checked); - }); -#ifdef CONFIG_URL - QJsonObject list = Application::confValue(QLatin1String("CDOC2-CONF")).toObject(); - auto setCDoc2Values = [this, list](const QString &key) { - ui->txtCdoc2UUID->setText(key); - QJsonObject data = list.value(key).toObject(); - ui->txtCdoc2Fetch->setText(data.value(QLatin1String("FETCH")).toString(Settings::CDOC2_GET)); - ui->txtCdoc2Post->setText(data.value(QLatin1String("POST")).toString(Settings::CDOC2_POST)); - }; - for(QJsonObject::const_iterator i = list.constBegin(); i != list.constEnd(); ++i) - ui->cmbCdoc2Name->addItem(i.value().toObject().value(QLatin1String("NAME")).toString(), i.key()); - if(Settings::CDOC2_GET.isSet() || Settings::CDOC2_POST.isSet()) - ui->cmbCdoc2Name->addItem(QStringLiteral("Custom"), QStringLiteral("custom")); - QString cdoc2Service = Settings::CDOC2_DEFAULT_KEYSERVER; - ui->cmbCdoc2Name->setCurrentIndex(ui->cmbCdoc2Name->findData(cdoc2Service)); - connect(ui->cmbCdoc2Name, qOverload(&QComboBox::currentIndexChanged), this, [this, setCDoc2Values] (int index) { - QString key = ui->cmbCdoc2Name->itemData(index).toString(); - Settings::CDOC2_DEFAULT_KEYSERVER = key; - setCDoc2Values(key); - }); - setCDoc2Values(cdoc2Service); -#else - ui->cmbCdoc2Name->addItem(QStringLiteral("Default")); - ui->txtCdoc2UUID->setText(QStringLiteral("default")); - ui->txtCdoc2Fetch->setText(QStringLiteral(CDOC2_GET_URL)); - ui->txtCdoc2Post->setText(QStringLiteral(CDOC2_POST_URL)); -#endif - - // pageProxy - connect(this, &SettingsDialog::finished, this, &SettingsDialog::saveProxy); - setProxyEnabled(); - connect( ui->rdProxyNone, &QRadioButton::toggled, this, &SettingsDialog::setProxyEnabled ); - connect( ui->rdProxySystem, &QRadioButton::toggled, this, &SettingsDialog::setProxyEnabled ); - connect( ui->rdProxyManual, &QRadioButton::toggled, this, &SettingsDialog::setProxyEnabled ); - switch(Settings::PROXY_CONFIG) - { - case Settings::ProxySystem: ui->rdProxySystem->setChecked(true); break; - case Settings::ProxyManual: ui->rdProxyManual->setChecked(true); break; - default: ui->rdProxyNone->setChecked(true); break; - } - - updateProxy(); // pageServices - TimeStamp ui->rdTimeStampDefault->setDisabled(Settings::TSA_URL_CUSTOM.isLocked()); ui->rdTimeStampCustom->setEnabled(ui->rdTimeStampDefault->isEnabled()); ui->rdTimeStampCustom->setChecked(Settings::TSA_URL_CUSTOM); ui->txtTimeStamp->setReadOnly(Settings::TSA_URL.isLocked()); - ui->txtTimeStamp->setEnabled(ui->rdTimeStampCustom->isChecked()); + ui->txtTimeStamp->setVisible(ui->rdTimeStampCustom->isChecked()); ui->txtTimeStamp->setPlaceholderText(Application::confValue(Settings::TSA_URL.KEY).toString()); QString TSA_URL = Settings::TSA_URL.value(Application::confValue(Application::TSAUrl)); ui->txtTimeStamp->setText(ui->txtTimeStamp->placeholderText() == TSA_URL ? QString() : std::move(TSA_URL)); ui->wgtTSACert->setDisabled(Settings::TSA_CERT.isLocked()); ui->wgtTSACert->setVisible(ui->rdTimeStampCustom->isChecked()); connect(ui->rdTimeStampCustom, &QRadioButton::toggled, ui->txtTimeStamp, [this](bool checked) { - ui->txtTimeStamp->setEnabled(checked); + ui->txtTimeStamp->setVisible(checked); ui->wgtTSACert->setVisible(checked); Settings::TSA_URL_CUSTOM = checked; }); @@ -452,10 +149,10 @@ void SettingsDialog::initFunctionality() ui->rdMIDUUIDCustom->setEnabled(ui->rdMIDUUIDDefault->isEnabled()); ui->rdMIDUUIDCustom->setChecked(Settings::MID_UUID_CUSTOM); ui->txtMIDUUID->setReadOnly(Settings::MID_UUID.isLocked()); - ui->txtMIDUUID->setEnabled(ui->rdMIDUUIDCustom->isChecked()); + ui->txtMIDUUID->setVisible(ui->rdMIDUUIDCustom->isChecked()); ui->txtMIDUUID->setText(Settings::MID_UUID); connect(ui->rdMIDUUIDCustom, &QRadioButton::toggled, ui->txtMIDUUID, [=](bool checked) { - ui->txtMIDUUID->setEnabled(checked); + ui->txtMIDUUID->setVisible(checked); Settings::MID_UUID_CUSTOM = checked; Settings::SID_UUID_CUSTOM = checked; }); @@ -467,19 +164,19 @@ void SettingsDialog::initFunctionality() QDesktopServices::openUrl(tr("https://www.id.ee/en/article/for-organisations-that-sign-large-quantities-of-documents-using-digidoc4-client/")); }); - // pageValidation - SiVa + // pageValidation ui->rdSiVaDefault->setDisabled(Settings::SIVA_URL_CUSTOM.isLocked()); ui->rdSiVaCustom->setEnabled(ui->rdSiVaDefault->isEnabled()); ui->rdSiVaCustom->setChecked(Settings::SIVA_URL_CUSTOM); ui->txtSiVa->setReadOnly(Settings::SIVA_URL.isLocked()); - ui->txtSiVa->setEnabled(ui->rdSiVaCustom->isChecked()); + ui->txtSiVa->setVisible(ui->rdSiVaCustom->isChecked()); ui->txtSiVa->setPlaceholderText(Application::confValue(Settings::SIVA_URL.KEY).toString()); QString SIVA_URL = Settings::SIVA_URL.value(Application::confValue(Application::SiVaUrl)); ui->txtSiVa->setText(ui->txtSiVa->placeholderText() == SIVA_URL ? QString() : std::move(SIVA_URL)); ui->wgtSiVaCert->setDisabled(Settings::SIVA_CERT.isLocked()); ui->wgtSiVaCert->setVisible(ui->rdSiVaCustom->isChecked()); connect(ui->rdSiVaCustom, &QRadioButton::toggled, ui->txtSiVa, [this](bool checked) { - ui->txtSiVa->setEnabled(checked); + ui->txtSiVa->setVisible(checked); ui->wgtSiVaCert->setVisible(checked); Settings::SIVA_URL_CUSTOM = checked; }); @@ -504,7 +201,77 @@ void SettingsDialog::initFunctionality() }); updateSiVaCert(QSslCertificate(QByteArray::fromBase64(Settings::SIVA_CERT), QSsl::Der)); + // pageEncryption + ui->wgtCDoc2->hide(); + connect(ui->rdCdoc2, &QRadioButton::toggled, ui->wgtCDoc2, &QWidget::setVisible); + ui->rdCdoc2->setChecked(Settings::CDOC2_DEFAULT); + connect(ui->rdCdoc2, &QRadioButton::toggled, this, Settings::CDOC2_DEFAULT); + ui->wgtCDoc2Server->hide(); + connect(ui->chkCdoc2KeyServer, &QCheckBox::toggled, ui->wgtCDoc2Server, &QWidget::setVisible); + ui->chkCdoc2KeyServer->setChecked(Settings::CDOC2_USE_KEYSERVER); + connect(ui->chkCdoc2KeyServer, &QCheckBox::toggled, this, Settings::CDOC2_USE_KEYSERVER); +#ifdef CONFIG_URL + QJsonObject list = Application::confValue(QLatin1String("CDOC2-CONF")).toObject(); + auto setCDoc2Values = [this, list](const QString &key) { + ui->txtCdoc2UUID->setText(key); + QJsonObject data = list.value(key).toObject(); + ui->txtCdoc2Fetch->setText(data.value(QLatin1String("FETCH")).toString(Settings::CDOC2_GET)); + ui->txtCdoc2Post->setText(data.value(QLatin1String("POST")).toString(Settings::CDOC2_POST)); + bool disabled = ui->cmbCdoc2Name->currentIndex() < ui->cmbCdoc2Name->count() - 1; + ui->txtCdoc2UUID->setReadOnly(disabled); + ui->txtCdoc2Fetch->setReadOnly(disabled); + ui->txtCdoc2Post->setReadOnly(disabled); + }; + for(QJsonObject::const_iterator i = list.constBegin(); i != list.constEnd(); ++i) + ui->cmbCdoc2Name->addItem(i.value().toObject().value(QLatin1String("NAME")).toString(), i.key()); + ui->cmbCdoc2Name->addItem(tr("Custom"), Settings::CDOC2_UUID); + QString cdoc2Service = Settings::CDOC2_DEFAULT_KEYSERVER; + ui->cmbCdoc2Name->setCurrentIndex(ui->cmbCdoc2Name->findData(cdoc2Service)); + connect(ui->cmbCdoc2Name, qOverload(&QComboBox::currentIndexChanged), this, [this, setCDoc2Values] (int index) { + QString key = ui->cmbCdoc2Name->itemData(index).toString(); + Settings::CDOC2_DEFAULT_KEYSERVER = key; + setCDoc2Values(key); + }); + setCDoc2Values(cdoc2Service); + connect(ui->txtCdoc2UUID, &QLineEdit::textEdited, this, Settings::CDOC2_UUID); + connect(ui->txtCdoc2Fetch, &QLineEdit::textEdited, this, Settings::CDOC2_GET); + connect(ui->txtCdoc2Post, &QLineEdit::textEdited, this, Settings::CDOC2_POST); +#else + ui->cmbCdoc2Name->addItem(QStringLiteral("Default")); + ui->txtCdoc2UUID->setText(QStringLiteral("00000000-0000-0000-0000-000000000000")); + ui->txtCdoc2Fetch->setText(QStringLiteral(CDOC2_GET_URL)); + ui->txtCdoc2Post->setText(QStringLiteral(CDOC2_POST_URL)); +#endif + + // pageProxy + connect(this, &SettingsDialog::finished, this, &SettingsDialog::saveProxy); + ui->proxyGroup->setId(ui->rdProxyNone, Settings::ProxyNone); + ui->proxyGroup->setId(ui->rdProxySystem, Settings::ProxySystem); + ui->proxyGroup->setId(ui->rdProxyManual, Settings::ProxyManual); + ui->wgtProxyManual->hide(); + connect(ui->rdProxyManual, &QRadioButton::toggled, ui->wgtProxyManual, &QWidget::setVisible); + ui->proxyGroup->button(Settings::PROXY_CONFIG)->setChecked(true); +#ifdef Q_OS_MACOS + ui->txtProxyHost->setText(Settings::PROXY_HOST); + ui->txtProxyPort->setText(Settings::PROXY_PORT); + ui->txtProxyUsername->setText(Settings::PROXY_USER); + ui->txtProxyPassword->setText(Settings::PROXY_PASS); + connect(ui->txtProxyHost, &QLineEdit::textChanged, this, Settings::PROXY_HOST); + connect(ui->txtProxyPort, &QLineEdit::textChanged, this, Settings::PROXY_PORT); + connect(ui->txtProxyUsername, &QLineEdit::textChanged, this, Settings::PROXY_USER); + connect(ui->txtProxyPassword, &QLineEdit::textChanged, this, Settings::PROXY_PASS); +#else + if(auto *i = digidoc::XmlConfCurrent::instance()) + { + ui->txtProxyHost->setText(QString::fromStdString(i->digidoc::XmlConfCurrent::proxyHost())); + ui->txtProxyPort->setText(QString::fromStdString(i->digidoc::XmlConfCurrent::proxyPort())); + ui->txtProxyUsername->setText(QString::fromStdString(i->digidoc::XmlConfCurrent::proxyUser())); + ui->txtProxyPassword->setText(QString::fromStdString(i->digidoc::XmlConfCurrent::proxyPass())); + } +#endif + // pageDiagnostics + ui->structureFunds->load(QStringLiteral(":/images/Struktuurifondid.svg")); ui->chkLibdigidocppDebug->setChecked(Settings::LIBDIGIDOCPP_DEBUG); connect(ui->chkLibdigidocppDebug, &QCheckBox::toggled, this, [this](bool checked) { Settings::LIBDIGIDOCPP_DEBUG = checked; @@ -515,7 +282,7 @@ void SettingsDialog::initFunctionality() } if(QFile f(qdigidoc4log); f.open(QFile::WriteOnly|QFile::Truncate)) f.write({}); -#ifdef Q_OS_MAC +#ifdef Q_OS_MACOS WarningDialog::show(this, tr("Restart DigiDoc4 Client to activate logging. Read more " "here.")); #else @@ -531,6 +298,132 @@ void SettingsDialog::initFunctionality() }); #endif }); + + // navigationArea + connect(ui->btNavClose, &QPushButton::clicked, this, &SettingsDialog::accept); + connect(this, &SettingsDialog::finished, this, &SettingsDialog::close); + + connect(ui->btnCheckConnection, &QPushButton::clicked, this, &SettingsDialog::checkConnection); + connect(ui->btnFirstRun, &QPushButton::clicked, this, [this] { + auto *dlg = new FirstRun(this); + connect(dlg, &FirstRun::langChanged, this, [this](const QString &lang) { + retranslate(lang); + selectLanguage(); + }); + dlg->open(); + }); +#ifdef CONFIG_URL + connect(qApp->conf(), &Configuration::finished, this, [=](bool /*update*/, const QString &error){ + if(!error.isEmpty()) { + WarningDialog::show(this, tr("Checking updates has failed.") + "
" + tr("Please try again."), error); + return; + } + auto *dlg = WarningDialog::show(this, tr("DigiDoc4 Client configuration update was successful.")); + new Overlay(dlg); +#ifdef Q_OS_WIN + QString path = QApplication::applicationDirPath() + QLatin1String("/id-updater.exe"); + if (QFile::exists(path)) + QProcess::startDetached(path, {}); +#endif + }); +#endif + connect(ui->btnRefreshConfig, &QPushButton::clicked, this, [] { +#ifdef CONFIG_URL + qApp->conf()->update(true); +#endif + Application::updateTSLCache({}); + }); + connect(ui->btnNavUseByDefault, &QPushButton::clicked, this, &SettingsDialog::useDefaultSettings); + connect(ui->btnNavSaveReport, &QPushButton::clicked, this, [=]{ + saveFile(QStringLiteral("diagnostics.txt"), ui->txtDiagnostics->toPlainText().toUtf8()); + }); + connect(ui->btnNavSaveLibdigidocpp, &QPushButton::clicked, this, [=]{ + Settings::LIBDIGIDOCPP_DEBUG = false; + QString log = QStringLiteral("%1/libdigidocpp.log").arg(QDir::tempPath()); + saveFile(QStringLiteral("libdigidocpp.txt"), log); + saveFile(QStringLiteral("qdigidoc4.txt"), qdigidoc4log); + QFile::remove(log); + ui->btnNavSaveLibdigidocpp->hide(); + }); +#ifdef Q_OS_WIN + connect(ui->btnNavFromHistory, &QPushButton::clicked, this, [this] { + // remove certificates from browsing history of Internet Explorer and/or Google Chrome, and do it for all users. + QList cache = qApp->signer()->cache(); + CertStore s; + for(const QSslCertificate &c: s.list()) + { + if(std::any_of(cache.cbegin(), cache.cend(), [&](const TokenData &token) { return token.cert() == c; })) + continue; + if(c.issuerInfo(QSslCertificate::CommonName).join(QString()).contains(QStringLiteral("KLASS3-SK"), Qt::CaseInsensitive) || + c.issuerInfo(QSslCertificate::Organization).contains(QStringLiteral("SK ID Solutions AS"), Qt::CaseInsensitive)) + s.remove(c); + } + WarningDialog::show(this, tr("Redundant certificates have been successfully removed.")); + }); +#endif + + ui->pageGroup->setId(ui->btnMenuGeneral, GeneralSettings); + ui->pageGroup->setId(ui->btnMenuCertificate, SigningSettings); + ui->pageGroup->setId(ui->btnMenuValidation, ValidationSettings); + ui->pageGroup->setId(ui->btnMenuEncryption, EncryptionSettings); + ui->pageGroup->setId(ui->btnMenuProxy, NetworkSettings); + ui->pageGroup->setId(ui->btnMenuDiagnostics, DiagnosticsSettings); + ui->pageGroup->setId(ui->btnMenuInfo, LicenseSettings); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + connect(ui->pageGroup, qOverload(&QButtonGroup::buttonClicked), this, &SettingsDialog::showPage); +#else + connect(ui->pageGroup, qOverload(&QButtonGroup::idClicked), this, &SettingsDialog::showPage); +#endif + + updateVersion(); + updateDiagnostics(); + showPage(page); +} + +SettingsDialog::~SettingsDialog() +{ + QApplication::restoreOverrideCursor(); + delete ui; +} + +QString SettingsDialog::certInfo(const SslCertificate &c) +{ + return tr("Issued to: %1
Valid to: %2 %3").arg( + c.subjectInfo(QSslCertificate::CommonName), + c.expiryDate().toString(QStringLiteral("dd.MM.yyyy")), + !c.isValid() ? QStringLiteral("(%1)").arg(tr("expired")) : QString()); +} + +void SettingsDialog::checkConnection() +{ + QApplication::setOverrideCursor( Qt::WaitCursor ); + saveProxy(); + if(CheckConnection connection; !connection.check()) + { + Application::restoreOverrideCursor(); + QString error; + QString details = connection.errorDetails(); + QTextStream s(&error); + s << connection.errorString(); + if (!details.isEmpty()) + s << "\n\n" << details << "."; + FadeInNotification::error(this, error, 120); + } + else + { + Application::restoreOverrideCursor(); + FadeInNotification::success(this, tr("The connection to certificate status service is successful!")); + } +} + +void SettingsDialog::retranslate(const QString& lang) +{ + emit langChanged(lang); + + qApp->loadTranslation( lang ); + ui->retranslateUi(this); + updateVersion(); + updateDiagnostics(); } void SettingsDialog::updateCert(const QSslCertificate &c, QPushButton *btn, CertLabel *lbl) @@ -574,22 +467,6 @@ void SettingsDialog::selectLanguage() button->setChecked(button->property("lang").toString() == Settings::LANGUAGE); } -void SettingsDialog::setProxyEnabled() -{ - ui->txtProxyHost->setEnabled(ui->rdProxyManual->isChecked()); - ui->txtProxyPort->setEnabled(ui->rdProxyManual->isChecked()); - ui->txtProxyUsername->setEnabled(ui->rdProxyManual->isChecked()); - ui->txtProxyPassword->setEnabled(ui->rdProxyManual->isChecked()); -} - -void SettingsDialog::updateProxy() -{ - ui->txtProxyHost->setText(Application::confValue( Application::ProxyHost ).toString()); - ui->txtProxyPort->setText(Application::confValue( Application::ProxyPort ).toString()); - ui->txtProxyUsername->setText(Application::confValue( Application::ProxyUser ).toString()); - ui->txtProxyPassword->setText(Application::confValue( Application::ProxyPass ).toString()); -} - void SettingsDialog::updateVersion() { ui->txtNavVersion->setText(tr("%1 version %2, released %3") @@ -598,18 +475,17 @@ void SettingsDialog::updateVersion() void SettingsDialog::saveProxy() { - if(ui->rdProxyNone->isChecked()) - Settings::PROXY_CONFIG = Settings::ProxyNone; - else if(ui->rdProxySystem->isChecked()) - Settings::PROXY_CONFIG = Settings::ProxySystem; - else if(ui->rdProxyManual->isChecked()) - Settings::PROXY_CONFIG = Settings::ProxyManual; - Application::setConfValue( Application::ProxyHost, ui->txtProxyHost->text() ); - Application::setConfValue( Application::ProxyPort, ui->txtProxyPort->text() ); - Application::setConfValue( Application::ProxyUser, ui->txtProxyUsername->text() ); - Application::setConfValue( Application::ProxyPass, ui->txtProxyPassword->text() ); + Settings::PROXY_CONFIG = ui->proxyGroup->checkedId(); +#ifndef Q_OS_MACOS + if(auto *i = digidoc::XmlConfCurrent::instance()) + { + i->setProxyHost(ui->txtProxyHost->text().toStdString()); + i->setProxyPort(ui->txtProxyPort->text().toStdString()); + i->setProxyUser(ui->txtProxyUsername->text().toStdString()); + i->setProxyPass(ui->txtProxyPassword->text().toStdString()); + } +#endif loadProxy(digidoc::Conf::instance()); - updateProxy(); } void SettingsDialog::loadProxy( const digidoc::Conf *conf ) @@ -658,26 +534,22 @@ void SettingsDialog::useDefaultSettings() ui->rdTimeStampDefault->setChecked(true); ui->rdSiVaDefault->setChecked(true); ui->rdMIDUUIDDefault->setChecked(true); + ui->rdCdoc2->setChecked(Settings::CDOC2_DEFAULT.DEFAULT); } void SettingsDialog::showPage(int page) { - changePage(ui->pageGroup->button(page)); -} - -void SettingsDialog::changePage(QAbstractButton *button) -{ - button->setChecked(true); - ui->stackedWidget->setCurrentIndex(ui->pageGroup->id(button)); - ui->btnNavUseByDefault->setVisible(button == ui->btnMenuCertificate || button == ui->btnMenuValidation); - ui->btnFirstRun->setVisible(button == ui->btnMenuGeneral); - ui->btnRefreshConfig->setVisible(button == ui->btnMenuGeneral); - ui->btnCheckConnection->setVisible(button == ui->btnMenuProxy); - ui->btnNavSaveReport->setVisible(button == ui->btnMenuDiagnostics); - ui->btnNavSaveLibdigidocpp->setVisible(button == ui->btnMenuDiagnostics && + ui->pageGroup->button(page)->setChecked(true); + ui->stackedWidget->setCurrentIndex(page); + ui->btnNavUseByDefault->setVisible(page == SigningSettings || page == ValidationSettings); + ui->btnFirstRun->setVisible(page == GeneralSettings); + ui->btnRefreshConfig->setVisible(page == GeneralSettings); + ui->btnCheckConnection->setVisible(page == NetworkSettings); + ui->btnNavSaveReport->setVisible(page == DiagnosticsSettings); + ui->btnNavSaveLibdigidocpp->setVisible(page == DiagnosticsSettings && QFile::exists(QStringLiteral("%1/libdigidocpp.log").arg(QDir::tempPath()))); #ifdef Q_OS_WIN - ui->btnNavFromHistory->setVisible(button == ui->btnMenuGeneral); + ui->btnNavFromHistory->setVisible(page == GeneralSettings); #else ui->btnNavFromHistory->hide(); #endif diff --git a/client/dialogs/SettingsDialog.h b/client/dialogs/SettingsDialog.h index d8e4e1210..72beee7b9 100644 --- a/client/dialogs/SettingsDialog.h +++ b/client/dialogs/SettingsDialog.h @@ -41,10 +41,11 @@ class SettingsDialog final: public QDialog Q_OBJECT public: - enum { + enum : quint8 { GeneralSettings, SigningSettings, ValidationSettings, + EncryptionSettings, NetworkSettings, DiagnosticsSettings, LicenseSettings @@ -62,20 +63,16 @@ class SettingsDialog final: public QDialog void togglePrinting(bool enable); private: - void changePage(QAbstractButton *button); void checkConnection(); - void initFunctionality(); void retranslate(const QString& lang); void saveFile(const QString &name, const QString &path); void saveFile(const QString &name, const QByteArray &content); void saveProxy(); QSslCertificate selectCert(const QString &label, const QString &format); void selectLanguage(); - void setProxyEnabled(); void updateCert(const QSslCertificate &c, QPushButton *btn, CertLabel *lbl); void updateSiVaCert(const QSslCertificate &c); void updateTSACert(const QSslCertificate &c); - void updateProxy(); void updateVersion(); void updateDiagnostics(); void useDefaultSettings(); diff --git a/client/dialogs/SettingsDialog.ui b/client/dialogs/SettingsDialog.ui index eb3cde8bf..d11659c16 100644 --- a/client/dialogs/SettingsDialog.ui +++ b/client/dialogs/SettingsDialog.ui @@ -3,7 +3,7 @@ SettingsDialog - Qt::WindowModal + Qt::WindowModality::WindowModal @@ -26,8 +26,15 @@ - QWidget{ - color: #000000 + QWidget { +color: #000000; +font-family: Roboto, Helvetica; +font-size: 14px; +} +#lblMenuSettings, #lblGeneralLang, #lblDefaultDirectory, #lblTimeStamp, #lblTSACert, #lblMID, #lblSiVa, #lblSiVaCert, #pageEncryptionLabel, #pageProxyLabel { +color: #003168; +font-weight: 700; +font-size: 18px; } @@ -50,43 +57,40 @@ - 205 + 203 0 - 205 + 203 16777215 #leftPane { - background-color: #ffffff; - border-right: 1px solid #DEE4E9; +background-color: #ffffff; +border-right: 1px solid #E7EAEF +} +#lblMenuSettings { +padding-left: 24; } QRadioButton { - background-color: #ffffff; - border: none; - text-align:left; - padding-left: 21; - min-height: 35px; +color: #003168; +border: none; +padding-left: 24; +min-height: 40px; } QRadioButton::indicator { - width: 0px; - height: 0px; - background-color:transparent; - selection-background-color:transparent; - color:transparent; - selection-color:transparent; +width: 0px; +height: 0px; +background-color: transparent; +selection-background-color: transparent; +color: transparent; +selection-color: transparent; } QRadioButton:checked { - background-color: #F4F5F6; - color: #006EB5; -} -QRadioButton:hover { - background-color: #FAFAFB; - color: #006EB5; +background-color: #E9ECF3; } @@ -110,21 +114,15 @@ QRadioButton:hover { 0 - 55 + 61 - Qt::TabFocus - - - color: #041E42; + Qt::FocusPolicy::TabFocus Settings - - Qt::AlignCenter - @@ -133,10 +131,7 @@ QRadioButton:hover { General - GENERAL - - - true + General true @@ -148,14 +143,8 @@ QRadioButton:hover { - - Services - - SIGNING SERVICES - - - true + Signing services pageGroup @@ -165,7 +154,7 @@ QRadioButton:hover { - VALIDATION SERVICES + Validation services pageGroup @@ -173,15 +162,19 @@ QRadioButton:hover { - - - Proxy - + - PROXY + Encryption settings - - true + + pageGroup + + + + + + + Proxy pageGroup @@ -190,14 +183,8 @@ QRadioButton:hover { - - Diagnostics - - DIAGNOSTICS - - - true + Diagnostics pageGroup @@ -206,14 +193,8 @@ QRadioButton:hover { - - Info - - INFO - - - true + Info pageGroup @@ -223,7 +204,7 @@ QRadioButton:hover { - Qt::Vertical + Qt::Orientation::Vertical @@ -238,48 +219,127 @@ QRadioButton:hover { - - - Roboto - 14 - - - #pageGeneral, #pageServices, #pageValidation, #pageProxy, #pageDiagnostics, #pageInfo { - background-color: #ffffff; + #pageGeneral, #pageServices, #pageValidation, #pageEncryption, #pageProxy, #pageDiagnostics, #pageInfo { +background-color: #ffffff; +} +#lblProxyHost, #lblProxyPort, #lblProxyUsername, #lblProxyPassword { +color: #07142A; +} +QLineEdit, QComboBox { +padding: 10px 14px; +border: 1px solid #C4CBD8; +border-radius: 4px; +color: #07142A; +placeholder-text-color: #607496; +font-size: 16px; +} +QLineEdit::disabled, QComboBox::disabled { +color: #607496; +background-color: #F3F5F7; +} +QComboBox QWidget#popup { +background-color: transparent; +} +QComboBox QWidget#content { +border: 1px solid #C4CBD8; +border-radius: 4px; +background-color: #FFFFFF; +} +QComboBox QPushButton { +margin: 3px; +padding: 0px 12px 0px 4px; +border: 0px; +color: #07142A; +text-align: left; +font-weight: normal; +font-size: 16px; +qproperty-iconSize: 14px 9px; +qproperty-layoutDirection: RightToLeft; +} +QComboBox QPushButton#selected { +qproperty-icon: url(:/images/arrow_up.svg); } -#lblGeneralLang, #lblRevocation, #lblTimeStamp, #lblMID, #lblSiVa { - color: #041E42; +QComboBox QPushButton:hover#selected { +qproperty-icon: url(:/images/arrow_up_white.svg); } -QLineEdit { - border: 1px solid #8E969D; - border-radius: 2px; - background-color: #FFFFFF; - min-height: 31px; - padding: 0px 10px; +QComboBox::drop-down { +background-color: #FFFFFF; +width: 25px; +} +QComboBox::down-arrow { +image: url(:/images/arrow_down.svg); +} +QComboBox::down-arrow:on { +top: 1px; +left: 1px; } QCheckBox, QRadioButton { - min-height: 31px; - spacing: 5px; +spacing: 8px; +color: #07142A; +border: none; /*Workaround for right padding*/ +border: 2px solid transparent; +border-radius: 4px; } -QCheckBox::disabled, QRadioButton::disabled, QLineEdit::disabled, QComboBox::disabled { - color: #727679; +QCheckBox:disabled, QRadioButton:disabled { +color: #BDBDBD; } QCheckBox::indicator, QRadioButton::indicator { - width: 14px; - height: 14px; +width: 16px; +height: 16px; } QCheckBox::indicator:unchecked { - image: url(:/images/icon_checkbox.png); +image: url(:/images/icon_checkbox.svg); +} +QCheckBox::indicator:unchecked:hover { +image: url(:/images/icon_checkbox_active.svg); +} +QCheckBox::indicator:unchecked:disabled { +image: url(:/images/icon_checkbox_disabled.svg); } QCheckBox::indicator:checked { - image: url(:/images/icon_checkbox_check.png); +image: url(:/images/icon_checkbox_check.svg); +} +QCheckBox::indicator:checked:hover { +image: url(:/images/icon_checkbox_check_active.svg); +} +QCheckBox::indicator:checked:disabled { +image: url(:/images/icon_checkbox_check_disabled.svg); +} +QRadioButton::indicator:unchecked { +image: url(:/images/icon_radio.svg); +} +QRadioButton::indicator:unchecked:hover { +image: url(:/images/icon_radio_active.svg); } -QRadioButton::indicator::unchecked { - image: url(:/images/icon_radio.png); +QRadioButton::indicator:unchecked:disabled { +image: url(:/images/icon_radio_disabled.svg); } -QRadioButton::indicator::checked { - image: url(:/images/icon_radio_checked.png); +QRadioButton::indicator:checked { +image: url(:/images/icon_radio_check.svg); +} +QRadioButton::indicator:checked:hover { +image: url(:/images/icon_radio_check_active.svg); +} +QRadioButton::indicator:checked:disabled { +image: url(:/images/icon_radio_check_disabled.svg); +} +QPushButton { +padding: 9px 12px; +border: 1px solid #2F70B6; +border-radius: 4px; +color: #2F70B6; +font-weight: 700; +} +QPushButton:hover { +background-color: #EAF1F8; +} +QPushButton:pressed { +background-color: #BFD3E8; +} +QToolButton { +border: none; +max-height: 22px; } @@ -288,24 +348,24 @@ QRadioButton::indicator::checked { - 5 + 24 - 20 + 32 - 20 + 19 - 20 + 32 - 20 + 32 - Qt::TabFocus + Qt::FocusPolicy::TabFocus Language @@ -315,7 +375,7 @@ QRadioButton::indicator::checked { - + Eesti @@ -331,7 +391,7 @@ QRadioButton::indicator::checked { - + Русский @@ -344,7 +404,7 @@ QRadioButton::indicator::checked { - + English @@ -359,14 +419,14 @@ QRadioButton::indicator::checked { - + Show print summary - + Ask role and address info on signing @@ -375,7 +435,7 @@ QRadioButton::indicator::checked { - Qt::TabFocus + Qt::FocusPolicy::TabFocus Container default location @@ -383,15 +443,12 @@ QRadioButton::indicator::checked { - - - 2 - - - 0 + + + 15 - + Same folder @@ -401,7 +458,7 @@ QRadioButton::indicator::checked { - + Select the default directory @@ -413,20 +470,8 @@ QRadioButton::indicator::checked { - - - - - 37 - 31 - - - - - 37 - 31 - - + + PointingHandCursor @@ -435,108 +480,15 @@ QRadioButton::indicator::checked { - + - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 5 - - - - - Qt::TabFocus - - - color: #041E42; - - - CDoc 2.0 - - - - - - - Use key server - - - - - - - Name - - - - - - - - - - UUID - - - - - - - true - - - - - - - Fetch URL - - - - - - - true - - - - - - - Post URL - - - - - - - true - - - - - - - Qt::Vertical + Qt::Orientation::Vertical @@ -550,7 +502,7 @@ QRadioButton::indicator::checked { - QFrame::NoFrame + QFrame::Shape::NoFrame true @@ -560,41 +512,32 @@ QRadioButton::indicator::checked { 0 0 - 378 - 527 + 791 + 577 - - QToolButton { border: none; } - QPushButton { - padding: 1px; - text-align: middle; - min-height: 30px; - min-width: 150px; - } - - 5 + 24 - 20 + 32 - 20 + 19 - 20 + 32 - 20 + 32 - Qt::TabFocus + Qt::FocusPolicy::TabFocus Access to Time-Stamping service @@ -613,15 +556,13 @@ QRadioButton::indicator::checked { Help - - :/images/icon_Abi.svg - :/images/icon_Abi_hover.svg - + + :/images/icon_help.svg:/images/icon_help.svg - 20 - 20 + 24 + 24 @@ -629,7 +570,7 @@ QRadioButton::indicator::checked { - Qt::Horizontal + Qt::Orientation::Horizontal @@ -642,33 +583,37 @@ QRadioButton::indicator::checked { - - - Use default access - - - true - - - rdTimeStamp - - - - - - - Use manually configured access + + + 15 - - rdTimeStamp - - + + + + Use default access + + + true + + + rdTimeStamp + + + + + + + Use manually configured access + + + rdTimeStamp + + + + - - false - true @@ -678,13 +623,13 @@ QRadioButton::indicator::checked { - 5 + 24 0 - 10 + 0 0 @@ -695,7 +640,7 @@ QRadioButton::indicator::checked { - Qt::TabFocus + Qt::FocusPolicy::TabFocus Time-Stamping service SSL certificate @@ -705,19 +650,22 @@ QRadioButton::indicator::checked { - Qt::TabFocus + Qt::FocusPolicy::TabFocus + + 16 + PointingHandCursor - ADD CERTIFICATE + Add certificate @@ -727,14 +675,14 @@ QRadioButton::indicator::checked { PointingHandCursor - SHOW CERTIFICATE + Show certificate - Qt::Horizontal + Qt::Orientation::Horizontal @@ -754,7 +702,7 @@ QRadioButton::indicator::checked { - Qt::TabFocus + Qt::FocusPolicy::TabFocus Access to mobile-ID and Smart-ID service @@ -770,15 +718,13 @@ QRadioButton::indicator::checked { Help - - :/images/icon_Abi.svg - :/images/icon_Abi_hover.svg - + + :/images/icon_help.svg:/images/icon_help.svg - 20 - 20 + 24 + 24 @@ -786,7 +732,7 @@ QRadioButton::indicator::checked { - Qt::Horizontal + Qt::Orientation::Horizontal @@ -799,35 +745,39 @@ QRadioButton::indicator::checked { - - - Use default access - - - true - - - rdMIDUUID - - - - - - - Use manually configured access + + + 15 - - rdMIDUUID - - + + + + Use default access + + + true + + + rdMIDUUID + + + + + + + Use manually configured access + + + rdMIDUUID + + + + - - false - - QLineEdit::Password + QLineEdit::EchoMode::Password 00000000-0000-0000-0000-000000000000 @@ -840,7 +790,7 @@ QRadioButton::indicator::checked { - Qt::Vertical + Qt::Orientation::Vertical @@ -854,37 +804,28 @@ QRadioButton::indicator::checked { - - QToolButton { border: none; } -QPushButton { - padding: 1px; - text-align: middle; - min-height: 30px; - min-width: 150px; -} - - 5 + 24 - 20 + 32 - 20 + 19 - 20 + 32 - 20 + 32 - Qt::TabFocus + Qt::FocusPolicy::TabFocus Access to Digital Signature Validation Service SiVa @@ -903,15 +844,13 @@ QPushButton { Help - - :/images/icon_Abi.svg - :/images/icon_Abi_hover.svg - + + :/images/icon_help.svg:/images/icon_help.svg - 20 - 20 + 24 + 24 @@ -919,7 +858,7 @@ QPushButton { - Qt::Horizontal + Qt::Orientation::Horizontal @@ -932,33 +871,37 @@ QPushButton { - - - Use default access - - - true + + + 15 - - rdSiVa - - - - - - - Use manually configured access - - - rdSiVa - - + + + + Use default access + + + true + + + rdSiVa + + + + + + + Use manually configured access + + + rdSiVa + + + + - - false - true @@ -968,13 +911,13 @@ QPushButton { - 5 + 24 0 - 10 + 0 0 @@ -985,7 +928,7 @@ QPushButton { - Qt::TabFocus + Qt::FocusPolicy::TabFocus Digital Signature Validation Service SiVa SSL certificate @@ -995,19 +938,22 @@ QPushButton { - Qt::TabFocus + Qt::FocusPolicy::TabFocus + + 16 + PointingHandCursor - ADD CERTIFICATE + Add certificate @@ -1017,14 +963,14 @@ QPushButton { PointingHandCursor - SHOW CERTIFICATE + Show certificate - Qt::Horizontal + Qt::Orientation::Horizontal @@ -1042,7 +988,7 @@ QPushButton { - Qt::Vertical + Qt::Orientation::Vertical @@ -1054,127 +1000,415 @@ QPushButton { - - - - QFormLayout::AllNonFixedFieldsGrow - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + 24 - 20 + 32 - 20 + 19 - 20 + 32 - 20 + 32 - - - - No proxy - - - true + + + + Qt::FocusPolicy::TabFocus - - - - - Use system proxy settings + Encryption settings - - - - Manual proxy configuration + + + + 15 + + + + Use default CDOC1 solution + + + true + + + cdoc2Group + + + + + + + Use default CDOC2 solution + + + cdoc2Group + + + + + + + + + + 24 + + + 24 + + + 0 + + + 0 + + + 0 + + + + + Use key server + + + + + + + + QFormLayout::FieldGrowthPolicy::AllNonFixedFieldsGrow + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + 24 + + + 24 + + + 0 + + + 0 + + + 0 + + + + + + 140 + 0 + + + + Name + + + cmbCdoc2Name + + + + + + + + + + UUID + + + txtCdoc2UUID + + + + + + + true + + + true + + + + + + + Fetch URL + + + txtCdoc2Fetch + + + + + + + true + + + true + + + + + + + Post URL + + + txtCdoc2Post + + + + + + + true + + + true + + + + + + + - - - + + + + Qt::Orientation::Vertical + + - 140 - 0 + 20 + 40 - - Host - - - txtProxyHost - - - - - + - - + + + + + + 24 + + + 32 + + + 19 + + + 32 + + + 32 + + + - Port - - - txtProxyPort + Proxy - - - - - - - Username - - - txtProxyUsername + + + + 15 - - - - + + + + No proxy + + + true + + + proxyGroup + + + + + + + Use system proxy settings + + + proxyGroup + + + + + + + Manual proxy configuration + + + proxyGroup + + + + - - - - Password - - - txtProxyPassword - + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 95 + + + 24 + + + + + 6 + + + + + Host + + + txtProxyHost + + + + + + + + + + + + 6 + + + + + Username + + + txtProxyUsername + + + + + + + + + + + + 6 + + + + + Port + + + txtProxyPort + + + + + + + + + + + + 6 + + + + + Password + + + txtProxyPassword + + + + + + + QLineEdit::EchoMode::Password + + + + + + - - - - QLineEdit::Password + + + + Qt::Orientation::Vertical - + + + 20 + 40 + + + + + 15 + - 10 + 32 - 10 + 32 - 10 + 32 - 10 + 15 @@ -1207,7 +1441,7 @@ QScrollBar::sub-line:vertical { } - QFrame::NoFrame + QFrame::Shape::NoFrame true @@ -1215,7 +1449,7 @@ QScrollBar::sub-line:vertical { - + Enable one-time log generation @@ -1225,19 +1459,22 @@ QScrollBar::sub-line:vertical { + + 15 + - 10 + 0 20 - 10 + 0 - 10 + 0 - + @@ -1252,7 +1489,7 @@ QScrollBar::sub-line:vertical { - Qt::TabFocus + Qt::FocusPolicy::TabFocus The project is supported by the European Regional Development Fund @@ -1262,7 +1499,7 @@ QScrollBar::sub-line:vertical { - Qt::TabFocus + Qt::FocusPolicy::TabFocus <p>Estonian ID-software is released by Information Systems's Authority<br /> @@ -1270,7 +1507,7 @@ In case of questions please contact our support via <a href="https://www Additional licenses and components - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1282,12 +1519,6 @@ Additional licenses and components - - - Roboto - 14 - - QTextEdit { color: #363739; @@ -1313,7 +1544,7 @@ QScrollBar::sub-line:vertical { } - QFrame::NoFrame + QFrame::Shape::NoFrame true @@ -1337,7 +1568,7 @@ p, li { white-space: pre-wrap; margin-top:12px; margin-bottom:12px; margin-left: <p align="center"><b>Roboto: Google’s signature family of fonts</b><br />Apache Software License, Version 2.0<br /><a href="https://github.com/google/roboto/blob/master/LICENSE" style=" text-decoration: underline; color:#006eb5;">https://github.com/google/roboto/blob/master/LICENSE</a> </p></body></html> - Qt::TextBrowserInteraction + Qt::TextInteractionFlag::TextBrowserInteraction true @@ -1353,53 +1584,61 @@ p, li { white-space: pre-wrap; margin-top:12px; margin-bottom:12px; margin-left: 0 - 46 + 48 16777215 - 46 + 48 #navigationArea { - border-top: 1px solid #DEE4E9; - background-color: #f7f7f7; +border-top: 1px solid #E7EAEF; +background-color: #F3F5F7; +} +#txtNavVersion { +color: #07142A; } QPushButton { - border-radius: 2px; - border: none; - color: #006EB5; - padding-left: 6px; - padding-right: 6px; - min-width: 120px; - min-height: 25px; - max-height: 25px; +padding: 9px 12px; +border-radius: 4px; +color: #2F70B6; +font-weight: 700; +} +QPushButton:hover { +background-color: #EAF1F8; } QPushButton:pressed { - color: #FFFFFF; - background-color: #006EB5; +background-color: #BFD3E8; +} +QPushButton:default { +color: #ffffff; +background-color: #2F70B6; } -QPushButton:hover:!pressed { - border: 1px solid #006EB5; - padding-left: 5px; - padding-right: 5px; - color: #006EB5; +QPushButton:default:hover { +background-color: #2B66A6; } -QPushButton:disabled { - color: #727679; +QPushButton:default:pressed { +background-color: #215081; +} +QPushButton:default:disabled { +background-color: #2F70B6; } + + 40 + - 10 + 24 0 - 10 + 40 0 @@ -1407,17 +1646,17 @@ QPushButton:disabled { - Qt::TabFocus + Qt::FocusPolicy::TabFocus - <b>DigiDoc4</b> klient 4.0.1.0 + DigiDoc4 4.0.1.0, released 01.02.2024 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -1432,11 +1671,8 @@ QPushButton:disabled { PointingHandCursor - - First run - - FIRST RUN + First run @@ -1445,30 +1681,18 @@ QPushButton:disabled { PointingHandCursor - - Refresh configuration - - REFRESH CONFIGURATION + Refresh configuration - - - 210 - 25 - - PointingHandCursor - - Check connection - - CHECK CONNECTIONS + Check connection @@ -1477,11 +1701,8 @@ QPushButton:disabled { PointingHandCursor - - Save diagnostics report - - SAVE DIAGNOSTICS REPORT TO DISK + Save diagnostics report @@ -1490,11 +1711,8 @@ QPushButton:disabled { PointingHandCursor - - Save log - - SAVE LOG + Save log @@ -1503,11 +1721,8 @@ QPushButton:disabled { PointingHandCursor - - Remove old certificates - - REMOVE OLD CERTIFICATES + Remove old certificates @@ -1516,60 +1731,21 @@ QPushButton:disabled { PointingHandCursor - - Use default settings - - USE DEFAULT SETTINGS + Use default settings - - - 132 - 25 - - - - - 16777215 - 25 - - - - - 14 - - PointingHandCursor - - Close - - - QPushButton { - border-radius: 2px; - border: none; - color: #ffffff; - background-color: #006EB5; - padding-left: 6px; - padding-right: 6px; -} -QPushButton:pressed { - background-color: #41B6E6; -} -QPushButton:hover:!pressed { - background-color: #008DCF; -} -QPushButton:disabled { - background-color: #BEDBED; -} - - CLOSE + Close + + + true @@ -1579,27 +1755,22 @@ QPushButton:disabled { - - CheckBox - QCheckBox -
widgets/CheckBox.h
-
LineEdit QLineEdit
widgets/LineEdit.h
+ + ComboBox + QComboBox +
widgets/ComboBox.h
+
QSvgWidget QWidget
QSvgWidget
1
- - RadioButton - QRadioButton -
widgets/RadioButton.h
-
CertLabel QLabel @@ -1616,5 +1787,6 @@ QPushButton:disabled { + diff --git a/client/images/icon_checkbox.png b/client/images/icon_checkbox.png deleted file mode 100644 index c3d1118cae587316c6e9ddd21fdee9792a522bbe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 691 zcmb7C!AiqG5Z#?@5-qf+*4RqVEjB+>*{p9&3jrI!f!UpzyqS5kll#NTLABDV2qCKD(eMa&jdg=?KJ32S;@Z3%om?UI z$|@gwwH+bod_3$QcN_AQo{Y@0OiDh}G)2O1QA!b!wN^quqDX6PesYRXlUcZ~a>8D3 zI|!69=1uEvrxOH$EugIxzDGjJ>2#*wb)#M<^hM!Tv+236@B7|LU<#>(aN6y5k}^F4 zQFJLI%6x3bM5W{>_*)in;t-c(DClF%vILBlcV;N+=Xq<0 z30*cQ!>;1I2H0*n*L)1XU?{Mj&FA?F93thauQ?k@UUgBva~-k%Jg_s*`r0rZ}mivR!s diff --git a/client/images/icon_checkbox_check.png b/client/images/icon_checkbox_check.png deleted file mode 100644 index 3325b424549d1b64249cbcfb7445564cfb0953c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmbVKO=}ZT6g@NZ5^Y1evB@;`qZDbIb`lUb3WB0UOiC?9OQGPxE?u?IKTzGd6{O(C z;#P3$53q|WB8npx3Zjj)2E{5^QsaDh&yAxPaN~uUH}A|l_ndp*y*V{`A=};G4Io>q zRxZif!)Je5-UHS03t74rsc zcNk+}+cx4jh9T)gqXFOd5ek|6&IqGep_Fk@@;vmpE=(APcqydf$Ov2k;tsMT$G)@; z$%uM=3;rt~x!ztF+M{%Tp#aBm{t}}O_1E5hK`5J3gNNb2Ue}WB#2OROQXmePh_+ex zZY#jd$}?>4G$D5MA35UTPdK&(BdU=Qspd!{mL6_kIG4ff@dEZ*KLl&{z>r2IcI?rc z&zkY{(F2ODH@@NSSc1>ZtGRVW~Ex>Xx*Lq@*Y98YL5*)AIH4VGQLnm|K2= zTbIX>NgJ(MI-^R-%Ouh%sWB;hd8Ul1av#RW@_H`iwDYqM407b#sQlLU_U{4cl5S2P zbMd{^QYUIru!c++ttv;rxO3!qkQdI{lOV?HDV0h(a{oQ#zPC9)F!3p3;@bJi%7b%P GZ~O$*b@mqk diff --git a/client/images/icon_help hover.svg b/client/images/icon_help hover.svg deleted file mode 100644 index cf3d7c1b3..000000000 --- a/client/images/icon_help hover.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - icon_help hover - Created with Sketch. - - - - - - - - - - - \ No newline at end of file diff --git a/client/images/icon_help.svg b/client/images/icon_help.svg index b6b720582..7fb0b859f 100644 --- a/client/images/icon_help.svg +++ b/client/images/icon_help.svg @@ -1,16 +1,4 @@ - - - - icon_help - Created with Sketch. - - - - - - - - - - + + + \ No newline at end of file diff --git a/client/images/icon_radio.png b/client/images/icon_radio.png deleted file mode 100644 index 5ebc14c47d3c0c2c9b321d66d48d866f612b89ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 691 zcma))Jx>Bb5I}GD-~bzHEaY>0oFTP*lKpz^;gZ8& z${(EIds0i>WI{`ZA&(2W&HdGRaVT$HF&>ZM*o6=%h~qfyUa$Ad`VDzB3O5>!UhDNv zr!%l^pgGHmMx!gKl$7$Daa|Ygqu+n7RLGQw$0LylXt&#Kwpvu!$Y%XMpQ1_T42O^9 z@=LXfJta5^0f0$THX04`t!FaWh^DoUlMn!y#P!~8FDDWZ)WxN5qZOQl0Kh!-YTI@= z9M;?f)gQ1E0svEkol&G|nwDktdObdvx|42+5C9lclMAufTeCT7P8XT9P6$A8xRS{v z^Q+cs%9d&-h}Llu0ss@UKY@BrDv}1}pNG{wsr)|^{p)u*yBnlW&r4}_m%?^2cfWOX F@d*Wk4A=kw diff --git a/client/images/icon_radio.svg b/client/images/icon_radio.svg new file mode 100644 index 000000000..e485fd912 --- /dev/null +++ b/client/images/icon_radio.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/client/images/icon_radio_active.svg b/client/images/icon_radio_active.svg new file mode 100644 index 000000000..3ed2b21c8 --- /dev/null +++ b/client/images/icon_radio_active.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/client/images/icon_radio_check.svg b/client/images/icon_radio_check.svg new file mode 100644 index 000000000..7c4248f8a --- /dev/null +++ b/client/images/icon_radio_check.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/client/images/icon_radio_check_active.svg b/client/images/icon_radio_check_active.svg new file mode 100644 index 000000000..ccb34d01b --- /dev/null +++ b/client/images/icon_radio_check_active.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/client/images/icon_radio_check_disabled.svg b/client/images/icon_radio_check_disabled.svg new file mode 100644 index 000000000..e514a2ed6 --- /dev/null +++ b/client/images/icon_radio_check_disabled.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/client/images/icon_radio_check_hover.svg b/client/images/icon_radio_check_hover.svg new file mode 100644 index 000000000..47aac8da4 --- /dev/null +++ b/client/images/icon_radio_check_hover.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/images/icon_radio_checked.png b/client/images/icon_radio_checked.png deleted file mode 100644 index 1e6c0e39314f36f76fc9162200d74f19cbb16612..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 691 zcmb7?JxD@P6vyAa@99%fp+qfn&{BvVt=1NWp)L{;K`lkl9z;V;(hxP((i${0*3uFU z<6uPU(*y@g2!R7pRTb7^v3y6rC83Lg zGYq3xD#^0kRun)sQS|wI(MW_+`orkD4zAU1-{2tD2@w#A0@v zjnQbPYT9i!`%ow#hJ1E(XxB#)B>=!ET9(UYUJ%A5Nm2Ff%cqgd4HOPSBvAqYi~@hD z*Tdmq+&^lU$8DtyG{)omPZMq67dKd)OX@ z@;on!;%npGE|9g!pwa9Y_y%aRgAhrS006^DbinVgRLa4?U?v&G38%Rl>`EfSLPAgi t0PG)+MS33rn + + + \ No newline at end of file diff --git a/client/images/icon_radio_hover.svg b/client/images/icon_radio_hover.svg new file mode 100644 index 000000000..ae90aab8b --- /dev/null +++ b/client/images/icon_radio_hover.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/images/images.qrc b/client/images/images.qrc index 35dd37656..74dbadf06 100644 --- a/client/images/images.qrc +++ b/client/images/images.qrc @@ -20,12 +20,10 @@ icon_Allkiri_small.svg icon_Allkiri.svg icon_check.svg - icon_checkbox.png icon_checkbox.svg icon_checkbox_active.svg icon_checkbox_disabled.svg icon_checkbox_hover.svg - icon_checkbox_check.png icon_checkbox_check.svg icon_checkbox_check_active.svg icon_checkbox_check_disabled.svg @@ -37,6 +35,7 @@ icon_Edit_hover.svg icon_Edit_pressed.svg icon_Edit.svg + icon_help.svg icon_IDkaart_disabled.svg icon_IDkaart_red.svg icon_IDkaart_green.svg @@ -48,8 +47,14 @@ icon_link.svg icon_Minu_eID_hover.svg icon_Minu_eID.svg - icon_radio.png - icon_radio_checked.png + icon_radio.svg + icon_radio_active.svg + icon_radio_disabled.svg + icon_radio_hover.svg + icon_radio_check.svg + icon_radio_check_active.svg + icon_radio_check_disabled.svg + icon_radio_check_hover.svg icon_remove_hover.svg icon_remove.svg icon_remove_pressed.svg diff --git a/client/translations/en.ts b/client/translations/en.ts index a349a92c3..a6213bcb5 100644 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -2306,50 +2306,6 @@ ID-CARD Settings Settings - - GENERAL - GENERAL - - - PROXY - PROXY - - - DIAGNOSTICS - DIAGNOSTICS - - - INFO - INFO - - - CLOSE - CLOSE - - - REMOVE OLD CERTIFICATES - REMOVE OLD CERTIFICATES - - - SAVE DIAGNOSTICS REPORT TO DISK - SAVE DIAGNOSTICS - - - SHOW CERTIFICATE - SHOW CERTIFICATE - - - USE DEFAULT SETTINGS - USE DEFAULT SETTINGS - - - CHECK CONNECTIONS - CHECK CONNECTIONS - - - REFRESH CONFIGURATION - REFRESH CONFIGURATION - Language Language @@ -2442,10 +2398,6 @@ Additional licenses and components In case of questions please contact our support via <a href="https://www.id.ee/en/id-help/"><span style=" text-decoration: underline; color:#006eb5;">id.ee</span></a>.</p> Additional licenses and components - - FIRST RUN - FIRST RUN - Select folder Select folder @@ -2467,59 +2419,44 @@ Additional licenses and components accessible General - - Services - accessible - Services - Proxy - accessible Proxy Diagnostics - accessible Diagnostics Info - accessible Info First run - accessible First run Refresh configuration - accessible Refresh configuration Check connection - accessible Check connection Save diagnostics report - accessible Save diagnostics report Remove old certificates - accessible Remove old certificates Use default settings - accessible Use default settings Close - accessible Close @@ -2556,13 +2493,8 @@ Additional licenses and components Save log - accessible Save log - - SAVE LOG - SAVE LOG - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? @@ -2576,12 +2508,12 @@ Additional licenses and components The project is supported by the European Regional Development Fund - SIGNING SERVICES - SIGNING SERVICES + Signing services + Signing services - VALIDATION SERVICES - VALIDATION SERVICES + Validation services + Validation services Access to Digital Signature Validation Service SiVa @@ -2599,10 +2531,6 @@ Additional licenses and components Select SiVa server certificate Select SiVa server certificate - - ADD CERTIFICATE - ADD CERTIFICATE - Select Time-Stamping server certificate Select Time-Stamping server certificate @@ -2611,6 +2539,30 @@ Additional licenses and components Time-Stamping service SSL certificate Time-Stamping Service SSL certificate + + Encryption settings + Encryption settings + + + Add certificate + Add certificate + + + Show certificate + Show certificate + + + Use default CDOC1 solution + + + + Use default CDOC2 solution + + + + Custom + + SignatureDialog diff --git a/client/translations/et.ts b/client/translations/et.ts index 91ef7c91f..3621e5e25 100644 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -2306,54 +2306,6 @@ ID-KAARDIGA Settings Seaded - - GENERAL - ÜLDINE - - - PROXY - PROKSI - - - DIAGNOSTICS - DIAGNOSTIKA - - - INFO - INFO - - - CLOSE - SULGE - - - FIRST RUN - ESMANE TUTVUSTUS - - - REMOVE OLD CERTIFICATES - EEMALDA ÜLELIIGSED SERTIFIKAADID - - - SAVE DIAGNOSTICS REPORT TO DISK - SALVESTA DIAGNOSTIKA - - - SHOW CERTIFICATE - NÄITA SERTIFIKAATI - - - USE DEFAULT SETTINGS - TAASTA ALGSEADED - - - CHECK CONNECTIONS - KONTROLLI INTERNETIÜHENDUST - - - REFRESH CONFIGURATION - KONTROLLI VÄRSKENDUSI - Language Keel @@ -2467,59 +2419,44 @@ Täiendavad litsentsid ja komponendid accessible Üldine - - Services - accessible - Teenused - Proxy - accessible Proksi Diagnostics - accessible Diagnostika Info - accessible Info First run - accessible Esmane tutvustus Refresh configuration - accessible Kontrolli värskendusi Check connection - accessible Kontrolli internetiühendust Save diagnostics report - accessible Salvesta diagnostika Remove old certificates - accessible Eemalda üleliigsed sertifikaadid Use default settings - accessible Taasta algseaded Close - accessible Sulge @@ -2556,13 +2493,8 @@ Täiendavad litsentsid ja komponendid Save log - accessible Salvesta logifail - - SAVE LOG - SALVESTA LOGIFAIL - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? Logimise aktiveerimiseks taaskäivita DigiDoc4 klient. Loe täpsemalt <a href="https://www.id.ee/artikkel/logifaili-genereerimine-digidoc4-kliendis/">siit</a>. Taaskäivita rakendus? @@ -2576,12 +2508,12 @@ Täiendavad litsentsid ja komponendid Projekti on toetatud Euroopa Liidu Regionaalarengu Fondist - SIGNING SERVICES - ALLKIRJASTAMISTEENUSED + Signing services + Allkirjastamisteenused - VALIDATION SERVICES - VALIDEERIMISTEENUSED + Validation services + Valideerimisteenused Access to Digital Signature Validation Service SiVa @@ -2599,10 +2531,6 @@ Täiendavad litsentsid ja komponendid Select SiVa server certificate - - ADD CERTIFICATE - LISA SERTIFIKAAT - Select Time-Stamping server certificate @@ -2611,6 +2539,30 @@ Täiendavad litsentsid ja komponendid Time-Stamping service SSL certificate Ajatempliteenuse SSL sertifikaat + + Encryption settings + Krüpteerimiseseaded + + + Add certificate + Lisa sertifikaat + + + Show certificate + Näita sertifikaati + + + Use default CDOC1 solution + + + + Use default CDOC2 solution + + + + Custom + + SignatureDialog diff --git a/client/translations/ru.ts b/client/translations/ru.ts index d8631c195..cbf183030 100644 --- a/client/translations/ru.ts +++ b/client/translations/ru.ts @@ -2307,54 +2307,6 @@ ID-КАРТОЙ Settings Настройки - - GENERAL - ОСНОВНЫЕ - - - PROXY - ПРОКСИ - - - DIAGNOSTICS - ДИАГНОСТИКА - - - INFO - ИНФО - - - CLOSE - ЗАКРЫТЬ - - - FIRST RUN - ПЕРВЫЙ ЗАПУСК - - - REMOVE OLD CERTIFICATES - УДАЛИТЬ СТАРЫЕ СЕРТИФИКАТЫ - - - SAVE DIAGNOSTICS REPORT TO DISK - СОХРАНИТЬ ДИАГНОСТИКУ - - - SHOW CERTIFICATE - ПОКАЗАТЬ СЕРТИФИКАТ - - - USE DEFAULT SETTINGS - ИСПОЛЬЗОВАТЬ НАСТРОЙКИ ПО УМОЛЧАНИЮ - - - CHECK CONNECTIONS - ПРОВЕРЬТЕ НАСТРОЙКИ ИНТЕРНЕТА - - - REFRESH CONFIGURATION - ПРОВЕРЬТЕ ОБНОВЛЕНИЯ - Language Язык @@ -2468,59 +2420,44 @@ Additional licenses and components accessible Основные - - Services - accessible - Службы - Proxy - accessible Прокси Diagnostics - accessible Диагностика Info - accessible Инфо First run - accessible Первый запуск Refresh configuration - accessible Проверьте обновления Check connection - accessible Проверьте настройки интернета Save diagnostics report - accessible Сохранить диагностику Remove old certificates - accessible Удалить старые сертификаты Use default settings - accessible Использовать настройки по умолчанию Close - accessible Закрыть @@ -2557,13 +2494,8 @@ Additional licenses and components Save log - accessible Сохранить лог-файл - - SAVE LOG - СОХРАНИТЬ ЛОГ-ФАЙЛ - Restart DigiDoc4 Client to activate logging. Read more <a href="https://www.id.ee/en/article/log-file-generation-in-digidoc4-client/">here</a>. Restart now? Перезапустите клиент DigiDoc4, чтобы активировать ведение журнала. Подробнее читайте <a href="https://www.id.ee/ru/artikkel/generirovanie-log-fajla-v-kliente-digidoc4/">здесь</a>. Перезапустить приложение? @@ -2577,12 +2509,12 @@ Additional licenses and components Проект поддерживается Европейским фондом регионального развития - SIGNING SERVICES - УСЛУГИ ПОДПИСАНИЯ + Signing services + Услуги подписания - VALIDATION SERVICES - УСЛУГИ ВАЛИДАЦИИ + Validation services + Услуги валидации Access to Digital Signature Validation Service SiVa @@ -2600,10 +2532,6 @@ Additional licenses and components Select SiVa server certificate - - ADD CERTIFICATE - ДОБАВИТЬ СЕРТИФИКАТ - Select Time-Stamping server certificate @@ -2612,6 +2540,30 @@ Additional licenses and components Time-Stamping service SSL certificate SSL сертификат службы отметок времени + + Encryption settings + + + + Add certificate + Добавить сертификат + + + Show certificate + Показать сертификат + + + Use default CDOC1 solution + + + + Use default CDOC2 solution + + + + Custom + + SignatureDialog diff --git a/client/widgets/CheckBox.cpp b/client/widgets/CheckBox.cpp deleted file mode 100644 index 9cee163e5..000000000 --- a/client/widgets/CheckBox.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * QDigiDoc4 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "CheckBox.h" - -#include -#include -#include -#include -#include - -CheckBox::CheckBox(QWidget *parent) - : QCheckBox(parent) -{} - -void CheckBox::paintEvent(QPaintEvent *event) -{ - QCheckBox::paintEvent(event); - QStyleOptionButton opt; - initStyleOption(&opt); - QRectF rect = style()->subElementRect(QStyle::SE_RadioButtonIndicator, &opt, this); - rect.adjust(1, 1, -1, -1); - QPainter painter(this); - painter.setRenderHint(QPainter::Antialiasing); - painter.setRenderHint(QPainter::SmoothPixmapTransform); - painter.fillRect(rect, Qt::white); - painter.setPen(QStringLiteral("#AAADAD")); - painter.drawRoundedRect(rect.translated(0.5, 0.5), 2.0, 2.0); - if (isChecked()) - { - rect.adjust(3, 3, -3, -3); - painter.setPen(QPen(QColor(QStringLiteral("#0C5AA6")), 2, Qt::SolidLine, Qt::RoundCap)); - QPainterPath path(QPointF(rect.left(), rect.center().y())); - path.lineTo(rect.center().x(), rect.bottom()); - path.lineTo(rect.right(), rect.top()); - painter.drawPath(path); - } -} diff --git a/client/widgets/CheckBox.h b/client/widgets/CheckBox.h deleted file mode 100644 index ec4b8015f..000000000 --- a/client/widgets/CheckBox.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * QDigiDoc4 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class CheckBox : public QCheckBox -{ - Q_OBJECT -public: - explicit CheckBox(QWidget *parent = nullptr); - -private: - void paintEvent(QPaintEvent *event) override; -}; diff --git a/client/widgets/RadioButton.cpp b/client/widgets/RadioButton.cpp deleted file mode 100644 index 3b3dcabdf..000000000 --- a/client/widgets/RadioButton.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * QDigiDoc4 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "RadioButton.h" - -#include -#include -#include -#include - -RadioButton::RadioButton(QWidget *parent) - : QRadioButton(parent) -{} - -void RadioButton::paintEvent(QPaintEvent *event) -{ - QRadioButton::paintEvent(event); - QStyleOptionButton opt; - initStyleOption(&opt); - QRect rect = style()->subElementRect(QStyle::SE_RadioButtonIndicator, &opt, this); - rect.adjust(1, 1, -1, -1); - QPainter painter(this); - painter.setRenderHint(QPainter::Antialiasing); - painter.fillRect(rect, Qt::white); - painter.setPen(QStringLiteral("#AAADAD")); - painter.drawEllipse(rect); - if (isChecked()) - { - rect.adjust(3, 3, -3, -3); - painter.setPen(QStringLiteral("#0C5AA6")); - painter.setBrush(painter.pen().color()); - painter.drawEllipse(rect); - } -} diff --git a/client/widgets/RadioButton.h b/client/widgets/RadioButton.h deleted file mode 100644 index 3a3623ab9..000000000 --- a/client/widgets/RadioButton.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * QDigiDoc4 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#pragma once - -#include - -class RadioButton : public QRadioButton -{ - Q_OBJECT -public: - explicit RadioButton(QWidget *parent = nullptr); - -private: - void paintEvent(QPaintEvent *event) override; -};