From a45df37a9117d3df54853898021282ef07ef77f6 Mon Sep 17 00:00:00 2001 From: DSCaskey <31944718+DSCaskey@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:43:09 -0500 Subject: [PATCH 1/5] add seamly2d welcome screen --- share/translations/seamly2d_cs_CZ.ts | 78 +++++ share/translations/seamly2d_de_DE.ts | 107 ++++++- share/translations/seamly2d_el_GR.ts | 78 +++++ share/translations/seamly2d_en_CA.ts | 78 +++++ share/translations/seamly2d_en_GB.ts | 78 +++++ share/translations/seamly2d_en_IN.ts | 78 +++++ share/translations/seamly2d_en_US.ts | 78 +++++ share/translations/seamly2d_es_ES.ts | 106 ++++++- share/translations/seamly2d_fi_FI.ts | 78 +++++ share/translations/seamly2d_fr_FR.ts | 78 +++++ share/translations/seamly2d_he_IL.ts | 78 +++++ share/translations/seamly2d_id_ID.ts | 78 +++++ share/translations/seamly2d_it_IT.ts | 78 +++++ share/translations/seamly2d_nl_NL.ts | 112 ++++++- share/translations/seamly2d_pt_BR.ts | 78 +++++ share/translations/seamly2d_ro_RO.ts | 78 +++++ share/translations/seamly2d_ru_RU.ts | 106 ++++++- share/translations/seamly2d_uk_UA.ts | 78 +++++ share/translations/seamly2d_zh_CN.ts | 78 +++++ src/app/seamly2d/core/vapplication.cpp | 2 +- src/app/seamly2d/core/vapplication.h | 2 +- src/app/seamly2d/core/vformulaproperty.cpp | 2 +- .../preferencesconfigurationpage.cpp | 19 +- .../preferencesconfigurationpage.ui | 69 +++- src/app/seamly2d/dialogs/dialogaboutapp.cpp | 2 +- .../seamly2d/dialogs/dialoglayoutprogress.cpp | 2 +- src/app/seamly2d/dialogs/dialognewpattern.cpp | 2 +- .../dialogs/dialogpatternproperties.cpp | 2 +- .../seamly2d/dialogs/dialogpreferences.cpp | 4 +- src/app/seamly2d/dialogs/dialogs.pri | 9 +- src/app/seamly2d/dialogs/dialogvariables.cpp | 14 +- .../seamly2d/dialogs/export_layout_dialog.cpp | 2 +- src/app/seamly2d/dialogs/history_dialog.cpp | 4 +- .../dialogs/layoutsettings_dialog.cpp | 2 +- src/app/seamly2d/dialogs/show_info_dialog.cpp | 2 +- src/app/seamly2d/dialogs/welcome_dialog.cpp | 133 ++++++++ src/app/seamly2d/dialogs/welcome_dialog.h | 60 ++++ src/app/seamly2d/dialogs/welcome_dialog.ui | 299 ++++++++++++++++++ src/app/seamly2d/main.cpp | 63 ++-- src/app/seamly2d/mainwindow.cpp | 2 +- src/app/seamly2d/xml/vpattern.cpp | 2 +- .../seamlymepreferencesconfigurationpage.cpp | 6 +- .../seamlyme/dialogs/dialogaboutseamlyme.cpp | 2 +- .../dialogs/dialogseamlymepreferences.cpp | 4 +- .../seamlyme/dialogs/me_welcome_dialog.cpp | 8 +- src/app/seamlyme/main.cpp | 4 +- src/app/seamlyme/mapplication.cpp | 2 +- src/app/seamlyme/tmainwindow.cpp | 18 +- src/libs/vdxf/dxiface.cpp | 2 +- src/libs/vlayout/vtextmanager.cpp | 2 +- src/libs/vmisc/def.cpp | 2 +- src/libs/vmisc/share/resources/icon.qrc | 1 + .../icon/svg/seamly2d_banner_vertical.svg | 109 +++++++ src/libs/vmisc/vabstractapplication.h | 2 +- src/libs/vmisc/vcommonsettings.cpp | 12 +- src/libs/vmisc/vcommonsettings.h | 12 +- src/libs/vmisc/vsettings.cpp | 4 +- src/libs/vmisc/vsettings.h | 4 +- src/libs/vpatterndb/vformula.cpp | 8 +- .../vtools/dialogs/support/dialogundo.cpp | 2 +- .../dialogs/support/edit_formula_dialog.cpp | 4 +- .../support/editlabeltemplate_dialog.cpp | 2 +- .../vtools/dialogs/tools/dialogalongline.cpp | 4 +- src/libs/vtools/dialogs/tools/dialogarc.cpp | 12 +- .../dialogs/tools/dialogarcwithlength.cpp | 12 +- .../vtools/dialogs/tools/dialogbisector.cpp | 4 +- .../tools/dialogcurveintersectaxis.cpp | 4 +- .../vtools/dialogs/tools/dialogcutarc.cpp | 4 +- .../vtools/dialogs/tools/dialogcutspline.cpp | 4 +- .../dialogs/tools/dialogcutsplinepath.cpp | 4 +- .../dialogs/tools/dialogellipticalarc.cpp | 20 +- .../vtools/dialogs/tools/dialogendline.cpp | 8 +- .../dialogs/tools/dialoglineintersectaxis.cpp | 4 +- src/libs/vtools/dialogs/tools/dialogmove.cpp | 16 +- .../vtools/dialogs/tools/dialognormal.cpp | 4 +- .../dialogs/tools/dialogpointofcontact.cpp | 4 +- .../vtools/dialogs/tools/dialogrotation.cpp | 4 +- .../dialogs/tools/dialogshoulderpoint.cpp | 4 +- .../vtools/dialogs/tools/dialogspline.cpp | 34 +- .../vtools/dialogs/tools/dialogsplinepath.cpp | 44 +-- src/libs/vtools/dialogs/tools/dialogtool.cpp | 4 +- src/libs/vtools/dialogs/tools/dialogtool.h | 2 +- .../tools/intersect_circles_dialog.cpp | 8 +- .../tools/intersect_circletangent_dialog.cpp | 4 +- .../tools/piece/dialoginternalpath.cpp | 12 +- .../tools/piece/pattern_piece_dialog.cpp | 46 +-- .../tools/drawTools/operation/vtoolmove.cpp | 6 +- .../drawTools/operation/vtoolrotation.cpp | 2 +- .../tools/drawTools/toolcurve/vtoolarc.cpp | 6 +- .../toolcurve/vtoolarcwithlength.cpp | 6 +- .../toolcurve/vtoolellipticalarc.cpp | 10 +- .../toolsinglepoint/toolcut/vtoolcutarc.cpp | 4 +- .../toolcut/vtoolcutspline.cpp | 4 +- .../toolcut/vtoolcutsplinepath.cpp | 4 +- .../toollinepoint/vtoolalongline.cpp | 2 +- .../toollinepoint/vtoolbisector.cpp | 2 +- .../toollinepoint/vtoolcurveintersectaxis.cpp | 2 +- .../toollinepoint/vtoolendline.cpp | 4 +- .../toollinepoint/vtoollineintersectaxis.cpp | 2 +- .../toollinepoint/vtoolnormal.cpp | 2 +- .../toollinepoint/vtoolshoulderpoint.cpp | 2 +- .../toolsinglepoint/vtoolpointofcontact.cpp | 2 +- .../line/operation/vistoolmove.cpp | 4 +- .../visualization/line/vistoolendline.cpp | 2 +- .../vtools/visualization/visualization.cpp | 2 +- src/libs/vwidgets/vabstractmainwindow.cpp | 2 +- 106 files changed, 2511 insertions(+), 334 deletions(-) create mode 100644 src/app/seamly2d/dialogs/welcome_dialog.cpp create mode 100644 src/app/seamly2d/dialogs/welcome_dialog.h create mode 100644 src/app/seamly2d/dialogs/welcome_dialog.ui create mode 100644 src/libs/vmisc/share/resources/icon/svg/seamly2d_banner_vertical.svg diff --git a/share/translations/seamly2d_cs_CZ.ts b/share/translations/seamly2d_cs_CZ.ts index 53a528ad8244..ed76622892e2 100644 --- a/share/translations/seamly2d_cs_CZ.ts +++ b/share/translations/seamly2d_cs_CZ.ts @@ -8647,6 +8647,18 @@ Chcete uložit své změny? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9809,6 +9821,72 @@ You can change this setting in the SeamlyMe preferences. Palce + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Jednotky: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + + + + Do not show again + + + + User locale + + + + Centimeters + Centimetry + + + Millimeters + + + + Inches + Palce + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_de_DE.ts b/share/translations/seamly2d_de_DE.ts index d738e71bc813..9e4a1ff91b50 100644 --- a/share/translations/seamly2d_de_DE.ts +++ b/share/translations/seamly2d_de_DE.ts @@ -3903,10 +3903,12 @@ for writing zum schreiben - Unable to get exclusive access to file + Unable to get exclusive access to file %1 Possibly the file is already being downloaded. - + Exklusiver Zugriff auf die Datei kann nicht gewährt werden +%1 +Möglicherweise wird die Datei bereits heruntergeladen. @@ -4816,10 +4818,12 @@ eine neue Gruppe der Liste zufügen Millimeter - Margins go beyond printing. + Margins go beyond printing. Apply settings anyway? - + Ränder gehen über den Druck hinaus. + +Einstellungen trotzdem anwenden? @@ -8656,6 +8660,19 @@ Sollen die Änderungen gespeichert werden? Email format is not valid. Das E-Mail-Format ist nicht gültig. + + Startup + Startup + Startup + + + Welcome + Willkommen + + + Do not show welcome screen + Willkommensbildschirm nicht anzeigen + PreferencesGraphicsViewPage @@ -9807,15 +9824,87 @@ Sollen die Änderungen gespeichert werden? Zoll - Selects what decimal separator char to use. -When checked the separator for the user's locale is used. + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. When unchecked the period is used. - + Legt fest, welches Dezimaltrennzeichen verwendet werden soll. +Wenn das Kontrollkästchen aktiviert ist, wird das Trennzeichen für das Gebietsschema des Benutzers verwendet. +Wenn es nicht markiert ist, wird der Punkt verwendet. - When checked the Welcome window will not be displayed. + When checked the Welcome window will not be displayed. You can change this setting in the SeamlyMe preferences. - + Wenn diese Option aktiviert ist, wird das Willkommensfenster nicht angezeigt. +Sie können diese Einstellung in den SeamlyMe-Einstellungen ändern. + + + + SeamlyWelcomeDialog + + Welcome + Willkommen + + + Welcome to Seamly2D + Willkommen bei Seamly2D + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + Bitte wählen Sie die gewünschten Einheiten, das Dezimaltrennzeichen und die Sprache. (Sie können diese Angaben später ändern.) + + + Units: + Einheiten: + + + Sets the default units for a new measurement file. + Legt die Standardeinheiten für eine neue Messdatei fest. + + + Decimal separator: + Dezimaltrennzeichen: + + + GUI language: + GUI-Sprache: + + + Do not show again + Nicht mehr anzeigen + + + User locale + Gebietsschema des Benutzers + + + Centimeters + Zentimeter + + + Millimeters + Millimeter + + + Inches + Zoll + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + Legt fest, welches Dezimaltrennzeichen verwendet werden soll. +Wenn das Kontrollkästchen aktiviert ist, wird das Trennzeichen für das Gebietsschema des Benutzers verwendet. +Wenn es nicht markiert ist, wird der Punkt verwendet. + + + Sets the language used for Seamly2D. + Legt die für Seamly2D verwendete Sprache fest. + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + Wenn diese Option aktiviert ist, wird das Willkommensfenster nicht angezeigt. +Sie können diese Einstellung in den Seamly2D-Voreinstellungen ändern. diff --git a/share/translations/seamly2d_el_GR.ts b/share/translations/seamly2d_el_GR.ts index 059ea732d207..0ba8e236d80b 100644 --- a/share/translations/seamly2d_el_GR.ts +++ b/share/translations/seamly2d_el_GR.ts @@ -8647,6 +8647,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9809,6 +9821,72 @@ You can change this setting in the SeamlyMe preferences. Ίντσες + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Μονάδες μέτρησης: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + + + + Do not show again + + + + User locale + + + + Centimeters + Εκατοστά + + + Millimeters + + + + Inches + Ίντσες + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_en_CA.ts b/share/translations/seamly2d_en_CA.ts index d17793d153ab..b867289747dc 100644 --- a/share/translations/seamly2d_en_CA.ts +++ b/share/translations/seamly2d_en_CA.ts @@ -8650,6 +8650,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9812,6 +9824,72 @@ You can change this setting in the SeamlyMe preferences. Inches + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Units: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + GUI language: + + + Do not show again + + + + User locale + + + + Centimeters + Centimeters + + + Millimeters + + + + Inches + Inches + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_en_GB.ts b/share/translations/seamly2d_en_GB.ts index 3ee52670b594..1c4c58e39731 100644 --- a/share/translations/seamly2d_en_GB.ts +++ b/share/translations/seamly2d_en_GB.ts @@ -8650,6 +8650,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9812,6 +9824,72 @@ You can change this setting in the SeamlyMe preferences. + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Units: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + GUI language: + + + Do not show again + + + + User locale + + + + Centimeters + + + + Millimeters + + + + Inches + + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_en_IN.ts b/share/translations/seamly2d_en_IN.ts index 73c4c41420e0..ee4e8b8e30d2 100644 --- a/share/translations/seamly2d_en_IN.ts +++ b/share/translations/seamly2d_en_IN.ts @@ -8650,6 +8650,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9812,6 +9824,72 @@ You can change this setting in the SeamlyMe preferences. Inches + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Units: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + GUI language: + + + Do not show again + + + + User locale + + + + Centimeters + Centimeters + + + Millimeters + + + + Inches + Inches + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_en_US.ts b/share/translations/seamly2d_en_US.ts index f5745d5a1f46..5d85f0258fba 100644 --- a/share/translations/seamly2d_en_US.ts +++ b/share/translations/seamly2d_en_US.ts @@ -8650,6 +8650,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9812,6 +9824,72 @@ You can change this setting in the SeamlyMe preferences. + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Units: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + GUI language: + + + Do not show again + + + + User locale + + + + Centimeters + + + + Millimeters + + + + Inches + + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_es_ES.ts b/share/translations/seamly2d_es_ES.ts index e54d1304583e..259529f8d0de 100644 --- a/share/translations/seamly2d_es_ES.ts +++ b/share/translations/seamly2d_es_ES.ts @@ -3942,10 +3942,12 @@ Do you want to download it? ¿Quiere descargarla? - Unable to get exclusive access to file + Unable to get exclusive access to file %1 Possibly the file is already being downloaded. - + No se puede obtener acceso exclusivo al archivo +%1 +Posiblemente el archivo ya está siendo descargado. @@ -4854,10 +4856,12 @@ Possibly the file is already being downloaded. Ninguno - Margins go beyond printing. + Margins go beyond printing. Apply settings anyway? - + Los márgenes van más allá de la impresión. + +¿Aplicar ajustes de todos modos? @@ -8711,6 +8715,18 @@ Do you want to save your changes? Email format is not valid. El formato del correo electrónico no es válido. + + Startup + Puesta en marcha + + + Welcome + Bienvenido + + + Do not show welcome screen + No mostrar la pantalla de bienvenida + PreferencesGraphicsViewPage @@ -9864,15 +9880,87 @@ actualización: Pulgadas - Selects what decimal separator char to use. -When checked the separator for the user's locale is used. + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. When unchecked the period is used. - + Selecciona el carácter separador decimal a utilizar. +Si está marcada, se utiliza el separador de la configuración regional del usuario. +Si no se selecciona, se utiliza el punto. - When checked the Welcome window will not be displayed. + When checked the Welcome window will not be displayed. You can change this setting in the SeamlyMe preferences. - + Si esta opción está seleccionada, no se mostrará la ventana de bienvenida. +Puede cambiar esta configuración en las preferencias de SeamlyMe. + + + + SeamlyWelcomeDialog + + Welcome + Bienvenido + + + Welcome to Seamly2D + Bienvenido a Seamly2D + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + Elija las unidades, el separador decimal y el idioma que prefiera. (Puede cambiarlos más adelante.) + + + Units: + Unidades: + + + Sets the default units for a new measurement file. + Establece las unidades por defecto para un nuevo archivo de medición. + + + Decimal separator: + Separador decimal: + + + GUI language: + GUI Idioma: + + + Do not show again + No volver a mostrar + + + User locale + Localización del usuario + + + Centimeters + Centímetros + + + Millimeters + + + + Inches + Pulgadas + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + Selecciona el carácter separador decimal a utilizar. +Si está marcada, se utiliza el separador de la configuración regional del usuario. +Si no se selecciona, se utiliza el punto. + + + Sets the language used for Seamly2D. + Establece el idioma utilizado para Seamly2D. + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + Si esta opción está seleccionada, no se mostrará la ventana de bienvenida. +Puede cambiar esta configuración en las preferencias de Seamly2D. diff --git a/share/translations/seamly2d_fi_FI.ts b/share/translations/seamly2d_fi_FI.ts index a99bad3573f5..631e430c1a00 100644 --- a/share/translations/seamly2d_fi_FI.ts +++ b/share/translations/seamly2d_fi_FI.ts @@ -8647,6 +8647,18 @@ Haluatko tallentaa muutokset? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9809,6 +9821,72 @@ You can change this setting in the SeamlyMe preferences. Tuumaa + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Mittayksiköt: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + + + + Do not show again + + + + User locale + + + + Centimeters + Senttimetriä + + + Millimeters + + + + Inches + Tuumaa + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_fr_FR.ts b/share/translations/seamly2d_fr_FR.ts index c2de6016fcf9..3b741136e766 100644 --- a/share/translations/seamly2d_fr_FR.ts +++ b/share/translations/seamly2d_fr_FR.ts @@ -8650,6 +8650,18 @@ Voulez-vous sauvegarder les changements? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9812,6 +9824,72 @@ You can change this setting in the SeamlyMe preferences. Pouces + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Unités: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + Langue de l'interface: + + + Do not show again + + + + User locale + + + + Centimeters + Centimètres + + + Millimeters + + + + Inches + Pouces + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_he_IL.ts b/share/translations/seamly2d_he_IL.ts index a2cafac958b1..fb2b69aec1a9 100644 --- a/share/translations/seamly2d_he_IL.ts +++ b/share/translations/seamly2d_he_IL.ts @@ -8646,6 +8646,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9808,6 +9820,72 @@ You can change this setting in the SeamlyMe preferences. + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + + + + Do not show again + + + + User locale + + + + Centimeters + סנטימטרים + + + Millimeters + + + + Inches + + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_id_ID.ts b/share/translations/seamly2d_id_ID.ts index 4a9d20561b74..b72ff9e591e8 100644 --- a/share/translations/seamly2d_id_ID.ts +++ b/share/translations/seamly2d_id_ID.ts @@ -8647,6 +8647,18 @@ Apakah anda ingin menyimpan perubahan anda? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9809,6 +9821,72 @@ You can change this setting in the SeamlyMe preferences. Inchi + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + + + + Do not show again + + + + User locale + + + + Centimeters + Centimeter + + + Millimeters + + + + Inches + Inchi + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_it_IT.ts b/share/translations/seamly2d_it_IT.ts index adef9a9d15ac..869d913eefba 100644 --- a/share/translations/seamly2d_it_IT.ts +++ b/share/translations/seamly2d_it_IT.ts @@ -8650,6 +8650,18 @@ Vuoi salvare i cambiamenti? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9812,6 +9824,72 @@ You can change this setting in the SeamlyMe preferences. Pollici + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Unità: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + Lingua di interfaccia: + + + Do not show again + + + + User locale + + + + Centimeters + Centimetri + + + Millimeters + + + + Inches + Pollici + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_nl_NL.ts b/share/translations/seamly2d_nl_NL.ts index 9ea94b9f7e52..d90825592082 100644 --- a/share/translations/seamly2d_nl_NL.ts +++ b/share/translations/seamly2d_nl_NL.ts @@ -3903,7 +3903,7 @@ Do you want to download it? Een nieuwe versie %1 is beschikbaar. Wil je het downloaden? - Unable to get exclusive access to file + Unable to get exclusive access to file %1 Possibly the file is already being downloaded. @@ -4815,7 +4815,7 @@ Possibly the file is already being downloaded. Millimeters - Margins go beyond printing. + Margins go beyond printing. Apply settings anyway? @@ -8593,7 +8593,7 @@ Wil je de veranderingen opslaan? Designer Info - + Info ontwerper Company / Designer Info @@ -8653,7 +8653,19 @@ Wil je de veranderingen opslaan? User locale - Lokalisatie gebruiker + Lokalisatie gebruiker + + + Startup + Startup + + + Welcome + Welkom + + + Do not show welcome screen + Welkomstscherm niet weergeven @@ -9677,19 +9689,19 @@ Wil je de veranderingen opslaan? Startup - + Startup Do not show welcome screen - + Welkomstscherm niet weergeven Decimal separator: - Decimaal scheidingsteken: + Decimaal scheidingsteken: User locale - Lokalisatie gebruiker + Lokalisatie gebruiker @@ -9806,15 +9818,87 @@ Wil je de veranderingen opslaan? Inches - Selects what decimal separator char to use. -When checked the separator for the user's locale is used. + When checked the Welcome window will not be displayed. +You can change this setting in the SeamlyMe preferences. + Als deze optie is aangevinkt, wordt het welkomstscherm niet weergegeven. +Je kunt deze instelling wijzigen in de SeamlyMe-voorkeuren. + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. When unchecked the period is used. - + Selecteert welk decimaal scheidingsteken moet worden gebruikt. +Indien aangevinkt wordt het scheidingsteken voor de locale van de gebruiker gebruikt. +Als deze optie niet is aangevinkt, wordt de punt gebruikt. + + + SeamlyWelcomeDialog - When checked the Welcome window will not be displayed. -You can change this setting in the SeamlyMe preferences. - + Welcome + Welkom + + + Welcome to Seamly2D + Welkom bij Seamly2D + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + Kies de eenheden, het decimaalscheidingsteken en de taal van je voorkeur. (Je kunt deze later wijzigen.) + + + Units: + Eenheden: + + + Sets the default units for a new measurement file. + Stelt de standaardeenheden in voor een nieuw meetbestand. + + + Decimal separator: + Decimaal scheidingsteken: + + + GUI language: + GUI taal: + + + Do not show again + Niet meer weergeven + + + User locale + Lokalisatie gebruiker + + + Centimeters + Centimeters + + + Millimeters + Millimeters + + + Inches + Inches + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + Selecteert welk decimaal scheidingsteken moet worden gebruikt. +Indien aangevinkt wordt het scheidingsteken voor de locale van de gebruiker gebruikt. +Als deze optie niet is aangevinkt, wordt de punt gebruikt. + + + Sets the language used for Seamly2D. + Stelt de taal in die wordt gebruikt voor Seamly2D. + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + Als deze optie is aangevinkt, wordt het welkomstvenster niet weergegeven. +Je kunt deze instelling wijzigen in de Seamly2D voorkeuren. diff --git a/share/translations/seamly2d_pt_BR.ts b/share/translations/seamly2d_pt_BR.ts index c289ee5c921a..1d16d5af41ea 100644 --- a/share/translations/seamly2d_pt_BR.ts +++ b/share/translations/seamly2d_pt_BR.ts @@ -8646,6 +8646,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9808,6 +9820,72 @@ You can change this setting in the SeamlyMe preferences. Polegadas + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Unidades: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + Linguagem GUI: + + + Do not show again + + + + User locale + + + + Centimeters + + + + Millimeters + + + + Inches + Polegadas + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_ro_RO.ts b/share/translations/seamly2d_ro_RO.ts index fc55257f363c..ce0d3d52dee9 100644 --- a/share/translations/seamly2d_ro_RO.ts +++ b/share/translations/seamly2d_ro_RO.ts @@ -8646,6 +8646,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9808,6 +9820,72 @@ You can change this setting in the SeamlyMe preferences. Inci + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Unități: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + Limbaj GUI: + + + Do not show again + + + + User locale + + + + Centimeters + Centimetrii + + + Millimeters + + + + Inches + Inci + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_ru_RU.ts b/share/translations/seamly2d_ru_RU.ts index 0ab3b1d98b08..38c987ba503f 100644 --- a/share/translations/seamly2d_ru_RU.ts +++ b/share/translations/seamly2d_ru_RU.ts @@ -3927,10 +3927,12 @@ Do you want to download it? Хотите скачать его? - Unable to get exclusive access to file + Unable to get exclusive access to file %1 Possibly the file is already being downloaded. - + Невозможно получить эксклюзивный доступ к файлу +%1 +Возможно, файл уже загружается. @@ -4840,10 +4842,12 @@ Possibly the file is already being downloaded. Миллиметры - Margins go beyond printing. + Margins go beyond printing. Apply settings anyway? - + Поля выходят за рамки печати. + +Применять настройки в любом случае? @@ -8681,6 +8685,18 @@ Do you want to save your changes? Email format is not valid. Формат электронной почты не соответствует действительности. + + Startup + Стартап + + + Welcome + Добро пожаловать + + + Do not show welcome screen + Не показывать экран приветствия + PreferencesGraphicsViewPage @@ -9833,15 +9849,87 @@ Do you want to save your changes? Дюймы - Selects what decimal separator char to use. -When checked the separator for the user's locale is used. + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. When unchecked the period is used. - + Выбирает, какой десятичный разделитель использовать. +Если флажок установлен, используется разделитель для локали пользователя. +Если флажок снят, используется точка. - When checked the Welcome window will not be displayed. + When checked the Welcome window will not be displayed. You can change this setting in the SeamlyMe preferences. - + Если флажок установлен, окно приветствия не будет отображаться. +Эту настройку можно изменить в настройках SeamlyMe. + + + + SeamlyWelcomeDialog + + Welcome + Добро пожаловать + + + Welcome to Seamly2D + Добро пожаловать в Seamly2D + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + Выберите желаемые единицы измерения, десятичный разделитель и язык. (Вы можете изменить их позже.) + + + Units: + Единицы измерения: + + + Sets the default units for a new measurement file. + Устанавливает единицы измерения по умолчанию для нового файла измерений. + + + Decimal separator: + Десятичный Разделитель: + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + Выбирает, какой десятичный разделитель использовать. +Если флажок установлен, используется разделитель для локали пользователя. +Если флажок снят, используется точка. + + + GUI language: + Язык интерфейса: + + + Do not show again + Больше не показывать + + + User locale + Пользовательская локаль + + + Centimeters + Сантиметры + + + Millimeters + Миллиметры + + + Inches + Дюймы + + + Sets the language used for Seamly2D. + Устанавливает язык, используемый для Seamly2D. + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + Если флажок установлен, окно приветствия не будет отображаться. +Эту настройку можно изменить в настройках Seamly2D. diff --git a/share/translations/seamly2d_uk_UA.ts b/share/translations/seamly2d_uk_UA.ts index 063121b557dd..d915c263d9ef 100644 --- a/share/translations/seamly2d_uk_UA.ts +++ b/share/translations/seamly2d_uk_UA.ts @@ -8649,6 +8649,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9811,6 +9823,72 @@ You can change this setting in the SeamlyMe preferences. Дюйми + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + Одинці виміру: + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + Мова інтерфейсу: + + + Do not show again + + + + User locale + + + + Centimeters + Сантиметри + + + Millimeters + + + + Inches + Дюйми + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/share/translations/seamly2d_zh_CN.ts b/share/translations/seamly2d_zh_CN.ts index d5dc6c7692c7..759b25574e6f 100644 --- a/share/translations/seamly2d_zh_CN.ts +++ b/share/translations/seamly2d_zh_CN.ts @@ -8646,6 +8646,18 @@ Do you want to save your changes? User locale + + Startup + + + + Welcome + + + + Do not show welcome screen + + PreferencesGraphicsViewPage @@ -9808,6 +9820,72 @@ You can change this setting in the SeamlyMe preferences. 英寸 + + SeamlyWelcomeDialog + + Welcome + + + + Welcome to Seamly2D + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + + Units: + + + + Sets the default units for a new measurement file. + + + + Decimal separator: + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + + GUI language: + GUI语言: + + + Do not show again + + + + User locale + + + + Centimeters + 公分 + + + Millimeters + + + + Inches + 英寸 + + + Sets the language used for Seamly2D. + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + SetPieceColor diff --git a/src/app/seamly2d/core/vapplication.cpp b/src/app/seamly2d/core/vapplication.cpp index eb8faec72065..ecceda143c5e 100644 --- a/src/app/seamly2d/core/vapplication.cpp +++ b/src/app/seamly2d/core/vapplication.cpp @@ -589,7 +589,7 @@ void VApplication::InitOptions() if (VApplication::IsGUIMode())// By default console version uses system locale { - loadTranslations(Seamly2DSettings()->GetLocale()); + loadTranslations(Seamly2DSettings()->getLocale()); } static const char * GENERIC_ICON_TO_CHECK = "document-open"; diff --git a/src/app/seamly2d/core/vapplication.h b/src/app/seamly2d/core/vapplication.h index cc52265f2382..829ce472743f 100644 --- a/src/app/seamly2d/core/vapplication.h +++ b/src/app/seamly2d/core/vapplication.h @@ -53,10 +53,10 @@ #define VAPPLICATION_H #include "../vmisc/vabstractapplication.h" +#include "../vmisc/vsettings.h" #include "../options.h" #include "../vwidgets/vmaingraphicsview.h" #include "../vpatterndb/vtranslatevars.h" -#include "vsettings.h" #include "vcmdexport.h" class VApplication;// use in define diff --git a/src/app/seamly2d/core/vformulaproperty.cpp b/src/app/seamly2d/core/vformulaproperty.cpp index 6e10de25ba32..fa3e4e0ec896 100644 --- a/src/app/seamly2d/core/vformulaproperty.cpp +++ b/src/app/seamly2d/core/vformulaproperty.cpp @@ -67,7 +67,7 @@ VFormulaProperty::VFormulaProperty(const QString &name) VPE::PlainTextProperty *tmpFormula = new VPE::PlainTextProperty(tr("Formula:")); addChild(tmpFormula); tmpFormula->setUpdateBehaviour(true, false); - tmpFormula->setOsSeparator(qApp->Settings()->GetOsSeparator()); + tmpFormula->setOsSeparator(qApp->Settings()->getOsSeparator()); setValue(0); } diff --git a/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.cpp b/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.cpp index 7bbb0fa19fe8..325d8fc7efd8 100644 --- a/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.cpp +++ b/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.cpp @@ -200,6 +200,9 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent) m_defaultExportFormatChanged = true; }); + //-------------------- Startup + ui->showWelcome_CheckBox->setChecked(qApp->Seamly2DSettings()->getShowWelcome()); + // Language InitLanguages(ui->langCombo); connect(ui->langCombo, static_cast(&QComboBox::currentIndexChanged), this, [this]() @@ -209,7 +212,7 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent) // Decimal separator setup ui->osOptionCheck->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint())); - ui->osOptionCheck->setChecked(qApp->Seamly2DSettings()->GetOsSeparator()); + ui->osOptionCheck->setChecked(qApp->Seamly2DSettings()->getOsSeparator()); // Unit setup InitUnits(); @@ -219,7 +222,7 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent) }); SetLabelComboBox(VApplication::LabelLanguages()); - index = ui->labelCombo->findData(qApp->Seamly2DSettings()->GetLabelLanguage()); + index = ui->labelCombo->findData(qApp->Seamly2DSettings()->getLabelLanguage()); if (index == -1) { index = ui->labelCombo->findData("en"); @@ -270,7 +273,7 @@ void PreferencesConfigurationPage::Apply() /* Maximum number of commands in undo stack may only be set when the undo stack is empty, since setting it on a * non-empty stack might delete the command at the current index. Calling setUndoLimit() on a non-empty stack * prints a warning and does nothing.*/ - settings->SetUndoCount(ui->undoCount_SpinBox->value()); + settings->setUndoCount(ui->undoCount_SpinBox->value()); if (m_selectionSoundChanged) { const QString locale = qvariant_cast(ui->selectionSound_ComboBox->currentText()); @@ -280,7 +283,7 @@ void PreferencesConfigurationPage::Apply() settings->setConfirmItemDelete(ui->confirmItemDelete_CheckBox->isChecked()); settings->setConfirmFormatRewriting(ui->confirmFormatRewriting_CheckBox->isChecked()); - settings->SetAutosaveState(ui->autoSave_CheckBox->isChecked()); + settings->setAutosaveState(ui->autoSave_CheckBox->isChecked()); settings->setAutosaveInterval(ui->autoInterval_Spinbox->value()); QTimer *autoSaveTimer = qApp->getAutoSaveTimer(); @@ -297,13 +300,13 @@ void PreferencesConfigurationPage::Apply() m_defaultExportFormatChanged = false; } - settings->SetOsSeparator(ui->osOptionCheck->isChecked()); - //settings->SetSendReportState(ui->sendReportCheck->isChecked()); + settings->setShowWelcome(ui->showWelcome_CheckBox->isChecked()); + settings->setOsSeparator(ui->osOptionCheck->isChecked()); if (m_langChanged) { const QString locale = qvariant_cast(ui->langCombo->currentData()); - settings->SetLocale(locale); + settings->setLocale(locale); m_langChanged = false; qApp->loadTranslations(locale); @@ -320,7 +323,7 @@ void PreferencesConfigurationPage::Apply() if (m_labelLangChanged) { const QString locale = qvariant_cast(ui->labelCombo->currentData()); - settings->SetLabelLanguage(locale); + settings->setLabelLanguage(locale); m_labelLangChanged = false; } if (m_moveSuffixChanged) diff --git a/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.ui b/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.ui index 902c011e74c2..4128025ca358 100644 --- a/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.ui +++ b/src/app/seamly2d/dialogs/configpages/preferencesconfigurationpage.ui @@ -61,7 +61,7 @@ QTabWidget::West - 0 + 3 @@ -1153,9 +1153,46 @@ - Language + Startup + + + + + 0 + 0 + + + + + 10 + true + + + + Welcome + + + + + + + 10 + false + + + + Do not show welcome screen + + + true + + + + + + @@ -1172,7 +1209,7 @@ - 9 + 10 true @@ -1377,22 +1414,22 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/src/app/seamly2d/dialogs/dialogaboutapp.cpp b/src/app/seamly2d/dialogs/dialogaboutapp.cpp index d9ed4cce7b28..f68ab60e3d16 100644 --- a/src/app/seamly2d/dialogs/dialogaboutapp.cpp +++ b/src/app/seamly2d/dialogs/dialogaboutapp.cpp @@ -80,7 +80,7 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) : //Limit dialog height to 80% of screen size setMaximumHeight(qRound(QGuiApplication::primaryScreen()->availableGeometry().height() * .8)); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QString revision = BUILD_REVISION; if (revision == QString("unknown")) diff --git a/src/app/seamly2d/dialogs/dialoglayoutprogress.cpp b/src/app/seamly2d/dialogs/dialoglayoutprogress.cpp index 13785a70eddf..9a9ba57f1463 100644 --- a/src/app/seamly2d/dialogs/dialoglayoutprogress.cpp +++ b/src/app/seamly2d/dialogs/dialoglayoutprogress.cpp @@ -65,7 +65,7 @@ DialogLayoutProgress::DialogLayoutProgress(int count, QWidget *parent) { ui->setupUi(this); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); ui->progressBar->setMaximum(maxCount); ui->progressBar->setValue(0); diff --git a/src/app/seamly2d/dialogs/dialognewpattern.cpp b/src/app/seamly2d/dialogs/dialognewpattern.cpp index 1587452e0f32..c53a71b2a49f 100644 --- a/src/app/seamly2d/dialogs/dialognewpattern.cpp +++ b/src/app/seamly2d/dialogs/dialognewpattern.cpp @@ -75,7 +75,7 @@ DialogNewPattern::DialogNewPattern(VContainer *data, const QString &patternPiece ui->lineEditName->setClearButtonEnabled(true); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QRect position = this->frameGeometry(); position.moveCenter(QGuiApplication::primaryScreen()->availableGeometry().center()); diff --git a/src/app/seamly2d/dialogs/dialogpatternproperties.cpp b/src/app/seamly2d/dialogs/dialogpatternproperties.cpp index ff13fe871551..f5c62362a567 100644 --- a/src/app/seamly2d/dialogs/dialogpatternproperties.cpp +++ b/src/app/seamly2d/dialogs/dialogpatternproperties.cpp @@ -108,7 +108,7 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat SCASSERT(doc != nullptr) VSettings *settings = qApp->Seamly2DSettings(); - settings->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + settings->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); if (qApp->getFilePath().isEmpty()) { diff --git a/src/app/seamly2d/dialogs/dialogpreferences.cpp b/src/app/seamly2d/dialogs/dialogpreferences.cpp index 944e0bce25ff..38caf6a401d2 100644 --- a/src/app/seamly2d/dialogs/dialogpreferences.cpp +++ b/src/app/seamly2d/dialogs/dialogpreferences.cpp @@ -82,7 +82,7 @@ DialogPreferences::DialogPreferences(QWidget *parent) //Limit dialog height to 80% of screen size setMaximumHeight(qRound(QGuiApplication::primaryScreen()->availableGeometry().height() * .8)); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QPushButton *ok_Button = ui->buttonBox->button(QDialogButtonBox::Ok); SCASSERT(ok_Button != nullptr) @@ -178,7 +178,7 @@ void DialogPreferences::Apply() m_patternPage->initDefaultSeamAllowance(); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); emit updateProperties(); setResult(QDialog::Accepted); } diff --git a/src/app/seamly2d/dialogs/dialogs.pri b/src/app/seamly2d/dialogs/dialogs.pri index 3db16df3ee48..ec3898ebde3c 100644 --- a/src/app/seamly2d/dialogs/dialogs.pri +++ b/src/app/seamly2d/dialogs/dialogs.pri @@ -23,7 +23,8 @@ HEADERS += \ $$PWD/configpages/preferencespatternpage.h \ $$PWD/configpages/preferencespathpage.h \ $$PWD/configpages/preferencesgraphicsviewpage.h \ - $$PWD/dialogdatetimeformats.h + $$PWD/dialogdatetimeformats.h \ + $$PWD/welcome_dialog.h SOURCES += \ $$PWD/abstractlayout_dialog.cpp \ @@ -46,7 +47,8 @@ SOURCES += \ $$PWD/configpages/preferencespatternpage.cpp \ $$PWD/configpages/preferencespathpage.cpp \ $$PWD/configpages/preferencesgraphicsviewpage.cpp \ - $$PWD/dialogdatetimeformats.cpp + $$PWD/dialogdatetimeformats.cpp \ + $$PWD/welcome_dialog.cpp FORMS += \ $$PWD/calculator_dialog.ui \ @@ -68,4 +70,5 @@ FORMS += \ $$PWD/configpages/preferencespatternpage.ui \ $$PWD/configpages/preferencespathpage.ui \ $$PWD/configpages/preferencesgraphicsviewpage.ui \ - $$PWD/dialogdatetimeformats.ui + $$PWD/dialogdatetimeformats.ui \ + $$PWD/welcome_dialog.ui diff --git a/src/app/seamly2d/dialogs/dialogvariables.cpp b/src/app/seamly2d/dialogs/dialogvariables.cpp index fd7b30c89027..4e5eb15f9998 100644 --- a/src/app/seamly2d/dialogs/dialogvariables.cpp +++ b/src/app/seamly2d/dialogs/dialogvariables.cpp @@ -105,7 +105,7 @@ DialogVariables::DialogVariables(VContainer *data, VPattern *doc, QWidget *paren formulaBaseHeight = ui->formula_PlainTextEdit->height(); ui->formula_PlainTextEdit->installEventFilter(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); qCDebug(vDialog, "Showing variables."); showUnits(); @@ -219,7 +219,7 @@ void DialogVariables::fillCustomVariables(bool freshCall) QString formula; try { - formula = qApp->TrVars()->FormulaToUser(variable->GetFormula(), qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(variable->GetFormula(), qApp->Settings()->getOsSeparator()); } catch (qmu::QmuParserError &error) { @@ -403,7 +403,7 @@ bool DialogVariables::evalVariableFormula(const QString &formula, bool fromUser, // Replace line return character with spaces for calc if exist if (fromUser) { - f = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + f = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } else { @@ -818,7 +818,7 @@ void DialogVariables::saveCustomVariableFormula() try { - const QString formula = qApp->TrVars()->FormulaFromUser(text, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaFromUser(text, qApp->Settings()->getOsSeparator()); doc->SetIncrementFormula(name->text(), formula); } catch (qmu::QmuParserError &error) // Just in case something bad will happen @@ -853,7 +853,7 @@ void DialogVariables::Fx() EditFormulaDialog *dialog = new EditFormulaDialog(variable->GetData(), NULL_ID, this); dialog->setWindowTitle(tr("Edit variable")); dialog->SetFormula(qApp->TrVars()->TryFormulaFromUser(ui->formula_PlainTextEdit->toPlainText().replace("\n", " "), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); const QString postfix = UnitsToStr(qApp->patternUnit(), true); dialog->setPostfix(postfix);//Show unit in dialog label (cm, mm or inch) @@ -908,7 +908,7 @@ bool DialogVariables::eventFilter(QObject *object, QEvent *event) QKeyEvent *keyEvent = static_cast(event); if ((keyEvent->key() == Qt::Key_Period) && (keyEvent->modifiers() & Qt::KeypadModifier)) { - if (qApp->Settings()->GetOsSeparator()) + if (qApp->Settings()->getOsSeparator()) { textEdit->insert(QLocale().decimalPoint()); } @@ -1002,7 +1002,7 @@ void DialogVariables::showCustomVariableDetails() QString formula; try { - formula = qApp->TrVars()->FormulaToUser(variable->GetFormula(), qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(variable->GetFormula(), qApp->Settings()->getOsSeparator()); } catch (qmu::QmuParserError &error) { diff --git a/src/app/seamly2d/dialogs/export_layout_dialog.cpp b/src/app/seamly2d/dialogs/export_layout_dialog.cpp index ee0838d4f914..e182487f25a3 100644 --- a/src/app/seamly2d/dialogs/export_layout_dialog.cpp +++ b/src/app/seamly2d/dialogs/export_layout_dialog.cpp @@ -65,7 +65,7 @@ ExportLayoutDialog::ExportLayoutDialog(int count, Draw mode, const QString &file ui->path_LineEdit->setClearButtonEnabled(true); ui->filename_LineEdit->setClearButtonEnabled(true); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); m_SaveButton = ui->buttonBox->button(QDialogButtonBox::Save); SCASSERT(m_SaveButton != nullptr) diff --git a/src/app/seamly2d/dialogs/history_dialog.cpp b/src/app/seamly2d/dialogs/history_dialog.cpp index 60886772d4da..b177799356f1 100644 --- a/src/app/seamly2d/dialogs/history_dialog.cpp +++ b/src/app/seamly2d/dialogs/history_dialog.cpp @@ -97,7 +97,7 @@ HistoryDialog::HistoryDialog(VContainer *data, VPattern *doc, QWidget *parent) ui->find_LineEdit->installEventFilter(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); fillTable(); initializeTable(); @@ -704,7 +704,7 @@ bool HistoryDialog::eventFilter(QObject *object, QEvent *event) QKeyEvent *keyEvent = static_cast(event); if ((keyEvent->key() == Qt::Key_Period) && (keyEvent->modifiers() & Qt::KeypadModifier)) { - if (qApp->Settings()->GetOsSeparator()) + if (qApp->Settings()->getOsSeparator()) { textEdit->insert(QLocale().decimalPoint()); } diff --git a/src/app/seamly2d/dialogs/layoutsettings_dialog.cpp b/src/app/seamly2d/dialogs/layoutsettings_dialog.cpp index a9289bad9dd3..0fa240c43e97 100644 --- a/src/app/seamly2d/dialogs/layoutsettings_dialog.cpp +++ b/src/app/seamly2d/dialogs/layoutsettings_dialog.cpp @@ -70,7 +70,7 @@ LayoutSettingsDialog::LayoutSettingsDialog(VLayoutGenerator *generator, QWidget ui->setupUi(this); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); //moved from ReadSettings - well...it seems it can be done once only (i.e. constructor) because Init funcs dont //even cleanse lists before adding diff --git a/src/app/seamly2d/dialogs/show_info_dialog.cpp b/src/app/seamly2d/dialogs/show_info_dialog.cpp index e6a602d9d4ae..cc13b9a34ce9 100644 --- a/src/app/seamly2d/dialogs/show_info_dialog.cpp +++ b/src/app/seamly2d/dialogs/show_info_dialog.cpp @@ -70,7 +70,7 @@ //Limit dialog height to 80% of screen size setMaximumHeight(qRound(QGuiApplication::primaryScreen()->availableGeometry().height() * .8)); - qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Seamly2DSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QByteArray byteArray; byteArray.append(doc->GetImage().toUtf8()); diff --git a/src/app/seamly2d/dialogs/welcome_dialog.cpp b/src/app/seamly2d/dialogs/welcome_dialog.cpp new file mode 100644 index 000000000000..bdae8064b68c --- /dev/null +++ b/src/app/seamly2d/dialogs/welcome_dialog.cpp @@ -0,0 +1,133 @@ +// @file welcome_dialog.cpp +// @author Douglas S Caskey +// @date 5 Jan, 2024 +// +// @brief +// @copyright +// This source code is part of the Seamly2D project, a pattern making +// program to create and model patterns of clothing. +// Copyright (C) 2017-2023 Seamly2D project +// All Rights Reserved. +// +// Seamly2D is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Seamly2D. If not, see . + +#include "welcome_dialog.h" +#include "ui_welcome_dialog.h" + +#include "../core/vapplication.h" + +#include +#include + + +//--------------------------------------------------------------------------------------------------------------------- +SeamlyWelcomeDialog::SeamlyWelcomeDialog(QWidget *parent) + : QDialog(parent) + , ui(new Ui::SeamlyWelcomeDialog) + , m_langChanged(false) + , settings(qApp->Seamly2DSettings()) +{ + ui->setupUi(this); + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + + //-------------------- Units setup + initUnits(MeasurementsType::Individual); + + //-------------------- Decimal separator setup + ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint())); + ui->separator_CheckBox->setChecked(settings->getOsSeparator()); + connect(ui->separator_CheckBox, &QCheckBox::stateChanged, this, &SeamlyWelcomeDialog::seperatorChanged); + + //-------------------- Languages setup + InitLanguages(ui->language_ComboBox); + connect(ui->language_ComboBox, static_cast(&QComboBox::currentIndexChanged), + this, [this]() + { + m_langChanged = true; + }); + + ui->doNotShow_CheckBox->setChecked(settings->getShowWelcome()); + + QPushButton *ok_Button = ui->buttonBox->button(QDialogButtonBox::Ok); + SCASSERT(ok_Button != nullptr) + connect(ok_Button, &QPushButton::clicked, this, &SeamlyWelcomeDialog::apply); +} + +//--------------------------------------------------------------------------------------------------------------------- +SeamlyWelcomeDialog::~SeamlyWelcomeDialog() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +// @brief apply apply dialog changes +void SeamlyWelcomeDialog::apply() +{ + settings->SetUnit(qvariant_cast(ui->units_ComboBox->currentData())); + settings->setOsSeparator(ui->separator_CheckBox->isChecked()); + settings->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + settings->setShowWelcome(ui->doNotShow_CheckBox->isChecked()); + + if (m_langChanged) + { + const QString locale = qvariant_cast(ui->language_ComboBox->currentData()); + settings->setLocale(locale); + m_langChanged = false; + } + + done(QDialog::Accepted); +} + +//--------------------------------------------------------------------------------------------------------------------- +// @brief changeEvent handle event changes +// @param type event type +void SeamlyWelcomeDialog::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::LanguageChange) + { + // retranslate designer form (single inheritance approach) + ui->retranslateUi(this); + ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint())); + } + + // remember to call base class implementation + QDialog::changeEvent(event); +} + +// @brief seperatorChanged handle change in decimal seperator +void SeamlyWelcomeDialog::seperatorChanged() +{ + QString seperator = ui->separator_CheckBox->isChecked() ? QString(QLocale().decimalPoint()) + : QString(QLocale::c().decimalPoint()); + + ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(seperator)); +} + + +//--------------------------------------------------------------------------------------------------------------------- +// @brief initUnits initinailize the units combobox +// @param type measurment type +void SeamlyWelcomeDialog::initUnits(const MeasurementsType &type) +{ + ui->units_ComboBox->addItem(tr("Centimeters"), unitCM); + ui->units_ComboBox->addItem(tr("Millimeters"), unitMM); + ui->units_ComboBox->addItem(tr("Inches") , unitINCH); + + // set default unit + const qint32 index = ui->units_ComboBox->findData(settings->GetUnit()); + if (index != -1) + { + ui->units_ComboBox->setCurrentIndex(index); + } +} diff --git a/src/app/seamly2d/dialogs/welcome_dialog.h b/src/app/seamly2d/dialogs/welcome_dialog.h new file mode 100644 index 000000000000..7b4b8c153104 --- /dev/null +++ b/src/app/seamly2d/dialogs/welcome_dialog.h @@ -0,0 +1,60 @@ +// @file welcome_dialog.h +// @author Douglas S Caskey +// @date 5 Jan, 2024 +// +// @brief +// @copyright +// This source code is part of the Seamly2D project, a pattern making +// program to create and model patterns of clothing. +// Copyright (C) 2017-2023 Seamly2D project +// All Rights Reserved. +// +// Seamly2D is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Seamly2D. If not, see . + +#ifndef WELCOME_DIALOG_H +#define WELCOME_DIALOG_H + +#include + +#include "../vmisc/def.h" +#include "../vmisc/vsettings.h" + +namespace Ui +{ + class SeamlyWelcomeDialog; +} + +class SeamlyWelcomeDialog : public QDialog +{ + Q_OBJECT + +public: + explicit SeamlyWelcomeDialog(QWidget *parent = nullptr); + ~SeamlyWelcomeDialog(); + void apply(); + +protected: + virtual void changeEvent(QEvent* event) Q_DECL_OVERRIDE; + void seperatorChanged(); + +private: + Q_DISABLE_COPY(SeamlyWelcomeDialog) + Ui::SeamlyWelcomeDialog *ui; + bool m_langChanged; + VSettings *settings; + + void initUnits(const MeasurementsType &type); +}; + +#endif // WELCOME_DIALOG_H diff --git a/src/app/seamly2d/dialogs/welcome_dialog.ui b/src/app/seamly2d/dialogs/welcome_dialog.ui new file mode 100644 index 000000000000..ce4096783db0 --- /dev/null +++ b/src/app/seamly2d/dialogs/welcome_dialog.ui @@ -0,0 +1,299 @@ + + + SeamlyWelcomeDialog + + + + 0 + 0 + 650 + 450 + + + + + 0 + 0 + + + + + 650 + 450 + + + + Welcome + + + + :/icon/logos/seamly_logo_32.png:/icon/logos/seamly_logo_32.png + + + + + + + + + 0 + 0 + + + + + 70 + 400 + + + + + + + :/icon/logos/seamlyme_vertical.png + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 14 + true + + + + Welcome to Seamly2D + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + 10 + false + + + + Please choose your preferred units, decimal separator, and language. (You can change these later.) + + + true + + + + + + + + 150 + 0 + + + + + 10 + false + + + + Units: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 10 + false + + + + Sets the default units for a new measurement file. + + + + + + + + 150 + 0 + + + + + 10 + false + + + + Decimal separator: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 300 + 0 + + + + + 10 + false + + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. +When unchecked the period is used. + + + < User locale > + + + true + + + + + + + + 150 + 0 + + + + + 10 + false + + + + GUI language: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 300 + 0 + + + + + 10 + false + + + + Sets the language used for Seamly2D. + + + + + + + + + + + + + + + + + 10 + false + + + + When checked the Welcome window will not be displayed. +You can change this setting in the Seamly2D preferences. + + + Do not show again + + + + + + + + 10 + false + + + + true + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + false + + + + + + + + + + + + diff --git a/src/app/seamly2d/main.cpp b/src/app/seamly2d/main.cpp index 830ca6b98281..e525310af30b 100644 --- a/src/app/seamly2d/main.cpp +++ b/src/app/seamly2d/main.cpp @@ -1,27 +1,28 @@ -/*************************************************************************** - * * - * Copyright (C) 2017 Seamly, LLC * - * * - * https://github.com/fashionfreedom/seamly2d * - * * - *************************************************************************** - ** - ** Seamly2D is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Seamly2D 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 General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Seamly2D. If not, see . - ** - ************************************************************************** - - ************************************************************************ +// @file main.cpp +// @author Douglas S Caskey +// @date 5 Jan, 2024 +// +// @brief +// @copyright +// This source code is part of the Seamly2D project, a pattern making +// program to create and model patterns of clothing. +// Copyright (C) 2017-2023 Seamly2D project +// All Rights Reserved. +// +// Seamly2D is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Seamly2D. If not, see . + +/************************************************************************ ** ** @file main.cpp ** @author Roman Telezhynskyi @@ -56,6 +57,7 @@ #include "mainwindow.h" #include "core/vapplication.h" +#include "dialogs/welcome_dialog.h" #include "../vpatterndb/vpiecenode.h" #include @@ -92,9 +94,20 @@ int main(int argc, char *argv[]) #endif //Q_OS_MAC VApplication app(argc, argv); - app.InitOptions(); + auto settings = qApp->Seamly2DSettings(); + //app.loadTranslations(settings->getLocale()); + bool showWelcome = settings->getShowWelcome(); + + if (!showWelcome) + { + SeamlyWelcomeDialog *dialog = new SeamlyWelcomeDialog(); + dialog->setAttribute(Qt::WA_DeleteOnClose, true); + dialog->exec(); + app.loadTranslations(settings->getLocale()); + } + MainWindow w; #if !defined(Q_OS_MAC) app.setWindowIcon(QIcon(":/icon/64x64/icon64x64.png")); diff --git a/src/app/seamly2d/mainwindow.cpp b/src/app/seamly2d/mainwindow.cpp index b7922ac2ad8c..132e9c51f41c 100644 --- a/src/app/seamly2d/mainwindow.cpp +++ b/src/app/seamly2d/mainwindow.cpp @@ -1875,7 +1875,7 @@ void MainWindow::exportToCSVData(const QString &fileName, const DialogExportToCS QString formula; try { - formula = qApp->TrVars()->FormulaToUser(incr->GetFormula(), qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(incr->GetFormula(), qApp->Settings()->getOsSeparator()); } catch (qmu::QmuParserError &error) { diff --git a/src/app/seamly2d/xml/vpattern.cpp b/src/app/seamly2d/xml/vpattern.cpp index 5c6a5c9b1701..a06b53e92ef6 100644 --- a/src/app/seamly2d/xml/vpattern.cpp +++ b/src/app/seamly2d/xml/vpattern.cpp @@ -1205,7 +1205,7 @@ QString VPattern::GetLabelBase(quint32 index) const const QStringList list = VApplication::LabelLanguages(); const QString def = QStringLiteral("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"); QStringList alphabet; - switch (list.indexOf(qApp->Seamly2DSettings()->GetLabelLanguage())) + switch (list.indexOf(qApp->Seamly2DSettings()->getLabelLanguage())) { case 0: // de { diff --git a/src/app/seamlyme/dialogs/configpages/seamlymepreferencesconfigurationpage.cpp b/src/app/seamlyme/dialogs/configpages/seamlymepreferencesconfigurationpage.cpp index 157797a60974..f91748e12d5d 100644 --- a/src/app/seamlyme/dialogs/configpages/seamlymepreferencesconfigurationpage.cpp +++ b/src/app/seamlyme/dialogs/configpages/seamlymepreferencesconfigurationpage.cpp @@ -82,7 +82,7 @@ SeamlyMePreferencesConfigurationPage::SeamlyMePreferencesConfigurationPage(QWidg //-------------------- Decimal separator setup ui->osOption_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint())); - ui->osOption_CheckBox->setChecked(qApp->SeamlyMeSettings()->GetOsSeparator()); + ui->osOption_CheckBox->setChecked(qApp->SeamlyMeSettings()->getOsSeparator()); //---------------------- Pattern making system InitPMSystems(ui->systemCombo); @@ -166,14 +166,14 @@ void SeamlyMePreferencesConfigurationPage::Apply() settings->setShowWelcome(ui->showWelcome_CheckBox->isChecked()); //settings->setShowSplash(ui->showSplash_CheckBox->isChecked()); - settings->SetOsSeparator(ui->osOption_CheckBox->isChecked()); + settings->setOsSeparator(ui->osOption_CheckBox->isChecked()); settings->setToolBarStyle(ui->toolBarStyle_CheckBox->isChecked()); if (m_langChanged || m_systemChanged) { const QString locale = qvariant_cast(ui->langCombo->currentData()); - settings->SetLocale(locale); + settings->setLocale(locale); m_langChanged = false; const QString code = qvariant_cast(ui->systemCombo->currentData()); diff --git a/src/app/seamlyme/dialogs/dialogaboutseamlyme.cpp b/src/app/seamlyme/dialogs/dialogaboutseamlyme.cpp index 10c5d250a180..89bd0b03ea15 100644 --- a/src/app/seamlyme/dialogs/dialogaboutseamlyme.cpp +++ b/src/app/seamlyme/dialogs/dialogaboutseamlyme.cpp @@ -80,7 +80,7 @@ DialogAboutSeamlyMe::DialogAboutSeamlyMe(QWidget *parent) //Limit dialog height to 80% of screen size setMaximumHeight(qRound(QGuiApplication::primaryScreen()->availableGeometry().height() * .8)); - //mApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + //mApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); RetranslateUi(); connect(ui->pushButton_Web_Site, &QPushButton::clicked, this, [this]() diff --git a/src/app/seamlyme/dialogs/dialogseamlymepreferences.cpp b/src/app/seamlyme/dialogs/dialogseamlymepreferences.cpp index ca8c461ebd7e..7fe3c28cb383 100644 --- a/src/app/seamlyme/dialogs/dialogseamlymepreferences.cpp +++ b/src/app/seamlyme/dialogs/dialogseamlymepreferences.cpp @@ -78,7 +78,7 @@ DialogSeamlyMePreferences::DialogSeamlyMePreferences(QWidget *parent) //Limit dialog height to 80% of screen size setMaximumHeight(qRound(QGuiApplication::primaryScreen()->availableGeometry().height() * .8)); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); QPushButton *ok_Button = ui->buttonBox->button(QDialogButtonBox::Ok); SCASSERT(ok_Button != nullptr) @@ -156,7 +156,7 @@ void DialogSeamlyMePreferences::Apply() m_configurationPage->Apply(); m_pathPage->Apply(); - qApp->SeamlyMeSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->SeamlyMeSettings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); emit updateProperties(); setResult(QDialog::Accepted); } diff --git a/src/app/seamlyme/dialogs/me_welcome_dialog.cpp b/src/app/seamlyme/dialogs/me_welcome_dialog.cpp index 155c82aab893..d5cf22b3b86b 100644 --- a/src/app/seamlyme/dialogs/me_welcome_dialog.cpp +++ b/src/app/seamlyme/dialogs/me_welcome_dialog.cpp @@ -48,7 +48,7 @@ SeamlyMeWelcomeDialog::SeamlyMeWelcomeDialog(QWidget *parent) //-------------------- Decimal separator setup ui->separator_CheckBox->setText(tr("User locale") + QString(" (%1)").arg(QLocale().decimalPoint())); - ui->separator_CheckBox->setChecked(settings->GetOsSeparator()); + ui->separator_CheckBox->setChecked(settings->getOsSeparator()); connect(ui->separator_CheckBox, &QCheckBox::stateChanged, this, &SeamlyMeWelcomeDialog::seperatorChanged); //-------------------- Languages setup @@ -77,14 +77,14 @@ SeamlyMeWelcomeDialog::~SeamlyMeWelcomeDialog() void SeamlyMeWelcomeDialog::apply() { settings->SetUnit(qvariant_cast(ui->units_ComboBox->currentData())); - settings->SetOsSeparator(ui->separator_CheckBox->isChecked()); - settings->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + settings->setOsSeparator(ui->separator_CheckBox->isChecked()); + settings->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); settings->setShowWelcome(ui->doNotShow_CheckBox->isChecked()); if (m_langChanged) { const QString locale = qvariant_cast(ui->language_ComboBox->currentData()); - settings->SetLocale(locale); + settings->setLocale(locale); m_langChanged = false; } diff --git a/src/app/seamlyme/main.cpp b/src/app/seamlyme/main.cpp index 2eab6622741c..d1e352bc9064 100644 --- a/src/app/seamlyme/main.cpp +++ b/src/app/seamlyme/main.cpp @@ -86,10 +86,10 @@ int main(int argc, char *argv[]) #endif //Q_OS_MAC MApplication app(argc, argv); - app.InitOptions(); + app.InitOptions(); auto settings = qApp->SeamlyMeSettings(); - app.loadTranslations(settings->GetLocale()); + app.loadTranslations(settings->getLocale()); bool showWelcome = settings->getShowWelcome(); //bool showSplash = settings->getShowSplash(); diff --git a/src/app/seamlyme/mapplication.cpp b/src/app/seamlyme/mapplication.cpp index 0dfa5dd502ee..ce726061dbbd 100644 --- a/src/app/seamlyme/mapplication.cpp +++ b/src/app/seamlyme/mapplication.cpp @@ -667,7 +667,7 @@ void MApplication::ParseCommandLine(const SocketConnection &connection, const QS } } - //loadTranslations(SeamlyMeSettings()->GetLocale()); + //loadTranslations(SeamlyMeSettings()->getLocale()); } const QStringList args = parser.positionalArguments(); diff --git a/src/app/seamlyme/tmainwindow.cpp b/src/app/seamlyme/tmainwindow.cpp index e4a569ecbbf7..d5eb6c332f1c 100644 --- a/src/app/seamlyme/tmainwindow.cpp +++ b/src/app/seamlyme/tmainwindow.cpp @@ -140,7 +140,7 @@ TMainWindow::TMainWindow(QWidget *parent) { ui->setupUi(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); ui->lineEditFind->setClearButtonEnabled(true); ui->lineEditName->setClearButtonEnabled(true); @@ -641,7 +641,7 @@ void TMainWindow::changeEvent(QEvent *event) { if (event->type() == QEvent::LanguageChange) { - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); // retranslate designer form (single inheritance approach) ui->retranslateUi(this); @@ -733,7 +733,7 @@ bool TMainWindow::eventFilter(QObject *object, QEvent *event) } else if ((keyEvent->key() == Qt::Key_Period) && (keyEvent->modifiers() & Qt::KeypadModifier)) { - if (qApp->Settings()->GetOsSeparator()) + if (qApp->Settings()->getOsSeparator()) { plainTextEdit->insertPlainText(QLocale().decimalPoint()); } @@ -752,7 +752,7 @@ bool TMainWindow::eventFilter(QObject *object, QEvent *event) QKeyEvent *keyEvent = static_cast(event); if ((keyEvent->key() == Qt::Key_Period) && (keyEvent->modifiers() & Qt::KeypadModifier)) { - if (qApp->Settings()->GetOsSeparator()) + if (qApp->Settings()->getOsSeparator()) { textEdit->insert(QLocale().decimalPoint()); } @@ -1807,7 +1807,7 @@ void TMainWindow::ShowNewMData(bool fresh) QString formula; try { - formula = qApp->TrVars()->FormulaToUser(meash->GetFormula(), qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(meash->GetFormula(), qApp->Settings()->getOsSeparator()); } catch (qmu::QmuParserError &error) { @@ -1972,7 +1972,7 @@ void TMainWindow::SaveMValue() try { - const QString formula = qApp->TrVars()->FormulaFromUser(text, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaFromUser(text, qApp->Settings()->getOsSeparator()); individualMeasurements->SetMValue(nameField->data(Qt::UserRole).toString(), formula); } catch (qmu::QmuParserError &error) // Just in case something bad will happen @@ -2354,7 +2354,7 @@ void TMainWindow::InitWindow() ui->comboBoxGender->setCurrentIndex(index); { - const QLocale dateLocale = QLocale(qApp->Settings()->GetLocale()); + const QLocale dateLocale = QLocale(qApp->Settings()->getLocale()); ui->dateEditBirthDate->setLocale(dateLocale); ui->dateEditBirthDate->setDisplayFormat(dateLocale.dateFormat()); ui->dateEditBirthDate->setDate(individualMeasurements->BirthDate()); @@ -2704,7 +2704,7 @@ void TMainWindow::RefreshTable(bool freshCall) QString formula; try { - formula = qApp->TrVars()->FormulaToUser(meash->GetFormula(), qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(meash->GetFormula(), qApp->Settings()->getOsSeparator()); } catch (qmu::QmuParserError &error) { @@ -2940,7 +2940,7 @@ bool TMainWindow::EvalFormula(const QString &formula, bool fromUser, VContainer QString f; if (fromUser) { - f = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + f = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } else { diff --git a/src/libs/vdxf/dxiface.cpp b/src/libs/vdxf/dxiface.cpp index 73f9631a7348..6101c56c3907 100644 --- a/src/libs/vdxf/dxiface.cpp +++ b/src/libs/vdxf/dxiface.cpp @@ -469,6 +469,6 @@ std::string dx_iface::LocaleToISO() locMap["kk"] = "KOI8-R"; locMap["kk_KZ"] = "KOI8-R"; - QLocale locale(qApp->Settings()->GetLocale()); + QLocale locale(qApp->Settings()->getLocale()); return locMap.value(locale.name().toStdString(), "ISO8859-1"); } diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index 0442f92b1211..f547170fd720 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -66,7 +66,7 @@ QMap PreparePlaceholders(const VAbstractPattern *doc) QMap placeholders; // Pattern tags - QLocale locale(qApp->Settings()->GetLocale()); + QLocale locale(qApp->Settings()->getLocale()); const QString date = locale.toString(QDate::currentDate(), doc->GetLabelDateFormat()); placeholders.insert(pl_date, date); diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index d6089b353706..a65cf63cdbd4 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -819,7 +819,7 @@ void InitLanguages(QComboBox *combobox) } // set default translators and language checked - qint32 index = combobox->findData(qApp->Settings()->GetLocale()); + qint32 index = combobox->findData(qApp->Settings()->getLocale()); if (index != -1) { combobox->setCurrentIndex(index); diff --git a/src/libs/vmisc/share/resources/icon.qrc b/src/libs/vmisc/share/resources/icon.qrc index f958a5a91801..76cfaf9df36d 100644 --- a/src/libs/vmisc/share/resources/icon.qrc +++ b/src/libs/vmisc/share/resources/icon.qrc @@ -148,5 +148,6 @@ icon/32x32/body_scan@2x.png icon/body_scan.png icon/32x32/invert_selection.png + icon/logos/seamlyme_vertical.png diff --git a/src/libs/vmisc/share/resources/icon/svg/seamly2d_banner_vertical.svg b/src/libs/vmisc/share/resources/icon/svg/seamly2d_banner_vertical.svg new file mode 100644 index 000000000000..0989534754c1 --- /dev/null +++ b/src/libs/vmisc/share/resources/icon/svg/seamly2d_banner_vertical.svg @@ -0,0 +1,109 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + SEAMLY + 2D + + Open Source Pattern Design Software + + + + diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index 9b3998199314..48e3651355bc 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -196,7 +196,7 @@ template inline QString VAbstractApplication::LocaleToString(const T &value) { QLocale loc; - qApp->Settings()->GetOsSeparator() ? loc = QLocale() : loc = QLocale::c(); + qApp->Settings()->getOsSeparator() ? loc = QLocale() : loc = QLocale::c(); return loc.toString(value); } diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 69fa907a9dd6..e255a4e26a45 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -557,13 +557,13 @@ void VCommonSettings::setShowSplash(const bool &value) } //--------------------------------------------------------------------------------------------------------------------- -bool VCommonSettings::GetOsSeparator() const +bool VCommonSettings::getOsSeparator() const { return value(settingConfigurationOsSeparator, 1).toBool(); } //--------------------------------------------------------------------------------------------------------------------- -void VCommonSettings::SetOsSeparator(const bool &value) +void VCommonSettings::setOsSeparator(const bool &value) { setValue(settingConfigurationOsSeparator, value); } @@ -575,7 +575,7 @@ bool VCommonSettings::GetAutosaveState() const } //--------------------------------------------------------------------------------------------------------------------- -void VCommonSettings::SetAutosaveState(const bool &value) +void VCommonSettings::setAutosaveState(const bool &value) { setValue(settingConfigurationAutosaveState, value); } @@ -649,13 +649,13 @@ void VCommonSettings::SetSendReportState(const bool &value) } //--------------------------------------------------------------------------------------------------------------------- -QString VCommonSettings::GetLocale() const +QString VCommonSettings::getLocale() const { return value(settingConfigurationLocale, QLocale().name()).toString(); } //--------------------------------------------------------------------------------------------------------------------- -void VCommonSettings::SetLocale(const QString &value) +void VCommonSettings::setLocale(const QString &value) { setValue(settingConfigurationLocale, value); } @@ -1281,7 +1281,7 @@ int VCommonSettings::GetUndoCount() const } //--------------------------------------------------------------------------------------------------------------------- -void VCommonSettings::SetUndoCount(const int &value) +void VCommonSettings::setUndoCount(const int &value) { setValue(settingPatternUndo, value); } diff --git a/src/libs/vmisc/vcommonsettings.h b/src/libs/vmisc/vcommonsettings.h index 572cb45e43bc..64340d3709b4 100644 --- a/src/libs/vmisc/vcommonsettings.h +++ b/src/libs/vmisc/vcommonsettings.h @@ -113,11 +113,11 @@ class VCommonSettings : public QSettings bool getShowSplash() const; void setShowSplash(const bool &value); - bool GetOsSeparator() const; - void SetOsSeparator(const bool &value); + bool getOsSeparator() const; + void setOsSeparator(const bool &value); bool GetAutosaveState() const; - void SetAutosaveState(const bool &value); + void setAutosaveState(const bool &value); int getAutosaveInterval() const; void setAutosaveInterval(const int &value); @@ -134,8 +134,8 @@ class VCommonSettings : public QSettings bool GetSendReportState() const; void SetSendReportState(const bool &value); - QString GetLocale() const; - void SetLocale(const QString &value); + QString getLocale() const; + void setLocale(const QString &value); QString GetPMSystemCode() const; void SetPMSystemCode(const QString &value); @@ -294,7 +294,7 @@ class VCommonSettings : public QSettings void setWebsite(const QString &value); int GetUndoCount() const; - void SetUndoCount(const int &value); + void setUndoCount(const int &value); QString getSound() const; QString getSelectionSound() const; diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index e2414da43f84..2818fce93bc1 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -119,13 +119,13 @@ VSettings::VSettings(Format format, Scope scope, const QString &organization, co } //--------------------------------------------------------------------------------------------------------------------- -QString VSettings::GetLabelLanguage() const +QString VSettings::getLabelLanguage() const { return value(settingConfigurationLabelLanguage, QLocale().bcp47Name()).toString(); } //--------------------------------------------------------------------------------------------------------------------- -void VSettings::SetLabelLanguage(const QString &value) +void VSettings::setLabelLanguage(const QString &value) { setValue(settingConfigurationLabelLanguage, value); } diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index facaad4b43fe..b2990f8ab621 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -72,8 +72,8 @@ class VSettings : public VCommonSettings VSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(), QObject *parent = nullptr); - QString GetLabelLanguage() const; - void SetLabelLanguage(const QString &value); + QString getLabelLanguage() const; + void setLabelLanguage(const QString &value); static QString GetDefPathPattern(); QString GetPathPattern() const; diff --git a/src/libs/vpatterndb/vformula.cpp b/src/libs/vpatterndb/vformula.cpp index 4a254fbe19d8..e86b66cb3b18 100644 --- a/src/libs/vpatterndb/vformula.cpp +++ b/src/libs/vpatterndb/vformula.cpp @@ -75,7 +75,7 @@ VFormula::VFormula() //--------------------------------------------------------------------------------------------------------------------- VFormula::VFormula(const QString &formula, const VContainer *container) - : formula(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())), + : formula(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator())), value(tr("Error")), checkZero(true), data(container), @@ -141,7 +141,7 @@ QString VFormula::GetFormula(FormulaType type) const } else { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } } @@ -152,7 +152,7 @@ void VFormula::SetFormula(const QString &value, FormulaType type) { if (type == FormulaType::ToUser) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); } else { @@ -265,7 +265,7 @@ void VFormula::Eval() try { QScopedPointer cal(new Calculator()); - QString expression = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + QString expression = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); const qreal result = cal->EvalFormula(data->DataVariables(), expression); if (qIsInf(result) || qIsNaN(result)) diff --git a/src/libs/vtools/dialogs/support/dialogundo.cpp b/src/libs/vtools/dialogs/support/dialogundo.cpp index df824d9c4d00..29fab046389c 100644 --- a/src/libs/vtools/dialogs/support/dialogundo.cpp +++ b/src/libs/vtools/dialogs/support/dialogundo.cpp @@ -66,7 +66,7 @@ DialogUndo::DialogUndo(QWidget *parent) { ui->setupUi(this); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); bool opening = qApp->getOpeningPattern(); if (opening) diff --git a/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp b/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp index 636fbf55f69e..29589426dcb7 100644 --- a/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp +++ b/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp @@ -520,7 +520,7 @@ void EditFormulaDialog::resizeEvent(QResizeEvent *event) //--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::SetFormula(const QString &value) { - m_formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + m_formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); m_undoFormula = m_formula; ui->plainTextEditFormula->setPlainText(m_formula); MoveCursorToEnd(ui->plainTextEditFormula); @@ -547,7 +547,7 @@ void EditFormulaDialog::setPostfix(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString EditFormulaDialog::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(m_formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(m_formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp b/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp index e23dc14c7328..86db9e9cd3d4 100644 --- a/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp +++ b/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp @@ -491,7 +491,7 @@ void EditLabelTemplateDialog::InitPlaceholdersMenu() void EditLabelTemplateDialog::InitPlaceholders() { // Pattern tags - QLocale locale(qApp->Settings()->GetLocale()); + QLocale locale(qApp->Settings()->getLocale()); const QString date = locale.toString(QDate::currentDate(), m_doc->GetLabelDateFormat()); m_placeholders.insert(pl_date, qMakePair(tr("Date"), date)); diff --git a/src/libs/vtools/dialogs/tools/dialogalongline.cpp b/src/libs/vtools/dialogs/tools/dialogalongline.cpp index 66b9b0b3dfdc..ad6a1d6bd8e1 100644 --- a/src/libs/vtools/dialogs/tools/dialogalongline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogalongline.cpp @@ -335,7 +335,7 @@ void DialogAlongLine::SetFirstPointId(const quint32 &value) */ void DialogAlongLine::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (formula.length() > 80) { @@ -422,7 +422,7 @@ void DialogAlongLine::SetPointName(const QString &value) */ QString DialogAlongLine::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogarc.cpp b/src/libs/vtools/dialogs/tools/dialogarc.cpp index b46d1110dd37..13c9c35d9ee4 100644 --- a/src/libs/vtools/dialogs/tools/dialogarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarc.cpp @@ -220,7 +220,7 @@ void DialogArc::setCenter(const quint32 &value) */ void DialogArc::setF2(const QString &value) { - f2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + f2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (f2.length() > 80) { @@ -286,7 +286,7 @@ void DialogArc::setLineColor(const QString &value) */ void DialogArc::setF1(const QString &value) { - f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (f1.length() > 80) { @@ -308,7 +308,7 @@ void DialogArc::setF1(const QString &value) */ void DialogArc::setRadius(const QString &value) { - radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (radius.length() > 80) { @@ -586,7 +586,7 @@ quint32 DialogArc::getCenter() const */ QString DialogArc::getRadius() const { - return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -596,7 +596,7 @@ QString DialogArc::getRadius() const */ QString DialogArc::getF1() const { - return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -606,5 +606,5 @@ QString DialogArc::getF1() const */ QString DialogArc::getF2() const { - return qApp->TrVars()->TryFormulaFromUser(f2, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(f2, qApp->Settings()->getOsSeparator()); } diff --git a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp index 46dea56fc712..14dab4c0e1ba 100644 --- a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp @@ -193,13 +193,13 @@ void DialogArcWithLength::SetCenter(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogArcWithLength::GetRadius() const { - return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogArcWithLength::SetRadius(const QString &value) { - radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (radius.length() > 80) { @@ -217,12 +217,12 @@ void DialogArcWithLength::SetRadius(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogArcWithLength::GetF1() const { - return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->getOsSeparator()); } void DialogArcWithLength::SetF1(const QString &value) { - f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (f1.length() > 80) { @@ -240,13 +240,13 @@ void DialogArcWithLength::SetF1(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogArcWithLength::GetLength() const { - return qApp->TrVars()->TryFormulaFromUser(length, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(length, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogArcWithLength::SetLength(const QString &value) { - length = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + length = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (length.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogbisector.cpp b/src/libs/vtools/dialogs/tools/dialogbisector.cpp index 7d74cf2ae1d7..5b3d2c3850e7 100644 --- a/src/libs/vtools/dialogs/tools/dialogbisector.cpp +++ b/src/libs/vtools/dialogs/tools/dialogbisector.cpp @@ -341,7 +341,7 @@ void DialogBisector::setLineColor(const QString &value) */ void DialogBisector::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (formula.length() > 80) { @@ -432,7 +432,7 @@ void DialogBisector::closeEvent(QCloseEvent *event) */ QString DialogBisector::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp index d2cad48883b4..a2571eb9686a 100644 --- a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp @@ -180,13 +180,13 @@ void DialogCurveIntersectAxis::setLineWeight(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogCurveIntersectAxis::GetAngle() const { - return qApp->TrVars()->TryFormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formulaAngle, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogCurveIntersectAxis::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaAngle.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp index 2520a7809879..66daa0f61ee9 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp @@ -210,7 +210,7 @@ void DialogCutArc::setArcId(const quint32 &value) */ void DialogCutArc::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (formula.length() > 80) { @@ -243,7 +243,7 @@ void DialogCutArc::SetPointName(const QString &value) */ QString DialogCutArc::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp index 24c800395992..233cce30e1ee 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp @@ -130,7 +130,7 @@ void DialogCutSpline::SetPointName(const QString &value) */ void DialogCutSpline::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formula.length() > 80) @@ -238,7 +238,7 @@ void DialogCutSpline::ShowVisualization() */ QString DialogCutSpline::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp index d574b0ae5c9b..bb3ca5b33d99 100644 --- a/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp @@ -130,7 +130,7 @@ void DialogCutSplinePath::SetPointName(const QString &value) */ void DialogCutSplinePath::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formula.length() > 80) @@ -238,7 +238,7 @@ void DialogCutSplinePath::ShowVisualization() */ QString DialogCutSplinePath::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp b/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp index 313cd0b0340a..ad4930415a15 100644 --- a/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogellipticalarc.cpp @@ -236,7 +236,7 @@ void DialogEllipticalArc::SetCenter(const quint32 &value) */ QString DialogEllipticalArc::GetRadius1() const { - return qApp->TrVars()->TryFormulaFromUser(radius1, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(radius1, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -246,7 +246,7 @@ QString DialogEllipticalArc::GetRadius1() const */ void DialogEllipticalArc::SetRadius1(const QString &value) { - radius1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + radius1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (radius1.length() > 80) { @@ -268,7 +268,7 @@ void DialogEllipticalArc::SetRadius1(const QString &value) */ QString DialogEllipticalArc::GetRadius2() const { - return qApp->TrVars()->TryFormulaFromUser(radius2, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(radius2, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -278,7 +278,7 @@ QString DialogEllipticalArc::GetRadius2() const */ void DialogEllipticalArc::SetRadius2(const QString &value) { - radius2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + radius2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (radius2.length() > 80) { @@ -300,7 +300,7 @@ void DialogEllipticalArc::SetRadius2(const QString &value) */ QString DialogEllipticalArc::GetF1() const { - return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(f1, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -310,7 +310,7 @@ QString DialogEllipticalArc::GetF1() const */ void DialogEllipticalArc::SetF1(const QString &value) { - f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + f1 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (f1.length() > 80) { @@ -332,7 +332,7 @@ void DialogEllipticalArc::SetF1(const QString &value) */ QString DialogEllipticalArc::GetF2() const { - return qApp->TrVars()->TryFormulaFromUser(f2, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(f2, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -342,7 +342,7 @@ QString DialogEllipticalArc::GetF2() const */ void DialogEllipticalArc::SetF2(const QString &value) { - f2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + f2 = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (f2.length() > 80) { @@ -364,7 +364,7 @@ void DialogEllipticalArc::SetF2(const QString &value) */ QString DialogEllipticalArc::GetRotationAngle() const { - return qApp->TrVars()->TryFormulaFromUser(rotationAngle, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(rotationAngle, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -374,7 +374,7 @@ QString DialogEllipticalArc::GetRotationAngle() const */ void DialogEllipticalArc::SetRotationAngle(const QString &value) { - rotationAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + rotationAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (rotationAngle.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index d7e8c0b8621d..7331201c04b9 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -287,7 +287,7 @@ void DialogEndLine::setLineWeight(const QString &value) */ void DialogEndLine::SetFormula(const QString &value) { - formulaLength = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formulaLength = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaLength.length() > 80) @@ -310,7 +310,7 @@ void DialogEndLine::SetFormula(const QString &value) */ void DialogEndLine::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaAngle.length() > 80) @@ -464,7 +464,7 @@ QString DialogEndLine::getLineType() const */ QString DialogEndLine::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formulaLength, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formulaLength, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -474,7 +474,7 @@ QString DialogEndLine::GetFormula() const */ QString DialogEndLine::GetAngle() const { - return qApp->TrVars()->TryFormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formulaAngle, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp index 5d0675cca129..2fbafaaad2a1 100644 --- a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp @@ -204,13 +204,13 @@ void DialogLineIntersectAxis::setLineColor(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogLineIntersectAxis::GetAngle() const { - return qApp->TrVars()->TryFormulaFromUser(formulaAngle, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formulaAngle, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogLineIntersectAxis::SetAngle(const QString &value) { - formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formulaAngle = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. TODO : see if I can get the max number of caracters in one line // of this PlainTextEdit to change 80 to this value if (formulaAngle.length() > 80) diff --git a/src/libs/vtools/dialogs/tools/dialogmove.cpp b/src/libs/vtools/dialogs/tools/dialogmove.cpp index e73266ecb155..8d808e290adf 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.cpp +++ b/src/libs/vtools/dialogs/tools/dialogmove.cpp @@ -160,13 +160,13 @@ DialogMove::~DialogMove() //--------------------------------------------------------------------------------------------------------------------- QString DialogMove::GetAngle() const { - return qApp->TrVars()->TryFormulaFromUser(angleFormula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(angleFormula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogMove::SetAngle(const QString &value) { - angleFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + angleFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); ui->angle_PlainTextEdit->setPlainText(angleFormula); VisToolMove *operation = qobject_cast(vis); @@ -179,13 +179,13 @@ void DialogMove::SetAngle(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogMove::GetLength() const { - return qApp->TrVars()->TryFormulaFromUser(lengthFormula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(lengthFormula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogMove::SetLength(const QString &value) { - lengthFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + lengthFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); ui->length_PlainTextEdit->setPlainText(lengthFormula); VisToolMove *operation = qobject_cast(vis); @@ -198,13 +198,13 @@ void DialogMove::SetLength(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogMove::getRotation() const { - return qApp->TrVars()->TryFormulaFromUser(rotationFormula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(rotationFormula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogMove::setRotation(const QString &value) { - rotationFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + rotationFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); ui->rotation_PlainTextEdit->setPlainText(rotationFormula); VisToolMove *operation = qobject_cast(vis); @@ -287,8 +287,8 @@ void DialogMove::ShowDialog(bool click) if (operation->LengthValue() > 0) { - angleFormula = qApp->TrVars()->FormulaToUser(operation->Angle(), qApp->Settings()->GetOsSeparator()); - lengthFormula = qApp->TrVars()->FormulaToUser(operation->Length(), qApp->Settings()->GetOsSeparator()); + angleFormula = qApp->TrVars()->FormulaToUser(operation->Angle(), qApp->Settings()->getOsSeparator()); + lengthFormula = qApp->TrVars()->FormulaToUser(operation->Length(), qApp->Settings()->getOsSeparator()); operation->SetAngle(angleFormula); operation->SetLength(lengthFormula); diff --git a/src/libs/vtools/dialogs/tools/dialognormal.cpp b/src/libs/vtools/dialogs/tools/dialognormal.cpp index b245f39648d2..5be65be6a3ef 100644 --- a/src/libs/vtools/dialogs/tools/dialognormal.cpp +++ b/src/libs/vtools/dialogs/tools/dialognormal.cpp @@ -314,7 +314,7 @@ void DialogNormal::SetAngle(const qreal &value) */ void DialogNormal::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (formula.length() > 80) { @@ -401,7 +401,7 @@ void DialogNormal::SetPointName(const QString &value) */ QString DialogNormal::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp index 2ea8a4d1e1fa..3dba3375bba7 100644 --- a/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp @@ -313,7 +313,7 @@ void DialogPointOfContact::setCenter(const quint32 &value) */ void DialogPointOfContact::setRadius(const QString &value) { - radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + radius = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (radius.length() > 80) { @@ -346,7 +346,7 @@ void DialogPointOfContact::SetPointName(const QString &value) */ QString DialogPointOfContact::getRadius() const { - return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(radius, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index 36f88ca6f11c..2c60e9afef3c 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -146,13 +146,13 @@ void DialogRotation::setOriginPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogRotation::GetAngle() const { - return qApp->TrVars()->TryFormulaFromUser(angleFormula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(angleFormula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void DialogRotation::SetAngle(const QString &value) { - angleFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + angleFormula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); ui->plainTextEditFormula->setPlainText(angleFormula); VisToolRotation *operation = qobject_cast(vis); diff --git a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp index 141724ad5aed..fa6054c43ad2 100644 --- a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp @@ -348,7 +348,7 @@ void DialogShoulderPoint::SetP1Line(const quint32 &value) */ void DialogShoulderPoint::SetFormula(const QString &value) { - formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (formula.length() > 80) { @@ -422,7 +422,7 @@ void DialogShoulderPoint::SetPointName(const QString &value) */ QString DialogShoulderPoint::GetFormula() const { - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp index b0a7efb032dc..caeba8795c2d 100644 --- a/src/libs/vtools/dialogs/tools/dialogspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogspline.cpp @@ -332,12 +332,12 @@ void DialogSpline::FXAngle1() auto dialog = new EditFormulaDialog(data, toolId, this); dialog->setWindowTitle(tr("Edit first control point angle")); QString angle1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(angle1F); dialog->setPostfix(degreeSymbol); if (dialog->exec() == QDialog::Accepted) { - angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (angle1F.length() > 80) { @@ -355,12 +355,12 @@ void DialogSpline::FXAngle2() auto dialog = new EditFormulaDialog(data, toolId, this); dialog->setWindowTitle(tr("Edit second control point angle")); QString angle2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(angle2F); dialog->setPostfix(degreeSymbol); if (dialog->exec() == QDialog::Accepted) { - angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (angle2F.length() > 80) { @@ -378,12 +378,12 @@ void DialogSpline::FXLength1() auto dialog = new EditFormulaDialog(data, toolId, this); dialog->setWindowTitle(tr("Edit first control point length")); QString length1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(length1F); dialog->setPostfix(UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (length1F.length() > 80) { @@ -401,12 +401,12 @@ void DialogSpline::FXLength2() auto dialog = new EditFormulaDialog(data, toolId, this); dialog->setWindowTitle(tr("Edit second control point length")); QString length2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(length2F); dialog->setPostfix(UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (length2F.length() > 80) { @@ -504,7 +504,7 @@ VSpline DialogSpline::CurrentSpline() const const qreal length1 = Visualization::FindLength(length1F, vars); const qreal length2 = Visualization::FindLength(length2F, vars); - const bool separator = qApp->Settings()->GetOsSeparator(); + const bool separator = qApp->Settings()->getOsSeparator(); angle1F = qApp->TrVars()->TryFormulaFromUser(angle1F, separator); angle2F = qApp->TrVars()->TryFormulaFromUser(angle2F, separator); @@ -572,16 +572,16 @@ void DialogSpline::ShowDialog(bool click) spl = VSpline(*GetP1(), path->GetP2(), path->GetP3(), *GetP4()); const QString angle1F = qApp->TrVars()->FormulaToUser(spl.GetStartAngleFormula(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); const QString angle2F = qApp->TrVars()->FormulaToUser(spl.GetEndAngleFormula(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); ui->plainTextEditAngle1F->setPlainText(angle1F); ui->plainTextEditAngle2F->setPlainText(angle2F); ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(spl.GetC1LengthFormula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(spl.GetC2LengthFormula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); if (not data->IsUnique(spl.name())) { @@ -627,17 +627,17 @@ void DialogSpline::SetSpline(const VSpline &spline) setCurrentPointId(ui->comboBoxP4, spl.GetP4().id()); const QString angle1F = qApp->TrVars()->FormulaToUser(spl.GetStartAngleFormula(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); const QString angle2F = qApp->TrVars()->FormulaToUser(spl.GetEndAngleFormula(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); ui->plainTextEditAngle1F->setPlainText(angle1F); ui->plainTextEditAngle2F->setPlainText(angle2F); const QString length1F = qApp->TrVars()->FormulaToUser(spl.GetC1LengthFormula(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); const QString length2F = qApp->TrVars()->FormulaToUser(spl.GetC2LengthFormula(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); ui->plainTextEditLength1F->setPlainText(length1F); ui->plainTextEditLength2F->setPlainText(length2F); diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index f5ce9da0e414..6c6d80fb53c4 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -409,7 +409,7 @@ void DialogSplinePath::Angle1Changed() try { - p.SetAngle1(angle1, qApp->TrVars()->FormulaFromUser(angle1F, qApp->Settings()->GetOsSeparator())); + p.SetAngle1(angle1, qApp->TrVars()->FormulaFromUser(angle1F, qApp->Settings()->getOsSeparator())); } catch (qmu::QmuParserError &error) { @@ -425,7 +425,7 @@ void DialogSplinePath::Angle1Changed() { ui->plainTextEditAngle2F->blockSignals(true); ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalAngle2(); ui->plainTextEditAngle2F->blockSignals(false); } @@ -452,7 +452,7 @@ void DialogSplinePath::Angle2Changed() try { - p.SetAngle2(angle2, qApp->TrVars()->FormulaFromUser(angle2F, qApp->Settings()->GetOsSeparator())); + p.SetAngle2(angle2, qApp->TrVars()->FormulaFromUser(angle2F, qApp->Settings()->getOsSeparator())); } catch (qmu::QmuParserError &error) { @@ -468,7 +468,7 @@ void DialogSplinePath::Angle2Changed() { ui->plainTextEditAngle1F->blockSignals(true); ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalAngle1(); ui->plainTextEditAngle1F->blockSignals(false); } @@ -495,7 +495,7 @@ void DialogSplinePath::Length1Changed() try { - p.SetLength1(length1, qApp->TrVars()->FormulaFromUser(length1F, qApp->Settings()->GetOsSeparator())); + p.SetLength1(length1, qApp->TrVars()->FormulaFromUser(length1F, qApp->Settings()->getOsSeparator())); } catch (qmu::QmuParserError &error) { @@ -529,7 +529,7 @@ void DialogSplinePath::Length2Changed() try { - p.SetLength2(length2, qApp->TrVars()->FormulaFromUser(length2F, qApp->Settings()->GetOsSeparator())); + p.SetLength2(length2, qApp->TrVars()->FormulaFromUser(length2F, qApp->Settings()->getOsSeparator())); } catch (qmu::QmuParserError &error) { @@ -550,13 +550,13 @@ void DialogSplinePath::FXAngle1() dialog->setWindowTitle(tr("Edit first control point angle")); QString angle1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText().replace("\n", " "), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(angle1F); dialog->setPostfix(degreeSymbol); if (dialog->exec() == QDialog::Accepted) { - angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + angle1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (angle1F.length() > 80) { @@ -575,13 +575,13 @@ void DialogSplinePath::FXAngle2() dialog->setWindowTitle(tr("Edit second control point angle")); QString angle2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText().replace("\n", " "), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(angle2F); dialog->setPostfix(degreeSymbol); if (dialog->exec() == QDialog::Accepted) { - angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + angle2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (angle2F.length() > 80) { @@ -600,13 +600,13 @@ void DialogSplinePath::FXLength1() dialog->setWindowTitle(tr("Edit first control point length")); QString length1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText().replace("\n", " "), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(length1F); dialog->setPostfix(UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + length1F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (length1F.length() > 80) { @@ -625,13 +625,13 @@ void DialogSplinePath::FXLength2() dialog->setWindowTitle(tr("Edit second control point length")); QString length2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText().replace("\n", " "), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); dialog->SetFormula(length2F); dialog->setPostfix(UnitsToStr(qApp->patternUnit(), true)); if (dialog->exec() == QDialog::Accepted) { - length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->GetOsSeparator()); + length2F = qApp->TrVars()->FormulaToUser(dialog->GetFormula(), qApp->Settings()->getOsSeparator()); // increase height if needed. if (length2F.length() > 80) { @@ -918,10 +918,10 @@ void DialogSplinePath::DataPoint(const VSplinePoint &p) ui->plainTextEditAngle2F->blockSignals(true); ui->plainTextEditLength2F->blockSignals(true); ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalAngle2(); ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length2Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalLength2(); ui->plainTextEditAngle2F->blockSignals(false); ui->plainTextEditLength2F->blockSignals(false); @@ -957,10 +957,10 @@ void DialogSplinePath::DataPoint(const VSplinePoint &p) ui->plainTextEditAngle1F->blockSignals(true); ui->plainTextEditLength1F->blockSignals(true); ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalAngle1(); ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length1Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalLength1(); ui->plainTextEditAngle1F->blockSignals(false); ui->plainTextEditLength1F->blockSignals(false); @@ -988,13 +988,13 @@ void DialogSplinePath::DataPoint(const VSplinePoint &p) ui->plainTextEditLength2F->blockSignals(true); ui->plainTextEditAngle1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle1Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); ui->plainTextEditAngle2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Angle2Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); ui->plainTextEditLength1F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length1Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); ui->plainTextEditLength2F->setPlainText(qApp->TrVars()->FormulaToUser(p.Length2Formula(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); EvalAngle1(); EvalLength1(); diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index f541e4ae523b..d53d666de66a 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -452,7 +452,7 @@ bool DialogTool::eventFilter(QObject *object, QEvent *event) } else if ((keyEvent->key() == Qt::Key_Period) && (keyEvent->modifiers() & Qt::KeypadModifier)) { - if (qApp->Settings()->GetOsSeparator()) + if (qApp->Settings()->getOsSeparator()) { plainTextEdit->insertPlainText(QLocale().decimalPoint()); } @@ -825,7 +825,7 @@ qreal DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QSt QString formula = text; formula.replace("\n", " "); // Translate to internal look. - formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); QScopedPointer cal(new Calculator()); result = cal->EvalFormula(data->DataVariables(), formula); diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 145e6bb83415..ec4f07c5e11e 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -386,7 +386,7 @@ inline void DialogTool::initializeOkCancel(T *ui) SCASSERT(bCancel != nullptr) connect(bCancel, &QPushButton::clicked, this, &DialogTool::DialogRejected); - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/intersect_circles_dialog.cpp b/src/libs/vtools/dialogs/tools/intersect_circles_dialog.cpp index ccd3c9b09d93..ebcdfe297bf1 100644 --- a/src/libs/vtools/dialogs/tools/intersect_circles_dialog.cpp +++ b/src/libs/vtools/dialogs/tools/intersect_circles_dialog.cpp @@ -168,13 +168,13 @@ void IntersectCirclesDialog::SetSecondCircleCenterId(const quint32 &value) QString IntersectCirclesDialog::GetFirstCircleRadius() const { return qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditCircle1Radius->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void IntersectCirclesDialog::SetFirstCircleRadius(const QString &value) { - const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); ui->plainTextEditCircle1Radius->setPlainText(formula); IntersectCirclesVisual *point = qobject_cast(vis); @@ -188,13 +188,13 @@ void IntersectCirclesDialog::SetFirstCircleRadius(const QString &value) QString IntersectCirclesDialog::GetSecondCircleRadius() const { return qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditCircle2Radius->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void IntersectCirclesDialog::SetSecondCircleRadius(const QString &value) { - const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); ui->plainTextEditCircle2Radius->setPlainText(formula); IntersectCirclesVisual *point = qobject_cast(vis); diff --git a/src/libs/vtools/dialogs/tools/intersect_circletangent_dialog.cpp b/src/libs/vtools/dialogs/tools/intersect_circletangent_dialog.cpp index ada83b9ac968..82bf9eac7d6d 100644 --- a/src/libs/vtools/dialogs/tools/intersect_circletangent_dialog.cpp +++ b/src/libs/vtools/dialogs/tools/intersect_circletangent_dialog.cpp @@ -138,13 +138,13 @@ void IntersectCircleTangentDialog::SetCircleCenterId(const quint32 &value) QString IntersectCircleTangentDialog::GetCircleRadius() const { return qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditRadius->toPlainText(), - qApp->Settings()->GetOsSeparator()); + qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void IntersectCircleTangentDialog::SetCircleRadius(const QString &value) { - const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(value, qApp->Settings()->getOsSeparator()); // increase height if needed. if (formula.length() > 80) { diff --git a/src/libs/vtools/dialogs/tools/piece/dialoginternalpath.cpp b/src/libs/vtools/dialogs/tools/piece/dialoginternalpath.cpp index 7f2277b8dccb..b09f4dc5fbac 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialoginternalpath.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialoginternalpath.cpp @@ -370,7 +370,7 @@ void DialogInternalPath::nodeChanged(int index) { this->expandWidthBeforeFormulaTextEdit(); } - w1Formula = qApp->TrVars()->FormulaToUser(w1Formula, qApp->Settings()->GetOsSeparator()); + w1Formula = qApp->TrVars()->FormulaToUser(w1Formula, qApp->Settings()->getOsSeparator()); ui->beforeWidthFormula_PlainTextEdit->setPlainText(w1Formula); MoveCursorToEnd(ui->beforeWidthFormula_PlainTextEdit); @@ -387,7 +387,7 @@ void DialogInternalPath::nodeChanged(int index) { this->expandWidthAfterFormulaTextEdit(); } - w2Formula = qApp->TrVars()->FormulaToUser(w2Formula, qApp->Settings()->GetOsSeparator()); + w2Formula = qApp->TrVars()->FormulaToUser(w2Formula, qApp->Settings()->getOsSeparator()); ui->afterWidthFormula_PlainTextEdit->setPlainText(w2Formula); MoveCursorToEnd(ui->afterWidthFormula_PlainTextEdit); @@ -1105,7 +1105,7 @@ void DialogInternalPath::setSeamAllowanceWidthFormula(const QString &formula) return; } - const QString width = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator()); + const QString width = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator()); // increase height if needed. if (width.length() > 80) { @@ -1162,7 +1162,7 @@ QString DialogInternalPath::getSeamAllowanceWidthFormula() const { QString width = ui->widthFormula_PlainTextEdit->toPlainText(); width.replace("\n", " "); - return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -1257,7 +1257,7 @@ QString DialogInternalPath::getSeamAllowanceWidthFormulaBefore() const { QString width = ui->beforeWidthFormula_PlainTextEdit->toPlainText(); width.replace("\n", " "); - return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- @@ -1265,7 +1265,7 @@ QString DialogInternalPath::getSeamAllowanceWidthFormulaAfter() const { QString width = ui->afterWidthFormula_PlainTextEdit->toPlainText(); width.replace("\n", " "); - return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/piece/pattern_piece_dialog.cpp b/src/libs/vtools/dialogs/tools/piece/pattern_piece_dialog.cpp index b75b2d2f4b5b..4973388e5966 100644 --- a/src/libs/vtools/dialogs/tools/piece/pattern_piece_dialog.cpp +++ b/src/libs/vtools/dialogs/tools/piece/pattern_piece_dialog.cpp @@ -105,7 +105,7 @@ QString getFormulaFromUser(QPlainTextEdit *textEdit) QString formula = textEdit->toPlainText(); formula.replace("\n", " "); - return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(formula, qApp->Settings()->getOsSeparator()); } } @@ -294,7 +294,7 @@ void PatternPieceDialog::SetPiece(const VPiece &piece) setInLayout(piece.isInLayout()); setPieceLock(piece.isLocked()); - const QString width = qApp->TrVars()->FormulaToUser(piece.getSeamAllowanceWidthFormula(), qApp->Settings()->GetOsSeparator()); + const QString width = qApp->TrVars()->FormulaToUser(piece.getSeamAllowanceWidthFormula(), qApp->Settings()->getOsSeparator()); ui->widthFormula_PlainTextEdit->setPlainText(width); m_saWidth = piece.GetSAWidth(); @@ -1113,7 +1113,7 @@ void PatternPieceDialog::nodeChanged(int index) QString w1Formula = node.GetFormulaSABefore(); enableDefaultButton(ui->beforeDefault_PushButton, w1Formula); - w1Formula = qApp->TrVars()->FormulaToUser(w1Formula, qApp->Settings()->GetOsSeparator()); + w1Formula = qApp->TrVars()->FormulaToUser(w1Formula, qApp->Settings()->getOsSeparator()); ui->beforeWidthFormula_PlainTextEdit->setPlainText(w1Formula); MoveCursorToEnd(ui->beforeWidthFormula_PlainTextEdit); @@ -1124,7 +1124,7 @@ void PatternPieceDialog::nodeChanged(int index) QString w2Formula = node.GetFormulaSAAfter(); enableDefaultButton(ui->afterDefault_PushButton, w2Formula); - w2Formula = qApp->TrVars()->FormulaToUser(w2Formula, qApp->Settings()->GetOsSeparator()); + w2Formula = qApp->TrVars()->FormulaToUser(w2Formula, qApp->Settings()->getOsSeparator()); ui->afterWidthFormula_PlainTextEdit->setPlainText(w2Formula); MoveCursorToEnd(ui->afterWidthFormula_PlainTextEdit); @@ -1340,7 +1340,7 @@ void PatternPieceDialog::nodeAngleChanged(int index) //--------------------------------------------------------------------------------------------------------------------- void PatternPieceDialog::enableDefaultBeforeButton() { - const QString allowance = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->GetOsSeparator()); + const QString allowance = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->getOsSeparator()); ui->beforeWidthFormula_PlainTextEdit->setPlainText(allowance); if (QPushButton *button = qobject_cast(sender())) { @@ -1351,7 +1351,7 @@ void PatternPieceDialog::enableDefaultBeforeButton() //--------------------------------------------------------------------------------------------------------------------- void PatternPieceDialog::enableDefaultAfterButton() { - const QString allowance = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->GetOsSeparator()); + const QString allowance = qApp->TrVars()->FormulaToUser(currentSeamAllowance, qApp->Settings()->getOsSeparator()); ui->afterWidthFormula_PlainTextEdit->setPlainText(allowance); if (QPushButton *button = qobject_cast(sender())) { @@ -1692,7 +1692,7 @@ void PatternPieceDialog::updateGrainlineValues() try { formula.replace("\n", " "); - formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); Calculator calculation; qreal calculatedValue = calculation.EvalFormula(data->DataVariables(), formula); if (qIsInf(calculatedValue) == true || qIsNaN(calculatedValue) == true) @@ -1774,7 +1774,7 @@ void PatternPieceDialog::updatePieceLabelValues() try { formula.replace("\n", " "); - formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); Calculator calculation; qreal calculatedValue = calculation.EvalFormula(data->DataVariables(), formula); if (qIsInf(calculatedValue) == true || qIsNaN(calculatedValue) == true) @@ -1859,7 +1859,7 @@ void PatternPieceDialog::updatePatternLabelValues() try { formula.replace("\n", " "); - formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); Calculator calculation; qreal calculatedValue = calculation.EvalFormula(data->DataVariables(), formula); if (qIsInf(calculatedValue) == true || qIsNaN(calculatedValue) == true) @@ -1983,7 +1983,7 @@ void PatternPieceDialog::editGrainlineFormula() EditFormulaDialog dialog(data, NULL_ID, this); dialog.setWindowTitle(title); - dialog.SetFormula(qApp->TrVars()->TryFormulaFromUser(labelFormula->toPlainText(), qApp->Settings()->GetOsSeparator())); + dialog.SetFormula(qApp->TrVars()->TryFormulaFromUser(labelFormula->toPlainText(), qApp->Settings()->getOsSeparator())); dialog.setCheckZero(checkForZero); if (dialog.exec() == QDialog::Accepted) { @@ -2040,7 +2040,7 @@ void PatternPieceDialog::editPieceLabelFormula() EditFormulaDialog dialog(data, NULL_ID, this); dialog.setWindowTitle(title); - dialog.SetFormula(qApp->TrVars()->TryFormulaFromUser(labelFormula->toPlainText(), qApp->Settings()->GetOsSeparator())); + dialog.SetFormula(qApp->TrVars()->TryFormulaFromUser(labelFormula->toPlainText(), qApp->Settings()->getOsSeparator())); dialog.setCheckZero(checkForZero); if (dialog.exec() == QDialog::Accepted) { @@ -2100,7 +2100,7 @@ void PatternPieceDialog::editPatternLabelFormula() EditFormulaDialog dialog(data, NULL_ID, this); dialog.setWindowTitle(title); - dialog.SetFormula(qApp->TrVars()->TryFormulaFromUser(labelFormula->toPlainText(), qApp->Settings()->GetOsSeparator())); + dialog.SetFormula(qApp->TrVars()->TryFormulaFromUser(labelFormula->toPlainText(), qApp->Settings()->getOsSeparator())); dialog.setCheckZero(checkForZero); if (dialog.exec() == QDialog::Accepted) { @@ -3239,13 +3239,13 @@ QString PatternPieceDialog::getSeamAllowanceWidthFormula() const { QString width = ui->widthFormula_PlainTextEdit->toPlainText(); width.replace("\n", " "); - return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->GetOsSeparator()); + return qApp->TrVars()->TryFormulaFromUser(width, qApp->Settings()->getOsSeparator()); } //--------------------------------------------------------------------------------------------------------------------- void PatternPieceDialog::setSeamAllowanceWidthFormula(const QString &formula) { - const QString width = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator()); + const QString width = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator()); ui->widthFormula_PlainTextEdit->setPlainText(width); PatternPieceVisual *path = qobject_cast(vis); @@ -3294,7 +3294,7 @@ void PatternPieceDialog::setGrainlineAngle(QString angleFormula) angleFormula = QString("0"); } - const QString formula = qApp->TrVars()->FormulaToUser(angleFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(angleFormula, qApp->Settings()->getOsSeparator()); ui->rotationFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->rotationFormula_LineEdit); @@ -3308,7 +3308,7 @@ void PatternPieceDialog::setGrainlineLength(QString lengthFormula) lengthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); } - const QString formula = qApp->TrVars()->FormulaToUser(lengthFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(lengthFormula, qApp->Settings()->getOsSeparator()); ui->lengthFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->lengthFormula_LineEdit); @@ -3322,7 +3322,7 @@ void PatternPieceDialog::setPieceLabelWidth(QString widthFormula) widthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); } - const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->getOsSeparator()); ui->pieceLabelWidthFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->pieceLabelWidthFormula_LineEdit); @@ -3336,7 +3336,7 @@ void PatternPieceDialog::setPieceLabelHeight(QString heightFormula) heightFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); } - const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->getOsSeparator()); ui->pieceLabelHeightFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->pieceLabelHeightFormula_LineEdit); @@ -3350,7 +3350,7 @@ void PatternPieceDialog::setPieceLabelAngle(QString angleFormula) angleFormula = QString("0"); } - const QString formula = qApp->TrVars()->FormulaToUser(angleFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(angleFormula, qApp->Settings()->getOsSeparator()); ui->pieceLabelAngleFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->pieceLabelAngleFormula_LineEdit); @@ -3364,7 +3364,7 @@ void PatternPieceDialog::setPatternLabelWidth(QString widthFormula) widthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); } - const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->getOsSeparator()); ui->patternLabelWidthFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->patternLabelWidthFormula_LineEdit); @@ -3378,7 +3378,7 @@ void PatternPieceDialog::setPatternLabelHeight(QString heightFormula) heightFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); } - const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->getOsSeparator()); ui->patternLabelHeightFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->patternLabelHeightFormula_LineEdit); @@ -3392,7 +3392,7 @@ void PatternPieceDialog::setPatternLabelAngle(QString angleFormula) angleFormula = QString("0"); } - const QString formula = qApp->TrVars()->FormulaToUser(angleFormula, qApp->Settings()->GetOsSeparator()); + const QString formula = qApp->TrVars()->FormulaToUser(angleFormula, qApp->Settings()->getOsSeparator()); ui->patternLabelAngleFormula_LineEdit->setPlainText(formula); MoveCursorToEnd(ui->patternLabelAngleFormula_LineEdit); @@ -3567,6 +3567,6 @@ qreal PatternPieceDialog::getFormulaValue(QPlainTextEdit *text) const Calculator calculation; QString formula = text->toPlainText().simplified(); formula.replace("\n", " "); - formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); return ToPixel(calculation.EvalFormula(data->DataVariables(), formula), *data->GetPatternUnit()); } diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index 8adceea48cd8..0b1b2a5330d5 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -506,9 +506,9 @@ void VToolMove::SetVisualization() SCASSERT(visual != nullptr) visual->setObjects(sourceToObjects(source)); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); - visual->SetLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); - visual->setRotation(qApp->TrVars()->FormulaToUser(formulaRotation, qApp->Settings()->GetOsSeparator())); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->getOsSeparator())); + visual->SetLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->getOsSeparator())); + visual->setRotation(qApp->TrVars()->FormulaToUser(formulaRotation, qApp->Settings()->getOsSeparator())); visual->setOriginPointId(m_originPointId); visual->RefreshGeometry(); } diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 495e18acb651..d0a91ae9e48a 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -349,7 +349,7 @@ void VToolRotation::SetVisualization() visual->setObjects(sourceToObjects(source)); visual->SetOriginPointId(m_originPointId); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->getOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp index 9fb68676d8db..c95fb9dc376d 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp @@ -428,9 +428,9 @@ void VToolArc::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setObject1Id(arc->GetCenter().id()); - visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius(), qApp->Settings()->GetOsSeparator())); - visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1(), qApp->Settings()->GetOsSeparator())); - visual->setF2(trVars->FormulaToUser(arc->GetFormulaF2(), qApp->Settings()->GetOsSeparator())); + visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius(), qApp->Settings()->getOsSeparator())); + visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1(), qApp->Settings()->getOsSeparator())); + visual->setF2(trVars->FormulaToUser(arc->GetFormulaF2(), qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(arc->GetPenStyle())); visual->setLineWeight(arc->getLineWeight()); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp index 22dd411a73a8..0cc50e890065 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp @@ -367,9 +367,9 @@ void VToolArcWithLength::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setObject1Id(arc->GetCenter().id()); - visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius(), qApp->Settings()->GetOsSeparator())); - visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1(), qApp->Settings()->GetOsSeparator())); - visual->setLength(trVars->FormulaToUser(arc->GetFormulaLength(), qApp->Settings()->GetOsSeparator())); + visual->setRadius(trVars->FormulaToUser(arc->GetFormulaRadius(), qApp->Settings()->getOsSeparator())); + visual->setF1(trVars->FormulaToUser(arc->GetFormulaF1(), qApp->Settings()->getOsSeparator())); + visual->setLength(trVars->FormulaToUser(arc->GetFormulaLength(), qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(arc->GetPenStyle())); visual->setLineWeight(arc->getLineWeight()); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp index 95e6d13f03af..235cf0c1afd9 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp @@ -474,12 +474,12 @@ void VToolEllipticalArc::SetVisualization() const VTranslateVars *trVars = qApp->TrVars(); visual->setObject1Id(elArc->GetCenter().id()); - visual->setRadius1(trVars->FormulaToUser(elArc->GetFormulaRadius1(), qApp->Settings()->GetOsSeparator())); - visual->setRadius2(trVars->FormulaToUser(elArc->GetFormulaRadius2(), qApp->Settings()->GetOsSeparator())); - visual->setF1(trVars->FormulaToUser(elArc->GetFormulaF1(), qApp->Settings()->GetOsSeparator())); - visual->setF2(trVars->FormulaToUser(elArc->GetFormulaF2(), qApp->Settings()->GetOsSeparator())); + visual->setRadius1(trVars->FormulaToUser(elArc->GetFormulaRadius1(), qApp->Settings()->getOsSeparator())); + visual->setRadius2(trVars->FormulaToUser(elArc->GetFormulaRadius2(), qApp->Settings()->getOsSeparator())); + visual->setF1(trVars->FormulaToUser(elArc->GetFormulaF1(), qApp->Settings()->getOsSeparator())); + visual->setF2(trVars->FormulaToUser(elArc->GetFormulaF2(), qApp->Settings()->getOsSeparator())); visual->setRotationAngle(trVars->FormulaToUser(elArc->GetFormulaRotationAngle(), - qApp->Settings()->GetOsSeparator())); + qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(elArc->GetPenStyle())); visual->setLineWeight(elArc->getLineWeight()); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp index ed89af338c01..2491dba08250 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp @@ -270,7 +270,7 @@ void VToolCutArc::SetVisualization() SCASSERT(visual != nullptr) visual->setObject1Id(curveCutId); - visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator())); const QSharedPointer curve = VAbstractTool::data.GeometricObject(curveCutId); visual->setLineStyle(lineTypeToPenStyle(curve->GetPenStyle())); @@ -284,7 +284,7 @@ QString VToolCutArc::makeToolTip() const { const QSharedPointer arc = VAbstractTool::data.GeometricObject(curveCutId); - const QString expression = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator()); + const QString expression = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator()); const qreal length = Visualization::FindVal(expression, VAbstractTool::data.DataVariables()); const QString arcStr = tr("Arc"); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp index 9dcea39560fb..06abb672e29d 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp @@ -270,7 +270,7 @@ void VToolCutSpline::SetVisualization() SCASSERT(visual != nullptr) visual->setObject1Id(curveCutId); - visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator())); const QSharedPointer curve = VAbstractTool::data.GeometricObject(curveCutId); visual->setLineStyle(lineTypeToPenStyle(curve->GetPenStyle())); @@ -284,7 +284,7 @@ QString VToolCutSpline::makeToolTip() const { const auto spl = VAbstractTool::data.GeometricObject(curveCutId); - const QString expression = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator()); + const QString expression = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator()); const qreal length = Visualization::FindVal(expression, VAbstractTool::data.DataVariables()); QPointF spl1p2, spl1p3, spl2p2, spl2p3; diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp index 42e671a13f7d..8c7e15fc9a3d 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -357,7 +357,7 @@ void VToolCutSplinePath::SetVisualization() SCASSERT(visual != nullptr) visual->setObject1Id(curveCutId); - visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator())); const QSharedPointer curve = VAbstractTool::data.GeometricObject(curveCutId); visual->setLineStyle(lineTypeToPenStyle(curve->GetPenStyle())); @@ -371,7 +371,7 @@ QString VToolCutSplinePath::makeToolTip() const { const auto splPath = VAbstractTool::data.GeometricObject(curveCutId); - const QString expression = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->GetOsSeparator()); + const QString expression = qApp->TrVars()->FormulaToUser(formula, qApp->Settings()->getOsSeparator()); const qreal length = Visualization::FindVal(expression, VAbstractTool::data.DataVariables()); VSplinePath *splPath1 = nullptr; diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp index 4008a0e9e625..4139c87121c5 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp @@ -183,7 +183,7 @@ void VToolAlongLine::SetVisualization() SCASSERT(visual != nullptr) visual->setObject1Id(basePointId); visual->setObject2Id(secondPointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp index 763e7dc1e2e2..affb476b4820 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp @@ -362,7 +362,7 @@ void VToolBisector::SetVisualization() visual->setObject1Id(firstPointId); visual->setObject2Id(basePointId); visual->setObject3Id(thirdPointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index 003f1fccd4fd..cc3f7253fbc0 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -383,7 +383,7 @@ void VToolCurveIntersectAxis::SetVisualization() visual->setObject1Id(curveId); visual->setAxisPointId(basePointId); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp index 340df6c117d5..e81eab5e6f54 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp @@ -290,8 +290,8 @@ void VToolEndLine::SetVisualization() SCASSERT(visual != nullptr) visual->setObject1Id(basePointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->getOsSeparator())); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 033aebe56900..edf321c2cb6e 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -380,7 +380,7 @@ void VToolLineIntersectAxis::SetVisualization() visual->setObject1Id(firstPointId); visual->setPoint2Id(secondPointId); visual->setAxisPointId(basePointId); - visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->GetOsSeparator())); + visual->SetAngle(qApp->TrVars()->FormulaToUser(formulaAngle, qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp index c17f43372630..8fa5d6b44234 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp @@ -335,7 +335,7 @@ void VToolNormal::SetVisualization() visual->setObject1Id(basePointId); visual->setObject2Id(secondPointId); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->getOsSeparator())); visual->SetAngle(angle); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp index 6e73470ef67a..15443e18fdcb 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp @@ -378,7 +378,7 @@ void VToolShoulderPoint::SetVisualization() visual->setObject1Id(pShoulder); visual->setLineP1Id(basePointId); visual->setLineP2Id(p2Line); - visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->GetOsSeparator())); + visual->setLength(qApp->TrVars()->FormulaToUser(formulaLength, qApp->Settings()->getOsSeparator())); visual->setLineStyle(lineTypeToPenStyle(m_lineType)); visual->setLineWeight(m_lineWeight); visual->RefreshGeometry(); diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp index 909df549efaa..907572a9246f 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp @@ -380,7 +380,7 @@ void VToolPointOfContact::SetVisualization() visual->setObject1Id(firstPointId); visual->setLineP2Id(secondPointId); visual->setRadiusId(center); - visual->setRadius(qApp->TrVars()->FormulaToUser(arcRadius, qApp->Settings()->GetOsSeparator())); + visual->setRadius(qApp->TrVars()->FormulaToUser(arcRadius, qApp->Settings()->getOsSeparator())); visual->RefreshGeometry(); } } diff --git a/src/libs/vtools/visualization/line/operation/vistoolmove.cpp b/src/libs/vtools/visualization/line/operation/vistoolmove.cpp index 4a386bcdfa4c..c32b000cf34d 100644 --- a/src/libs/vtools/visualization/line/operation/vistoolmove.cpp +++ b/src/libs/vtools/visualization/line/operation/vistoolmove.cpp @@ -212,7 +212,7 @@ void VisToolMove::RefreshGeometry() Visualization::toolTip = tr("Length = %1%2, angle = %3°, Shift to constrain angle, " "Mouse click - finish selecting a position") .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(tempLength)), - qApp->Settings()->GetOsSeparator())) + qApp->Settings()->getOsSeparator())) .arg(prefix) .arg(tempAngle); } @@ -221,7 +221,7 @@ void VisToolMove::RefreshGeometry() Visualization::toolTip = tr("Length = %1%2, angle = %3°, rotation angle = %4° Hold SHIFT to constrain angle," "CTRL - change rotation origin point, Mouse click - finish creating") .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(tempLength)), - qApp->Settings()->GetOsSeparator())) + qApp->Settings()->getOsSeparator())) .arg(prefix) .arg(tempAngle) .arg(tempRotation); diff --git a/src/libs/vtools/visualization/line/vistoolendline.cpp b/src/libs/vtools/visualization/line/vistoolendline.cpp index 3af7f8fc4400..596892084f47 100644 --- a/src/libs/vtools/visualization/line/vistoolendline.cpp +++ b/src/libs/vtools/visualization/line/vistoolendline.cpp @@ -106,7 +106,7 @@ void VisToolEndLine::RefreshGeometry() "Hold SHIFT to constrain angle, Press ENTER to finish tool creation") .arg(this->line().angle()) .arg(qApp->TrVars()->FormulaToUser(QString::number(qApp->fromPixel(this->line().length())), - qApp->Settings()->GetOsSeparator())) + qApp->Settings()->getOsSeparator())) .arg(prefix); } diff --git a/src/libs/vtools/visualization/visualization.cpp b/src/libs/vtools/visualization/visualization.cpp index dacac6e17784..2a63a68d0f2a 100644 --- a/src/libs/vtools/visualization/visualization.cpp +++ b/src/libs/vtools/visualization/visualization.cpp @@ -196,7 +196,7 @@ qreal Visualization::FindVal(const QString &expression, // Replace line return with spaces for calc if exist QString formula = expression; formula.replace("\n", " "); - formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->GetOsSeparator()); + formula = qApp->TrVars()->FormulaFromUser(formula, qApp->Settings()->getOsSeparator()); QScopedPointer cal(new Calculator()); val = cal->EvalFormula(vars, formula); diff --git a/src/libs/vwidgets/vabstractmainwindow.cpp b/src/libs/vwidgets/vabstractmainwindow.cpp index f9d9333ac3bc..9b5151c0af71 100644 --- a/src/libs/vwidgets/vabstractmainwindow.cpp +++ b/src/libs/vwidgets/vabstractmainwindow.cpp @@ -116,7 +116,7 @@ void VAbstractMainWindow::ToolBarStyle(QToolBar *bar) //--------------------------------------------------------------------------------------------------------------------- void VAbstractMainWindow::WindowsLocale() { - qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + qApp->Settings()->getOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); } //--------------------------------------------------------------------------------------------------------------------- From b3cb8287e7e0cdd00db3cbc91cd2b0fa4e2eced5 Mon Sep 17 00:00:00 2001 From: DSCaskey <31944718+DSCaskey@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:30:13 -0500 Subject: [PATCH 2/5] cleanup code --- src/app/seamly2d/dialogs/welcome_dialog.ui | 2 +- src/app/seamly2d/main.cpp | 14 +++++++------- src/app/seamly2d/mainwindow.cpp | 2 +- src/app/seamly2d/mainwindow.h | 2 +- src/app/seamlyme/main.cpp | 1 - src/libs/vmisc/share/resources/icon.qrc | 2 +- .../resources/icon/logos/seamly2d_vertical.png | Bin 0 -> 11327 bytes src/libs/vtools/tools/pattern_piece_tool.cpp | 4 ++++ 8 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 src/libs/vmisc/share/resources/icon/logos/seamly2d_vertical.png diff --git a/src/app/seamly2d/dialogs/welcome_dialog.ui b/src/app/seamly2d/dialogs/welcome_dialog.ui index ce4096783db0..47d5b52e030a 100644 --- a/src/app/seamly2d/dialogs/welcome_dialog.ui +++ b/src/app/seamly2d/dialogs/welcome_dialog.ui @@ -50,7 +50,7 @@ - :/icon/logos/seamlyme_vertical.png + :/icon/logos/seamly2d_vertical.png true diff --git a/src/app/seamly2d/main.cpp b/src/app/seamly2d/main.cpp index e525310af30b..02de679138c0 100644 --- a/src/app/seamly2d/main.cpp +++ b/src/app/seamly2d/main.cpp @@ -97,10 +97,10 @@ int main(int argc, char *argv[]) app.InitOptions(); auto settings = qApp->Seamly2DSettings(); - //app.loadTranslations(settings->getLocale()); - bool showWelcome = settings->getShowWelcome(); + // its named showWelcome, but true means "do not show welcome again" and thus we invert it here + bool showWelcome = !settings->getShowWelcome(); - if (!showWelcome) + if (showWelcome) { SeamlyWelcomeDialog *dialog = new SeamlyWelcomeDialog(); dialog->setAttribute(Qt::WA_DeleteOnClose, true); @@ -108,21 +108,21 @@ int main(int argc, char *argv[]) app.loadTranslations(settings->getLocale()); } - MainWindow w; + MainWindow window; #if !defined(Q_OS_MAC) app.setWindowIcon(QIcon(":/icon/64x64/icon64x64.png")); #endif // !defined(Q_OS_MAC) - app.setMainWindow(&w); + app.setMainWindow(&window); int msec = 0; //Before we load pattern show window. if (VApplication::IsGUIMode()) { - w.show(); + window.show(); msec = 15; // set delay for correct the first fitbest zoom } - QTimer::singleShot(msec, &w, SLOT(ProcessCMD())); + QTimer::singleShot(msec, &window, &MainWindow::processCommandLine); return app.exec(); } diff --git a/src/app/seamly2d/mainwindow.cpp b/src/app/seamly2d/mainwindow.cpp index f4431748584e..a1871e50cda0 100644 --- a/src/app/seamly2d/mainwindow.cpp +++ b/src/app/seamly2d/mainwindow.cpp @@ -7106,7 +7106,7 @@ bool MainWindow::setHeight(const QString &text) } //--------------------------------------------------------------------------------------------------------------------- -void MainWindow::ProcessCMD() +void MainWindow::processCommandLine() { const VCommandLinePtr cmd = qApp->CommandLine(); auto args = cmd->OptInputFileNames(); diff --git a/src/app/seamly2d/mainwindow.h b/src/app/seamly2d/mainwindow.h index 045ff99e4679..298285949d91 100644 --- a/src/app/seamly2d/mainwindow.h +++ b/src/app/seamly2d/mainwindow.h @@ -103,7 +103,7 @@ class MainWindow : public MainWindowsNoGUI bool LoadPattern(const QString &fileName, const QString &customMeasureFile = QString()); public slots: - void ProcessCMD(); + void processCommandLine(); void penChanged(Pen pen); virtual void ShowToolTip(const QString &toolTip) Q_DECL_OVERRIDE; diff --git a/src/app/seamlyme/main.cpp b/src/app/seamlyme/main.cpp index c2ad098ca3af..aa4bdc776f09 100644 --- a/src/app/seamlyme/main.cpp +++ b/src/app/seamlyme/main.cpp @@ -101,7 +101,6 @@ int main(int argc, char *argv[]) } QTimer::singleShot(0, &app, &MApplication::processCommandLine); - //app.processCommandLine(); return app.exec(); } diff --git a/src/libs/vmisc/share/resources/icon.qrc b/src/libs/vmisc/share/resources/icon.qrc index 76cfaf9df36d..78643eb16304 100644 --- a/src/libs/vmisc/share/resources/icon.qrc +++ b/src/libs/vmisc/share/resources/icon.qrc @@ -148,6 +148,6 @@ icon/32x32/body_scan@2x.png icon/body_scan.png icon/32x32/invert_selection.png - icon/logos/seamlyme_vertical.png + icon/logos/seamly2d_vertical.png diff --git a/src/libs/vmisc/share/resources/icon/logos/seamly2d_vertical.png b/src/libs/vmisc/share/resources/icon/logos/seamly2d_vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..f2d11d417bf6cadc65cbf64b7fb8b6fe237e4753 GIT binary patch literal 11327 zcmV-FEWp!=P)%Jy)?>%?UlXLDl&;BSJP(5JW{FcgXe@s?Pu!p_8sUZS-XgHNz(l$*T7`AfAZw>`V8qd2Q>zKE8kd=FJ&2oeC^7 z{yqTo20jbC1UwCt0>=Z%859B-GH~2^r;o0`>1YrO5Dt}a&iF5nKe4**L7+zlO|JtI zz-NHI$P5VsuK`~JdI1+&8wkPuPrm8I;b&Lpq3=22oHM>$H>!H#4H+~Ui@dXcgiZ_0 zBgW_P){~*Z$BdbATFunjtb3V9l$P{h=%AA?1|k8Q#E`|w3C9_qN3179eXE9ktbf(W zGKU671*59Z98=k2;Dms;KL<>AAezuQX$v-LZL7{%Pac_eC%rA65yAlzpDx00pKh429al9t@w%@hQXZ5CC8t{=n2EGnlfK1<){TjH>Ed%Y*R@&pOI|FvW z7ah^oL;iPZ<$n(VGmOu`tf?=-=-l|{0%N=J8F=;u-S4_9t^}R{o&@dz-ay`I6YnBy zW)j6t@B_ebrk_X5F_knL#@DJ4J{I02ESt^^jEHy1m>(}9O^UyI_{wya`bw7!AR@FK!xwF19K zq$q&z152$9ik;vO0Iwh-;*E&5;#u1TayN!G0sgfKJNs^0QJ@e z#ZK^U;8bK=Y6jK=7aP~it!kXLL9rA3I3g1M9a*LS4SW*#lW`41SDi$$6MPH8Nqq>> zPW}p+-d7^;_d#HhwL!6OOFNJ$dls+)VL&bhu146(pYR@IEl)?L^3$Zat;b1C=T0d0 zDZLo@8?YC62)G>ZR1Xz9!3~HauN+}7A4Ietix9!0+}fE z1N^}_1_2it#{~$nA4e1bmjKV34SWeMEvewrv*&(GqrQ=k9+releUye-VHfZ_U^znc z4Zw*&Kj0%|LakzJL z2qHv$4|oc(GkqIT(SF9-px6nvVgn)@zY16_C24zcvA@H8kwxng;9OE7VGQ^uvPb{L z+90yK`K{2#?Jpee%3k`RwXHemUcCxY)&WG31?wSXJ9^itfkOUE-3=W;OMv_4BU+8W zBf2X)k^LOb6*W!-&UU$0kL<&ftS5_o(fTQHugkRrLf`q;lWvPv|54QwFR$!9aAbLD z?*XNe9+ja`sRCUJiD*0#Yfr@EZLvgqTT5H>zJrH%tlzrpl_iLV!4HGa7&Bv8|31TG zZZ~Y&wff~Zw>;CyUBSQ=h*q);*@^}rmP0!}Xndw=Ez<}d)UT#?Y63B%5Eb2p;tz-BiCd?n(Y zV>g&z?eTlhS-&I+K7RNIzh3u&%WpWYx-O_gNfKoxJsC4{%HT00r%cv^K2+VtP5WN_95(J9U=k-LI_}Rzp=B9AA071eD$ib*TBfA z>Pc52epC6xMZnL1^NjD$VH-g|grNMm6NgQnoac@)?)VFiuReC%XZ-KX2m_5z(*gB! zh@nQPt(?Mn38Zg;jllu zTN3GUZ186X!XZS)y%-S*zXS|JEQe0mkCYND*PR~4dT>ZEGP0nNaljlV}DdaNG?Z5)Y&OFapW z#*VQ1^@aCs*|8?gaeMQwHFw8i9glo$@~lhT+V<^TT?JHQGk4?>Uqd*qFtR<3L@W@i za0u`K2!RSaT`;j{|J%_mJ6>7rbgk*Y<`r!n?w*8Iy{r55D(`>1>kYZ%2(l=x2mXU_ zVGko}p1%N{URPh?;c&~oLlAZJW!%1J-Qst4zv9Y2_pTVADk}$!4c7Opa1tUKn*Y=z zq=bemuvrcv0KqLsnvNh`jT5%-Ke&Cr%QbqG^(GQ7ALjQPIbasDCoe{bu0T{emm7jccj?-5ZUyxnA#GF|ZP`(B~87h?=Lj<=p8Ach!g}vog9|0dlWaj6MYag{fARm^8y@y(MdoNr) z`sM2#HU*JikW$T_k0{$UGNK@y*L}v{>G8vP=tQ(V*5bJr4;^???SKJ8^AW{r_Sb44 zGb6z5@rLI9n?_?^?8EU`)YHUrYR%M9J<9v6Y(BJe-J#aK2P?|^X8XIQB4G+}7ovnW zr?XXNSHNY)-)a6Hc_BC&Z}YV&)eJvp2%?9|1^-6&^UHuo5%zHaGMyhX?ir1E+14Xd z`)}3<x=kv9*3UAtfT%Cl>K_ex=eqWmFp;PB28FE5_m``!!` zt-bremQB&kfBV>>mc754bkddQ_pKZfG_1W#p^&}IQ#Xxh`vYT0|C25mR(4xdeag%F1X?f3N_(+l_1#Nf-mt9R|L)8YG}b;B^g%3q6&Tya;HndQ>PX1- zpWGgAX=-lXwyqGJ=?a1ijSCPp?I1euI?cdr#I*XJz-N(F((9OQZJ-catE+!;H^(bT z!ji3s!2d4k+r%N@Zfus57ZJaS?&{|6h24mgOGX|HYmxuTM&x}cCOnSBHu&u_X)p;k zkA+B5y<)%wgnzybu{H#PonVbjm3({P6at?|R$z_jxOM?=TaFiS@c(ck*gPI3l^CQu zVhjGO^!Ka{6hiPR9uI8=ZbrP`^69IQ51fH$KisDCZbZwOmL|??gssPauti%JBZ7>u z6;UMr+>N*=3+YN6gIFAnak<`(?9m&sxHbnJVe7F0392~S*g&xUb|7k?Fl0xtMx00P z!9C4lSKwA;Wj6cNiV)}4=j%XxA=*4{@;kO7P9#SI$01Q^OG&vRmLfd%VZ`~g7m^bo zig1;HXy+dzd!jXxDYUCoy*`LYL{6^zcOa{?$wd7Fn{gauq~0NWqMH!|byta@18#+%7JI_yqT);}+pUU(mM zxV9NEQ@*Z6bk;$0-ZIGOKrV|~CPy0o>jQxDRPCxS)bwvTbzWsXqhhaYf1Nx$ppI*!TV##?C2_(3#e&N ze$e(LvR#P5)`~9QvjR*ds$|F2K2w5U#5-QM+aoB! zUA5I@iXlkyl6MdT`9Q?Twh$K?I0(UAxz%KXY9y7EwXZV~EsaLP;ybayUIg!=dz(#v ziS+YXWJ_!{K0)#XWVA{bgJFClVh1+$(uYV9JOZKPI%@+bX~}ebxEygO=+3A@BseF1 zvl)kx7TszkIEH8oPr)OZZ8yUvB=*qBgVqeE?c}4img3!NzKKlRBZwxX0}&|J80Yul zuoq9G`)xHr5kbP~ZFkZQ7UtXW7gpTV zv}L4>0Oxr8#t4M3)`)v?62&&cLy!?`BUPKl30n{qkJ%=PVk6kpn{7cx+6yKxou-v3 zHiAtADZQjCY1pZBu!IS#vSI6#}VKb6nD~V#C(i0FNVFsd?_LHEBp5P|Lab-!+ z2F1Qg{|d1O*9C1*>?6Dg(Q7@42o*a?&q#3qacfHE`zm&VpCT1Z;%3LLLgI^o;wSh) z#LVJ`Lr6O2H00v8RH&n%Apj3!6Oy|D*81N9h}PpaB#7hX!gZ(nz>F?+tGUz(#l9_> zYtW{k4HQ!6v#Wz7{See#dLiN?y$V=>q>0;)sDfNk%!}6DNaVNMbDFW)qKkb>pF?^= zUOTF=1$`F#K0Fx-9CNb}wov41T08a;Ft4#5$E3D)tfX zjbt;m+JOIvSSGGFKGRswVjtnz2(ep`ET!#;7r=aETe}$1cO{X@2(Lr-xvoIa->F9& zSWZLs-)oKYF{B)?S!O#~3NRCb$02*(eMr%!AU4`U<5(oF!71VX7RxNb zgb4hA6rV zLHvJ_g)W;Y?g*lb9))mO`*4myzR~!t`I$W2tUtC8;bQVlcsrRbbY%!rlF4se>-eMq z=!;B`XDLk519PGCss~X<=fEtl<5lvsUDhC(5I5$TXmg>nXHT-C7ZO!E9{J}t8-H7m zlaXm(5Kr3i$osy>gNRIzpemk;xGUnTk@vV@*<{L)_x(OZ)6f+Je*;PG=Y&rg&-%Re zWIn}1a{;;$vFhnOKHCkKA`6}!VNzj)X;~if#RB$0;-CH>QXQvIUg!}-vvC&bgXQ(l z&0FcRFcP_$k0~5>;J1bxmnV5s#0*^KZ+gjKwP{70W2M)v$=F4tQTx!jC3ycO9o z?EaS;$vW{iw!E}KF%031GTrop9;=Z(KGV`C7a#`l!0>w43jJR0M@I8*ax z$QBeuX6|UjJL#JU3+f2#dudGEDZNjq6C+n{LNpX6Blr)$M3Us$5+};lg#dA*RwwWFhS^{w_nxYd=Yb zNe{9)-XMF?FH;;qMj6E9t4SpW9%g(`t89=jPOA-ZA^HfiW&99Z>8=8y87Uj4kk{rN zQWa`VhGUYwQ7$9A8sTT%GI$pn_Z$7V8}X`Lh%C0>BK3aHwl~U@;ATWsb9zBZ35HWi zad}@Ll{CyeV#Ym5WWs5^iYUdFkcuBFR7$BM$ZO(*2alj) zb$J+t@C+xB!CF*|*24ja#Pl}e?Y_=9#sq0xj0FFR&iQD^BF1oEdWwzU5>or@?-2X% zT!dvEOThfm#q|Jfy^TT%1t3{hQjZ|*wptu&vLtT{UiHL(i z7rzc{WmS%PQV$1=MRZ#)xLl7QR)rw1;~s1w@!bU>WF#I(Y)jpy3P8Rw2ua%a6}qT4 z+tDI;JR(P5L19aqbV64W+#4yX`c;l%aA#K#T!RSbS95eyGN++X1cwpE{#puaTr+Ws z@jLs0KOpv`Ay|AY3xz?5#xj@u@<9~lm5CnhT zxId1VYhs9Ls2WKk)=nNH(t9KCWg*1Npaj2w=&n9we7EMN{iyM*FJwty65|jz1F!Iz zY>xzzvG9z5eR-GkM1NL-dm7KY+1eoJqE+Zc=l~KadM7E_HV9e}h9ykrx~gV^qKrHM zsu6cYvm8jik5!0$H(P1#55{vABh?IAkcH~gh*m@sFf&uW7a_MJS9bD5yj>vvMsyQWSIy7kCSL^ivJp87 zk98qm1jiA1*6JDS=Z=^Uf*TM9#qH#4nJvMltC821QfPvoFrH&~T#1lU&R=eClnKFy5ZiFjtb>Incn4zjcf$F` zZ`@!#8I;p9H}v0Qsm0w55JS8V%IR!RHpBcog~taS;T?$U(Xb3UROk_Y$av0T(tRqY zkm3$I6>`n=9gZQ^_7CIFQx}@x38cqj>>=IJ^(7qk@4EaaE=d4Iz8(BNQeC&tzyEw-6sZ z;`8iwQkCMf!ih%b3QLbgDW99C;=sN)k1o^AcnL?qQR3LR)h<#T( zwIq=D^9iFPS0Ul=*#?Q2b%(8MQ8}WOG4pq9%JSI-LoYg;c!Eypt$4p0&tX&3b~jHv z)1B!hEP35MP)jOK$%+_~qUIlnFwyN%u(hSTjc~TO5OH!Ff$X`f5Yx*x`;7`ob$X)5 z!`{TUwC9MEk$43!+=viDHX+u%iZf<(AvdM@f0Xr@gMlPVfBH`~nkj2T=Xsku{;{@XV-(+uGj0A%S_|G_;PawuKR}|xv&Iv(AxC-ZV zsNn5VaGXoKngG99P!v<9mYnhalrBW`0rNz$ z6MQ>jPH}_6W@Ty+ytMp}+-QW;MpT8~jk#^JTNxN_u5a6X7Nk47?c1|3J|T=rKW z+*cg&!s{f$=0foK9__L{zMBET4;XFkL$VOJkV;%K-?-K(<{=k?A1naD+X=pyz5~2s zx!; zTTGN8y9-$CN+z{cgRIN>=WRg2T3#n# zKei3w;2y@I5>GA!yH<>}V2Q)I!-x;2TdlKfu%6UA>xo>ZbdXX(>s-#~v*<-%q`LI0 z2=BZXNkaAsr<-#b;UH7eEd@rtyws}^wsM5!TyMmL`VqwXe~q<4E+ZUdVX-H^&Nt>G z#5Ng!e-eqGFg*djjBS@G^avL^^Y6LHDts2Q9hvww5n{W+eFfZAA7S z0bGI%(ljJOwNqtFKaEEW@mm~>FdLJQND)7+g_jBQmsz$gA*I7wM#_QIiVDOl!0dac zly-&k;_*skoh`v<8`t;Zy-0;gB~?l5M~K3ueAw-OOU5wMQLVsR5{n}-OV&1k5bRX- zCLhQoF?LXxYfi%RE`iDGry0{ihw zM)bo$liSZnm<6}vYWJo|oPzx0UPYLkLrCtOdvPeiYr@M)Hv-Wlj6$@7Wys2xAmzij z1yOnzBwyA0cpvZMeY}tN@jl*LC}?`AnP=Y7Bi7M6J`q-9LRyd3=;2zco=S=Et~D)6 z=@zZn0-+6|xPBv2TCrx)bJumU+~*5sJwV+}Nf zUaAd$R-tC$orEkO*q{`*oVqIZ#|9dLXgnN|HNn$s7o4WicPkIcq(FEvMBger+$ zx#T|$fxUtP6Fhy=ts{xY|4HHB)l9J|5f5Lm{KZ*;Wb!}+*H2h*l2-bk_?uUb7Iwx- zeB_bF8+=v6z64)3v0-Q;5%~|9RpB`bP&){R&hp#0J(XPbb+`0OBqC4H?TH1@)jA&k z`^+;NJQMqR5UiCZ@mn&el5w=5U`$6ea-Z-k&T!pU>g!6bLvw9my5@)`(2G(0Mr-a3 zh4`a}CqgQ;3#qOX$Xh`vYQ_wCy7`SAD_(HC?sRhM8MmGg3ddiitI~}tzF#t;<|l5f zWBr5$-_=V0DCpxfv_%Myd$@7dM*B5KgSZOE@1pB+tG~2#)tn!(%Ke5!SUsu|!3kDS z9w+`Y#8)c~ou8@Bj`hGewp^ojE>Aff(- z$KtD1=tIj^UGMBon;?Eo=O*?Zb8pGWn(0+WYwHI7A?9w{^+x_nn~!d zC!Y$Vy@&-!#KUQZx}`77{ioLYHqT$w3Fr9XizYTyDwKDr9>ucLR>i(#Urnzbe@}@H zshd38LQI9VHQKq+d^wRZvttaYh=Y3R#LXDt(L-JIDJFVZRPFyfhYrf%f zyH-j)1kBgA5?~6htgoGywu_XuL?6(dOL?XqmU4ec5v)+>`tMv~f-{yl&>1cl3zHTDRd)!9$^cxTJAz zT104l?fhSBTkSIizloQYTo;bUOA|W&bA`IXs{)^at@%<;EVgW*0Xp8_T5;d-( zvF7yzy8evS@i$+tE%_Aa-;=p6Yr@MDN*=Bc&A(qK)L4!Ffzz)kt-ill13NKe=r6+`j?LJpGnGMk9&0aPgoEDV4@WsrHWVqm-Mk zwzNT|X)F6wB-Zb5ahuhN6v0Xpa``_tEqblN7AL5xgN?BMmq{$ZqL;4UJH2-Pt8^~e zD|f@!r%#x_C9V=H!l(~}^39;6(P{s@->+*qo~0dMap|D7QyIlcDCaN(7pGI5B3Pr{T!L<{0kr6S=l(SX|?l*p|tk`q;;AsozU@> z1o6~YoL65r?>vBuPPnryO!#KETSH1{RA3miH*aXdIcUPxIsT#*%amd=vbWmfmlB}9 zcv@rhzSn9wHmV|v0;qmgEp41L(RyNf?Yxzs&hhP!D53wWrCzezEZTQkV{AYJ4T|Xom3Lk*WFT+(21!EwM*;7KBd(EAYnAJ0BOny#&gF?BC&y1 zEy}dI`SnV(*quyXC!`Ldbsaw2hJqza8s}UF7A2l0@f0Xef)nVp6vs8wrcj$>9x14ap0p9puV?s_4Rjv()G3TF4L%o z@FH64WErvKrWcE-hwurWP;jAD>apWjYrY&sv)1bw9#8*9`m>cr>GS|G#g>p#QDS>GMZ8UA%OBLw_L1d)EmX z#;vW3Tx~mPY>BE7rR%FIVq+Gsn*FHtmYFjbhVfo|o>;tQcCt`SnqFFI^;@lcR6Uw$ zi3k_e*DbhDlXxto_4b5TJ#{EFQE7b*>9K$rL2K@qUb`TXh=-n1k;DwN{w#2SX!L@m zFE==7MYW1%etxVP5Wm3GIQp_aCFOtH_(CN7P<;AE^VCCNgkd#uAwy6Bm8Tv z)Mq@}ZYUX9GuEnQO?w{~ExJ6ebZ{F^7vbdT=g;c`JlIE-?uzNv4v3LoS?))hM8KHubQ)3sqh)7wAy4x3x6#M$Ie*#!VPOOX_O^n zq1CjyTfV5o-N4nUq(Ep=T77@X>g#`JiinvYCr;|p@eTdMp~y{04YNY~b+v2MZ$e7l zxMbD!@A}{FjJ&Xpmz+6&NF>I0fX|WtJ$t`W>UZ&I^vBCzYS@wM!}7{2e{M=cd2>r- zno@ic&3OdNed&aQX!Vo|>HGUs#2)$m$_7_=hD=c~;b6*?hDhJm(ps(c2NimZMvn$H z1epP*zUwfsU%|EntXHV@p^*Ofz8modifiers() & Qt::ControlModifier) + { + break; + } toggleSeamAllowance(!piece.IsSeamAllowance()); break; } From edd6eb1661e069dd10c43a8905ad9cbe73e35ae4 Mon Sep 17 00:00:00 2001 From: DSCaskey <31944718+DSCaskey@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:48:02 -0500 Subject: [PATCH 3/5] add selection sound pref --- src/app/seamly2d/dialogs/welcome_dialog.cpp | 21 +++ src/app/seamly2d/dialogs/welcome_dialog.h | 1 + src/app/seamly2d/dialogs/welcome_dialog.ui | 147 +++++++++++++++++++- 3 files changed, 167 insertions(+), 2 deletions(-) diff --git a/src/app/seamly2d/dialogs/welcome_dialog.cpp b/src/app/seamly2d/dialogs/welcome_dialog.cpp index bdae8064b68c..91070f77a9f9 100644 --- a/src/app/seamly2d/dialogs/welcome_dialog.cpp +++ b/src/app/seamly2d/dialogs/welcome_dialog.cpp @@ -29,6 +29,7 @@ #include #include +#include //--------------------------------------------------------------------------------------------------------------------- @@ -36,6 +37,7 @@ SeamlyWelcomeDialog::SeamlyWelcomeDialog(QWidget *parent) : QDialog(parent) , ui(new Ui::SeamlyWelcomeDialog) , m_langChanged(false) + , m_selectionSoundChanged(false) , settings(qApp->Seamly2DSettings()) { ui->setupUi(this); @@ -57,6 +59,18 @@ SeamlyWelcomeDialog::SeamlyWelcomeDialog(QWidget *parent) m_langChanged = true; }); + //-------------------- Selection sound + int index = ui->selectionSound_ComboBox->findText(settings->getSound()); + if (index != -1) + { + ui->selectionSound_ComboBox->setCurrentIndex(index); + } + connect(ui->selectionSound_ComboBox, static_cast(&QComboBox::currentIndexChanged), this, [this]() + { + m_selectionSoundChanged = true; + QSound::play("qrc:/sounds/" + ui->selectionSound_ComboBox->currentText() + ".wav"); + }); + ui->doNotShow_CheckBox->setChecked(settings->getShowWelcome()); QPushButton *ok_Button = ui->buttonBox->button(QDialogButtonBox::Ok); @@ -86,6 +100,13 @@ void SeamlyWelcomeDialog::apply() m_langChanged = false; } + if (m_selectionSoundChanged) + { + const QString sound = qvariant_cast(ui->selectionSound_ComboBox->currentText()); + settings->setSelectionSound(sound); + m_selectionSoundChanged = false; + } + done(QDialog::Accepted); } diff --git a/src/app/seamly2d/dialogs/welcome_dialog.h b/src/app/seamly2d/dialogs/welcome_dialog.h index 7b4b8c153104..37958a5114d7 100644 --- a/src/app/seamly2d/dialogs/welcome_dialog.h +++ b/src/app/seamly2d/dialogs/welcome_dialog.h @@ -52,6 +52,7 @@ class SeamlyWelcomeDialog : public QDialog Q_DISABLE_COPY(SeamlyWelcomeDialog) Ui::SeamlyWelcomeDialog *ui; bool m_langChanged; + bool m_selectionSoundChanged; VSettings *settings; void initUnits(const MeasurementsType &type); diff --git a/src/app/seamly2d/dialogs/welcome_dialog.ui b/src/app/seamly2d/dialogs/welcome_dialog.ui index 47d5b52e030a..a6d622ba5e3c 100644 --- a/src/app/seamly2d/dialogs/welcome_dialog.ui +++ b/src/app/seamly2d/dialogs/welcome_dialog.ui @@ -29,7 +29,7 @@ :/icon/logos/seamly_logo_32.png:/icon/logos/seamly_logo_32.png - + @@ -96,7 +96,7 @@ - Please choose your preferred units, decimal separator, and language. (You can change these later.) + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) true @@ -240,6 +240,149 @@ When unchecked the period is used. + + + + + 150 + 0 + + + + + 10 + false + + + + Sound: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 10 + false + + + + + + + silent + + + + + + + silent + + + + + button_click + + + + + mouse1_click + + + + + mouse2_click + + + + + mouse3_click + + + + + camera_click + + + + + camera_buzz + + + + + clock_click + + + + + clock_beep + + + + + microwave_beep + + + + + coffeemaker_click + + + + + coffeemaker2_click + + + + + inspirstar_click + + + + + phone2_click + + + + + phone1_click + + + + + scissors_click + + + + + wallswitch_click + + + + + buzz_click + + + + From a5761fc821cab831971182a1589b8240fc64b7f3 Mon Sep 17 00:00:00 2001 From: DSCaskey <31944718+DSCaskey@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:58:46 -0500 Subject: [PATCH 4/5] lupdate --- share/translations/seamly2d_cs_CZ.ts | 16 ++- share/translations/seamly2d_de_DE.ts | 101 ++++++++++--------- share/translations/seamly2d_el_GR.ts | 16 ++- share/translations/seamly2d_en_CA.ts | 16 ++- share/translations/seamly2d_en_GB.ts | 16 ++- share/translations/seamly2d_en_IN.ts | 16 ++- share/translations/seamly2d_en_US.ts | 16 ++- share/translations/seamly2d_es_ES.ts | 16 ++- share/translations/seamly2d_fi_FI.ts | 16 ++- share/translations/seamly2d_fr_FR.ts | 108 ++++++++++++--------- share/translations/seamly2d_he_IL.ts | 16 ++- share/translations/seamly2d_id_ID.ts | 16 ++- share/translations/seamly2d_it_IT.ts | 88 ++++++++++------- share/translations/seamly2d_nl_NL.ts | 16 ++- share/translations/seamly2d_pt_BR.ts | 16 ++- share/translations/seamly2d_ro_RO.ts | 16 ++- share/translations/seamly2d_ru_RU.ts | 16 ++- share/translations/seamly2d_uk_UA.ts | 16 ++- share/translations/seamly2d_zh_CN.ts | 16 ++- src/app/seamly2d/dialogs/welcome_dialog.ui | 3 + 20 files changed, 361 insertions(+), 195 deletions(-) diff --git a/share/translations/seamly2d_cs_CZ.ts b/share/translations/seamly2d_cs_CZ.ts index ed76622892e2..cd63c306b8f8 100644 --- a/share/translations/seamly2d_cs_CZ.ts +++ b/share/translations/seamly2d_cs_CZ.ts @@ -9831,10 +9831,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Jednotky: @@ -9886,6 +9882,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_de_DE.ts b/share/translations/seamly2d_de_DE.ts index 9e4a1ff91b50..047bdd6bbd0b 100644 --- a/share/translations/seamly2d_de_DE.ts +++ b/share/translations/seamly2d_de_DE.ts @@ -1558,7 +1558,7 @@ p, li { white-space: pre-wrap; } Width: - Breite: + Breite: Length: @@ -3365,7 +3365,7 @@ p, li { white-space: pre-wrap; } Control Point Lengths - Kontrollpunktlängen + Kontrollpunktlängen Arc Radii @@ -3903,10 +3903,10 @@ for writing zum schreiben - Unable to get exclusive access to file + Unable to get exclusive access to file %1 Possibly the file is already being downloaded. - Exklusiver Zugriff auf die Datei kann nicht gewährt werden + Exklusiver Zugriff auf die Datei kann nicht gewährt werden %1 Möglicherweise wird die Datei bereits heruntergeladen. @@ -3935,8 +3935,7 @@ Möglicherweise wird die Datei bereits heruntergeladen. Add a new group to the list - -eine neue Gruppe der Liste zufügen + Eine neue Gruppe der Liste zufügen Delete active group from the list @@ -4748,9 +4747,9 @@ eine neue Gruppe der Liste zufügen Two groups: big, small = 1; Descending area = 2 -⇥Drei Gruppen: groß, mittel, klein = 0 -⇥Zwei Gruppen: groß, klein = 1 -⇥Absteigende Fläche = 2 + Drei Gruppen: groß, mittel, klein = 0 + Zwei Gruppen: groß, klein = 1 + Absteigende Fläche = 2 Layout options @@ -4818,10 +4817,10 @@ eine neue Gruppe der Liste zufügen Millimeter - Margins go beyond printing. + Margins go beyond printing. Apply settings anyway? - Ränder gehen über den Druck hinaus. + Ränder gehen über den Druck hinaus. Einstellungen trotzdem anwenden? @@ -5506,7 +5505,7 @@ Sollen die Änderungen gespeichert werden? &Operations - Abläufe + &Abläufe Piece @@ -7792,7 +7791,7 @@ Sollen die Änderungen gespeichert werden? Width: - Breite: + Breite: Reset notch length to default. @@ -8946,7 +8945,7 @@ Sollen die Änderungen gespeichert werden? px - Pixel + px Duration: @@ -9109,7 +9108,7 @@ Sollen die Änderungen gespeichert werden? Pattern Piece - &Schnittteil + Schnittteil Properties @@ -9824,17 +9823,17 @@ Sollen die Änderungen gespeichert werden? Zoll - Selects what decimal separator char to use. -When checked the separator for the user's locale is used. + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. When unchecked the period is used. - Legt fest, welches Dezimaltrennzeichen verwendet werden soll. -Wenn das Kontrollkästchen aktiviert ist, wird das Trennzeichen für das Gebietsschema des Benutzers verwendet. + Legt fest, welches Dezimaltrennzeichen verwendet werden soll. +Wenn das Kontrollkästchen aktiviert ist, wird das Trennzeichen für das Gebietsschema des Benutzers verwendet. Wenn es nicht markiert ist, wird der Punkt verwendet. - When checked the Welcome window will not be displayed. + When checked the Welcome window will not be displayed. You can change this setting in the SeamlyMe preferences. - Wenn diese Option aktiviert ist, wird das Willkommensfenster nicht angezeigt. + Wenn diese Option aktiviert ist, wird das Willkommensfenster nicht angezeigt. Sie können diese Einstellung in den SeamlyMe-Einstellungen ändern. @@ -9848,10 +9847,6 @@ Sie können diese Einstellung in den SeamlyMe-Einstellungen ändern.Welcome to Seamly2D Willkommen bei Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - Bitte wählen Sie die gewünschten Einheiten, das Dezimaltrennzeichen und die Sprache. (Sie können diese Angaben später ändern.) - Units: Einheiten: @@ -9889,21 +9884,33 @@ Sie können diese Einstellung in den SeamlyMe-Einstellungen ändern.Zoll - Selects what decimal separator char to use. -When checked the separator for the user's locale is used. + Sets the language used for Seamly2D. + Legt die für Seamly2D verwendete Sprache fest. + + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + Bitte wählen Sie Ihre bevorzugten Einheiten, das Dezimaltrennzeichen, die Sprache und den Auswahlton. (Sie können diese Angaben später ändern.) + + + Sound: + Ton: + + + Selects what decimal separator char to use. +When checked the separator for the user's locale is used. When unchecked the period is used. - Legt fest, welches Dezimaltrennzeichen verwendet werden soll. -Wenn das Kontrollkästchen aktiviert ist, wird das Trennzeichen für das Gebietsschema des Benutzers verwendet. + Legt fest, welches Dezimaltrennzeichen verwendet werden soll. +Wenn das Kontrollkästchen aktiviert ist, wird das Trennzeichen für das Gebietsschema des Benutzers verwendet. Wenn es nicht markiert ist, wird der Punkt verwendet. - Sets the language used for Seamly2D. - Legt die für Seamly2D verwendete Sprache fest. + Sets the node selection click sound. + Legt den Klickton für die Knotenauswahl fest. - When checked the Welcome window will not be displayed. + When checked the Welcome window will not be displayed. You can change this setting in the Seamly2D preferences. - Wenn diese Option aktiviert ist, wird das Willkommensfenster nicht angezeigt. + Wenn diese Option aktiviert ist, wird das Willkommensfenster nicht angezeigt. Sie können diese Einstellung in den Seamly2D-Voreinstellungen ändern. @@ -12737,19 +12744,19 @@ wie gewohnt in SeamlyME laden können. Length - Länge + Länge Radius - Radius + Radius End angle - Abschlusswinkel + Abschlusswinkel Label - Etikett + Etikett @@ -12760,23 +12767,23 @@ wie gewohnt in SeamlyME laden können. Length - Länge + Länge Radius - Radius + Radius End angle - Abschlusswinkel + Abschlusswinkel Name - Bezeichnung + Bezeichnung Tool - Werkzeug + Werkzeug Arc - Radius and Length @@ -12873,19 +12880,19 @@ wie gewohnt in SeamlyME laden können. Length - Länge + Länge Radius - Radius + Radius End angle - Endwinkel + Endwinkel Label - Etikett + Etikett @@ -13451,7 +13458,7 @@ wie gewohnt in SeamlyME laden können. VToolRotation Origin point - Ausgangspunkt + Ausgangspunkt Rotation angle diff --git a/share/translations/seamly2d_el_GR.ts b/share/translations/seamly2d_el_GR.ts index 0ba8e236d80b..7160b97ce06a 100644 --- a/share/translations/seamly2d_el_GR.ts +++ b/share/translations/seamly2d_el_GR.ts @@ -9831,10 +9831,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Μονάδες μέτρησης: @@ -9886,6 +9882,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_en_CA.ts b/share/translations/seamly2d_en_CA.ts index b867289747dc..1b5d6086f6aa 100644 --- a/share/translations/seamly2d_en_CA.ts +++ b/share/translations/seamly2d_en_CA.ts @@ -9834,10 +9834,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Units: @@ -9889,6 +9885,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_en_GB.ts b/share/translations/seamly2d_en_GB.ts index 1c4c58e39731..d9f5be4aa99c 100644 --- a/share/translations/seamly2d_en_GB.ts +++ b/share/translations/seamly2d_en_GB.ts @@ -9834,10 +9834,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Units: @@ -9889,6 +9885,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_en_IN.ts b/share/translations/seamly2d_en_IN.ts index ee4e8b8e30d2..cb840fa78b1d 100644 --- a/share/translations/seamly2d_en_IN.ts +++ b/share/translations/seamly2d_en_IN.ts @@ -9834,10 +9834,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Units: @@ -9889,6 +9885,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_en_US.ts b/share/translations/seamly2d_en_US.ts index 5d85f0258fba..86f95f90ca2b 100644 --- a/share/translations/seamly2d_en_US.ts +++ b/share/translations/seamly2d_en_US.ts @@ -9834,10 +9834,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Units: @@ -9889,6 +9885,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_es_ES.ts b/share/translations/seamly2d_es_ES.ts index 259529f8d0de..ebaa9e7d867b 100644 --- a/share/translations/seamly2d_es_ES.ts +++ b/share/translations/seamly2d_es_ES.ts @@ -9904,10 +9904,6 @@ Puede cambiar esta configuración en las preferencias de SeamlyMe. Welcome to Seamly2D Bienvenido a Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - Elija las unidades, el separador decimal y el idioma que prefiera. (Puede cambiarlos más adelante.) - Units: Unidades: @@ -9962,6 +9958,18 @@ You can change this setting in the Seamly2D preferences. Si esta opción está seleccionada, no se mostrará la ventana de bienvenida. Puede cambiar esta configuración en las preferencias de Seamly2D. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + Elija las unidades, el separador decimal, el idioma y el sonido de selección que prefiera. (Puede cambiarlos más adelante.) + + + Sound: + Sonido: + + + Sets the node selection click sound. + Establece el sonido del clic de selección del nodo. + SetPieceColor diff --git a/share/translations/seamly2d_fi_FI.ts b/share/translations/seamly2d_fi_FI.ts index 631e430c1a00..da6cbb9ba05f 100644 --- a/share/translations/seamly2d_fi_FI.ts +++ b/share/translations/seamly2d_fi_FI.ts @@ -9831,10 +9831,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Mittayksiköt: @@ -9886,6 +9882,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_fr_FR.ts b/share/translations/seamly2d_fr_FR.ts index 3b741136e766..8f992bfc1024 100644 --- a/share/translations/seamly2d_fr_FR.ts +++ b/share/translations/seamly2d_fr_FR.ts @@ -2042,7 +2042,7 @@ p, li { white-space: pre-wrap; } Millimeters - + Millimètres Draft block name: @@ -4807,7 +4807,7 @@ Possibly the file is already being downloaded. Millimeters - + Millimètres Margins go beyond printing. @@ -7316,7 +7316,7 @@ Voulez-vous sauvegarder les changements? Millimeters - + Millimètres @@ -8536,7 +8536,7 @@ Voulez-vous sauvegarder les changements? Decimal separator: - + Séparateur décimal : None @@ -8576,7 +8576,7 @@ Voulez-vous sauvegarder les changements? Millimeters - + Millimètres Selection sound @@ -8584,7 +8584,7 @@ Voulez-vous sauvegarder les changements? Sound: - + Le son: Designer Info @@ -8648,7 +8648,7 @@ Voulez-vous sauvegarder les changements? User locale - + Localité de l'utilisateur Startup @@ -8656,7 +8656,7 @@ Voulez-vous sauvegarder les changements? Welcome - + Bienvenue Do not show welcome screen @@ -9692,11 +9692,11 @@ Voulez-vous sauvegarder les changements? Decimal separator: - + Séparateur décimal : User locale - + Localité de l'utilisateur @@ -9746,148 +9746,162 @@ Voulez-vous sauvegarder les changements? SeamlyMeWelcomeDialog Welcome - + Bienvenue Welcome to SeamlyME - + Bienvenue à SeamlyME 3D Look users - + Utilisateurs de 3D Look To utilize a 3D Look body scan the file needs to be converted to SeamlyME format. - + Pour utiliser un scan du corps 3D Look, le fichier doit être converti au format SeamlyME. Attach your 3DLook file to an email and send to convert@seamly.io. - + Joignez votre fichier 3DLook à un courriel et envoyez-le à convert@seamly.io. You will recieve an email with the converted file, which you can then load in SeamlyME as usual. - + Vous recevrez un e-mail avec le fichier converti, que vous pourrez ensuite charger dans SeamlyME comme d'habitude. Please choose your preferred units, decimal separator, and language. (You can change these later.) - + Veuillez choisir les unités, le séparateur décimal et la langue que vous préférez. (Vous pourrez les modifier ultérieurement.) Units: - Unités: + Unités: Sets the default units for a new measurement file. - + Définit les unités par défaut pour un nouveau fichier de mesure. Decimal separator: - + Séparateur décimal : Selects what decimal separator char to use. When checked the separator for the user's locale is used. When unchecked the period is used. - + Sélectionne le séparateur décimal à utiliser. +Si la case est cochée, le séparateur de la locale de l'utilisateur est utilisé. +Si la case n'est pas cochée, c'est le point qui est utilisé. GUI language: - Langue de l'interface: + Langue de l'interface: Sets the language used for SeamlyMe. - + Définit la langue utilisée pour SeamlyMe. When checked the Welcome window will not be displayed. You can change this setting in the SeamlyMe preferences. - + Si cette option est cochée, la fenêtre de bienvenue ne sera pas affichée. +Vous pouvez modifier ce paramètre dans les préférences de SeamlyMe. Do not show again - + Ne plus montrer User locale - + Localité de l'utilisateur Centimeters - Centimètres + Centimètres Millimeters - + Millimètres Inches - Pouces + Pouces SeamlyWelcomeDialog Welcome - + Bienvenue Welcome to Seamly2D - - - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - + Bienvenue à Seamly2D Units: - Unités: + Unités: Sets the default units for a new measurement file. - + Définit les unités par défaut pour un nouveau fichier de mesure. Decimal separator: - + Séparateur décimal : Selects what decimal separator char to use. When checked the separator for the user's locale is used. When unchecked the period is used. - + Sélectionne le séparateur décimal à utiliser. +Si la case est cochée, le séparateur de la locale de l'utilisateur est utilisé. +Si la case n'est pas cochée, c'est le point qui est utilisé. GUI language: - Langue de l'interface: + Langue de l'interface: Do not show again - + Ne plus montrer User locale - + Localité de l'utilisateur Centimeters - Centimètres + Centimètres Millimeters - + Millimètres Inches - Pouces + Pouces Sets the language used for Seamly2D. - + Définit la langue utilisée pour Seamly2D. When checked the Welcome window will not be displayed. You can change this setting in the Seamly2D preferences. - + Si cette option est cochée, la fenêtre de bienvenue ne sera pas affichée. +Vous pouvez modifier ce paramètre dans les préférences de Seamly2D. + + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + Veuillez choisir les unités, le séparateur décimal, la langue et le son de sélection que vous préférez. (Vous pourrez les modifier ultérieurement.) + + + Sound: + Le son: + + + Sets the node selection click sound. + Définit le son du clic de sélection du nœud. diff --git a/share/translations/seamly2d_he_IL.ts b/share/translations/seamly2d_he_IL.ts index fb2b69aec1a9..8350ba1c3517 100644 --- a/share/translations/seamly2d_he_IL.ts +++ b/share/translations/seamly2d_he_IL.ts @@ -9830,10 +9830,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: @@ -9885,6 +9881,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_id_ID.ts b/share/translations/seamly2d_id_ID.ts index b72ff9e591e8..23035725d083 100644 --- a/share/translations/seamly2d_id_ID.ts +++ b/share/translations/seamly2d_id_ID.ts @@ -9831,10 +9831,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: @@ -9886,6 +9882,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_it_IT.ts b/share/translations/seamly2d_it_IT.ts index 869d913eefba..0433ac6c89be 100644 --- a/share/translations/seamly2d_it_IT.ts +++ b/share/translations/seamly2d_it_IT.ts @@ -9746,148 +9746,162 @@ Vuoi salvare i cambiamenti? SeamlyMeWelcomeDialog Welcome - + Benvenuti Welcome to SeamlyME - + Benvenuti a SeamlyME 3D Look users - + Utenti di 3D Look To utilize a 3D Look body scan the file needs to be converted to SeamlyME format. - + Per utilizzare una scansione del corpo 3D Look, il file deve essere convertito nel formato SeamlyME. Attach your 3DLook file to an email and send to convert@seamly.io. - + Allegare il file 3DLook a un'e-mail e inviarlo a convert@seamly.io. You will recieve an email with the converted file, which you can then load in SeamlyME as usual. - + Riceverete un'e-mail con il file convertito, che potrete caricare in SeamlyME come di consueto. Please choose your preferred units, decimal separator, and language. (You can change these later.) - + Scegliere le unità di misura, il separatore decimale e la lingua preferiti. (È possibile modificarli in seguito.) Units: - Unità: + Unità: Sets the default units for a new measurement file. - + Imposta le unità di misura predefinite per un nuovo file di misura. Decimal separator: - + Separatore decimale: Selects what decimal separator char to use. When checked the separator for the user's locale is used. When unchecked the period is used. - + Seleziona il carattere di separazione decimale da utilizzare. +Quando è selezionata, viene utilizzato il separatore del locale dell'utente. +Quando è deselezionato, viene utilizzato il punto. GUI language: - Lingua di interfaccia: + Lingua di interfaccia: Sets the language used for SeamlyMe. - + Imposta la lingua utilizzata per SeamlyMe. When checked the Welcome window will not be displayed. You can change this setting in the SeamlyMe preferences. - + Quando è selezionata, la finestra di benvenuto non viene visualizzata. +È possibile modificare questa impostazione nelle preferenze di SeamlyMe. Do not show again - + Non mostrare di nuovo User locale - + Locale dell'utente Centimeters - Centimetri + Centimetri Millimeters - + Millimetri Inches - Pollici + Pollici SeamlyWelcomeDialog Welcome - + Benvenuti Welcome to Seamly2D - - - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - + Benvenuti a Seamly2D Units: - Unità: + Unità: Sets the default units for a new measurement file. - + Imposta le unità di misura predefinite per un nuovo file di misura. Decimal separator: - + Separatore decimale: Selects what decimal separator char to use. When checked the separator for the user's locale is used. When unchecked the period is used. - + Seleziona il carattere di separazione decimale da utilizzare. +Quando è selezionata, viene utilizzato il separatore del locale dell'utente. +Quando è deselezionato, viene utilizzato il punto. GUI language: - Lingua di interfaccia: + Lingua di interfaccia: Do not show again - + Non mostrare di nuovo User locale - + Locale dell'utente Centimeters - Centimetri + Centimetri Millimeters - + Millimetri Inches - Pollici + Pollici Sets the language used for Seamly2D. - + Imposta la lingua utilizzata per Seamly2D. When checked the Welcome window will not be displayed. You can change this setting in the Seamly2D preferences. - + Quando è selezionata, la finestra di benvenuto non viene visualizzata. +È possibile modificare questa impostazione nelle preferenze di Seamly2D. + + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + Scegliere le unità di misura, il separatore decimale, la lingua e il suono di selezione preferiti. (È possibile modificarli in seguito.) + + + Sound: + Suono: + + + Sets the node selection click sound. + Imposta il suono del clic di selezione del nodo. diff --git a/share/translations/seamly2d_nl_NL.ts b/share/translations/seamly2d_nl_NL.ts index d90825592082..ec339f285e4a 100644 --- a/share/translations/seamly2d_nl_NL.ts +++ b/share/translations/seamly2d_nl_NL.ts @@ -9842,10 +9842,6 @@ Als deze optie niet is aangevinkt, wordt de punt gebruikt. Welcome to Seamly2D Welkom bij Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - Kies de eenheden, het decimaalscheidingsteken en de taal van je voorkeur. (Je kunt deze later wijzigen.) - Units: Eenheden: @@ -9900,6 +9896,18 @@ You can change this setting in the Seamly2D preferences. Als deze optie is aangevinkt, wordt het welkomstvenster niet weergegeven. Je kunt deze instelling wijzigen in de Seamly2D voorkeuren. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + Kies de eenheden, het decimaalscheidingsteken, de taal en het selectiegeluid van je voorkeur. (Je kunt deze later wijzigen.) + + + Sound: + Geluid: + + + Sets the node selection click sound. + Stelt het klikgeluid van de knooppuntselectie in. + SetPieceColor diff --git a/share/translations/seamly2d_pt_BR.ts b/share/translations/seamly2d_pt_BR.ts index 1d16d5af41ea..5a360ca16c6a 100644 --- a/share/translations/seamly2d_pt_BR.ts +++ b/share/translations/seamly2d_pt_BR.ts @@ -9830,10 +9830,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Unidades: @@ -9885,6 +9881,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_ro_RO.ts b/share/translations/seamly2d_ro_RO.ts index ce0d3d52dee9..2651d076f003 100644 --- a/share/translations/seamly2d_ro_RO.ts +++ b/share/translations/seamly2d_ro_RO.ts @@ -9830,10 +9830,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Unități: @@ -9885,6 +9881,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_ru_RU.ts b/share/translations/seamly2d_ru_RU.ts index 38c987ba503f..967b3bf5c3ab 100644 --- a/share/translations/seamly2d_ru_RU.ts +++ b/share/translations/seamly2d_ru_RU.ts @@ -9873,10 +9873,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D Добро пожаловать в Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - Выберите желаемые единицы измерения, десятичный разделитель и язык. (Вы можете изменить их позже.) - Units: Единицы измерения: @@ -9931,6 +9927,18 @@ You can change this setting in the Seamly2D preferences. Если флажок установлен, окно приветствия не будет отображаться. Эту настройку можно изменить в настройках Seamly2D. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + Выберите желаемые единицы измерения, десятичный разделитель, язык и звук выбора. (Вы можете изменить их позже.) + + + Sound: + Звук: + + + Sets the node selection click sound. + Устанавливает звук щелчка при выборе узла. + SetPieceColor diff --git a/share/translations/seamly2d_uk_UA.ts b/share/translations/seamly2d_uk_UA.ts index d915c263d9ef..ae3e9bcf6314 100644 --- a/share/translations/seamly2d_uk_UA.ts +++ b/share/translations/seamly2d_uk_UA.ts @@ -9833,10 +9833,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: Одинці виміру: @@ -9888,6 +9884,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/share/translations/seamly2d_zh_CN.ts b/share/translations/seamly2d_zh_CN.ts index 759b25574e6f..37e35a776abc 100644 --- a/share/translations/seamly2d_zh_CN.ts +++ b/share/translations/seamly2d_zh_CN.ts @@ -9830,10 +9830,6 @@ You can change this setting in the SeamlyMe preferences. Welcome to Seamly2D - - Please choose your preferred units, decimal separator, and language. (You can change these later.) - - Units: @@ -9885,6 +9881,18 @@ When unchecked the period is used. You can change this setting in the Seamly2D preferences. + + Please choose your preferred units, decimal separator, language, and selection sound. (You can change these later.) + + + + Sound: + + + + Sets the node selection click sound. + + SetPieceColor diff --git a/src/app/seamly2d/dialogs/welcome_dialog.ui b/src/app/seamly2d/dialogs/welcome_dialog.ui index a6d622ba5e3c..2292f84ef9a9 100644 --- a/src/app/seamly2d/dialogs/welcome_dialog.ui +++ b/src/app/seamly2d/dialogs/welcome_dialog.ui @@ -282,6 +282,9 @@ When unchecked the period is used. false + + Sets the node selection click sound. + From 23a52dee863bd17570fd6878776c5206bbd79e10 Mon Sep 17 00:00:00 2001 From: DSCaskey <31944718+DSCaskey@users.noreply.github.com> Date: Sat, 2 Mar 2024 01:13:44 -0500 Subject: [PATCH 5/5] fix gui language change update --- src/app/seamly2d/mainwindow.cpp | 27 ++++++++++++++------------- src/libs/vmisc/vsettings.cpp | 1 - src/libs/vmisc/vsettings.h | 4 ---- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/app/seamly2d/mainwindow.cpp b/src/app/seamly2d/mainwindow.cpp index 7c2a81122dee..611eb7db923a 100644 --- a/src/app/seamly2d/mainwindow.cpp +++ b/src/app/seamly2d/mainwindow.cpp @@ -268,8 +268,6 @@ MainWindow::MainWindow(QWidget *parent) } } - connect(qApp->Seamly2DSettings(), &VSettings::labelLanguageChanged, this, &MainWindow::initBasePointComboBox); - // In case we will need it // else if (isAncestorOf(old) == true && now == nullptr) // focus OUT @@ -304,6 +302,7 @@ MainWindow::MainWindow(QWidget *parent) connect(appPreferences_Action, &QAction::triggered, this, &MainWindow::Preferences); menu->setAsDockMenu(); + #endif //defined(Q_OS_MAC) } @@ -1771,6 +1770,7 @@ void MainWindow::changeEvent(QEvent *event) UpdateWindowTitle(); initPenToolBar(); + initBasePointComboBox(); emit pieceScene->LanguageChanged(); } // remember to call base class implementation @@ -2321,28 +2321,28 @@ void MainWindow::initPointNameToolBar() fontSizeComboBox->setEnabled(true); basePointComboBox = new QComboBox ; - initBasePointComboBox(); ui->pointName_ToolBar->addWidget(basePointComboBox); - basePointComboBox->setToolTip(tr("Base name used for new points.\nPress enter to temporarily add it to the list.")); - basePointComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); - basePointComboBox->setCurrentIndex(0); - basePointComboBox->setEditable(true); - basePointComboBox->setInsertPolicy(QComboBox::InsertAtTop); - + initBasePointComboBox(); basePointComboBox->setEnabled(true); + connect(basePointComboBox, &QComboBox::currentTextChanged, this, &MainWindow::basePointChanged); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief initBasePointComboBox fills basePointComboBox according to the label language selected. + * @brief initBasePointComboBox fills basePointComboBox. */ void MainWindow::initBasePointComboBox() { basePointComboBox->clear(); basePointComboBox->addItem(tr("Default")); - basePointComboBox->addItems(doc->GetCurrentAlphabet()); + basePointComboBox->addItems(doc->GetCurrentAlphabet()); // These items are based on the Point name language + basePointComboBox->setToolTip(tr("Base name used for new points.\nPress enter to temporarily add it to the list.")); + basePointComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); + basePointComboBox->setCurrentIndex(0); + basePointComboBox->setEditable(true); + basePointComboBox->setInsertPolicy(QComboBox::InsertAtTop); } //--------------------------------------------------------------------------------------------------------------------- @@ -2568,7 +2568,8 @@ void MainWindow::basePointChanged() { basePointComboBox->setStyleSheet("QComboBox {color: black;}"); - if (!text.isEmpty() && text != tr("Default")){ + if (!text.isEmpty() && text != tr("Default")) + { basePoint = text; } } @@ -6416,11 +6417,11 @@ void MainWindow::Preferences() //connect(dialog.data(), &DialogPreferences::updateProperties, // toolProperties, &VToolOptionsPropertyBrowser::refreshOptions); connect(dialog.data(), &DialogPreferences::updateProperties, this, &MainWindow::initPropertyEditor); + connect(dialog.data(), &DialogPreferences::updateProperties, this, &MainWindow::initBasePointComboBox); connect(dialog.data(), &DialogPreferences::updateProperties, ui->view, &VMainGraphicsView::resetScrollBars); connect(dialog.data(), &DialogPreferences::updateProperties, ui->view, &VMainGraphicsView::resetScrollAnimations); - QGuiApplication::restoreOverrideCursor(); if (guard->exec() == QDialog::Accepted) diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 758777a5dacf..96804ebb7962 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -128,7 +128,6 @@ QString VSettings::getLabelLanguage() const void VSettings::setLabelLanguage(const QString &value) { setValue(settingConfigurationLabelLanguage, value); - emit labelLanguageChanged(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index 821d2c318b88..e363363f2043 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -187,10 +187,6 @@ class VSettings : public VCommonSettings PageOrientation getTiledPDFOrientation() const; void setTiledPDFOrientation(PageOrientation value); - -signals: - void labelLanguageChanged(); - private: Q_DISABLE_COPY(VSettings) };