diff --git a/.gitignore b/.gitignore index eed2f58cb..19aa9e681 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ *(v*).vit* *(v*).vst* +# Valentina's backup file +*.bak + # KDE directory preferences .directory diff --git a/.tx/config b/.tx/config index 0ca0025fd..de69aa30f 100644 --- a/.tx/config +++ b/.tx/config @@ -2,8 +2,9 @@ host = https://www.transifex.com lang_map = uk: uk_UA, cs : cs_CZ, nl : nl_NL, fi : fi_FI, es : es_ES, id : id_ID -[valentina-project.valentina_ts] +[valentina-project.valentina-ts] file_filter = share/translations/valentina_.ts +minimum_perc = 20 source_file = share/translations/valentina.ts source_lang = en type = QT diff --git a/ChangeLog.txt b/ChangeLog.txt index e33a1db31..74b331d2f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -38,6 +38,15 @@ - Export tiled PDF with watermark. - [#984] Issue with up to date list of unique names. - Tracking changes/prevent "OK" recalculation after "Apply". +- Change behavior for menu Pattern piece -> Show main path. Now it has an influence on export as well. +- Call Piece Options and Delete Piece from the piece list context menu. +- Change default values for grainline length and pattern label size to 10 cm. +- Tool Point at distance and angle now allows negative length. +- Export pattern to DXF-ASTM. +- [smart-pattern/valentina#18] Auto-created Visibility Group for group operation. +- Setting scale factor for export and print. +- New layout generator option: Prefer one sheet solution. +- [smart-pattern/valentina#15] Organization of groups - groups categories # Version 0.6.2 (unreleased) - [#903] Bug in tool Cut Spline path. diff --git a/common.pri b/common.pri index 8a9f35321..efdd80636 100644 --- a/common.pri +++ b/common.pri @@ -933,5 +933,7 @@ MSVC_DEBUG_CXXFLAGS += \ -wd5026 \ # move constructor was implicitly defined as deleted -wd5027 \ # move assignment operator was implicitly defined as deleted -wd5039 \ # pointer or reference to potentially throwing function passed to extern C function under -EHc. - -wd4774 # format string expected in argument 3 is not a string literal + -wd4774 \ # format string expected in argument 3 is not a string literal + -wd5204 # class has virtual functions, but its trivial destructor is not virtual; instances of objects derived + # from this class may not be destructed correctly } diff --git a/dist/OBS_debian/debian.valentina.1 b/dist/OBS_debian/debian.valentina.1 index 715019661..48c841dd1 100644 --- a/dist/OBS_debian/debian.valentina.1 +++ b/dist/OBS_debian/debian.valentina.1 @@ -1,6 +1,6 @@ .\" Manpage for valentina. .\" Contact dismine@gmail.com to correct errors. -.TH valentina 1 "21 July, 2019" "valentina man page" +.TH valentina 1 "22 March, 2020" "valentina man page" .SH NAME Valentina \- Pattern making program. .SH SYNOPSIS @@ -102,6 +102,33 @@ The path to output destination folder. By default the directory at which the app .BR "*" " AutoCAD DXF 2013 AAMA files (*.dxf) = 23," .RE .RS +.BR "*" " AutoCAD DXF R10 ASTM файли (*.dxf) = 24," +.RE +.RS +.BR "*" " AutoCAD DXF R11/12 ASTM файли (*.dxf) = 25," +.RE +.RS +.BR "*" " AutoCAD DXF R13 ASTM файли (*.dxf) = 26," +.RE +.RS +.BR "*" " AutoCAD DXF R14 ASTM файли (*.dxf) = 27," +.RE +.RS +.BR "*" " AutoCAD DXF 2000 ASTM файли (*.dxf) = 28," +.RE +.RS +.BR "*" " AutoCAD DXF 2004 ASTM файли (*.dxf) = 29," +.RE +.RS +.BR "*" " AutoCAD DXF 2007 ASTM файли (*.dxf) = 30," +.RE +.RS +.BR "*" " AutoCAD DXF 2010 ASTM файли (*.dxf) = 31," +.RE +.RS +.BR "*" " AutoCAD DXF 2013 ASTM файли (*.dxf) = 32," +.RE +.RS .BR "*" " PDF tiled files (*.pdf) = 33." .RE .IP "--bdxf" @@ -186,16 +213,24 @@ The path to output destination folder. By default the directory at which the app .RB "Page top margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." .IP "-B, --bmargin " .RB "Page bottom margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." +.IP "--xscale " +.RB "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." +.IP "--yscale " +.RB "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." .IP "--followGrainline" -.RB "Order detail to follow grainline direction (" "export mode" "). +.RB "Order detail to follow grainline direction (" "export mode" ")." .IP "--manualPriority" -.RB "Follow manual priority over priority by square (" "export mode" "). +.RB "Follow manual priority over priority by square (" "export mode" ")." .IP "--nestQuantity" .RB "Nest quantity copies of each piece (" "export mode" "). .IP "-c, --crop" .RB "Auto crop unused length (" "export mode" ")." +.IP "--cropWidth" +.RB "Auto crop unused width (" "export mode" ")." .IP "-u, --unite" .RB "Unite pages if possible (" "export mode" "). Maximum value limited by QImage that supports only a maximum of " "32768x32768 px" " images." +.IP "--preferOneSheetSolution" +.RB "Prefer one sheet layout solution (" "export mode" ")." .IP "-S, --savelen" .RB "Save length of the sheet if set (" "export mode" "). The option tells the program to use as much as possible width of sheet. Quality of a layout can be worse when this option was used." .IP "-l, --layounits " diff --git a/dist/debian/valentina.1 b/dist/debian/valentina.1 index 18664147b..48c841dd1 100644 --- a/dist/debian/valentina.1 +++ b/dist/debian/valentina.1 @@ -1,6 +1,6 @@ .\" Manpage for valentina. .\" Contact dismine@gmail.com to correct errors. -.TH valentina 1 "17 October, 2019" "valentina man page" +.TH valentina 1 "22 March, 2020" "valentina man page" .SH NAME Valentina \- Pattern making program. .SH SYNOPSIS @@ -102,6 +102,33 @@ The path to output destination folder. By default the directory at which the app .BR "*" " AutoCAD DXF 2013 AAMA files (*.dxf) = 23," .RE .RS +.BR "*" " AutoCAD DXF R10 ASTM файли (*.dxf) = 24," +.RE +.RS +.BR "*" " AutoCAD DXF R11/12 ASTM файли (*.dxf) = 25," +.RE +.RS +.BR "*" " AutoCAD DXF R13 ASTM файли (*.dxf) = 26," +.RE +.RS +.BR "*" " AutoCAD DXF R14 ASTM файли (*.dxf) = 27," +.RE +.RS +.BR "*" " AutoCAD DXF 2000 ASTM файли (*.dxf) = 28," +.RE +.RS +.BR "*" " AutoCAD DXF 2004 ASTM файли (*.dxf) = 29," +.RE +.RS +.BR "*" " AutoCAD DXF 2007 ASTM файли (*.dxf) = 30," +.RE +.RS +.BR "*" " AutoCAD DXF 2010 ASTM файли (*.dxf) = 31," +.RE +.RS +.BR "*" " AutoCAD DXF 2013 ASTM файли (*.dxf) = 32," +.RE +.RS .BR "*" " PDF tiled files (*.pdf) = 33." .RE .IP "--bdxf" @@ -186,10 +213,14 @@ The path to output destination folder. By default the directory at which the app .RB "Page top margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." .IP "-B, --bmargin " .RB "Page bottom margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." +.IP "--xscale " +.RB "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." +.IP "--yscale " +.RB "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." .IP "--followGrainline" -.RB "Order detail to follow grainline direction (" "export mode" "). +.RB "Order detail to follow grainline direction (" "export mode" ")." .IP "--manualPriority" -.RB "Follow manual priority over priority by square (" "export mode" "). +.RB "Follow manual priority over priority by square (" "export mode" ")." .IP "--nestQuantity" .RB "Nest quantity copies of each piece (" "export mode" "). .IP "-c, --crop" @@ -198,6 +229,8 @@ The path to output destination folder. By default the directory at which the app .RB "Auto crop unused width (" "export mode" ")." .IP "-u, --unite" .RB "Unite pages if possible (" "export mode" "). Maximum value limited by QImage that supports only a maximum of " "32768x32768 px" " images." +.IP "--preferOneSheetSolution" +.RB "Prefer one sheet layout solution (" "export mode" ")." .IP "-S, --savelen" .RB "Save length of the sheet if set (" "export mode" "). The option tells the program to use as much as possible width of sheet. Quality of a layout can be worse when this option was used." .IP "-l, --layounits " diff --git a/share/translations/valentina.ts b/share/translations/valentina.ts index bc8a8ad32..69877ce64 100644 --- a/share/translations/valentina.ts +++ b/share/translations/valentina.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2463,6 +2470,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2502,6 +2537,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2515,7 +2578,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2525,6 +2588,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3064,6 +3139,53 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + ... + ... + + DialogLayoutSettings @@ -3331,10 +3453,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3343,10 +3461,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3363,6 +3477,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3775,6 +3902,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4720,10 +4875,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5460,6 +5611,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5567,6 +5742,22 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9780,6 +9971,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10974,10 +11172,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11565,6 +11759,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11697,6 +11911,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11868,6 +12094,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -12370,6 +12611,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12463,7 +12724,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12472,7 +12733,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12500,7 +12761,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -13104,6 +13365,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13428,6 +13697,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -13439,6 +13712,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13533,6 +13810,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -14133,6 +14414,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15662,6 +15947,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15723,6 +16193,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15732,7 +16214,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15754,6 +16236,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index e0b6041bb..5ca1e2ee2 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -50,6 +50,13 @@ Přidat spojení jednotlivostí (dílů střihu) + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Převrácení podle osy + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Rotation + Otáčení + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Převrácení podle čáry + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Rotation + Otáčení + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Jedinečný název dílu střihu + Jedinečný název dílu střihu Choose group name @@ -2509,6 +2572,18 @@ New group Nová skupina + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ Koeficient účinnosti: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Okraje + + + Left: + Levý: + + + cm + cm + + + Right: + Pravý: + + + Top: + Nahoře: + + + Bottom: + Dole: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3317,10 +3435,6 @@ Přesto použít nastavení? Time given for the algorithm to find best layout. Čas daný algoritmu k nalezení nejlepšího rozvržení. - - min - min - Efficiency: Účinnost: @@ -3329,10 +3443,6 @@ Přesto použít nastavení? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - % - Manual priority Ruční přednost @@ -3349,6 +3459,19 @@ Přesto použít nastavení? Auto crop unused width Automaticky ořezat nepoužívanou šířku + + Prefer one sheet solution + + + + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3761,6 +3884,34 @@ Přesto použít nastavení? Center point Středový bod + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Rotation + Otáčení + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4702,10 +4853,6 @@ Přesto použít nastavení? Length: Délka: - - = - = - U mark Značka U @@ -5435,6 +5582,30 @@ Přesto použít nastavení? This point cannot be origin point. Please, select another origin point Tento bod nemůže být původní bod. Vyberte, prosím, jiný původní bod + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5538,6 +5709,22 @@ Přesto použít nastavení? Orientation: Natočení: + + Options + Volby + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9569,6 +9756,13 @@ Tato volba se projeví po opětovném spuštění. Odstranit položku ze skupiny + + RenameGroup + + rename group + + + RenamePP @@ -10692,10 +10886,6 @@ Chcete uložit změny? Formula wizard Průvodce vzorcem - - = - = - Value Hodnota @@ -11233,6 +11423,26 @@ Chcete uložit změny? Invalid version. Maximum supported format version is %1 Neplatná verze. Nejvyšší podporovaná verze formátu je %1 + + Can't open file %1: +%2. + Nelze otevřít soubor %1: +%2. + + + Can't open schema file %1: +%2. + Nelze otevřít soubor se schématem %1: +%2. + + + Could not load schema file '%1'. + Nepodařilo se nahrát soubor se schématem '%1'. + + + Validation error file %3 in line %1 column %2 + Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 + VAbstractCubicBezierPath @@ -11321,6 +11531,18 @@ Chcete uložit změny? Length Délka + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11492,6 +11714,21 @@ Chcete uložit změny? Neplatný zářez. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11994,6 +12231,26 @@ Chcete uložit změny? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12087,7 +12344,7 @@ Chcete uložit změny? Can't open schema file %1: %2. - Nelze otevřít soubor se schématem %1: + Nelze otevřít soubor se schématem %1: %2. @@ -12096,7 +12353,7 @@ Chcete uložit změny? Validation error file %3 in line %1 column %2 - Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 + Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 Parsing error file %3 in line %1 column %2 @@ -12124,7 +12381,7 @@ Chcete uložit změny? Could not load schema file '%1'. - Nepodařilo se nahrát soubor se schématem '%1'. + Nepodařilo se nahrát soubor se schématem '%1'. Fail to write Canonical XML. @@ -12717,6 +12974,14 @@ Chcete uložit změny? Can't create history record for the tool. Nelze vytvořit záznam historie pro nástroj. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13034,6 +13299,10 @@ Chcete uložit změny? Origin point Původní bod + + Flipping by axis + Převrácení podle osy + VToolFlippingByLine @@ -13045,6 +13314,10 @@ Chcete uložit změny? Second line point Druhý bod čáry + + flipping by line + + VToolHeight @@ -13139,6 +13412,10 @@ Chcete uložit změny? Rotation origin point Původní bod otočení + + move + + VToolOptionsPropertyBrowser @@ -13739,6 +14016,10 @@ Chcete uložit změny? Rotation angle Úhel otáčení + + rotate + + VToolSeamAllowance @@ -15238,6 +15519,191 @@ Chcete uložit změny? Left symbol _ in the name OtočeníElOblouk_ + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15299,6 +15765,18 @@ Chcete uložit změny? Hide not in layout Skrýt ne v rozvržení + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15308,7 +15786,7 @@ Chcete uložit změny? Rename - Přejmenovat + Přejmenovat Delete @@ -15330,6 +15808,26 @@ Chcete uložit změny? Show All Ukázat vše + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Nastavení + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index 44b38165f..1c415e19a 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -50,18 +50,25 @@ Verbindungsdetail hinzufügen + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility change group visibility - + Gruppen Sichtbarkeit ändern ChangeMultipleGroupsVisibility change multiple groups visibility - + Mehrere Gruppensichtbarkeiten ändern @@ -368,11 +375,11 @@ Interfacing - Futter + Verbindungskante Interlining - Zwischenfutter + Einlagestoff @@ -1032,7 +1039,7 @@ Cannot find point with id %1 - + Punkt mit ID %1 kann nicht gefunden werden @@ -1363,7 +1370,7 @@ DialogDateTimeFormats Label date time editor - Datum-Zeit-Beschriftungseditor + Bezeichnung Datum/Zeit bearbeiten Format: @@ -1530,11 +1537,11 @@ Detail label visible - Detailbeschriftung sichtbar + Detailbezeichnung sichtbar Pattern label visible - Musterbeschriftung sichtbar + Musterbezeichnung sichtbar Fabric @@ -1668,19 +1675,19 @@ DialogEditLabel Edit label template - Labelvorlage bearbeiten + Bezeichnungsvorlage bearbeiten Clear current and begin new label - Aktuelles löschen und neues Label beginnen + Aktuelle löschen und neue Bezeichnung beginnen Import from label template - Von Labelvorlage importieren + Von Bezeichnungsvorlage importieren Export label as template - Label als Vorlage exportieren + Bezeichner als Vorlage exportieren Edit @@ -1742,11 +1749,11 @@ Label template - Labelvorlage + Bezeichnungsvorlage Export label template - Labelvorlage exportieren + Bezeichnungsvorlage exportieren template @@ -1822,7 +1829,7 @@ Piece annotation - Schnitteilbeschriftung + Schnitteilanmerkung Piece orientation @@ -1830,7 +1837,7 @@ Piece rotation - Schnitteildrehung + Schnittmusterteil drehen Piece tilt @@ -1866,7 +1873,7 @@ Material: Interfacing - + Material: Verbindungskante Interfacing @@ -1874,7 +1881,7 @@ Material: Interlining - + Material: Einlagestoff Interlining @@ -1882,7 +1889,7 @@ Word: Cut - + Wort: Schnitt Cut @@ -1890,7 +1897,7 @@ Word: on fold - + Wort: auf Falz on fold @@ -2108,7 +2115,7 @@ Rotation angle: - Rotations-Winkel: + Drehungs-Winkel: Center point: @@ -2124,11 +2131,11 @@ Edit radius1 - Bearbeite Radius1 + Radius1 bearbeiten Edit radius2 - Bearbeite Radius2 + Radius2 bearbeiten Edit first angle @@ -2140,7 +2147,7 @@ Edit rotation angle - Bearbeite Rotations-Winkel + Drehungs-Winkel bearbeiten Elliptical arc @@ -2386,7 +2393,7 @@ Edit measurement - Maß anpassen + Maß bearbeiten Empty field @@ -2406,7 +2413,7 @@ <html><head/><body><p>Search final measurements by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search final measurements by regex.</p></body></html> - + <html><head/><body><p>Suche nach endgültigen Maßen mit Ausdruck.</p><p> Schreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um das endgültige Maß mit einem RegEx zu suchen.</p></body></html> @@ -2447,6 +2454,34 @@ Flipping by axis Über Achse spiegeln + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Drehung + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Über Linie spiegeln + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Drehung + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Eindeutiger Name des Schnittteils + Eindeutiger Name des Schnittteils Choose group name @@ -2509,6 +2572,18 @@ New group Neue Gruppe + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2753,19 +2828,19 @@ Rotate objects around point %1. Suffix '%2' - + Drehe Objekte um den Punkt %1. Endung '%2' Flipping by line %1_%2. Suffix '%3' - + Spiegeln der Linie %1_%2. Endung '%3' Flipping by axis through %1 point. Suffix '%2' - + Spiegeln an Achse durch Punkt %1. Endung '%2' Move objects. Suffix '%1' - + Verschiebe Objekte. Endung '%1' @@ -2952,15 +3027,15 @@ <html><head/><body><p>Search increments by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search increments by regex.</p></body></html> - + <html><head/><body><p>Suche Zunahmen nach Ausdruck.</p><p>Schreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um die Zunahme mit einem RegEx zu suchen.</p></body></html> <html><head/><body><p>Search preview calculations by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search preview calculations by regex.</p></body></html> - + <html><head/><body><p>Suche Preview Berechnungen nach Ausdruck. </p><p>Schreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um Preview Berechnungen mit einem RegEx zu suchen.</p></body></html> Increment - + Zunahme Separator @@ -3033,18 +3108,77 @@ Nesting. Please, wait. - + Verschachtelung läuft. Bitte warten. Time left: - + Zeit verbleibend: Time left: %1 - + Zeit verbleibend: %1 Efficiency coefficient: %1% + Effizienz-Koeffizient: %1% + + + + DialogLayoutScale + + Layout scale + + + + Margins + Ränder + + + Left: + Links: + + + cm + cm + + + Right: + Rechts: + + + Top: + Oben: + + + Bottom: + Unten: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> @@ -3306,46 +3440,55 @@ Einstellungen trotzdem anwenden? Follow grainline - + Folge der Fadenlauf-Linie Time: - + Zeit: Time given for the algorithm to find best layout. + Zeit die dem Algorithmus bleibt um das beste Layout zu finden. + + + Efficiency: + Effizienz: + + + Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. + Setze den Layout Effizienz-Koeffizienten. Der Layout Effizienz-Koeffizient ist das Verhältnis der Fläche der Schnittteile zum umgebenden Rechteck aller Schnittteile. Wenn die Verschachtelungstiefe den notwendigen Wert erreicht hat endet der Vorgang. Wenn der Wert 0 ist wird keine Prüfung durchgeführt. + + + Manual priority + Manuelle Rangordnung + + + Nest quantity of copies according to piece settings. + Verschachtele eine Anzahl Kopien entsprechend der Schnittteileinstellungen. + + + Nest quantity + Verschachtelungs Anzahl + + + Auto crop unused width + Automatisches Bechneiden unbenutzter Breite + + + Prefer one sheet solution min + minutes + min + + + Enable this option to prefer getting one sheet solutions. - Efficiency: - - - - Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - - - % - - - - Manual priority - - - - Nest quantity of copies according to piece settings. - - - - Nest quantity - - - - Auto crop unused width + Enable this option to prefer getting one sheet solutions. @@ -3746,20 +3889,48 @@ Einstellungen trotzdem anwenden? Rotation angle: - Rotations-Winkel: + Drehungs-Winkel: Edit rotation angle - Bearbeite Rotations-Winkel + Drehungs-Winkel bearbeiten Rotation origin point: - Rotationsurprung: + Drehung um Ursprungspunkt: Center point Mittelpunkt + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Drehung + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -3805,7 +3976,7 @@ Einstellungen trotzdem anwenden? Multisize - + Multimaß @@ -4153,7 +4324,7 @@ Einstellungen trotzdem anwenden? From multisize measurements - + Aus Multimaß-Maße Pattern @@ -4165,19 +4336,19 @@ Einstellungen trotzdem anwenden? Label data - Beschriftungsdaten + Bezeichnungsdaten Label template: - Beschriftungstemplate: + Bezeichnungsvorlage: Edit pattern label - Schnittmusterbeschriftung editieren + Musterbezeichnung bearbeiten Edit template - Template editieren + Vorlage bearbeiten Date format: @@ -4189,11 +4360,11 @@ Einstellungen trotzdem anwenden? Save label data. - Beschriftungsdaten speichern. + Bezeichnungsdaten speichern. Label data were changed. Do you want to save them before editing label template? - Beschriftungen wurden angepasst. Möchten Sie diese speichern bevor Sie das Beschriftungstemplate editieren? + Bezeichnungsdaten wurden angepasst. Möchten Sie diese Speichern bevor Sie die Bezeichnungsvorlage editieren? Materials @@ -4217,7 +4388,7 @@ Einstellungen trotzdem anwenden? Label language: - Sprache der Bezeichnung: + Bezeichnungs Sprache: @@ -4499,11 +4670,11 @@ Einstellungen trotzdem anwenden? Passmarks - + Passmarken Passmark: - + Passmarke: One line @@ -4531,7 +4702,7 @@ Einstellungen trotzdem anwenden? Passmark - + Passmarke Marks @@ -4555,7 +4726,7 @@ Einstellungen trotzdem anwenden? Select if need designate the corner point as a passmark - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll Intersection @@ -4571,7 +4742,7 @@ Einstellungen trotzdem anwenden? Select if need designate the corner point as a passmark. Show only left passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur linke Passmarke anzeigen. Intersection (only left) @@ -4579,7 +4750,7 @@ Einstellungen trotzdem anwenden? Select if need designate the corner point as a passmark. Show only right passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur rechte Passmarke anzeigen. Intersection (only right) @@ -4587,7 +4758,7 @@ Einstellungen trotzdem anwenden? Control - + Steuerung Visible @@ -4647,7 +4818,7 @@ Einstellungen trotzdem anwenden? The path is a cut contour. Use to control export to DXF-AAMA - + Der Pfad ist eine Schnittkante. Verwenden um den Export in DXF-AAMA zu steuern The list of pieces is empty. Please, first create at least one piece for current pattern piece. @@ -4655,11 +4826,11 @@ Einstellungen trotzdem anwenden? This option has effect only if the second passmark on seam line enabled in global preferences. The option helps disable the second passmark for this passmark only. - + Diese Option hat nur dann Effekt, wenn die zweite Passmarke auf der Nahtkante in den globalen Einstellungen aktiviert ist. Diese Option hilft die zweite Passmarke nur für diese Passmarke zu unterdrücken. Show the second passmark on seam line - + Zeige die zweite Passmarke auf der Nahtkante Excluded @@ -4667,7 +4838,7 @@ Einstellungen trotzdem anwenden? The same curve repeats twice! - + Die selbe Kurve wiederholt sich zweimal! <Empty> @@ -4679,43 +4850,39 @@ Einstellungen trotzdem anwenden? Acute angle that looks inside of piece - + Spitzer Winkel der in das Schnittteil hinein geht Acute angle that looks outside of piece - + Spitzer Winkel der aus dem Schnittteil heraus schaut V mark 2 - + V Markierung 2 Select main path objects, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation - + Wähle die maßgeblichen Hauptpfad Objekte, <b>%1</b> - umgekehrte Richtung der Kurve, <b>%2</b> - Erstellung beenden Manual length - + Manuelle Längenangabe Length: Länge: - - = - - U mark - + U Markierung Box mark - + Box Markierung Edit passmark length - + Ändern der Passmarken Länge @@ -4813,7 +4980,7 @@ Einstellungen trotzdem anwenden? Doubletree - + Dublette Corner @@ -4829,15 +4996,15 @@ Einstellungen trotzdem anwenden? Button - + Knopf Place label - Beschriftung plazieren + Bezeichner platzieren Control - + Steuerung Visible @@ -4861,7 +5028,7 @@ Einstellungen trotzdem anwenden? Circle - + Kreis @@ -5204,7 +5371,7 @@ Einstellungen trotzdem anwenden? Tool point of intersetion arcs - + Werkzeug Punkt am Schnittpunkt der Bögen @@ -5311,7 +5478,7 @@ Einstellungen trotzdem anwenden? Tool point of intersection circles - + Werkzeug Punkt am Schnittpunkt der Kreise @@ -5431,6 +5598,30 @@ Einstellungen trotzdem anwenden? This point cannot be origin point. Please, select another origin point + Dieser Punkt kann nicht der Ausgangspunkt sein. Bitte wähle einen anderen Ausgangspunkt + + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags @@ -5536,6 +5727,22 @@ Einstellungen trotzdem anwenden? Orientation: Ausrichtung: + + Options + Optionen + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -5617,11 +5824,11 @@ Einstellungen trotzdem anwenden? tiled - + unterteilt Numerical control - + Numerische Steuerung @@ -5768,7 +5975,7 @@ Einstellungen trotzdem anwenden? Passmark - + Passmarke Each point in the path must be unique! @@ -5776,7 +5983,7 @@ Einstellungen trotzdem anwenden? Passmarks - + Passmarken Workpiece tool @@ -5800,7 +6007,7 @@ Einstellungen trotzdem anwenden? Doubletree - + Dublette Corner @@ -5816,7 +6023,7 @@ Einstellungen trotzdem anwenden? Button - + Knopf Place label @@ -5828,11 +6035,11 @@ Einstellungen trotzdem anwenden? To open all detail's features complete creating the main path. Please, press OK. - + Um die Eigenschaften des Details zu öffnen vervollständige den maßgeblichen Hauptpfad. Bitte drücke OK. The same curve repeats twice! - + Die selbe Kurve wiederholt sich zweimal! <Empty> @@ -5840,15 +6047,15 @@ Einstellungen trotzdem anwenden? Select main path objects clockwise, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation - + Wähle die maßgeblichen Hauptpfad Objekte im Uhrzeigersinn, <b>%1</b> - umgekehrte Richtung der Kurve, <b>%2</b> - Erstellung beenden Circle - + Kreis Edit passmark length - + Ändern der Passmarken Länge @@ -6276,7 +6483,7 @@ Einstellungen trotzdem anwenden? Cannot find point with id %1 - + Punkt mit ID %1 kann nicht gefunden werden @@ -6295,9 +6502,9 @@ Einstellungen trotzdem anwenden? Followed %n option(s) require restart to take effect: %1. - - Folgende %n Option(en) erfordern einen Neustart um wirksam zu werden: %1. - Folgende %n Option(en) erfordern einen Neustart um wirksam zu werden: %1. + + Folgende %n Option(en) erfordern einen Neubeginn um Wirkung zu zeigen: %1. + Folgende %n Option(en) erfordern einen Neubeginn um Wirkung zu zeigen: %1. @@ -6683,7 +6890,7 @@ Einstellungen trotzdem anwenden? Feed error: invalid "enclosure" with the download link - + Nachrichten Fehler: ungültige "enclosure" des Download Links Error @@ -7851,7 +8058,7 @@ Sollen die Änderungen gespeichert werden? Gradation doesn't support inches - + Abstufung unterstützt keine Inches Measurements have been synced @@ -7911,11 +8118,11 @@ Sollen die Änderungen gespeichert werden? Load Multisize - + Lade MultiMaße Load multisize measurements file - + Lade MultiMaß Maße-Datei Open Tape @@ -7927,7 +8134,7 @@ Sollen die Änderungen gespeichert werden? Edit linked to the pattern measurements - + Änderung der mit dem Schnitt verbundenen Maße Sync @@ -7935,15 +8142,15 @@ Sollen die Änderungen gespeichert werden? Synchronize linked to the pattern measurements after change - + Synchronisierung der mit dem Schnitt verbundenen Maße nach Änderung Unload Current - + Entladen der aktuellen Maße Unload measurements if they were not used in a pattern file - + Entladen der Maße, die nicht in der Schnitt Datei verwendet wurden Individual measurements @@ -7951,7 +8158,7 @@ Sollen die Änderungen gespeichert werden? Multisize measurements - + MultiMaß Maße Pattern files @@ -7975,11 +8182,11 @@ Sollen die Änderungen gespeichert werden? Open Tape app for creating or editing measurements file - + Öffnen der Tape App um ein Maß-Datei anzulegen oder zu ändern Export increments to CSV - + Exportieren der Zunahmen in CSV Name @@ -8015,7 +8222,7 @@ Sollen die Änderungen gespeichert werden? zoom fit best current pattern piece - + Zoom Best-Fit aktuelles Schnittteil Export details skiping the Layout stage @@ -8035,11 +8242,11 @@ Sollen die Änderungen gespeichert werden? Couldn't set size. Need a file with multisize measurements. - + Konnte die Größe nicht übernehmen. Benötige eine Datei mit MultiMaß Massen. Couldn't set height. Need a file with multisize measurements. - + Konnte die Höhe nicht übernehmen. Benötige eine Datei mit MultiMaß Massen. Label template editor @@ -8079,7 +8286,7 @@ Sollen die Änderungen gespeichert werden? You can't export empty scene. Please, include at least one detail in layout. - + Leere Szene kann nicht exportiert werden. Bitte mindestens ein Detail in den Zuschnittplan aufnehmen. Export final measurements error. @@ -8115,19 +8322,19 @@ Sollen die Änderungen gespeichert werden? Select placelabel center point - + Wähle den Mittelpunkt der Beschriftung aus The measurements file '%1' could not be found or provides not enough information. - + Die Maß-Datei '%1' konnte nicht gefunden werden oder enthält ungenügende Informationen. Use these tools to create a pattern - + Verwende diese Werkzeuge um einen Schnitt zu erstellen Scale: - + Maßstab: Create new pattern piece to start working. @@ -8139,127 +8346,127 @@ Sollen die Änderungen gespeichert werden? Cannot save settings. Access denied. - + Kann Einstellungen nicht speichern. Zugriff verwehrt. Ctrl+O - + Strg+O Cannot read settings from a malformed .INI file. - + Kann Einstellungen nicht aus fehlerhafter .INI Datei lesen. Select path objects, <b>%1</b> - reverse direction curve - + Wähle Pfad Objekte, <b>%1</b> - umgekehrte Richtung der Kurve Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - finish creation - + Wähle ein oder mehr Objekte, halte <b>%1</b> - für Mehrfachauswahl, <b>%2</b> - Erstellung beenden Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - confirm selection - + Wähle ein oder mehr Objekte, halte <b>%1</b> - für Mehrfachauswahl, <b>%2</b> - Auswahl bestätigen Point of intersection circle and segment - + Punkt am Schnittpunkt von Kreis und Abschnitt Increase label font - + Beschriftung vergrößern Decrease label font - + Beschriftung verkleinern Original label font - + Original Beschriftung Hide labels - + Beschriftung verstecken Groups of visibility - + Gruppen Sichtbarkeit Export recipe - + Exportieren der Anleitung Recipe files - + Anleitungs-Dateien recipe - + Anleitung Could not save recipe. %1 - + Konnte Anleitung nicht speichern. %1 Curved path tool which uses point as control handle - + Werkzeug Gekrümmter Pfad verwendet einstellbare Angriffspunkte Point of intersection arc and axis - + Punkt am Schnittpunkt von Bogen und Achse Show main path - + Zeige Hauptpfad Globally show pieces main path - + Globale Anzeige des Hauptpfads der Schnittteile Pattern messages - + Schnitt Nachrichten Clear all messages - + Lösche alle Nachrichten Filter - + Filter DEBUG - + DEBUG WARNING - + WARNUNG CRITICAL - + KRITISCH FATAL - + FATAL INFO - + INFO Auto refresh the list with each parse - + Automatische Aktualisierung der Liste mit jedem Leseversuch Watermark - + Wasserzeichen Load - + Laden Remove @@ -8267,19 +8474,19 @@ Sollen die Änderungen gespeichert werden? Edit current - + Aktuelles Anpassen Editor - + Editor Create or edit a watermark - + Anlegen oder Ändern eines Wasserzeichens Watermark files - + Wasserzeichen Dateien @@ -8370,11 +8577,11 @@ Sollen die Änderungen gespeichert werden? Cannot set printer margins - + Kann Druckränder nicht setzen Can't create a path - + Kann keinen Pfad erstellen Pattern @@ -8394,15 +8601,15 @@ Sollen die Änderungen gespeichert werden? Value in line %1 is infinite or NaN. Please, check your calculations. - + Wert in Zeile %1 ist unendlich oder keine Zahl. Bitte die Berechnung überprüfen. Parser error at line %1: %2. - + Fehler beim Lesen in Zeile %1: %2. File error %1. - + Datei Fehler %1. One or more pattern pieces are bigger than the paper format you selected. Please, select a bigger paper format. @@ -8410,7 +8617,7 @@ Sollen die Änderungen gespeichert werden? Description - Beschreibung + Beschreibung Measurement file has unknown format. @@ -8426,7 +8633,7 @@ Sollen die Änderungen gespeichert werden? Application doesn't support multisize table with inches. - + Anwendung unterstützt keine MultiMaß-Tabelle mit Inches. File error. @@ -8438,27 +8645,27 @@ Sollen die Änderungen gespeichert werden? Please, additionally provide: %1 - + Bitte zusätzlich angeben: %1 Preparing details for layout - + Vorbereitung der Details für den Zuschnittplan Timeout. - + Zeitüberschreitung. Cannot set printer page size - + Kann die Seitengröße für den Druck nicht einstellen Cannot set custom printer page size - + Kann keine selbsterstellte Druck Seitengröße einstellen Process has been stoped because of exception. - + Vorgang wurde wegen eines Fehlers unterbrochen. File error. @@ -8466,7 +8673,11 @@ Sollen die Änderungen gespeichert werden? %1 %2 - + Datei Fehler. + +%1 + +%2 @@ -8512,14 +8723,14 @@ Sollen die Änderungen gespeichert werden? OperationMoveLabel move point label - Punkt-Label bewegen + Verschiebe Punkt Beschreibung OperationShowLabel toggle label - + Bezeichner ein/ausschalten @@ -8603,6 +8814,10 @@ Sollen die Änderungen gespeichert werden? Count steps (0 - no limit): Schritte (0 - unbegrenzt): + + All user defined materials have been deleted! + Alle benutzerdefinierten Materialien wurden gelöscht! + User defined materials Benutzerdefinierte Materialien @@ -8619,104 +8834,112 @@ Sollen die Änderungen gespeichert werden? Forbid flipping Umdrehen verhindern + + By default forbid flipping for all workpieces + Spiegeln aller Arbeitsstücke als Vorgabe verbieten + + + By default forbid flipping for all new created workpieces + Spiegeln aller neu erstellten Arbeitsstücke als Vorgabe verbieten + PreferencesConfigurationPage Save - Speichern + Speichern Auto-save modified pattern - Automatisches Speichern + Automatisches Speichern geänderter Schnittmuster Interval: - Intervall: + Intervall: min - min + min Language - Sprache + Sprache GUI language: - Sprache der Benutzeroberfläche: + Sprache der Benutzeroberfläche: Decimal separator parts: - Dezimaltrennzeichen: + Dezimal Trennsymbol: Default unit: - Standard-Maßeinheit: + Standard Einheit: Label language: - Sprache der Bezeichnung: + Bezeichnungs Sprache: Pattern making system - Schnittmuster-System + Schnittmuster Fertigungs-System Pattern making system: - Schnittmuster-System: + Schnittmuster Fertigungs-System: Author: - Autor: + Autor: Book: - Buch: + Buch: Pattern editing - + Muster bearbeiten Reset warnings - + Warnungen zurücksetzen Toolbar - Symbolleiste + Werkzeugleiste The text appears under the icon (recommended for beginners). - Der Text wird unter dem Symbol angezeigt (empfohlen für Anfänger). + Der Text erscheint unter dem Icon (empfohlen für Anfangende). With OS options - + Mit Betriebssystem (OS) Optionen Centimeters - Zentimeter + Zentimeter Millimiters - Millimeter + Millimeter Inches - Zoll + Inch Update a pattern only after a curve release - + Aktualisieren eines Schnittmusters erst nach Loslassen der Kurve Free curve mode - + Freier Kurvenmodus default unit - + Standard Einheit General @@ -8724,85 +8947,85 @@ Sollen die Änderungen gespeichert werden? Double click calls Zoom fit best for current pattern piece - + Doppelklick ruft Zoom Best-Fit für das aktuelle Schnittmusterteil auf Scrolling - + Scrollen Animation - + Animation Duration: - + Dauer: Scrolling animation duration - + Dauer der Scrollanimation ms milliseconds - + ms Update interval: - + Aktualisierungsintervall: Time in milliseconds between each animation update - + Zeit in Millisekunden zwischen den Animationssequenzen Mouse scale - + Maus Skalierung Sensor: sensor mouse - + Sensor: Scale scrolling sensitivity for mouse with sensor - + Skalieren der Scrollempfindlichkeit für Maus mit Sensor Wheel: mouse wheel - + Mausrad: Scale scrolling sensitivity for mouse with wheel - + Skalieren der Scrollempfindlichkeit für Maus mit Rad Acceleration: - + Beschleunigung: User Interface - + Benutzeroberfläche Activate dark mode - + Dunklen Hintergrund aktivieren dark mode - + Dunkler Hintergrund PreferencesPathPage Paths that Valentina uses - + Pfade die Valentina benutzt Type - Typ + Typ Path @@ -8818,15 +9041,15 @@ Sollen die Änderungen gespeichert werden? Open Directory - Verzeichnis öffnen + Öffentliches Verzeichnis (Open Directory) My Individual Measurements - + Meine Persönlichen Maße My Multisize Measurements - + Meine MultiMaß Masse My Patterns @@ -8842,26 +9065,26 @@ Sollen die Änderungen gespeichert werden? My label templates - + Meine Bezeichnungsvorlagen PreferencesPatternPage Graphical output - Grafische Ausgabe + Grafische Ausgabe Use antialiasing - Antialiasing verwenden + Kantenglättung (Anti-Aliasing) verwenden Undo - Rückgängig + Zurück Count steps (0 - no limit): - Schritte (0 - unbegrenzt): + Anzahl Schritte (0 - keine Beschränkung): Workpiece @@ -8873,27 +9096,27 @@ Sollen die Änderungen gespeichert werden? Show a passmark both in the seam allowance and on the seam line. - + Passmarke anzeigen, sowohl auf der Nahtzugabe als auch auf der Naht. Show second passmark on seam line - + Zweite Passmarke auf der Naht anzeigen By default forbid flipping for all new created workpieces - + Spiegeln aller neu erstellten Arbeitsstücke als Standard verbieten By default hide the main path if the seam allowance was enabled - + Verstecke automatisch den Hauptpfad wenn eine Nahtzugabe eingestellt ist Hide main path - + Verstecke Hauptpfad Label font: - + Bezeichner Schriftart: Seam allowance @@ -8901,23 +9124,23 @@ Sollen die Änderungen gespeichert werden? Default value: - + Vorgabe Wert: Label data/time format - + Bezeichner Datum/Zeit Format Date: - + Datum: Edit formats - + Format bearbeiten Time: - + Zeit: Materials @@ -8925,11 +9148,11 @@ Sollen die Änderungen gespeichert werden? Known materials: - + Bekannte Materialien: Manage list of known materials - + Verwaltung der Liste bekannter Materialien Manage @@ -8937,27 +9160,27 @@ Sollen die Änderungen gespeichert werden? When manage pattern materials save them to known materials list - + Verwaltung der Materialien eines Musters speichert diese in die Liste der bekannten Materialien Remeber pattern materials - + Materialien des Musters behalten Curve approximation: - + Kurven-Näherung: Set default curve approximation scale - + Standard Größenordnung der Kurven-Näherung setzen Bold line width - + Fette Zeilenbreite Line width: - + Zeilenbreite: Millimiters @@ -8970,19 +9193,20 @@ Sollen die Änderungen gespeichert werden? Use OpenGL to render a scene. This option will take an affect after restart. - + Verwende OpenGL um eine Szene zu berechnen. +Diese Option wird nach einem Neustart aktiv. Use OpenGL render - + OpenGL Berechnung verwenden antialiasing - + Kantenglättung (Anti-Aliasing) scene render - + Szene berechnen @@ -9164,31 +9388,31 @@ This option will take an affect after restart. Wrong tag name '%1'. - Falscher Symbolname '%1'. + Falscher Symbolname '%1'. Can't convert toUInt parameter - Konnte nicht in Parameter vom Typ 'Integer' umwandeln + Konnte nicht in Parameter vom Typ 'positive Ganzzahl' umwandeln Can't convert toBool parameter - Konnte nicht in Parameter vom Typ 'Boolean' umwandeln + Konnte nicht in Parameter vom Typ 'Wahrheitswert' umwandeln Got empty parameter - Leerer Parameter erhalten + Leerer Parameter erhalten Can't convert toDouble parameter - Kann Parameter toDouble nicht konvertieren + Konnte nicht in Parameter vom Typ 'Fließkomma' umwandeln Got wrong parameter id. Need only id > 0. - Falsche Parameter-ID. Wert > 0 erforderlich. + Falsche Parameter-ID. Wert > 0 erforderlich. United detail - + Vereinigungs Detail Fabric @@ -9216,43 +9440,43 @@ This option will take an affect after restart. Visibility trigger contains error and will be ignored - + Sichtbarkeits Auslöser enthält Fehler und wird ignoriert User material number %1 was not defined in this pattern. - + Benutzer Material Nummer %1 wurde nicht in diesem Schnitt definiert. Error in internal path '%1'. There is no intersection of first point with cutting countour - + Fehler in internem Pfad '%1'. Es gibt keinen Schnittpunkt des ersten Punktes mit der Schnittkontur Error in internal path '%1'. There is no intersection of last point with cutting countour - + Fehler in internem Pfad '%1'. Es gibt keinen Schnittpunkt des letzten Punktes mit der Schnittkontur Cannot calculate a notch for point '%1' in piece '%2'. Seam allowance is empty. - + Kann keinen Einschnitt an Punkt '%1' in Schnittteil '%2' berechnen. Nahtzugabe ist leer. Cannot calculate a notch for point '%1' in piece '%2'. Cannot find position for a notch. - + Cannot calculate a notch for point '%1' in piece '%2'. Kann keine Position für einen Einschnitt finden. Cannot calculate a notch for point '%1' in piece '%2'. Unable to fix a notch position. - + Cannot calculate a notch for point '%1' in piece '%2'. Es ist unmöglich eine Einschnitt Position festzulegen. Cannot calculate a notch for point '%1' in piece '%2'. Notch collapse. - + Kann keinen Einschnitt an Punkt '%1' in Schnittteil '%2' berechnen. Einschnitt fehlgeschlagen. Cannot calculate a notch for point '%1' in piece '%2'. Cannot find intersection. - + Cannot calculate a notch for point '%1' in piece '%2'. Kann keinen Schnittpunkt finden. Cannot get tokens from formula '%1'. Parser error: %2. - + Kann die Symbole aus Formel '%1' nicht lesen. Lese-Fehler: %2. Error @@ -9260,7 +9484,7 @@ This option will take an affect after restart. Empty formula - + Leere Formel Invalid result. Value is infinite or NaN. Please, check your calculations. @@ -9280,55 +9504,55 @@ This option will take an affect after restart. Piece '%1' has invalid layout allowance. Please, check seam allowance to check how seam allowance behave. - + Schnittteil '%1' hat ungültige Zuschnittzugabe. Bitte die Nahtzugabe überprüfen, um zu prüfen wie sich die Nahtzugabe verhält. Piece '%1'. Seam allowance is not valid. - + Schnitteil '%1'. Nahtzugabe ist ungültig. Found null notch for point '%1' in piece '%2'. Length is less than minimal allowed. - + Leerer Einschnitt an Punkt '%1' in Schnittteil '%2' gefunden. Länge ist geringer als die Minimalangabe erlaubt. Cannot calculate a notch for point '%1' in piece '%2' with built in seam allowance. User must manually provide length. - + Kann keinen Einschnitt für Punkt '%1' in Schnittteil '%2' berechnen mit vorgegebener Nahtzugabe. Der Benutzer muss die Länge manuell vorgeben. Cannot calculate seam allowance before for point '%1'. Reason: %2. - + Kann die Nahtzugabe vor Punkt '%1' nicht berechnen . Ursache: %2. Cannot calculate seam allowance after for point '%1'. Reason: %2. - + Kann die Nahtzugabe nach Punkt '%1' nicht berechnen . Ursache: %2. Cannot calculate seam allowance after for point '%1'. Reason: - + Kann die Nahtzugabe nach Punkt '%1' nicht berechnen . Ursache: Cannot calculate passmark length for point '%1'. Reason: %2. - + Kann die Passmarken Länge für Punkt '%1' nicht berechnen. Ursache: %2. Passmark '%1' is not part of piece '%2'. - + Passmarke '%1' ist nicht Teil von Schnittteil '%2'. Cannot cast tool with id '%1'. - + Kann Werkzeug mit der ID '%1' nicht aufrufen. Empty list of nodes for tool with id '%1'. - + Leere Liste der Knoten für Werkzeug mit der ID '%1'. Invalid formula '%1' for tool with id '%2'. %3. - + Ungültige Formel '%1' für Werkzeug mit der ID '%2'. %3. Can't convert toInt parameter - + Konnte nicht in Parameter vom Typ 'Ganzzahl' umwandeln @@ -9546,6 +9770,13 @@ This option will take an affect after restart. RemoveItemFromGroup Remove item from group + Element aus Gruppe entfernen + + + + RenameGroup + + rename group @@ -9556,6 +9787,13 @@ This option will take an affect after restart. Schnittteil umbenennen + + RotationMoveLabel + + move point label + Verschiebe Punkt Beschreibung + + SaveDetailOptions @@ -9567,21 +9805,21 @@ This option will take an affect after restart. SavePieceOptions save detail options - + Detailoptionen speichern SavePiecePathOptions save path options - + Pfad-Optionen speichern SavePlaceLabelOptions save place label options - + Beschriftung Platzierungs-Optionen speichern @@ -9595,18 +9833,18 @@ This option will take an affect after restart. ShowDoubleLabel toggle the first dart label - + Ein/Ausschalten der ersten Abnäher-Bezeichnung togggle the second dart label - + Ein/Ausschalten der zweiten Abnäher-Bezeichnung ShowLabel toggle label - + Bezeichner ein/ausschalten @@ -10171,6 +10409,10 @@ Do you want to save your changes? Export to CSV Als CSV exportieren + + Comma-Separated Values (*.cvs) + Komma-Separierte Werte (*,csv) + Invalid value Ungültiger Wert @@ -10181,7 +10423,7 @@ Do you want to save your changes? Comma-Separated Values - + Komma-Separierte Werte Customer's name @@ -10209,7 +10451,7 @@ Do you want to save your changes? The measurements document has no write permissions. - + Die Maß-Datei hat keine Schreibrechte. Cannot set permissions for %1 to writable. @@ -10229,7 +10471,7 @@ Do you want to save your changes? Multisize measurements - + MultiMaß Maße Invalid result. Value is infinite or NaN. Please, check your calculations. @@ -10241,19 +10483,19 @@ Do you want to save your changes? Export from multisize measurements is not supported. - + Exportieren von MultiMaß-Maßen wird nicht unterstützt. Customer name: - Name des Kunden: + Kundenname: Open multisize … - + MultiMaß öffnen … Create from existing … - + Erstellen aus Vorhandenem … Save… @@ -10261,59 +10503,59 @@ Do you want to save your changes? Import from CSV - + Aus CSV importieren Measurement name in is empty. - + Name des Maßes in ist leer. Merasurement '%1' doesn't match regex pattern. - + Maß '%1' entspricht keinem RegEx pattern. Merasurement '%1' already used in file. - + Maß '%1' wird bereits in Datei verwendet. Measurement '%1' is not one of known measurements. - + Maß '%1' ist kein bekanntes Maß. Individual measurements require at least 2 columns. - + Individuelle Maße erfordern mindestens 2 Spalten. Error in row %1. - + Fehler in Zeile %1. Multisize measurements require at least 4 columns. - + MultiMaß Maße erfordern mindestens 4 Spalten. Cannot convert base size value to double in column 2. - + Kann den Wert der Basis-Größe nicht in eine Fließkommazahl wandeln in Spalte 2. Cannot convert height increase value to double in column 3. - + Kann den Wert der Höhen-Zunahme nicht in eine Fließkommazahl wandeln in Spalte 3. Cannot convert size increase value to double in column 4. - + Kann den Wert der Größenzunahme nicht in eine Fließkommazahl wandeln in Spalte 4. Imported file must not contain the same name twice. - + Importierte Datei darf die selbe Bezeichnung nicht zweimal enthalten. Error in row %1. Measurement name is empty. - + Fehler in Zeile %1. Maß Bezeichnung ist leer. Cannot save settings. Access denied. - + Kann Einstellungen nicht speichern. Zugriff verwehrt. &File @@ -10357,23 +10599,23 @@ Do you want to save your changes? <html><head/><body><p>Search measurements by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search measurements by regex.</p></body></html> - + <html><head/><body><p>Suche nach Maßen mit Ausdruck. </p><p>chreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um Maße mit einem RegEx zu suchen.</p></body></html> Do you want to change the premissions? - + Wollen Sie die Berechtigung ändern ? Cannot read settings from a malformed .INI file. - + Kann Einstellungen nicht aus fehlerhafter .INI Datei lesen. Height (%1): - + Höhe (%1): Size (%1): - + Größe (%1): @@ -10408,15 +10650,15 @@ Do you want to save your changes? Center pin: - + Mittlerer Pin: Top pin: - + Oberer Pin: Bottom pin: - + Unterer Pin: Arrows: @@ -10427,7 +10669,7 @@ Do you want to save your changes? TabLabels Piece label data - + Stück Bezeichnungs-Daten Letter: @@ -10439,7 +10681,7 @@ Do you want to save your changes? Placement: - Platzierung: + Platzierung: Labels @@ -10475,15 +10717,15 @@ Do you want to save your changes? Center pin: - + Mittlerer Pin: Top left pin: - + Oberer linker Pin: Bottom right pin: - + Unterer rechter Pin: Angle: @@ -10507,7 +10749,7 @@ Do you want to save your changes? Quantity: - + Anzahl: on fold @@ -10515,11 +10757,11 @@ Do you want to save your changes? Annotation: - + Anmerkung: A text field to add comments in - + Ein Textfeld um Kommentare hinzuzufügen Orientation: @@ -10527,34 +10769,34 @@ Do you want to save your changes? Rotation: - Drehung: + Drehung: Tilt: - + Neigung: Fold position: - + Falz Position: Edit piece label template - + Schnittteil Bezeichnungsvorlage bearbeiten Options to control position a detail label. <b>Not available if a detail label template is empty</b>. - + Optionen um die Position einer Detail Bezeichnung anzupassen. <b>Nicht verfügbar, wenn die Detail Bezeichnungsvorlage leer ist</b>. Options to control position a pattern label. <b>Not available if a pattern label template is empty</b>. - + Optionen um die Position einer Schnittmuster Bezeichnung anzupassen. <b>Nicht verfügbar, wenn die Schnittmuster Bezeichnungsvorlage leer ist</b>. TabPassmarks Passmark: - + Passmarke: One line @@ -10594,7 +10836,7 @@ Do you want to save your changes? Select if need designate the corner point as a passmark - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll Intersection @@ -10602,15 +10844,15 @@ Do you want to save your changes? Show the second passmark on seam line - + Zeige die zweite Passmarke auf der Nahtkante This option has effect only if the second passmark on seam line enabled in global preferences. The option helps disable the second passmark for this passmark only. - + Diese Option hat nur dann Effekt, wenn die zweite Passmarke auf der Nahtkante in den globalen Einstellungen aktiviert ist. Diese Option hilft die zweite Passmarke nur für diese Passmarke zu unterdrücken. Select if need designate the corner point as a passmark. Show only left passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur linke Passmarke anzeigen. Intersection (only left) @@ -10618,7 +10860,7 @@ Do you want to save your changes? Select if need designate the corner point as a passmark. Show only right passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur rechte Passmarke anzeigen. Intersection (only right) @@ -10638,19 +10880,19 @@ Do you want to save your changes? Acute angle that looks intside of piece - + Spitzer Winkel der in das Schnittteil hinein geht Acute angle that looks outside of piece - + Spitzer Winkel der aus dem Schnittteil heraus schaut V mark 2 - + V Marke 2 Manual length - + Manuelle Längenangabe Length: @@ -10660,10 +10902,6 @@ Do you want to save your changes? Formula wizard Formelassistent - - = - - Value Wert @@ -10678,26 +10916,26 @@ Do you want to save your changes? U mark - + U Markierung Box mark - + Box Markierung List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. - + Liste aller definierten Passmarken. Um eine Passmarke zu definieren gehe auf den Reiter Hauptpfad, rufe das Kontext Menü für ein Punktelement auf und wähle Passmarke aus. TabPaths Main path - + Hauptpfad All objects in path should follow in clockwise direction. - Alle Objekte im Pfad sollten im Uhrzeigersinn folgen. + Alle Objekte im Pfad sollten im Uhrzeigersinn folgen. Forbid piece be mirrored in a layout. @@ -10765,23 +11003,23 @@ Do you want to save your changes? Start point: - + Anfangspunkt: End point: - + Endpunkt: Include as: - + Einfügen als: Internal paths - + Interne Pfade The seam allowance is part of main path - + Die Nahtzugabe ist Teil des Hauptpfades Built in @@ -10789,11 +11027,11 @@ Do you want to save your changes? Hide the main path if the seam allowance is enabled - + Verstecke den Hauptpfad wenn eine Nahtzugabe eingestellt ist Hide main path - + Verstecke Hauptpfad Name of detail: @@ -10809,11 +11047,11 @@ Do you want to save your changes? Force piece to be always flipped in a layout. - + Zwangsweise das Schnittteil immer im Zuschnittplan spiegeln. Force flipping - + Spiegeln erzwingen Move on top @@ -10833,16 +11071,16 @@ Do you want to save your changes? Priority: - + Rangordnung: Controls priority in layout. 0 - no priority. - + Steuert die Rangordnung im Zuschnittplan. 0 - keine Rangordnung. Automatic seam allowance - + Automatisch Custom @@ -10861,7 +11099,7 @@ Do you want to save your changes? Tape This test build is older than %1 days. To provide you with better quality service we restrict the lifetime you can use a test build. To continue using Tape please update to newer test build. The application will be shut down. - + Diese Testversion ist älter als %1 Tage. Um Ihnen eine bessere Qualität bieten zu können, beschränken wir die Dauer der Nutzung einer Testversion. Um weiterhin Tape verwenden zu können, aktualisieren Sie bitte auf eine neuere Testversion. Die Anwendung wird geschloßen. @@ -10989,86 +11227,86 @@ Do you want to save your changes? TapePreferencesConfigurationPage Language - Sprache + Sprache GUI language: - Sprache der Benutzeroberfläche: + Sprache der Benutzeroberfläche: Decimal separator parts: - Dezimaltrennzeichen: + Dezimal Trennsymbol: Pattern making system - Schnittmuster-System + Schnittmuster Fertigungs-System Pattern making system: - Schnittmuster-System: + Schnittmuster Fertigungs-System: Author: - Autor: + Autor: Book: - Buch: + Buch: Measurements editing - + Maße bearbeiten Reset warnings - + Warnungen zurücksetzen Toolbar - Symbolleiste + Werkzeugleiste The text appears under the icon (recommended for beginners). - Der Text wird unter dem Symbol angezeigt (empfohlen für Anfänger). + Der Text erscheint unter dem Icon (empfohlen für Anfangende). Default height and size - Standardhöhe und Größe + Standard Höhe und Größe Default height: - Standardhöhe: + Standardhöhe: Default size: - Standardgröße: + Standardgröße: With OS options - + Mit Betriebssystem (OS) Optionen User Interface - + Benutzeroberfläche Activate dark mode - + Dunklen Hintergrund aktivieren dark mode - + Dunkler Hintergrund TapePreferencesPathPage Paths that Valentina uses - + Pfade die Valentina benutzt Type - Typ + Typ Path @@ -11084,15 +11322,15 @@ Do you want to save your changes? Open Directory - Verzeichnis öffnen + Öffentliches Verzeichnis (Open Directory) My Individual Measurements - + Meine Persönlichen Maße My Multisize Measurements - + Meine MultiMaß Masse My Templates @@ -11103,18 +11341,25 @@ Do you want to save your changes? Meine Schnittmuster + + ToggleDetailInLayout + + detail in layout list + Detail in Zuschnittplan Liste + + TogglePieceForceForbidFlipping piece flipping - + Schnittteil spiegeln TogglePieceInLayout detail in layout list - + Detail in Zuschnittplan Liste @@ -11178,17 +11423,40 @@ Do you want to save your changes? Unexpected version "%1". Unerwartete Version "%1". + + Error replacing a symlink by real file: %1. + Fehler beim Ersetzen eines symbolischen Links durch eine echte Datei: %1. + Error openning a temp file: %1. - + Fehler beim Öffnen der temporären Datei: %1. Invalid version. Minimum supported format version is %1 - + Ungültige Version. Die minimal unterstützte Format Version ist %1 Invalid version. Maximum supported format version is %1 - + Ungültige Version. Die maximal unterstützte Format Version ist %1 + + + Can't open file %1: +%2. + Konnte Datei %1 nicht öffnen: %2. + + + Can't open schema file %1: +%2. + Konnte Schemadatei %1 nicht öffnen: +%2. + + + Could not load schema file '%1'. + Konnte Schemadatei %1 nicht öffnen. + + + Validation error file %3 in line %1 column %2 + Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 @@ -11213,7 +11481,7 @@ Do you want to save your changes? Tabloid Paper format - + Tablett Roll 24in @@ -11243,17 +11511,17 @@ Do you want to save your changes? Roll 48in Paper format - Rolle 44 Zoll {48i?} + Rolle 44 Zoll {48 Zoll ?} Roll 62in Paper format - Rolle 44 Zoll {62i?} + Rolle 44 Zoll {62 Zoll ?} Roll 72in Paper format - Rolle 44 Zoll {72i?} + Rolle 44 Zoll {72 Zoll ?} Custom @@ -11265,18 +11533,30 @@ Do you want to save your changes? VAbstractNode This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. VAbstractOperation Label - + Bezeichnung Length - Länge + Länge + + + operation options + + + + delete operation + + + + Visibility group + @@ -11302,25 +11582,25 @@ Do you want to save your changes? VAbstractPiece Piece '%1'. Not enough points to build seam allowance. - + Schnittteil '%1'. Nicht genügend Punkte vorhanden um Nahtzugabe zu erstellen. VAbstractPieceData Detail - Detail + Detail VAbstractSpline Length - Länge + Länge Label - + Bezeichnung @@ -11363,47 +11643,51 @@ Do you want to save your changes? light salmon - + Helle Lachsfarbe + + + golden rod + Goldrute orange - + Orange deep pink - + Tiefrosa violet - + Violett dark violet - + Dunkles Violett medium sea green - + Mittleres Seegrün lime - + Zitronengrün deep sky blue - + Tiefes Himmelblau corn flower blue - + Kornblumenblau Edit wrong formula - Formel korrigieren + Formel korrigieren goldenrod - + Goldrute @@ -11442,6 +11726,21 @@ Do you want to save your changes? Invalid notch. + Fehlerhafter Einschnitt. + + + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty @@ -11701,7 +12000,7 @@ Do you want to save your changes? Rotation in degrees (one of predefined, export mode). Default value is 180. 0 is no-rotate. Valid values: %1. Each value show how many times details will be rotated. For example 180 mean two times (360/180=2) by 180 degree. - Drehung in Grad (eins der vordefinierten, Exportmodus). Standardwert ist 180. 0 bedeutet keine Drehung. Gültige erte: %1. Jeder Wert zeigt, wie oft Details gedreht werden sollen. Zum Beispiel bedeutet 180, dass das Detail zweimal im 180 Grad gedreht word (360/180=2). + Drehung in Grad (um einen vordefinierten Winkel, Exportmodus). Standardwert ist 180. 0 bedeutet keine Drehung. Gültige Werte: %1. Jeder Wert gibt an, wie oft Details gedreht werden sollen. Zum Beispiel bedeutet 180, dass das Detail zweimal um 180 Grad gedreht wird (360/180=2). Unite pages if possible (export mode). Maximum value limited by QImage that supports only a maximum of 32768x32768 px images. @@ -11741,7 +12040,11 @@ Do you want to save your changes? Number corresponding to output format (default = 0, export mode): - + Zahl entspricht Ausgabeformat (default = 0 , Exportmodus): + + + Number corresponding to page template (default = 0, export mode): + Zahl entspricht Seitenvorlage (Standard = 0, Exportmodus): Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). Alternatively you can use the %1 environment variable. @@ -11749,47 +12052,47 @@ Do you want to save your changes? Export dxf in binary form. - + Export in DXF Binär Format. Export text as paths. - + Text als Pfade exportieren. Export only details. Export details as they positioned in the details mode. Any layout related options will be ignored. - + Exportiere ausschließlich Details. Exportiere Details wie sie im Detailsmodus positioniert wurden. Alle mit dem Zuschnittsplan zusammenhängenden Möglichkeiten werden ignoriert. Export only details that match a piece name regex. - + Exportiere ausschließlich Details die einem Schnittteil RegEx entsprechen. The name regex - + Der RegEx für die Bezeichnung Export to csv with header. By default disabled. - + Exportiere als CSV mit Kopfzeile. Im Standard deaktiviert. Specify codec that will be used to save data. List of supported codecs provided by Qt. Default value depend from system. On Windows, the codec will be based on a system locale. On Unix systems, the codec will might fall back to using the iconv library if no builtin codec for the locale can be found. Valid values for this installation: - + Angabe zum Zeichensatz der verwendet wird um die Daten zu speichern. Die Liste der unterstützten Zeichensätze wird von Qt zur Verfügung gestellt. Der Standard Wert hängt vom System ab. Unter Windows, entspricht der Zeichensatz der Systemeinstellung. Auf Unix Systemen, kann der Zeichensatz auf die iConv Bibliothek zurückgreifen, falls kein vorhandener Zeichensatz für die Systemeinstellung gefunden wird. Gültige Werte für diese Installation: Codec name - + Zeichensatz Specify csv separator character. Default value is '%1'. Valid characters: - + Angabe des CSV Trennzeichens. Standard Wert ist '%1'. Gültige Zeichen: Separator character - + Trennzeichen Calling this command enable exporting final measurements. Specify path to csv file with final measurements. The path must contain path to directory and name of file. It can be absolute or relatetive. In case of relative path will be used current working directory to calc a destination path. - + Der Aufruf dieses Befehls ermöglicht den Export der endgültigen Maße. Gib das Verzeichnisangabe die CSV Datei mit den endgültigen Maßen an. Die Verzeichnisangabe muss das Verzeichnis und den Dateinamen enthalten. Es kann absolut oder relativ angegeben werden. Im Fall einer relativen Verzeichnisangabe wird der Zielpfad ausgehende vom aktuellen Arbeitsverzeichnis ermittelt. Path to csv file @@ -11943,6 +12246,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12035,7 +12358,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Konnte Schemadatei %1 nicht öffnen: + Konnte Schemadatei %1 nicht öffnen: %2. @@ -12044,7 +12367,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 + Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 Parsing error file %3 in line %1 column %2 @@ -12072,7 +12395,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Konnte Schemadatei %1 nicht öffnen. + Konnte Schemadatei %1 nicht öffnen. Fail to write Canonical XML. @@ -12088,7 +12411,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. Couldn't get version information. @@ -12123,7 +12446,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. Add to group @@ -12256,7 +12579,7 @@ Do you want to save your changes? Force flipping - + Spiegeln erzwingen by length @@ -12284,7 +12607,7 @@ Do you want to save your changes? Passmark - + Passmarke Seam allowance angle @@ -12352,15 +12675,15 @@ Do you want to save your changes? V mark 2 - + V Marke 2 U mark - + U Markierung Box mark - + Box Markierung @@ -12617,7 +12940,7 @@ Do you want to save your changes? Detail - Detail + Detail Unnamed path @@ -12665,16 +12988,24 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece Cannot calculate a notch for point '%1' in piece '%2'. - + Kann keinen Einschnitt an Punkt '%1' in Schnittteil '%2' berechnen. Notch for point '%1' in piece '%2' will be disabled. Manual length is less than allowed value. - + Einschnitt für Punkt '%1' in Schnittteil '%2' wird deaktiviert. Die angegebene manuelle Länge ist geringer als die Minimalangabe erlaubt. @@ -12759,7 +13090,7 @@ Do you want to save your changes? VToolAlongLine Length - Länge + Länge Angle @@ -12767,14 +13098,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolArc Length - Länge + Länge Radius @@ -12790,14 +13121,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolArcWithLength Length - Länge + Länge Radius @@ -12813,14 +13144,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolBasePoint Label - + Bezeichnung @@ -12918,14 +13249,14 @@ Do you want to save your changes? VToolDoublePoint Label - + Bezeichnung VToolEllipticalArc Length - Länge + Länge Radius @@ -12941,7 +13272,7 @@ Do you want to save your changes? Label - + Bezeichnung Rotation @@ -12954,6 +13285,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Über Achse spiegeln + VToolFlippingByLine @@ -12965,12 +13300,16 @@ Do you want to save your changes? Second line point Punkt 2 der Linie + + flipping by line + + VToolHeight Length - Länge + Länge Angle @@ -12978,14 +13317,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolLine Length - Länge + Länge Angle @@ -12996,7 +13335,7 @@ Do you want to save your changes? VToolLineIntersect Label - + Bezeichnung Error calculating point '%1'. Lines (%2;%3) and (%4;%5) have no point of intersection @@ -13007,7 +13346,7 @@ Do you want to save your changes? VToolLineIntersectAxis Length - Länge + Länge Angle @@ -13015,7 +13354,7 @@ Do you want to save your changes? Label - + Bezeichnung Error calculating point '%1'. Line (%2;%3) doesn't have intersection with axis through point '%4' and angle %5° @@ -13026,7 +13365,7 @@ Do you want to save your changes? VToolLinePoint Length - Länge + Länge Angle @@ -13034,7 +13373,7 @@ Do you want to save your changes? Label - + Bezeichnung @@ -13045,7 +13384,7 @@ Do you want to save your changes? Length - Länge + Länge Center point @@ -13059,6 +13398,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13568,7 +13911,7 @@ Do you want to save your changes? Rotation angle: - Rotations-Winkel: + Drehungs-Winkel: Fourth point: @@ -13584,7 +13927,7 @@ Do you want to save your changes? Rotation origin point: - Rotationsurprung: + Drehung um Ursprungspunkt: @@ -13605,7 +13948,7 @@ Do you want to save your changes? VToolPointOfContact Length - Länge + Länge Angle @@ -13613,7 +13956,7 @@ Do you want to save your changes? Label - + Bezeichnung Error calculating point '%1'. Circle with center '%2' and radius '%3' doesn't have intersection with line (%4;%5) @@ -13651,6 +13994,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13720,11 +14067,11 @@ Do you want to save your changes? Force flipping - + Spiegeln erzwingen This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. Tool was used after deleting. @@ -13735,7 +14082,7 @@ Do you want to save your changes? VToolShoulderPoint Length - Länge + Länge Angle @@ -13743,7 +14090,7 @@ Do you want to save your changes? Label - + Bezeichnung @@ -13759,9 +14106,13 @@ Do you want to save your changes? union details + + United detail + Vereinigungs Detail + This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. @@ -15146,6 +15497,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15207,6 +15743,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15216,7 +15764,7 @@ Do you want to save your changes? Rename - Umbenennen + Umbenennen Delete @@ -15238,6 +15786,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Einstellungen + + + Categories: %1. + + Valentina @@ -15350,7 +15918,7 @@ Do you want to save your changes? WatermarkWindow Watermark - + Wasserzeichen Opacity: @@ -15447,7 +16015,7 @@ Do you want to save your changes? Watermark files - + Wasserzeichen Dateien Save as diff --git a/share/translations/valentina_el_GR.ts b/share/translations/valentina_el_GR.ts index 556d8da2c..29681d775 100644 --- a/share/translations/valentina_el_GR.ts +++ b/share/translations/valentina_el_GR.ts @@ -50,6 +50,13 @@ προσθήκη λεπτομερειών συνένωσης + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2403,6 +2410,34 @@ Flipping by axis Αναστροφή κατά άξονα + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Rotation + Περιστροφή + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2442,6 +2477,34 @@ Flipping by line Αναστροφή κατά γραμμή + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Rotation + Περιστροφή + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2455,7 +2518,7 @@ Unique pattern piece name - Μοναδικό όνομα κομματιού πατρόν + Μοναδικό όνομα κομματιού πατρόν Choose group name @@ -2465,6 +2528,18 @@ New group Νέα ομάδα + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2992,6 +3067,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + Περιθώρια + + + Left: + Αριστερά: + + + cm + εκ + + + Right: + Δεξιά: + + + Top: + Επάνω: + + + Bottom: + Κάτω: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3244,10 +3362,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3256,10 +3370,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3276,6 +3386,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3688,6 +3811,34 @@ Apply settings anyway? Center point Κεντρικό σημείο + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Rotation + Περιστροφή + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4617,10 +4768,6 @@ Apply settings anyway? Length: Μήκος: - - = - - U mark @@ -5349,6 +5496,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5452,6 +5623,22 @@ Apply settings anyway? Orientation: + + Options + Επιλογές + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9363,6 +9550,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10455,10 +10649,6 @@ Do you want to save your changes? Formula wizard Βοηθός φόρμουλας - - = - - Value Τιμή @@ -10973,6 +11163,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -11061,6 +11269,18 @@ Do you want to save your changes? Length Μήκος + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11228,6 +11448,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11614,6 +11849,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -11687,15 +11942,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -11712,10 +11958,6 @@ Do you want to save your changes? Could not copy temp file to document file Δεν ήταν δυνατή η αντιγραφή του προσωρινού αρχείου στο αρχείο εγγράφου - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -12307,6 +12549,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12608,6 +12858,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Αναστροφή κατά άξονα + VToolFlippingByLine @@ -12619,6 +12873,10 @@ Do you want to save your changes? Second line point Δεύτερο σημείο γραμμής + + flipping by line + + VToolHeight @@ -12713,6 +12971,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13309,6 +13571,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -14734,6 +15000,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -14795,12 +15246,24 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups Rename - Μετονομασία + Μετονομασία Delete @@ -14822,6 +15285,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Προτιμήσεις + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_en_CA.ts b/share/translations/valentina_en_CA.ts index 9b4a1cc9e..9e433e7a3 100644 --- a/share/translations/valentina_en_CA.ts +++ b/share/translations/valentina_en_CA.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2509,6 +2572,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3315,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3327,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3347,6 +3457,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3759,6 +3882,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4700,10 +4851,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5432,6 +5579,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5535,6 +5706,22 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9560,6 +9747,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10683,10 +10877,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11224,6 +11414,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11312,6 +11522,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11483,6 +11705,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11985,6 +12222,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12078,7 +12335,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12087,7 +12344,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12372,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -12708,6 +12965,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13290,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Flipping by axis + VToolFlippingByLine @@ -13036,6 +13305,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13130,6 +13403,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14007,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15510,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + hyperbolic sine function + + + hyperbolic cosine + function cosh + hyperbolic cosine + + + hyperbolic tangens function + function tanh + hyperbolic tangens function + + + hyperbolic arcus sine function + function asinh + hyperbolic arcus sine function + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + hyperbolic arcur tangens function + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + logarithm to the base 2 + + + logarithm to the base 10 + function log10 + logarithm to the base 10 + + + logarithm to the base 10 + function log + logarithm to the base 10 + + + logarithm to base e (2.71828...) + function ln + logarithm to base e (2.71828...) + + + e raised to the power of x + function exp + e raised to the power of x + + + square root of a value + function sqrt + square root of a value + + + sign function -1 if x<0; 1 if x>0 + function sign + sign function -1 if x<0; 1 if x>0 + + + round to nearest integer + function rint + round to nearest integer + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + absolute value + + + min of all arguments + function min + min of all arguments + + + max of all arguments + function max + max of all arguments + + + sum of all arguments + function sum + sum of all arguments + + + mean value of all arguments + function avg + mean value of all arguments + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + Returns the floating-point remainder of numer/denom (rounded towards zero) + VVITConverter @@ -15290,6 +15756,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15777,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15321,6 +15799,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_en_IN.ts b/share/translations/valentina_en_IN.ts index db9d738cb..e1ff249cf 100644 --- a/share/translations/valentina_en_IN.ts +++ b/share/translations/valentina_en_IN.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2509,6 +2572,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3315,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3327,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3347,6 +3457,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3759,6 +3882,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4700,10 +4851,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5432,6 +5579,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5535,6 +5706,22 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9560,6 +9747,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10683,10 +10877,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11224,6 +11414,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11312,6 +11522,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11483,6 +11705,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11985,6 +12222,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12078,7 +12335,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12087,7 +12344,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12372,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -12708,6 +12965,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13290,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Flipping by axis + VToolFlippingByLine @@ -13036,6 +13305,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13130,6 +13403,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14007,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15510,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15756,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15777,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15321,6 +15799,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_en_US.ts b/share/translations/valentina_en_US.ts index cfc4d098e..821d8af44 100644 --- a/share/translations/valentina_en_US.ts +++ b/share/translations/valentina_en_US.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2509,6 +2572,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3315,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3327,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3347,6 +3457,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3759,6 +3882,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4700,10 +4851,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5432,6 +5579,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5535,6 +5706,22 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9560,6 +9747,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10683,10 +10877,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11224,6 +11414,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11312,6 +11522,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11483,6 +11705,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11985,6 +12222,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12078,7 +12335,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12087,7 +12344,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12372,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -12708,6 +12965,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13290,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Flipping by axis + VToolFlippingByLine @@ -13036,6 +13305,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13130,6 +13403,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14007,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15510,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15756,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15777,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15321,6 +15799,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index cd8f57e19..fbb7a1c41 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -50,6 +50,13 @@ añadir detalles de la unión + + ChangeGroupOptions + + rename group + renombrar grupo + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Volteando por ejes + + Enable to create a visibility gropup from original objects + Habilitar para crear un grupo de visibilidad a partir de objetos originales + + + Visibility Group + Grupo de Visibilidad + + + Name: + Nombre: + + + Rotation + Rotación + + + Tags: + Etiquetas: + + + Separate each tag with comma. + Separar cada etiqueta con coma. + + + Add tags + Agregar etiquetas + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Volteando por linea + + Enable to create a visibility gropup from original objects + Habilitar para crear un grupo de visibilidad a partir de objetos originales + + + Visibility Group + Grupo de Visibilidad + + + Name: + Nombre: + + + Rotation + Rotación + + + Tags: + Etiquetas: + + + Separate each tag with comma. + Separar cada etiqueta con coma. + + + Add tags + Agregar etiquetas + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Nombre único de pieza del patrón + Nombre único de pieza del patrón Choose group name @@ -2509,6 +2572,18 @@ New group Nuevo grupo + + Tags: + Etiquetas: + + + Separate each tag with comma. + Separar cada etiqueta con coma. + + + Add tags + Agregar etiquetas + DialogHeight @@ -3048,6 +3123,49 @@ Coeficiente de eficiencia: %1% + + DialogLayoutScale + + Layout scale + Escala del diseño + + + Margins + Margenes + + + Left: + Izquierda: + + + cm + cm + + + Right: + Derecha: + + + Top: + Superior: + + + Bottom: + Inferior: + + + Scale + Escala + + + Horizontal: + Horizontal: + + + Vertical: + Vertical: + + DialogLayoutSettings @@ -3316,10 +3434,6 @@ Aplicar características de todos modos? Time given for the algorithm to find best layout. Tiempo dado para que el algoritmo encuentre el mejor diseño. - - min - min - Efficiency: Eficiencia: @@ -3328,10 +3442,6 @@ Aplicar características de todos modos? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Establecer coeficiente de eficiencia del diseño. El coeficiente de eficiencia del diseño es el radio del área ocupada por las piezas al limite rectangular de todas las piezas. Si el anidamiento alcanza el nivel requerido, el proceso se detiene. Si el valor es 0 no se realizará ninguna comprobación. - - % - % - Manual priority Prioridad manual @@ -3348,6 +3458,19 @@ Aplicar características de todos modos? Auto crop unused width Recorte automático del ancho no utilizado + + Prefer one sheet solution + Prefiere una solución de hoja + + + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. + Habilite esta opción para preferir obtener soluciones de una hoja. + DialogLine @@ -3760,6 +3883,34 @@ Aplicar características de todos modos? Center point Punto central + + Enable to create a visibility gropup from original objects + Habilitar para crear un grupo de visibilidad a partir de objetos originales + + + Visibility Group + Grupo de Visibilidad + + + Name: + Nombre: + + + Rotation + Rotación + + + Tags: + Etiquetas: + + + Separate each tag with comma. + Separar cada etiqueta con coma. + + + Add tags + Agregar etiquetas + DialogNewMeasurements @@ -4701,10 +4852,6 @@ Aplicar características de todos modos? Length: Longitud: - - = - = - U mark Marca U @@ -5433,6 +5580,30 @@ Aplicar características de todos modos? This point cannot be origin point. Please, select another origin point Este punto no puede ser punto de origen. Por favor, seleccione otro punto de origen + + Enable to create a visibility gropup from original objects + Habilitar para crear un grupo de visibilidad a partir de objetos originales + + + Visibility Group + Grupo de Visibilidad + + + Name: + Nombre: + + + Tags: + Etiquetas: + + + Separate each tag with comma. + Separar cada etiqueta con coma. + + + Add tags + Agregar etiquetas + DialogSaveLAyout @@ -5536,6 +5707,22 @@ Aplicar características de todos modos? Orientation: Orientación: + + Options + Opciones + + + Scale + Escala + + + Horizontal: + Horizontal: + + + Vertical: + Vertical: + DialogSaveLayout @@ -6295,7 +6482,7 @@ Aplicar características de todos modos? Followed %n option(s) require restart to take effect: %1. - + Para seguir %n opción(es) se requiere re-inicializar el programa: %1. Para seguir %n opción(es) se requiere re-inicializar el programa: %1. @@ -8256,11 +8443,11 @@ el patrón. Watermark - + Marca de Agua Load - + Cargar Remove @@ -8268,19 +8455,19 @@ el patrón. Edit current - + Editar actual Editor - + Editor Create or edit a watermark - + Crear o editar una marca de agua Watermark files - + Archivos de marca de agua @@ -8467,7 +8654,11 @@ el patrón. %1 %2 - + Error archivo. + +%1 + +%2 @@ -9342,7 +9533,7 @@ Esta opción surtirá efecto después de reiniciar. Can't convert toInt parameter - + No se puede convertir el parámetro toInt @@ -9563,6 +9754,13 @@ Esta opción surtirá efecto después de reiniciar. Remover elemento del grupo + + RenameGroup + + rename group + renombrar grupo + + RenamePP @@ -10686,10 +10884,6 @@ Quieres guardar los cambios? Formula wizard Asistente de formula - - = - = - Value Valor @@ -10712,7 +10906,7 @@ Quieres guardar los cambios? List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. - + Lista de todos los piques definidos. Para definir un pique regrese a la pestaña de Ruta Principal, llame al menú de contexto por un punto del articulo y hágalo un pique. @@ -11227,6 +11421,26 @@ Quieres guardar los cambios? Invalid version. Maximum supported format version is %1 Versión invalida. La versión de formato máximo admitido es %1 + + Can't open file %1: +%2. + No se pudo abrir el archivo %1: +%2. + + + Can't open schema file %1: +%2. + No se pudo abrir el archivo de esquema %1: +%2. + + + Could not load schema file '%1'. + No se puede cargar el archivo de esquema '%1'. + + + Validation error file %3 in line %1 column %2 + Error de validación en el archivo %3 en la línea %1 columna %2 + VAbstractCubicBezierPath @@ -11315,6 +11529,18 @@ Quieres guardar los cambios? Length Longitud + + operation options + opciones de operacion + + + delete operation + borrar operacion + + + Visibility group + Grupo de visibilidad + VAbstractPattern @@ -11486,6 +11712,21 @@ Quieres guardar los cambios? Pique invalido. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + Preparación de datos para error de diseño: Detalle '%1' cuadro <= 0 + + + Preparing data for layout error: Layout paper sheet <= 0 + Preparación de datos para el error de diseño: Hoja de papel del diseño <= 0 + + + Preparing data for layout error: List of details is empty + Preparación de datos para el error de diseño: la lista de detalles está vacía + + VCommandLine @@ -11988,6 +12229,26 @@ Quieres guardar los cambios? Auto crop unused width (export mode). Auto cortar ancho sin uso (modo de exportación). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + Establecer factor de escala horizontal desde 0.01 hasta 3.0 (predeterminado = 1.0, modo exportación). + + + Horizontal scale + Escala horizontal + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + Establecer escala vertical desde 0.01 hasta 3.0 ( Predeterminado = 1.0, modo exportación). + + + Vertical scale + Escala vertical + + + Prefer one sheet layout solution (export mode). + Prefiere una solución de diseño de hoja (modo de exportación). + VCommonSettings @@ -12081,7 +12342,7 @@ Quieres guardar los cambios? Can't open schema file %1: %2. - No se pudo abrir el archivo de esquema %1: + No se pudo abrir el archivo de esquema %1: %2. @@ -12090,7 +12351,7 @@ Quieres guardar los cambios? Validation error file %3 in line %1 column %2 - Error de validación en el archivo %3 en la línea %1 columna %2 + Error de validación en el archivo %3 en la línea %1 columna %2 Parsing error file %3 in line %1 column %2 @@ -12118,7 +12379,7 @@ Quieres guardar los cambios? Could not load schema file '%1'. - No se puede cargar el archivo de esquema '%1'. + No se puede cargar el archivo de esquema '%1'. Fail to write Canonical XML. @@ -12711,6 +12972,14 @@ Quieres guardar los cambios? Can't create history record for the tool. No se puede crear un registro de historial para la herramienta. + + Reading final measurements error. + Error de lectura de medidas finales. + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + Valor para medida final '%1' es infinito o no es un numero. Por favor, revise sus cálculos. + VPiece @@ -12720,7 +12989,7 @@ Quieres guardar los cambios? Notch for point '%1' in piece '%2' will be disabled. Manual length is less than allowed value. - + Pique para el punto '%1' en la pieza '%2' será inhabilitado. La longitud manual es menor que el valor permitido. @@ -12739,7 +13008,7 @@ Quieres guardar los cambios? Not supported file suffix '%1' - + No soporta el archivo con sufijo '%1' cm @@ -12753,7 +13022,7 @@ Quieres guardar los cambios? Cannot open the watermark image. - + No se puede abrir la imagen de marca de agua. @@ -13028,6 +13297,10 @@ Quieres guardar los cambios? Origin point Punto origen + + Flipping by axis + Volteando por ejes + VToolFlippingByLine @@ -13039,6 +13312,10 @@ Quieres guardar los cambios? Second line point Punto segunda linea + + flipping by line + voltear por linea + VToolHeight @@ -13133,6 +13410,10 @@ Quieres guardar los cambios? Rotation origin point Punto de origen de rotación + + move + mover + VToolOptionsPropertyBrowser @@ -13733,6 +14014,10 @@ Quieres guardar los cambios? Rotation angle Angulo de rotación + + rotate + rotar + VToolSeamAllowance @@ -15232,6 +15517,191 @@ Quieres guardar los cambios? Left symbol _ in the name RotaciónElArco_ + + converts degrees to radian + functionm degTorad + convertir grados a radianes + + + converts radian to degrees + function radTodeg + convertir radianes a grados + + + sine function working with radians + function sin + función seno trabajando con radianes + + + cosine function working with radians + function cos + función coseno trabajando con radianes + + + tangens function working with radians + function tan + función tangente trabajando con radianes + + + arcus sine function working with radians + function asin + función arcoseno trabajando con radianes + + + arcus cosine function working with radians + function acos + función arco coseno trabajando con radianes + + + arcus tangens function working with radians + function atan + función arco tangente trabajando con radianes + + + hyperbolic sine function + function sinh + función seno hiperbolico + + + hyperbolic cosine + function cosh + coseno hiperbolico + + + hyperbolic tangens function + function tanh + función tangente hiperbolico + + + hyperbolic arcus sine function + function asinh + función arco coseno hiperbolico + + + hyperbolic arcus cosine function + function acosh + función arco coseno hiperbolico + + + hyperbolic arcur tangens function + function atanh + función arco tangente hiperbolica + + + sine function working with degrees + function sinD + función seno trabajando con grados + + + cosine function working with degrees + function cosD + función coseno trabajando con grados + + + tangens function working with degrees + function tanD + función tangente trabajando con grados + + + arcus sine function working with degrees + function asinD + función arco seno trabajando con grados + + + arcus cosine function working with degrees + function acosD + función arco coseno trabajando con grados + + + arcus tangens function working with degrees + function atanD + función arco tangente trabajando con grados + + + logarithm to the base 2 + function log2 + logaritmo de base 2 + + + logarithm to the base 10 + function log10 + logaritmo de base 10 + + + logarithm to the base 10 + function log + logaritmo de base 10 + + + logarithm to base e (2.71828...) + function ln + logaritmo base e (2.71828...) + + + e raised to the power of x + function exp + e elevado a la potencia de x + + + square root of a value + function sqrt + raíz cuadrada de un valor + + + sign function -1 if x<0; 1 if x>0 + function sign + signo de la función -1 si x<0; 1 si x>0 + + + round to nearest integer + function rint + redondear al entero mas cercano + + + round to up to 1 decimal + function r2cm + redondear hasta 1 decimal + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + cortar, dividir y rotar la operación de modelado. Toma unidades cm. + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + cortar, dividir y rotar la operación de modelado. Toma unidades pulgadas. + + + absolute value + function abs + valor absoluto + + + min of all arguments + function min + minimo de todos los argumentos + + + max of all arguments + function max + máximo de todos los argumentos + + + sum of all arguments + function sum + suma de todos los argumentos + + + mean value of all arguments + function avg + significado del valor de todos los argumentos + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + Devuelve el resto de punto flotante de numerador/denominador (redondeado hacia cero) + VVITConverter @@ -15293,6 +15763,18 @@ Quieres guardar los cambios? Hide not in layout No ocultar en el diseño + + Piece options + Opciones de pieza + + + Delete piece + Eliminar pieza + + + Cannot find piece by id '%1' + No se puede encontrar pieza con id '%1' + VWidgetGroups @@ -15302,7 +15784,7 @@ Quieres guardar los cambios? Rename - Renombrar + Renombrar Delete @@ -15324,6 +15806,26 @@ Quieres guardar los cambios? Show All Mostrar Todo + + Tags: + Etiquetas: + + + Separate each tag with comma. + Separar cada etiqueta con coma. + + + Filter by tags + Filtrar por etiquetas + + + Preferences + Preferencias + + + Categories: %1. + Categoría: %1. + Valentina @@ -15452,11 +15954,11 @@ Quieres guardar los cambios? WatermarkWindow Watermark - + Marca de Agua Opacity: - + Opacidad: Text @@ -15468,7 +15970,7 @@ Quieres guardar los cambios? watermark text - + texto marca de agua Rotation: @@ -15476,20 +15978,20 @@ Quieres guardar los cambios? Font: - + Fuente: The quick brown fox jumps over the lazy dog Use native text to test a font options - + El que es perico, donde quiera es verde Edit font - + Editar fuente Image - + Imagen Path: @@ -15497,7 +15999,7 @@ Quieres guardar los cambios? path to image - + ruta a la imagen Browse… @@ -15505,7 +16007,7 @@ Quieres guardar los cambios? Gray color - + Color gris &File @@ -15541,7 +16043,7 @@ Quieres guardar los cambios? Watermark image - + Imagen Marca de agua File error. @@ -15549,7 +16051,7 @@ Quieres guardar los cambios? Watermark files - + Archivos de marca de agua Save as @@ -15557,7 +16059,7 @@ Quieres guardar los cambios? watermark - + marca de agua Failed to lock. This file already opened in another window. @@ -15598,7 +16100,8 @@ Quieres guardar los cambios? The watermark has been modified. Do you want to save your changes? - + La marca de agua ha sido modificada. +Quiere guardar los cambios? Don't Save @@ -15610,15 +16113,15 @@ Do you want to save your changes? untitled.vwm - + sintítulo.vwm Confirm format rewriting - + Confirmar reescritura de formato This file is using previous format version v%1. The current is v%2. Saving the file with this app version will update the format version for this file. This may prevent you from be able to open the file with older app versions. Do you really want to continue? - + Este archivo esta usando un formato de version previo v%1. El actual es v%2. Guardando el archivo con esta version de la aplicación actualizara el formato de version para este archivo. Esto puede impedir que pueda abrir el archivo con versiones anteriores de la aplicación. ¿Realmente quieres continuar? File saved diff --git a/share/translations/valentina_fi_FI.ts b/share/translations/valentina_fi_FI.ts index 8e177bc36..2101ca8e9 100644 --- a/share/translations/valentina_fi_FI.ts +++ b/share/translations/valentina_fi_FI.ts @@ -36,6 +36,13 @@ + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2059,6 +2066,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2094,6 +2129,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2105,10 +2168,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -2117,6 +2176,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2628,6 +2699,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + cm + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -2820,10 +2934,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2832,10 +2942,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2852,6 +2958,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3260,6 +3379,34 @@ Apply settings anyway? Center point Keskipiste + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4141,10 +4288,6 @@ Apply settings anyway? Length: - - = - - U mark @@ -4805,6 +4948,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4888,6 +5055,22 @@ Apply settings anyway? Orientation: + + Options + Asetukset + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -8519,6 +8702,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -9511,10 +9701,6 @@ Do you want to save your changes? Formula wizard - - = - - Value Arvo @@ -9997,6 +10183,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Tiedostoa %1 ei voitu avata: +%2. + + + Can't open schema file %1: +%2. + Skeematiedostoa %1 ei voitu avata. +%2. + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 + VAbstractCubicBezierPath @@ -10085,6 +10291,18 @@ Do you want to save your changes? Length Pituus + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -10252,6 +10470,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -10634,6 +10867,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -10727,7 +10980,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Skeematiedostoa %1 ei voitu avata. + Skeematiedostoa %1 ei voitu avata. %2. @@ -10736,7 +10989,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 + Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 Parsing error file %3 in line %1 column %2 @@ -10762,10 +11015,6 @@ Do you want to save your changes? Could not remove document file Dokumenttitiedostoa ei voitu poistaa - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -11357,6 +11606,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -11607,6 +11864,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -11618,6 +11879,10 @@ Do you want to save your changes? Second line point Viivan toinen piste + + flipping by line + + VToolHeight @@ -11712,6 +11977,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -12252,6 +12521,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13712,6 +13985,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -13773,13 +14231,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete Poista @@ -13800,6 +14266,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Asetukset + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_fr_FR.ts b/share/translations/valentina_fr_FR.ts index 52f42e174..cfc022d15 100644 --- a/share/translations/valentina_fr_FR.ts +++ b/share/translations/valentina_fr_FR.ts @@ -50,6 +50,13 @@ Ajouter des fusions de pièce de patron + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nom: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nom: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Nom unique de pièce de patron + Nom unique de pièce de patron Choose group name @@ -2509,6 +2572,18 @@ New group Nouveau groupe + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Gauche: + + + cm + cm + + + Right: + Droite: + + + Top: + Haut: + + + Bottom: + Bas: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3312,10 +3430,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3324,10 +3438,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3344,6 +3454,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3756,6 +3879,34 @@ Apply settings anyway? Center point Point central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nom: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4697,10 +4848,6 @@ Apply settings anyway? Length: Longueur: - - = - - U mark @@ -5429,6 +5576,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nom: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5532,6 +5703,22 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9545,6 +9732,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10668,10 +10862,6 @@ Voulez-vous enregistrer les changements? Formula wizard Assistant formule - - = - - Value Valeur @@ -11205,6 +11395,25 @@ Voulez-vous enregistrer les changements? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + impossible d'ouvrir le fichier %1: +%2. + + + Can't open schema file %1: +%2. + Erreur d'ouverture du fichier de schéma %1: %2. + + + Could not load schema file '%1'. + Impossible de lire le schéma de fichier '%1'. + + + Validation error file %3 in line %1 column %2 + Erreur de validation : fichier %3, ligne %1, colonne %2 + VAbstractCubicBezierPath @@ -11293,6 +11502,18 @@ Voulez-vous enregistrer les changements? Length Longueur + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11460,6 +11681,21 @@ Voulez-vous enregistrer les changements? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11962,6 +12198,26 @@ Voulez-vous enregistrer les changements? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12055,7 +12311,7 @@ Voulez-vous enregistrer les changements? Can't open schema file %1: %2. - Erreur d'ouverture du fichier de schéma %1: %2. + Erreur d'ouverture du fichier de schéma %1: %2. Could not load schema file. @@ -12063,7 +12319,7 @@ Voulez-vous enregistrer les changements? Validation error file %3 in line %1 column %2 - Erreur de validation : fichier %3, ligne %1, colonne %2 + Erreur de validation : fichier %3, ligne %1, colonne %2 Parsing error file %3 in line %1 column %2 @@ -12091,7 +12347,7 @@ Voulez-vous enregistrer les changements? Could not load schema file '%1'. - Impossible de lire le schéma de fichier '%1'. + Impossible de lire le schéma de fichier '%1'. Fail to write Canonical XML. @@ -12684,6 +12940,14 @@ Voulez-vous enregistrer les changements? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12993,6 +13257,10 @@ Voulez-vous enregistrer les changements? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -13004,6 +13272,10 @@ Voulez-vous enregistrer les changements? Second line point Point de deuxieme ligne + + flipping by line + + VToolHeight @@ -13098,6 +13370,10 @@ Voulez-vous enregistrer les changements? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13694,6 +13970,10 @@ Voulez-vous enregistrer les changements? Rotation angle + + rotate + + VToolSeamAllowance @@ -15193,6 +15473,191 @@ Voulez-vous enregistrer les changements? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15254,6 +15719,18 @@ Voulez-vous enregistrer les changements? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15263,7 +15740,7 @@ Voulez-vous enregistrer les changements? Rename - Renommer + Renommer Delete @@ -15285,6 +15762,26 @@ Voulez-vous enregistrer les changements? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Préférences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_he_IL.ts b/share/translations/valentina_he_IL.ts index fdba7ec7b..51c1cf1d1 100644 --- a/share/translations/valentina_he_IL.ts +++ b/share/translations/valentina_he_IL.ts @@ -36,6 +36,13 @@ + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -1668,6 +1675,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -1703,6 +1738,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -1714,10 +1777,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -1726,6 +1785,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2185,6 +2256,53 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + ... + ... + + DialogLayoutSettings @@ -2349,10 +2467,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2361,10 +2475,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2381,6 +2491,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -2757,6 +2880,34 @@ Apply settings anyway? Center point נקודת מרכז + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -3475,10 +3626,6 @@ Apply settings anyway? Length: - - = - - U mark @@ -4091,6 +4238,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4174,6 +4345,26 @@ Apply settings anyway? Orientation: + + Options + אפשרויות + + + Scale + + + + Horizontal: + + + + Vertical: + + + + ... + ... + DialogSaveLayout @@ -7474,6 +7665,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -8434,10 +8632,6 @@ Do you want to save your changes? Formula wizard - - = - - Value @@ -8815,6 +9009,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -8903,6 +9115,18 @@ Do you want to save your changes? Length אורך + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -9070,6 +9294,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -9448,6 +9687,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -9521,15 +9780,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -9538,10 +9788,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -10106,6 +10352,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -10352,6 +10606,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -10363,6 +10621,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -10457,6 +10719,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -10961,6 +11227,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -12346,6 +12616,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -12385,13 +12840,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete למחוק @@ -12412,6 +12875,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_id_ID.ts b/share/translations/valentina_id_ID.ts index 357a7597d..dc8318172 100644 --- a/share/translations/valentina_id_ID.ts +++ b/share/translations/valentina_id_ID.ts @@ -36,6 +36,13 @@ + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -1939,6 +1946,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -1974,6 +2009,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -1985,10 +2048,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -1997,6 +2056,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2456,6 +2527,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + cm + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -2620,10 +2734,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2632,10 +2742,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2652,6 +2758,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3044,6 +3163,34 @@ Apply settings anyway? Center point titik tengah + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -3778,10 +3925,6 @@ Apply settings anyway? Length: - - = - - U mark @@ -4417,6 +4560,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4500,6 +4667,22 @@ Apply settings anyway? Orientation: + + Options + pilihan + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -7820,6 +8003,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -8772,10 +8962,6 @@ Do you want to save your changes? Formula wizard - - = - - Value @@ -9195,6 +9381,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -9283,6 +9487,18 @@ Do you want to save your changes? Length panjang + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -9450,6 +9666,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -9832,6 +10063,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -9905,15 +10156,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -9922,10 +10164,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -10490,6 +10728,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -10736,6 +10982,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -10747,6 +10997,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -10841,6 +11095,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -11357,6 +11615,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -12747,6 +13009,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -12786,13 +13233,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete hapus @@ -12813,6 +13268,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index 94ba8841e..7fb63f5c3 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -50,6 +50,13 @@ Aggiungi dettagli di unione + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2439,6 +2446,34 @@ Flipping by axis Ruotare sull'asse + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotazione + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2478,6 +2513,34 @@ Flipping by line Ruota sulla linea + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotazione + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2491,7 +2554,7 @@ Unique pattern piece name - Nome unico del pezzo del modello + Nome unico del pezzo del modello Choose group name @@ -2501,6 +2564,18 @@ New group Nuovo gruppo + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3040,6 +3115,49 @@ Coefficiente di efficienza: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Margini + + + Left: + Sinistra: + + + cm + cm + + + Right: + Destra: + + + Top: + Top: + + + Bottom: + Fondo: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3309,10 +3427,6 @@ Applicare la configurazione comunque? Time given for the algorithm to find best layout. Tempo concesso all’algoritmo per trovare il miglior piazzamento. - - min - min - Efficiency: Efficienza: @@ -3321,10 +3435,6 @@ Applicare la configurazione comunque? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Imposta coefficiente di efficienza del piazzamento. Il coefficiente di efficienza del piazzamento è la percentuale di area occupata dai pezzi all’interno dell’area delimitata. Se la loro disposizione raggiunge il livello richiesto, il processo si interrompe. Se il valore è impostato su 0 non viene effettuata nessuna verifica. - - % - - Manual priority @@ -3341,6 +3451,19 @@ Applicare la configurazione comunque? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3753,6 +3876,34 @@ Applicare la configurazione comunque? Center point Punto centrale + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotazione + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4632,11 +4783,11 @@ Applicare la configurazione comunque? Continue the first point to the cutting contour - + Prolunga il primo punto fino al contorno del pezzo Continue the last point to the cutting contour - + Prolunga l'ultimo punto fino al contorno del pezzo The path is a cut contour. Use to control export to DXF-AAMA @@ -4694,10 +4845,6 @@ Applicare la configurazione comunque? Length: Lunghezza: - - = - - U mark @@ -5426,6 +5573,30 @@ Applicare la configurazione comunque? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5529,6 +5700,22 @@ Applicare la configurazione comunque? Orientation: Orientamento: + + Options + Opzioni + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -8044,7 +8231,7 @@ Vuoi salvare i cambiamenti? Internal path tool - + Strumento Tracciato Interno Save &As… @@ -9555,6 +9742,13 @@ Questa opzione sarà effettiva dopo il riavvio del programma. Rimuovi oggetto dal gruppo + + RenameGroup + + rename group + + + RenamePP @@ -9594,7 +9788,7 @@ Questa opzione sarà effettiva dopo il riavvio del programma. SavePlaceLabelOptions save place label options - + Salva opzioni di posizionamento etichetta @@ -10678,10 +10872,6 @@ Vuoi salvare le tue modifiche? Formula wizard Formula magica - - = - - Value Valore @@ -11215,6 +11405,25 @@ Vuoi salvare le tue modifiche? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Impossibile aprire file %1: +%2. + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -11303,6 +11512,18 @@ Vuoi salvare le tue modifiche? Length Lunghezza + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11474,6 +11695,21 @@ Vuoi salvare le tue modifiche? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11944,6 +12180,26 @@ Vuoi salvare le tue modifiche? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12022,19 +12278,10 @@ Vuoi salvare le tue modifiche? Impossibile aprire file %1: %2. - - Can't open schema file %1: -%2. - - Could not load schema file. Impossibile caricare il file di schema - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -12047,10 +12294,6 @@ Vuoi salvare le tue modifiche? This id is not unique. Questo ID è già esistente. - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -12642,6 +12885,14 @@ Vuoi salvare le tue modifiche? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12955,6 +13206,10 @@ Vuoi salvare le tue modifiche? Origin point Punto d'origine + + Flipping by axis + Ruotare sull'asse + VToolFlippingByLine @@ -12966,6 +13221,10 @@ Vuoi salvare le tue modifiche? Second line point Secondo punto della linea + + flipping by line + + VToolHeight @@ -13060,6 +13319,10 @@ Vuoi salvare le tue modifiche? Rotation origin point Ruota punto d'origine + + move + + VToolOptionsPropertyBrowser @@ -13652,6 +13915,10 @@ Vuoi salvare le tue modifiche? Rotation angle Angolo di rotazione + + rotate + + VToolSeamAllowance @@ -15106,6 +15373,191 @@ Vuoi salvare le tue modifiche? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15167,12 +15619,24 @@ Vuoi salvare le tue modifiche? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups Rename - Rinomina + Rinomina Delete @@ -15194,6 +15658,26 @@ Vuoi salvare le tue modifiche? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferenze + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_nl_NL.ts b/share/translations/valentina_nl_NL.ts index d53ef63fa..cc4d93602 100644 --- a/share/translations/valentina_nl_NL.ts +++ b/share/translations/valentina_nl_NL.ts @@ -50,6 +50,13 @@ voeg een samengevoegd detail toe + + ChangeGroupOptions + + rename group + hernoem groep + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Kantelen via de aslijn + + Enable to create a visibility gropup from original objects + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten + + + Visibility Group + Zichtbaarheid groep + + + Name: + Naam: + + + Rotation + Rotatie + + + Tags: + Etiketten: + + + Separate each tag with comma. + Plaats een komma tussen ieder etiket. + + + Add tags + Etiket toevoegen + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Kantelen via de lijn + + Enable to create a visibility gropup from original objects + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten + + + Visibility Group + Zichtbaarheid groep + + + Name: + Naam: + + + Rotation + Rotatie + + + Tags: + Etiketten: + + + Separate each tag with comma. + Plaats een komma tussen ieder etiket. + + + Add tags + Etiket toevoegen + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unieke patroondeel naam + Unieke patroondeel naam Choose group name @@ -2509,6 +2572,18 @@ New group Nieuwe groep + + Tags: + Etiket: + + + Separate each tag with comma. + Plaats een komma tussen ieder etiket. + + + Add tags + Etiket toevoegen + DialogHeight @@ -3048,6 +3123,49 @@ Efficiëntie coëfficiënt: %1% + + DialogLayoutScale + + Layout scale + Schaal van de opmaak + + + Margins + Marges + + + Left: + Links: + + + cm + cm + + + Right: + Rechts: + + + Top: + Bovenaan: + + + Bottom: + Onderaan: + + + Scale + Schaal + + + Horizontal: + Horizontaal: + + + Vertical: + Vertikaal: + + DialogLayoutSettings @@ -3317,10 +3435,6 @@ Toch de instellingen aanpassen? Time given for the algorithm to find best layout. Tijd toegekend aan het algoritme om de beste opmaak te vinden. - - min - min - Efficiency: Efficiëntie: @@ -3329,10 +3443,6 @@ Toch de instellingen aanpassen? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Bepaal de opmaak efficiëntie coëfficiënt. De opmaak efficiëntie coëfficiënt is de verhouding van het gebied door de stukken ingenomen ten opzichte van de rechthoek die alle objecten bevat. Als het aantal inpassingen het verwachte niveau bereikt, wordt het proces gestopt. Als de waarde 0 is, wordt er niet gechecked. - - % - % - Manual priority Manuele voorrang @@ -3349,6 +3459,19 @@ Toch de instellingen aanpassen? Auto crop unused width Automatisch inkorten van ongebruikte breedte + + Prefer one sheet solution + Verkies een 1-blad oplossing + + + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. + Deze optie aanzetten om 1-blad oplossingen te verkrijgen. + DialogLine @@ -3761,6 +3884,34 @@ Toch de instellingen aanpassen? Center point Middelpunt + + Enable to create a visibility gropup from original objects + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten + + + Visibility Group + Zichtbaarheid groep + + + Name: + Naam: + + + Rotation + Rotatie + + + Tags: + Etiket: + + + Separate each tag with comma. + Plaats een komma tussen ieder etiket. + + + Add tags + Etiket toevoegen + DialogNewMeasurements @@ -4702,10 +4853,6 @@ Toch de instellingen aanpassen? Length: Lengte: - - = - = - U mark U markering @@ -5434,6 +5581,30 @@ Toch de instellingen aanpassen? This point cannot be origin point. Please, select another origin point Dit punt kan geen startpunt zijn. Gelieve een ander startpunt te kiezen + + Enable to create a visibility gropup from original objects + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten + + + Visibility Group + Zichtbaarheid groep + + + Name: + Naam: + + + Tags: + Etiket: + + + Separate each tag with comma. + Plaats een komma tussen ieder etiket. + + + Add tags + Etiket toevoegen + DialogSaveLAyout @@ -5537,6 +5708,22 @@ Toch de instellingen aanpassen? Orientation: Orientatie: + + Options + Opties + + + Scale + Schaal + + + Horizontal: + Horizontaal: + + + Vertical: + Vertikaal: + DialogSaveLayout @@ -8131,7 +8318,7 @@ Do you want to save your changes? Create new pattern piece to start working. - Maak een nieuw patroondeel om te gaan werken. + Start een nieuw patroondeel op. Changes applied. @@ -9139,7 +9326,7 @@ Deze optie wordt actief na een herstart.. QObject Create new pattern piece to start working. - Maak een nieuw patroondeel om te gaan werken. + Start een nieuw patroondeel op. mm @@ -9566,6 +9753,13 @@ Deze optie wordt actief na een herstart.. Verwijder item van groep + + RenameGroup + + rename group + hernoem groep + + RenamePP @@ -10689,10 +10883,6 @@ Wil je deze veranderingen opslaan? Formula wizard Formule assistent - - = - = - Value Waarde @@ -11230,6 +11420,26 @@ Wil je deze veranderingen opslaan? Invalid version. Maximum supported format version is %1 Ongeldige versie. Maximum ondersteund formaat is %1 + + Can't open file %1: +%2. + kan bestand niet openen %1: +%2. + + + Can't open schema file %1: +%2. + Kan schema bestand niet openen %1: +%2. + + + Could not load schema file '%1'. + Kan schema bestand niet laden '%1". + + + Validation error file %3 in line %1 column %2 + Validatie fout bestand %3 op lijn %1 kolom %2 + VAbstractCubicBezierPath @@ -11318,6 +11528,18 @@ Wil je deze veranderingen opslaan? Length Lengte + + operation options + bewerkingsopties + + + delete operation + verwijder bewerking + + + Visibility group + Zichtbaarheid groep + VAbstractPattern @@ -11489,6 +11711,21 @@ Wil je deze veranderingen opslaan? Ongeldige inkeping. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + Fout bij het voorbereiden van gegevens voor lay-out: Detail '%1' vierkant <= 0 + + + Preparing data for layout error: Layout paper sheet <= 0 + Fout bij het voorbereiden van gegevens voor lay-out: Lay-out blad papier <=0 + + + Preparing data for layout error: List of details is empty + Fout bij het voorbereiden van gegevens voor lay-out: Detail lijst is leeg + + VCommandLine @@ -11991,6 +12228,26 @@ Wil je deze veranderingen opslaan? Auto crop unused width (export mode). Automatisch inkorten van ongebruikte breedte (export modus). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + Zet de horizontale schaal factor tussen 0.01 en 3.0 (standaard=1.0, export modus). + + + Horizontal scale + Horizontale schaal + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + Zet de vertikale schaal factor tussen 0.01 en 3.0 (standaard=1.0, export modus). + + + Vertical scale + Vertikale schaal + + + Prefer one sheet layout solution (export mode). + Verkies 1-blad opmaak oplossing (export modus). + VCommonSettings @@ -12084,7 +12341,7 @@ Wil je deze veranderingen opslaan? Can't open schema file %1: %2. - Kan schema bestand niet openen %1: + Kan schema bestand niet openen %1: %2. @@ -12093,7 +12350,7 @@ Wil je deze veranderingen opslaan? Validation error file %3 in line %1 column %2 - Validatie fout bestand %3 op lijn %1 kolom %2 + Validatie fout bestand %3 op lijn %1 kolom %2 Parsing error file %3 in line %1 column %2 @@ -12121,7 +12378,7 @@ Wil je deze veranderingen opslaan? Could not load schema file '%1'. - Kan schema bestand niet laden '%1". + Kan schema bestand niet laden '%1". Fail to write Canonical XML. @@ -12714,6 +12971,14 @@ Wil je deze veranderingen opslaan? Can't create history record for the tool. Kan geen geschiedenis item voor dit gereedschap aanmaken. + + Reading final measurements error. + Inlezen definitieve maten fout. + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + Waarde voor de definitieve maten '%1' is oneindig of NaN. Controlleer uw berekeningen. + VPiece @@ -13031,6 +13296,10 @@ Wil je deze veranderingen opslaan? Origin point Startpunt + + Flipping by axis + Kantelen via de aslijn + VToolFlippingByLine @@ -13042,6 +13311,10 @@ Wil je deze veranderingen opslaan? Second line point Tweede lijnpunt + + flipping by line + Kantelen langs een lijn + VToolHeight @@ -13136,6 +13409,10 @@ Wil je deze veranderingen opslaan? Rotation origin point Rotatie startpunt + + move + verplaats + VToolOptionsPropertyBrowser @@ -13736,6 +14013,10 @@ Wil je deze veranderingen opslaan? Rotation angle Hoek van draaiing + + rotate + draai + VToolSeamAllowance @@ -15235,6 +15516,191 @@ Wil je deze veranderingen opslaan? Left symbol _ in the name RotationElArc_ + + converts degrees to radian + functionm degTorad + omzetten graden naar radialen + + + converts radian to degrees + function radTodeg + omzetten radialen naar graden + + + sine function working with radians + function sin + sinus gebruikt radialen + + + cosine function working with radians + function cos + cosinus gebruikt radialen + + + tangens function working with radians + function tan + tangens gebruikt radialen + + + arcus sine function working with radians + function asin + boogsinus gebruikt radialen + + + arcus cosine function working with radians + function acos + boogcosinus gebruikt radialen + + + arcus tangens function working with radians + function atan + boogtanges gebruikt radialen + + + hyperbolic sine function + function sinh + hyperbolische sine functie + + + hyperbolic cosine + function cosh + hyperbolische cosinus + + + hyperbolic tangens function + function tanh + hyperbolische tangens functie + + + hyperbolic arcus sine function + function asinh + hyperbolische arcus sine functie + + + hyperbolic arcus cosine function + function acosh + hyperbolische boogcosinus + + + hyperbolic arcur tangens function + function atanh + hyperbolische arcus tangens functie + + + sine function working with degrees + function sinD + sinus gebruikt graden + + + cosine function working with degrees + function cosD + cosinus gebruikt graden + + + tangens function working with degrees + function tanD + tangens gebruikt graden + + + arcus sine function working with degrees + function asinD + boogsinus gebruikt graden + + + arcus cosine function working with degrees + function acosD + boogcosinus gebruikt graden + + + arcus tangens function working with degrees + function atanD + boogtangens gebruikt graden + + + logarithm to the base 2 + function log2 + logaritme naar de basis 2 + + + logarithm to the base 10 + function log10 + logaritme naar de basis 10 + + + logarithm to the base 10 + function log + logaritme naar de basis 10 + + + logarithm to base e (2.71828...) + function ln + logaritme naar basis e (2.71828...) + + + e raised to the power of x + function exp + e tot de macht van x + + + square root of a value + function sqrt + Kwadrant wortelgetal van een waarde + + + sign function -1 if x<0; 1 if x>0 + function sign + Teken functie -1 als x<0; 1 als x>0 + + + round to nearest integer + function rint + Rond het dichtbijzijnde gehele getal + + + round to up to 1 decimal + function r2cm + afronden op 1 decimaal + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + model snijden, splitsen en draaien operatie. Gebruikt cm. + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + model snijden, splitsen en draaien operatie. Gebruikt inches. + + + absolute value + function abs + absolute waarde + + + min of all arguments + function min + min van alle argumenten + + + max of all arguments + function max + max van alle argumenten + + + sum of all arguments + function sum + som van alle argumenten + + + mean value of all arguments + function avg + Gemiddelde waarde van alle argumenten + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + Brengt het drijvende-punt restant van numerator/denominator terug ( afgerond naar nul) + VVITConverter @@ -15296,6 +15762,18 @@ Wil je deze veranderingen opslaan? Hide not in layout Verberg niet in opmaak + + Piece options + Werkstuk opties + + + Delete piece + Verwijder werkstuk + + + Cannot find piece by id '%1' + Kan werkstuk met id '%1' niet vinden + VWidgetGroups @@ -15305,7 +15783,7 @@ Wil je deze veranderingen opslaan? Rename - Hernoem + Hernoem Delete @@ -15327,6 +15805,26 @@ Wil je deze veranderingen opslaan? Show All Vertoon Alles + + Tags: + Etiket: + + + Separate each tag with comma. + Plaats een komma tussen ieder etiket. + + + Filter by tags + Filter per etiket + + + Preferences + Voorkeuren + + + Categories: %1. + Categoriëen: %1. + Valentina diff --git a/share/translations/valentina_pl_PL.ts b/share/translations/valentina_pl_PL.ts index 3543a96e8..0b4cf98fa 100644 --- a/share/translations/valentina_pl_PL.ts +++ b/share/translations/valentina_pl_PL.ts @@ -50,6 +50,13 @@ dodaj szczegóły połaczenia + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2263,6 +2270,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2302,6 +2337,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2315,7 +2378,7 @@ Unique pattern piece name - Unikalna nazwa formy + Unikalna nazwa formy Choose group name @@ -2325,6 +2388,18 @@ New group Nowa grupa + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2816,6 +2891,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + Marginesy + + + Left: + Lewy: + + + cm + cm + + + Right: + Prawy: + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3004,10 +3122,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3016,10 +3130,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3036,6 +3146,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3440,6 +3563,34 @@ Apply settings anyway? Center point Punkt środkowy + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4269,10 +4420,6 @@ Apply settings anyway? Length: Długość: - - = - - U mark @@ -4926,6 +5073,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5009,6 +5180,22 @@ Apply settings anyway? Orientation: + + Options + Opcje + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -8598,6 +8785,13 @@ This option will take an affect after restart. Usuń element z grupy + + RenameGroup + + rename group + + + RenamePP @@ -9657,10 +9851,6 @@ Do you want to save your changes? Formula wizard Kreator formuł - - = - - Value Wartość @@ -10179,6 +10369,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -10267,6 +10475,18 @@ Do you want to save your changes? Length Długość + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -10434,6 +10654,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -10816,6 +11051,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -10889,15 +11144,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -10906,10 +11152,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -11489,6 +11731,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -11747,6 +11997,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -11758,6 +12012,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -11852,6 +12110,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -12380,6 +12642,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13815,6 +14081,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -13876,13 +14327,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete Usuń @@ -13903,6 +14362,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Ustawienia + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_pt_BR.ts b/share/translations/valentina_pt_BR.ts index cd2c19ffc..fa392ed72 100644 --- a/share/translations/valentina_pt_BR.ts +++ b/share/translations/valentina_pt_BR.ts @@ -50,6 +50,13 @@ Adicionar detalhes de ligação + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Espelhar através do eixo + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotação + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Espelhar através de linha + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotação + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Nome único da peça de molde + Nome único da peça de molde Choose group name @@ -2509,6 +2572,18 @@ New group Novo grupo + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + Margens + + + Left: + Esquerda: + + + cm + cm + + + Right: + Direita: + + + Top: + Topo: + + + Bottom: + Base: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3313,10 +3431,6 @@ Aplicar configurações de qualquer forma? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3325,10 +3439,6 @@ Aplicar configurações de qualquer forma? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3345,6 +3455,19 @@ Aplicar configurações de qualquer forma? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3757,6 +3880,34 @@ Aplicar configurações de qualquer forma? Center point Ponto central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotação + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4698,10 +4849,6 @@ Aplicar configurações de qualquer forma? Length: Comprimento: - - = - - U mark @@ -5430,6 +5577,30 @@ Aplicar configurações de qualquer forma? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5529,6 +5700,22 @@ Aplicar configurações de qualquer forma? Orientation: Orientação: + + Options + Opções + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9543,6 +9730,13 @@ Esta opção terá um efeito após o reinício. + + RenameGroup + + rename group + + + RenamePP @@ -10666,10 +10860,6 @@ Deseja salvar suas mudanças? Formula wizard Assistente de fórmulas - - = - - Value Valor @@ -11203,6 +11393,26 @@ Deseja salvar suas mudanças? Invalid version. Maximum supported format version is %1 Versão inválida. O formato da versão máxima suportado é %1 + + Can't open file %1: +%2. + Impossível abrir o arquivo %1: +%2. + + + Can't open schema file %1: +%2. + Impossível abrir o arquivo de esquema %1: +%2. + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + Arquivo de erro de validação %3 na linha %1 coluna %2 + VAbstractCubicBezierPath @@ -11291,6 +11501,18 @@ Deseja salvar suas mudanças? Length Comprimento + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11462,6 +11684,21 @@ Deseja salvar suas mudanças? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11932,6 +12169,26 @@ Deseja salvar suas mudanças? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12025,7 +12282,7 @@ Deseja salvar suas mudanças? Can't open schema file %1: %2. - Impossível abrir o arquivo de esquema %1: + Impossível abrir o arquivo de esquema %1: %2. @@ -12034,7 +12291,7 @@ Deseja salvar suas mudanças? Validation error file %3 in line %1 column %2 - Arquivo de erro de validação %3 na linha %1 coluna %2 + Arquivo de erro de validação %3 na linha %1 coluna %2 Parsing error file %3 in line %1 column %2 @@ -12048,10 +12305,6 @@ Deseja salvar suas mudanças? Got wrong parameter id. Need only id > 0. Obteve parâmetro de identidade errado. Permitido somente Identidade > 0. - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -12643,6 +12896,14 @@ Deseja salvar suas mudanças? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12960,6 +13221,10 @@ Deseja salvar suas mudanças? Origin point Ponto de origem + + Flipping by axis + Espelhar através do eixo + VToolFlippingByLine @@ -12971,6 +13236,10 @@ Deseja salvar suas mudanças? Second line point Segundo ponto da linha + + flipping by line + + VToolHeight @@ -13065,6 +13334,10 @@ Deseja salvar suas mudanças? Rotation origin point Rotação do ponto de origem + + move + + VToolOptionsPropertyBrowser @@ -13665,6 +13938,10 @@ Deseja salvar suas mudanças? Rotation angle Ângulo de rotação + + rotate + + VToolSeamAllowance @@ -15119,6 +15396,191 @@ Deseja salvar suas mudanças? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15180,6 +15642,18 @@ Deseja salvar suas mudanças? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15189,7 +15663,7 @@ Deseja salvar suas mudanças? Rename - Renomear + Renomear Delete @@ -15211,6 +15685,26 @@ Deseja salvar suas mudanças? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferências + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_ro_RO.ts b/share/translations/valentina_ro_RO.ts index 23bdd373b..97e21378f 100644 --- a/share/translations/valentina_ro_RO.ts +++ b/share/translations/valentina_ro_RO.ts @@ -50,6 +50,13 @@ adauga detalii ale Uniunii + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2228,6 +2235,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2263,6 +2298,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2274,10 +2337,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -2286,6 +2345,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2801,6 +2872,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + cm + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -2993,10 +3107,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3005,10 +3115,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3025,6 +3131,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3433,6 +3552,34 @@ Apply settings anyway? Center point Punct central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4230,10 +4377,6 @@ Apply settings anyway? Length: Lungime: - - = - - U mark @@ -4883,6 +5026,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4966,6 +5133,22 @@ Apply settings anyway? Orientation: + + Options + Opțiuni + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -8486,6 +8669,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -9474,10 +9664,6 @@ Do you want to save your changes? Formula wizard Asistent Formulă - - = - - Value Valoare @@ -9932,6 +10118,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -10020,6 +10224,18 @@ Do you want to save your changes? Length Lungime + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -10187,6 +10403,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -10569,6 +10800,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -10642,15 +10893,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -10659,10 +10901,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -11231,6 +11469,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -11477,6 +11723,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -11488,6 +11738,10 @@ Do you want to save your changes? Second line point Al doilea Punct de linie + + flipping by line + + VToolHeight @@ -11582,6 +11836,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -12110,6 +12368,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13535,6 +13797,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -13574,13 +14021,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete Șterge @@ -13601,6 +14056,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferințe + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_ru_RU.ts b/share/translations/valentina_ru_RU.ts index 53738b7e6..e54ecb08b 100644 --- a/share/translations/valentina_ru_RU.ts +++ b/share/translations/valentina_ru_RU.ts @@ -50,6 +50,13 @@ добавить объединение деталей + + ChangeGroupOptions + + rename group + переименовать группу + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Отразить объект по оси + + Enable to create a visibility gropup from original objects + Позволяет создать группу видимости из исходных объектов + + + Visibility Group + Группа видимости + + + Name: + Название: + + + Rotation + Поворот + + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Add tags + Добавить категории + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Отразить объект по линии + + Enable to create a visibility gropup from original objects + Позволяет создать группу видимости из исходных объектов + + + Visibility Group + Группа видимости + + + Name: + Название: + + + Rotation + Поворот + + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Add tags + Добавить категории + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Уникальное имя выкройки + Уникальное имя выкройки Choose group name @@ -2509,6 +2572,18 @@ New group Новая группа + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Add tags + Добавить категории + DialogHeight @@ -3048,6 +3123,49 @@ Коэффициент эффективности: %1% + + DialogLayoutScale + + Layout scale + Масштаб раскладки + + + Margins + Поля + + + Left: + Левое: + + + cm + см + + + Right: + Правое: + + + Top: + Верхнее: + + + Bottom: + Нижнее: + + + Scale + Масштаб + + + Horizontal: + По горизонтали: + + + Vertical: + По вертикали: + + DialogLayoutSettings @@ -3317,10 +3435,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. Время, данное алгоритму, чтобы найти лучшую раскладку. - - min - - Efficiency: Эффективность: @@ -3329,17 +3443,13 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Установите коэффициент эффективности раскладки. Коэффициент эффективности раскладки - это отношение площади, занимаемой деталями, к ограничивающему прямоугольнику всех деталей. Когда раскладка достигает установленного значения, процесс останавливается. Если значение равно 0, проверка не производится. - - % - - Manual priority Ручной приоритет Nest quantity of copies according to piece settings. - + Разложить согласно количеству копий в соответствии с настройками детали. Nest quantity @@ -3349,6 +3459,19 @@ Apply settings anyway? Auto crop unused width Автоматически обрезать неиспользуемую ширину + + Prefer one sheet solution + Предпочесть решение с одним листом + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3761,6 +3884,34 @@ Apply settings anyway? Center point Центральная точка + + Enable to create a visibility gropup from original objects + Позволяет создать группу видимости из исходных объектов + + + Visibility Group + Группа видимости + + + Name: + Название: + + + Rotation + Поворот + + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Add tags + Добавить категории + DialogNewMeasurements @@ -4702,10 +4853,6 @@ Apply settings anyway? Length: Длина: - - = - - U mark U метка @@ -5433,6 +5580,54 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + Эта точка не может быть исходной точкой. Пожалуйста, выберите другую исходную точку + + + Enable to create a visibility gropup from original objects + Позволяет создать группу видимости из исходных объектов + + + Visibility Group + Группа видимости + + + Name: + Название: + + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Add tags + Добавить категории + + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags @@ -5538,6 +5733,22 @@ Apply settings anyway? Orientation: Ориентация: + + Options + Опции + + + Scale + Масштаб + + + Horizontal: + По горизонтали: + + + Vertical: + По вертикали: + DialogSaveLayout @@ -8145,7 +8356,7 @@ Do you want to save your changes? Ctrl+O - + Ctrl+O Cannot read settings from a malformed .INI file. @@ -8153,7 +8364,7 @@ Do you want to save your changes? Select path objects, <b>%1</b> - reverse direction curve - + Выберите объекты контура, <b>%1 </b>- кривая обратного направления Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - finish creation @@ -8460,7 +8671,7 @@ Do you want to save your changes? Process has been stoped because of exception. - + Процесс был остановлен из-за исключения. File error. @@ -9315,19 +9526,19 @@ This option will take an affect after restart. Cannot calculate seam allowance before for point '%1'. Reason: %2. - + Невозможно рассчитать припуск на шов перед точкой '%1'. Причина: %2. Cannot calculate seam allowance after for point '%1'. Reason: %2. - + Невозможно рассчитать припуск на шов после точки '%1'. Причина: %2. Cannot calculate seam allowance after for point '%1'. Reason: - + Невозможно рассчитать припуск на шов после точки '%1'. Причина: Cannot calculate passmark length for point '%1'. Reason: %2. - + Невозможно рассчитать длину надсечки для точки '%1'. Причина: %2. Passmark '%1' is not part of piece '%2'. @@ -9343,7 +9554,7 @@ This option will take an affect after restart. Invalid formula '%1' for tool with id '%2'. %3. - + Неверная формула '%1' для инструмента с идентификатором '%2'. %3. Can't convert toInt parameter @@ -9568,6 +9779,13 @@ This option will take an affect after restart. Удалить объект из группы + + RenameGroup + + rename group + переименовать группу + + RenamePP @@ -10691,10 +10909,6 @@ Do you want to save your changes? Formula wizard Мастер формул - - = - - Value Значение @@ -10717,7 +10931,7 @@ Do you want to save your changes? List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. - + Список всех установленных надсечек. Чтобы поставить надсечку, вернитесь во вкладку «Главный контур», вызовите контекстное меню у нужной точки и поставьте галочку в строке "Надсечка". @@ -11232,6 +11446,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 Недействительная версия. Максимально поддерживаемая версия формата %1 + + Can't open file %1: +%2. + Невозможно открыть файл %1: +%2. + + + Can't open schema file %1: +%2. + Невозможно открыть файл схемы %1: +%2. + + + Could not load schema file '%1'. + Не удалось открыть файл схемы '%1'. + + + Validation error file %3 in line %1 column %2 + Ошибка валидации файла %3 в строке %1 столбца %2 + VAbstractCubicBezierPath @@ -11307,7 +11541,7 @@ Do you want to save your changes? VAbstractNode This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. @@ -11320,6 +11554,18 @@ Do you want to save your changes? Length Длина + + operation options + параметры операции + + + delete operation + удалить операцию + + + Visibility group + Группа видимости + VAbstractPattern @@ -11491,6 +11737,21 @@ Do you want to save your changes? Неправильная надсечка. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + Ошибка подготовки данных для раскладки: список деталей пуст + + VCommandLine @@ -11955,7 +12216,7 @@ Do you want to save your changes? Order detail to follow grainline direction (export mode). - + Получите детали в соответствии с направлением долевой (режим экспорта). <Time> in minutes given for the algorithm to find best layout. Time must be in range from 1 minute to 60 minutes. Default value 1 minute. @@ -11979,7 +12240,7 @@ Do you want to save your changes? Nest quantity copies of each piece (export mode). - + Разложить согласно количеству копий каждой детали (режим экспорта). Set layout efficiency <coefficient>. Layout efficiency coefficient is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Coefficient must be in range from 0 to 100. Default value 0. @@ -11993,6 +12254,26 @@ Do you want to save your changes? Auto crop unused width (export mode). Автоматическая обрезка неиспользуемой ширины (режим экспорта). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + Масштаб по горизонтали + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + Масштаб по вертикали + + + Prefer one sheet layout solution (export mode). + Предпочесть решение с одним листом раскладки (режим экспорта). + VCommonSettings @@ -12086,7 +12367,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Невозможно открыть файл схемы %1: + Невозможно открыть файл схемы %1: %2. @@ -12095,7 +12376,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Ошибка валидации файла %3 в строке %1 столбца %2 + Ошибка валидации файла %3 в строке %1 столбца %2 Parsing error file %3 in line %1 column %2 @@ -12123,7 +12404,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Не удалось открыть файл схемы '%1'. + Не удалось открыть файл схемы '%1'. Fail to write Canonical XML. @@ -12135,11 +12416,11 @@ Do you want to save your changes? Not unique id (%1) - + Не уникальный идентификатор (%1) This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. Couldn't get version information. @@ -12174,7 +12455,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. Add to group @@ -12212,7 +12493,7 @@ Do you want to save your changes? Result is infinite - + Результат бесконечен Result is NaN @@ -12706,14 +12987,30 @@ Do you want to save your changes? VPatternRecipe Invalid tag %1 - + Неправильная категория %1 Can't find element by id '%1' - + Не удается найти элемент с идентификатором '%1' Can't create history record for the tool. + Невозможно создать запись истории для инструмента. + + + Reading final measurements error. + Ошибка чтения финальных измерений. + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. @@ -12758,7 +13055,7 @@ Do you want to save your changes? Cannot open the watermark image. - + Не удается открыть изображение водяного знака. @@ -13033,6 +13330,10 @@ Do you want to save your changes? Origin point Исходная точка + + Flipping by axis + Отразить объект по оси + VToolFlippingByLine @@ -13044,6 +13345,10 @@ Do you want to save your changes? Second line point Вторая точка линии + + flipping by line + + VToolHeight @@ -13138,6 +13443,10 @@ Do you want to save your changes? Rotation origin point Исходная точка вращения + + move + + VToolOptionsPropertyBrowser @@ -13738,6 +14047,10 @@ Do you want to save your changes? Rotation angle Угол вращения + + rotate + + VToolSeamAllowance @@ -13811,7 +14124,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. Tool was used after deleting. @@ -13852,7 +14165,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. @@ -15242,6 +15555,191 @@ Do you want to save your changes? Left symbol _ in the name ВращениеЭлДуга_ + + converts degrees to radian + functionm degTorad + Преобразует градусы в радианы + + + converts radian to degrees + function radTodeg + Преобразует радианы в градусы + + + sine function working with radians + function sin + Функция синуса, работающая с радианами + + + cosine function working with radians + function cos + Функция косинуса, работающая с радианами + + + tangens function working with radians + function tan + Функция тангенса, работающая с радианами + + + arcus sine function working with radians + function asin + Функция арксинуса, работающая с радианами + + + arcus cosine function working with radians + function acos + Функция арккосинуса, работающая с радианами + + + arcus tangens function working with radians + function atan + Функция арктангенса, работающая с радианами + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + Функция синуса, работающая с градусами + + + cosine function working with degrees + function cosD + Функция косинуса, работающая с градусами + + + tangens function working with degrees + function tanD + Функция тангенса, работающая с градусами + + + arcus sine function working with degrees + function asinD + Функция арксинуса, работающая с градусами + + + arcus cosine function working with degrees + function acosD + Функция арккосинуса, работающая с градусами + + + arcus tangens function working with degrees + function atanD + Функция арктангенса, работающая с градусами + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + Квадратный корень из значения + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + Округление до целого числа + + + round to up to 1 decimal + function r2cm + Округление до 1 десятичного знака + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + Вырезать, разделить и повернуть операцию моделирования. Взять единицу измерения - см. + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + Вырезать, разделить и повернуть операцию моделирования. Взять единицу измерения - дюйм. + + + absolute value + function abs + Абсолютная величина (модуль) + + + min of all arguments + function min + Минимальный из всех аргументов + + + max of all arguments + function max + Максимальный из всех аргументов + + + sum of all arguments + function sum + Сумма всех аргументов + + + mean value of all arguments + function avg + Среднее значение всех аргументов + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15303,6 +15801,18 @@ Do you want to save your changes? Hide not in layout Скрыть не в раскладке + + Piece options + Параметры детали + + + Delete piece + Удалить деталь + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15312,7 +15822,7 @@ Do you want to save your changes? Rename - Переименовать + Переименовать Delete @@ -15334,6 +15844,26 @@ Do you want to save your changes? Show All Показать все + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Filter by tags + Фильтр по категориям + + + Preferences + Свойства + + + Categories: %1. + Категории: %1. + Valentina @@ -15359,7 +15889,7 @@ Do you want to save your changes? <b>Curved path</b>: select seven or more points, <b>%1</b> - finish creation - + <b>Контур кривой</b>: выберите семь или более точек, <b>%1</b> - завершить создание @@ -15452,7 +15982,7 @@ Do you want to save your changes? <b>Curved path</b>: select three or more points, <b>%1</b> - finish creation - + <b>Контур кривой</b>: выберите три или более точек, <b>%1</b> - завершить создание Use <b>%1</b> for sticking angle! diff --git a/share/translations/valentina_uk_UA.ts b/share/translations/valentina_uk_UA.ts index 23f445a34..dcb1b4f62 100644 --- a/share/translations/valentina_uk_UA.ts +++ b/share/translations/valentina_uk_UA.ts @@ -50,6 +50,13 @@ додати об'єднання деталей + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Відзеркалити по вісі + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Відзеркалити по лінії + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Унікальне ім'я лекала + Унікальне ім'я лекала Choose group name @@ -2509,6 +2572,18 @@ New group Нова група + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Ліве: + + + cm + см + + + Right: + Праве: + + + Top: + Верхнє: + + + Bottom: + Нижнє: + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -3315,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3327,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3347,6 +3457,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -3759,6 +3882,34 @@ Apply settings anyway? Center point Точка центру + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4700,10 +4851,6 @@ Apply settings anyway? Length: Довжина: - - = - - U mark @@ -5433,6 +5580,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5536,6 +5707,22 @@ Apply settings anyway? Orientation: + + Options + Параметри + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -9561,6 +9748,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10684,10 +10878,6 @@ Do you want to save your changes? Formula wizard Мастер формул - - = - - Value Значення @@ -11225,6 +11415,25 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Не можу відкрити файл%1: +%2. + + + Can't open schema file %1: +%2. + Не можу відкрити файл схеми %1:\n%2. + + + Could not load schema file '%1'. + Не вдалося завантажити файл схеми '%1'. + + + Validation error file %3 in line %1 column %2 + Помилка валідації файлу %3 в рядку %1 стовпця %2 + VAbstractCubicBezierPath @@ -11313,6 +11522,18 @@ Do you want to save your changes? Length Довжина + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11484,6 +11705,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11986,6 +12222,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12079,7 +12335,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Не можу відкрити файл схеми %1:\n%2. + Не можу відкрити файл схеми %1:\n%2. Could not load schema file. @@ -12087,7 +12343,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Помилка валідації файлу %3 в рядку %1 стовпця %2 + Помилка валідації файлу %3 в рядку %1 стовпця %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12371,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Не вдалося завантажити файл схеми '%1'. + Не вдалося завантажити файл схеми '%1'. Fail to write Canonical XML. @@ -12708,6 +12964,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13289,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Відзеркалити по вісі + VToolFlippingByLine @@ -13036,6 +13304,10 @@ Do you want to save your changes? Second line point Друга точка лінії + + flipping by line + + VToolHeight @@ -13130,6 +13402,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14006,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15509,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15755,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15776,7 @@ Do you want to save your changes? Rename - Перейменувати + Перейменувати Delete @@ -15321,6 +15798,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Властивості + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_zh_CN.ts b/share/translations/valentina_zh_CN.ts index 3b04f2cc7..e80848ef8 100644 --- a/share/translations/valentina_zh_CN.ts +++ b/share/translations/valentina_zh_CN.ts @@ -50,6 +50,13 @@ 添加合成细节 + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -1820,6 +1827,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -1855,6 +1890,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -1866,10 +1929,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -1878,6 +1937,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2329,6 +2400,49 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + DialogLayoutSettings @@ -2501,10 +2615,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2513,10 +2623,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2533,6 +2639,19 @@ Apply settings anyway? Auto crop unused width + + Prefer one sheet solution + + + + min + minutes + + + + Enable this option to prefer getting one sheet solutions. + + DialogLine @@ -2909,6 +3028,34 @@ Apply settings anyway? Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -3615,10 +3762,6 @@ Apply settings anyway? Length: 长度: - - = - - U mark @@ -4194,6 +4337,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4277,6 +4444,22 @@ Apply settings anyway? Orientation: + + Options + + + + Scale + + + + Horizontal: + + + + Vertical: + + DialogSaveLayout @@ -7606,6 +7789,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -8578,10 +8768,6 @@ Do you want to save your changes? Formula wizard - - = - - Value @@ -9016,6 +9202,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -9104,6 +9308,18 @@ Do you want to save your changes? Length 长度 + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -9271,6 +9487,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -9649,6 +9880,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -9722,15 +9973,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -9739,10 +9981,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -10307,6 +10545,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -10549,6 +10795,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -10560,6 +10810,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -10654,6 +10908,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -11158,6 +11416,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -12543,6 +12805,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -12582,13 +13029,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete 删除 @@ -12609,6 +13064,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 6b31f0724..493a5392e 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -172,6 +172,10 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con vStdErr() << QApplication::translate("vNoisyHandler", "WARNING:") << logMsg << "\n"; break; case QtCriticalMsg: + if (isPatternMessage) + { + qApp->PostPatternMessage(logMsg, type); + } debugdate += QStringLiteral(":CRITICAL:%1(%2)] %3: %4: %5").arg(context.file).arg(context.line) .arg(context.function, context.category, logMsg); vStdErr() << QApplication::translate("vNoisyHandler", "CRITICAL:") << logMsg << "\n"; diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index b58f8f33e..e608db6c7 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -204,6 +204,7 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const diag.SetAutoCropWidth(IsOptionSet(LONG_OPTION_CROP_WIDTH)); diag.SetUnitePages(IsOptionSet(LONG_OPTION_UNITE)); diag.SetSaveLength(IsOptionSet(LONG_OPTION_SAVELENGTH)); + diag.SetPreferOneSheetSolution(IsOptionSet(LONG_OPTION_PREFER_ONE_SHEET_SOLUTION)); diag.SetGroup(OptGroup()); if (IsOptionSet(LONG_OPTION_IGNORE_MARGINS)) @@ -408,6 +409,28 @@ bool VCommandLine::IsCSVWithHeader() const return IsOptionSet(LONG_OPTION_CSVWITHHEADER); } +//--------------------------------------------------------------------------------------------------------------------- +qreal VCommandLine::ExportXScale() const +{ + qreal xs = 0; + if (IsOptionSet(LONG_OPTION_EXPXSCALE)) + { + xs = OptionValue(LONG_OPTION_EXPXSCALE).toDouble(); + } + return xs; +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VCommandLine::ExportYScale() const +{ + qreal ys = 0; + if (IsOptionSet(LONG_OPTION_EXPYSCALE)) + { + ys = OptionValue(LONG_OPTION_EXPYSCALE).toDouble(); + } + return ys; +} + //--------------------------------------------------------------------------------------------------------------------- QString VCommandLine::OptExportSuchDetails() const { @@ -664,6 +687,12 @@ void VCommandLine::InitCommandLineOptions() translate("VCommandLine", "Page bottom margin in current units like 3.0 (export mode). If not set will be " "used value from default printer. Or 0 if none printers was found."), translate("VCommandLine", "The bottom margin")}, + {LONG_OPTION_EXPXSCALE, + translate("VCommandLine", "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode)."), + translate("VCommandLine", "Horizontal scale")}, + {LONG_OPTION_EXPYSCALE, + translate("VCommandLine", "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode)."), + translate("VCommandLine", "Vertical scale")}, //================================================================================================================= {LONG_OPTION_FOLLOW_GRAINLINE, translate("VCommandLine", "Order detail to follow grainline direction (export mode).")}, @@ -678,6 +707,8 @@ void VCommandLine::InitCommandLineOptions() {{SINGLE_OPTION_UNITE, LONG_OPTION_UNITE}, translate("VCommandLine", "Unite pages if possible (export mode). Maximum value limited by QImage that " "supports only a maximum of 32768x32768 px images.")}, + {LONG_OPTION_PREFER_ONE_SHEET_SOLUTION, + translate("VCommandLine", "Prefer one sheet layout solution (export mode).")}, //================================================================================================================= {{SINGLE_OPTION_SAVELENGTH, LONG_OPTION_SAVELENGTH}, translate("VCommandLine", "Save length of the sheet if set (export mode). The option tells the program to use " diff --git a/src/app/valentina/core/vcmdexport.h b/src/app/valentina/core/vcmdexport.h index a89f0bf4c..b4b8057b7 100644 --- a/src/app/valentina/core/vcmdexport.h +++ b/src/app/valentina/core/vcmdexport.h @@ -88,6 +88,9 @@ public: bool IsExportOnlyDetails() const; bool IsCSVWithHeader() const; + qreal ExportXScale() const; + qreal ExportYScale() const; + //@brief returns the piece name regex or empty string if not set QString OptExportSuchDetails() const; diff --git a/src/app/valentina/dialogs/dialoghistory.cpp b/src/app/valentina/dialogs/dialoghistory.cpp index 7d8f1fb37..ec6c1ce22 100644 --- a/src/app/valentina/dialogs/dialoghistory.cpp +++ b/src/app/valentina/dialogs/dialoghistory.cpp @@ -40,7 +40,10 @@ #include "../vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.h" #include "../xml/vpattern.h" #include "../vmisc/diagnostic.h" + #include +#include +#include //--------------------------------------------------------------------------------------------------------------------- /** @@ -165,26 +168,30 @@ void DialogHistory::FillTable() qint32 currentRow = -1; qint32 count = 0; ui->tableWidget->setRowCount(history.size());//Make row count max possible number - for (qint32 i = 0; i< history.size(); ++i) + + std::function CreateRecord = [this](const VToolRecord &tool) { - const VToolRecord tool = history.at(i); - const QString historyRecord = Record(tool); - if (not historyRecord.isEmpty()) + return Record(tool); + }; + + QVector historyRecords = QtConcurrent::blockingMapped(history, CreateRecord); + + for (auto &record : historyRecords) + { + if (not record.description.isEmpty()) { currentRow++; { QTableWidgetItem *item = new QTableWidgetItem(QString()); item->setTextAlignment(Qt::AlignHCenter); - item->setData(Qt::UserRole, tool.getId()); + item->setData(Qt::UserRole, record.id); item->setFlags(item->flags() ^ Qt::ItemIsEditable); ui->tableWidget->setItem(currentRow, 0, item); } - QTableWidgetItem *item = new QTableWidgetItem(historyRecord); - QFont font = item->font(); - font.setBold(true); - item->setFont(font); + QTableWidgetItem *item = new QTableWidgetItem(record.description); + item->setFont(QFont("Times", 12, QFont::Bold)); item->setFlags(item->flags() ^ Qt::ItemIsEditable); ui->tableWidget->setItem(currentRow, 1, item); ++count; @@ -211,16 +218,20 @@ QT_WARNING_DISABLE_GCC("-Wswitch-default") * @param tool record data * @return description */ -QString DialogHistory::Record(const VToolRecord &tool) +HistoryRecord DialogHistory::Record(const VToolRecord &tool) const { // This check helps to find missed tools in the switch Q_STATIC_ASSERT_X(static_cast(Tool::LAST_ONE_DO_NOT_USE) == 55, "Not all tools were used in history."); - const QDomElement domElem = doc->elementById(tool.getId()); + HistoryRecord record; + record.id = tool.getId(); + + bool updateCache = false; + const QDomElement domElem = doc->elementById(tool.getId(), QString(), updateCache); if (domElem.isElement() == false) { - qDebug()<<"Can't find element by id"< spl = data->GeometricObject(tool.getId()); SCASSERT(not spl.isNull()) - return spl->NameForHistory(tr("Curve")); + record.description = spl->NameForHistory(tr("Curve")); + return record; } case Tool::CubicBezier: { const QSharedPointer spl = data->GeometricObject(tool.getId()); SCASSERT(not spl.isNull()) - return spl->NameForHistory(tr("Cubic bezier curve")); + record.description = spl->NameForHistory(tr("Cubic bezier curve")); + return record; } case Tool::Arc: { const QSharedPointer arc = data->GeometricObject(tool.getId()); SCASSERT(not arc.isNull()) - return arc->NameForHistory(tr("Arc")); + record.description = arc->NameForHistory(tr("Arc")); + return record; } case Tool::ArcWithLength: { const QSharedPointer arc = data->GeometricObject(tool.getId()); SCASSERT(not arc.isNull()) - return tr("%1 with length %2") - .arg(arc->NameForHistory(tr("Arc"))) - .arg(arc->GetLength()); + record.description = tr("%1 with length %2") + .arg(arc->NameForHistory(tr("Arc"))) + .arg(arc->GetLength()); + return record; } case Tool::SplinePath: { const QSharedPointer splPath = data->GeometricObject(tool.getId()); SCASSERT(not splPath.isNull()) - return splPath->NameForHistory(tr("Spline path")); + record.description = splPath->NameForHistory(tr("Spline path")); + return record; } case Tool::CubicBezierPath: { const QSharedPointer splPath = data->GeometricObject(tool.getId()); SCASSERT(not splPath.isNull()) - return splPath->NameForHistory(tr("Cubic bezier curve path")); + record.description = splPath->NameForHistory(tr("Cubic bezier curve path")); + return record; } case Tool::PointOfContact: - return tr("%4 - point of contact of arc with the center in point %1 and line %2_%3") - .arg(PointName(AttrUInt(domElem, AttrCenter)), - PointName(AttrUInt(domElem, AttrFirstPoint)), - PointName(AttrUInt(domElem, AttrSecondPoint)), - PointName(tool.getId())); + record.description = tr("%4 - point of contact of arc with the center in point %1 and line %2_%3") + .arg(PointName(AttrUInt(domElem, AttrCenter)), + PointName(AttrUInt(domElem, AttrFirstPoint)), + PointName(AttrUInt(domElem, AttrSecondPoint)), + PointName(tool.getId())); + return record; case Tool::Height: - return tr("Point of perpendicular from point %1 to line %2_%3") - .arg(PointName(AttrUInt(domElem, AttrBasePoint)), - PointName(AttrUInt(domElem, AttrP1Line)), - PointName(AttrUInt(domElem, AttrP2Line))); + record.description = tr("Point of perpendicular from point %1 to line %2_%3") + .arg(PointName(AttrUInt(domElem, AttrBasePoint)), + PointName(AttrUInt(domElem, AttrP1Line)), + PointName(AttrUInt(domElem, AttrP2Line))); + return record; case Tool::Triangle: - return tr("Triangle: axis %1_%2, points %3 and %4") - .arg(PointName(AttrUInt(domElem, AttrAxisP1)), - PointName(AttrUInt(domElem, AttrAxisP2)), - PointName(AttrUInt(domElem, AttrFirstPoint)), - PointName(AttrUInt(domElem, AttrSecondPoint))); + record.description = tr("Triangle: axis %1_%2, points %3 and %4") + .arg(PointName(AttrUInt(domElem, AttrAxisP1)), + PointName(AttrUInt(domElem, AttrAxisP2)), + PointName(AttrUInt(domElem, AttrFirstPoint)), + PointName(AttrUInt(domElem, AttrSecondPoint))); + return record; case Tool::PointOfIntersection: - return tr("%1 - point of intersection %2 and %3") - .arg(PointName(tool.getId()), - PointName(AttrUInt(domElem, AttrFirstPoint)), - PointName(AttrUInt(domElem, AttrSecondPoint))); + record.description = tr("%1 - point of intersection %2 and %3") + .arg(PointName(tool.getId()), + PointName(AttrUInt(domElem, AttrFirstPoint)), + PointName(AttrUInt(domElem, AttrSecondPoint))); + return record; case Tool::CutArc: { const QSharedPointer arc = data->GeometricObject(AttrUInt(domElem, AttrArc)); SCASSERT(not arc.isNull()) - return tr("%1 - cut %2") - .arg(PointName(tool.getId()), arc->NameForHistory(tr("arc"))); + record.description = tr("%1 - cut %2") + .arg(PointName(tool.getId()), arc->NameForHistory(tr("arc"))); + return record; } case Tool::CutSpline: { const quint32 splineId = AttrUInt(domElem, VToolCutSpline::AttrSpline); const QSharedPointer spl = data->GeometricObject(splineId); SCASSERT(not spl.isNull()) - return tr("%1 - cut %2") - .arg(PointName(tool.getId()), spl->NameForHistory(tr("curve"))); + record.description = tr("%1 - cut %2") + .arg(PointName(tool.getId()), spl->NameForHistory(tr("curve"))); + return record; } case Tool::CutSplinePath: { @@ -349,56 +380,71 @@ QString DialogHistory::Record(const VToolRecord &tool) const QSharedPointer splPath = data->GeometricObject(splinePathId); SCASSERT(not splPath.isNull()) - return tr("%1 - cut %2") - .arg(PointName(tool.getId()), splPath->NameForHistory(tr("curve path"))); + record.description = tr("%1 - cut %2") + .arg(PointName(tool.getId()), splPath->NameForHistory(tr("curve path"))); + return record; } case Tool::LineIntersectAxis: - return tr("%1 - point of intersection line %2_%3 and axis through point %4") - .arg(PointName(tool.getId()), - PointName(AttrUInt(domElem, AttrP1Line)), - PointName(AttrUInt(domElem, AttrP2Line)), - PointName(AttrUInt(domElem, AttrBasePoint))); + record.description = tr("%1 - point of intersection line %2_%3 and axis through point %4") + .arg(PointName(tool.getId()), + PointName(AttrUInt(domElem, AttrP1Line)), + PointName(AttrUInt(domElem, AttrP2Line)), + PointName(AttrUInt(domElem, AttrBasePoint))); + return record; case Tool::CurveIntersectAxis: - return tr("%1 - point of intersection curve and axis through point %2") - .arg(PointName(tool.getId()), PointName(AttrUInt(domElem, AttrBasePoint))); + record.description = tr("%1 - point of intersection curve and axis through point %2") + .arg(PointName(tool.getId()), PointName(AttrUInt(domElem, AttrBasePoint))); + return record; case Tool::PointOfIntersectionArcs: - return tr("%1 - point of arcs intersection").arg(PointName(tool.getId())); + record.description = tr("%1 - point of arcs intersection").arg(PointName(tool.getId())); + return record; case Tool::PointOfIntersectionCircles: - return tr("%1 - point of circles intersection").arg(PointName(tool.getId())); + record.description = tr("%1 - point of circles intersection").arg(PointName(tool.getId())); + return record; case Tool::PointOfIntersectionCurves: - return tr("%1 - point of curves intersection").arg(PointName(tool.getId())); + record.description = tr("%1 - point of curves intersection").arg(PointName(tool.getId())); + return record; case Tool::PointFromCircleAndTangent: - return tr("%1 - point from circle and tangent").arg(PointName(tool.getId())); + record.description = tr("%1 - point from circle and tangent").arg(PointName(tool.getId())); + return record; case Tool::PointFromArcAndTangent: - return tr("%1 - point from arc and tangent").arg(PointName(tool.getId())); + record.description = tr("%1 - point from arc and tangent").arg(PointName(tool.getId())); + return record; case Tool::TrueDarts: - return tr("Correction the dart %1_%2_%3") - .arg(PointName(AttrUInt(domElem, AttrDartP1)), - PointName(AttrUInt(domElem, AttrDartP2)), - PointName(AttrUInt(domElem, AttrDartP2))); + record.description = tr("Correction the dart %1_%2_%3") + .arg(PointName(AttrUInt(domElem, AttrDartP1)), + PointName(AttrUInt(domElem, AttrDartP2)), + PointName(AttrUInt(domElem, AttrDartP2))); + return record; case Tool::EllipticalArc: { const QSharedPointer elArc = data->GeometricObject(tool.getId()); SCASSERT(not elArc.isNull()) - return tr("%1 with length %2") - .arg(elArc->NameForHistory(tr("Elliptical arc"))) - .arg(elArc->GetLength()); + record.description = tr("%1 with length %2") + .arg(elArc->NameForHistory(tr("Elliptical arc"))) + .arg(elArc->GetLength()); + return record; } case Tool::Rotation: - return tr("Rotate objects around point %1. Suffix '%2'") - .arg(PointName(AttrUInt(domElem, AttrCenter)), - doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Rotate objects around point %1. Suffix '%2'") + .arg(PointName(AttrUInt(domElem, AttrCenter)), + doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; case Tool::FlippingByLine: - return tr("Flipping by line %1_%2. Suffix '%3'") - .arg(PointName(AttrUInt(domElem, AttrP1Line)), - PointName(AttrUInt(domElem, AttrP2Line)), - doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Flipping by line %1_%2. Suffix '%3'") + .arg(PointName(AttrUInt(domElem, AttrP1Line)), + PointName(AttrUInt(domElem, AttrP2Line)), + doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; case Tool::FlippingByAxis: - return tr("Flipping by axis through %1 point. Suffix '%2'") - .arg(PointName(AttrUInt(domElem, AttrCenter)), - doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Flipping by axis through %1 point. Suffix '%2'") + .arg(PointName(AttrUInt(domElem, AttrCenter)), + doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; case Tool::Move: - return tr("Move objects. Suffix '%1'").arg(doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Move objects. Suffix '%1'") + .arg(doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; //Because "history" not only show history of pattern, but help restore current data for each pattern's //piece, we need add record about details and nodes, but don't show them. case Tool::Piece: @@ -414,16 +460,16 @@ QString DialogHistory::Record(const VToolRecord &tool) case Tool::PlaceLabel: case Tool::InsertNode: case Tool::DuplicateDetail: - return QString(); + return record; } } catch (const VExceptionBadId &e) { qDebug()<GeometricObject(pointId)->name(); } //--------------------------------------------------------------------------------------------------------------------- -quint32 DialogHistory::AttrUInt(const QDomElement &domElement, const QString &name) +quint32 DialogHistory::AttrUInt(const QDomElement &domElement, const QString &name) const { return doc->GetParametrUInt(domElement, name, QChar('0')); } diff --git a/src/app/valentina/dialogs/dialoghistory.h b/src/app/valentina/dialogs/dialoghistory.h index bf5987b85..85e3e999d 100644 --- a/src/app/valentina/dialogs/dialoghistory.h +++ b/src/app/valentina/dialogs/dialoghistory.h @@ -35,6 +35,12 @@ class VPattern; +struct HistoryRecord +{ + QString description{}; + quint32 id{NULL_ID}; +}; + namespace Ui { class DialogHistory; @@ -86,11 +92,11 @@ private: qint32 cursorToolRecordRow; void FillTable(); - QString Record(const VToolRecord &tool); + HistoryRecord Record(const VToolRecord &tool) const; void InitialTable(); void ShowPoint(); - QString PointName(quint32 pointId); - quint32 AttrUInt(const QDomElement &domElement, const QString &name); + QString PointName(quint32 pointId) const; + quint32 AttrUInt(const QDomElement &domElement, const QString &name) const; void RetranslateUi(); int CursorRow() const; }; diff --git a/src/app/valentina/dialogs/dialogincrements.cpp b/src/app/valentina/dialogs/dialogincrements.cpp index 856185b07..b626b416c 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -95,9 +95,8 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par qCDebug(vDialog, "Showing variables."); ShowUnits(); - const bool freshCall = true; - FillIncrements(freshCall); - FillPreviewCalculations(freshCall); + FillIncrements(); + FillPreviewCalculations(); FillLengthsLines(); FillLengthLinesAngles(); FillLengthsCurves(); @@ -182,15 +181,15 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par /** * @brief FillIncrementTable fill data for increment table */ -void DialogIncrements::FillIncrements(bool freshCall) +void DialogIncrements::FillIncrements() { - FillIncrementsTable(ui->tableWidgetIncrement, data->DataIncrementsWithSeparators(), false, freshCall); + FillIncrementsTable(ui->tableWidgetIncrement, data->DataIncrementsWithSeparators(), false); } //--------------------------------------------------------------------------------------------------------------------- -void DialogIncrements::FillPreviewCalculations(bool freshCall) +void DialogIncrements::FillPreviewCalculations() { - FillIncrementsTable(ui->tableWidgetPC, data->DataIncrementsWithSeparators(), true, freshCall); + FillIncrementsTable(ui->tableWidgetPC, data->DataIncrementsWithSeparators(), true); } //--------------------------------------------------------------------------------------------------------------------- @@ -302,6 +301,7 @@ QTableWidgetItem * DialogIncrements::AddCell(QTableWidget *table, const QString QTableWidgetItem *item = new QTableWidgetItem(text); item->setTextAlignment(aligment); + item->setToolTip(text); // set the item non-editable (view only), and non-selectable Qt::ItemFlags flags = item->flags(); @@ -869,7 +869,7 @@ void DialogIncrements::RefreshPattern() //--------------------------------------------------------------------------------------------------------------------- void DialogIncrements::FillIncrementsTable(QTableWidget *table, const QMap > &increments, - bool takePreviewCalculations, bool freshCall) + bool takePreviewCalculations) { SCASSERT(table != nullptr) @@ -920,11 +920,6 @@ void DialogIncrements::FillIncrementsTable(QTableWidget *table, } } - if (freshCall) - { - table->resizeColumnsToContents(); - table->resizeRowsToContents(); - } table->horizontalHeader()->setStretchLastSection(true); table->blockSignals(false); } diff --git a/src/app/valentina/dialogs/dialogincrements.h b/src/app/valentina/dialogs/dialogincrements.h index 97f17be60..eb80a056c 100644 --- a/src/app/valentina/dialogs/dialogincrements.h +++ b/src/app/valentina/dialogs/dialogincrements.h @@ -111,10 +111,10 @@ private: void FillIncrementsTable(QTableWidget *table, const QMap > &increments, - bool takePreviewCalculations, bool freshCall = false); + bool takePreviewCalculations); - void FillIncrements(bool freshCall = false); - void FillPreviewCalculations(bool freshCall = false); + void FillIncrements(); + void FillPreviewCalculations(); void FillLengthsLines(); void FillLengthLinesAngles(); void FillLengthsCurves(); diff --git a/src/app/valentina/dialogs/dialoglayoutscale.cpp b/src/app/valentina/dialogs/dialoglayoutscale.cpp new file mode 100644 index 000000000..256c66f14 --- /dev/null +++ b/src/app/valentina/dialogs/dialoglayoutscale.cpp @@ -0,0 +1,214 @@ +/************************************************************************ + ** + ** @file dialoglayoutscale.cpp + ** @author Roman Telezhynskyi + ** @date 21 3, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina 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. + ** + ** Valentina 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 Valentina. If not, see . + ** + *************************************************************************/ + +#include "dialoglayoutscale.h" +#include "ui_dialoglayoutscale.h" +#include "../core/vapplication.h" +#include "../vmisc/vsettings.h" + +#include + +//--------------------------------------------------------------------------------------------------------------------- +DialogLayoutScale::DialogLayoutScale(bool printTiled, QWidget *parent) + :QDialog(parent), + ui(new Ui::DialogLayoutScale) +{ + ui->setupUi(this); + + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + + QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok); + SCASSERT(bOk != nullptr) + connect(bOk, &QPushButton::clicked, this, &DialogLayoutScale::Save); + + if (not printTiled) + { + ui->groupBoxMargins->setVisible(false); + } + + connect(ui->toolButtonScaleConnected, &QToolButton::clicked, this, &DialogLayoutScale::ToggleScaleConnection); + + connect(ui->doubleSpinBoxHorizontalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogLayoutScale::HorizontalScaleChanged); + connect(ui->doubleSpinBoxVerticalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogLayoutScale::VerticalScaleChanged); + + ReadSettings(); +} + +//--------------------------------------------------------------------------------------------------------------------- +DialogLayoutScale::~DialogLayoutScale() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::SetTiledMargins(QMarginsF margins) +{ + // read Margins top, right, bottom, left + margins = UnitConvertor(margins, Unit::Mm, qApp->patternUnit()); + + ui->doubleSpinBoxLeftField->setValue(margins.left()); + ui->doubleSpinBoxTopField->setValue(margins.top()); + ui->doubleSpinBoxRightField->setValue(margins.right()); + ui->doubleSpinBoxBottomField->setValue(margins.bottom()); +} + +//--------------------------------------------------------------------------------------------------------------------- +QMarginsF DialogLayoutScale::GetTiledMargins() const +{ + QMarginsF margins = QMarginsF( + ui->doubleSpinBoxLeftField->value(), + ui->doubleSpinBoxTopField->value(), + ui->doubleSpinBoxRightField->value(), + ui->doubleSpinBoxBottomField->value() + ); + + return UnitConvertor(margins, qApp->patternUnit(), Unit::Mm); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::SetXScale(qreal scale) +{ + ui->doubleSpinBoxHorizontalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogLayoutScale::GetXScale() const +{ + return ui->doubleSpinBoxHorizontalScale->value() / 100.; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::SetYScale(qreal scale) +{ + ui->doubleSpinBoxVerticalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogLayoutScale::GetYScale() const +{ + return ui->doubleSpinBoxVerticalScale->value() / 100.; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::showEvent(QShowEvent *event) +{ + QDialog::showEvent( event ); + if ( event->spontaneous() ) + { + return; + } + + if (isInitialized) + { + return; + } + // do your init stuff here + + setFixedSize(size()); + + isInitialized = true;//first show windows are held +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::Save() +{ + WriteSettings(); + + accept(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::ToggleScaleConnection() +{ + m_scaleConnected = not m_scaleConnected; + + QIcon icon; + icon.addFile(m_scaleConnected ? QStringLiteral(":/icon/32x32/link.png") + : QStringLiteral(":/icon/32x32/broken_link.png")); + ui->toolButtonScaleConnected->setIcon(icon); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::HorizontalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxVerticalScale->blockSignals(true); + ui->doubleSpinBoxVerticalScale->setValue(d); + ui->doubleSpinBoxVerticalScale->blockSignals(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::VerticalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxHorizontalScale->blockSignals(true); + ui->doubleSpinBoxHorizontalScale->setValue(d); + ui->doubleSpinBoxHorizontalScale->blockSignals(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::ReadSettings() +{ + VSettings *settings = qApp->ValentinaSettings(); + const Unit unit = qApp->patternUnit(); + + // read Margins top, right, bottom, left + const QMarginsF margins = settings->GetTiledPDFMargins(unit); + + ui->doubleSpinBoxLeftField->setValue(margins.left()); + ui->doubleSpinBoxTopField->setValue(margins.top()); + ui->doubleSpinBoxRightField->setValue(margins.right()); + ui->doubleSpinBoxBottomField->setValue(margins.bottom()); + + ui->doubleSpinBoxLeftField->setSuffix(UnitsToStr(unit, true)); + ui->doubleSpinBoxTopField->setSuffix(UnitsToStr(unit, true)); + ui->doubleSpinBoxRightField->setSuffix(UnitsToStr(unit, true)); + ui->doubleSpinBoxBottomField->setSuffix(UnitsToStr(unit, true)); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::WriteSettings() const +{ + VSettings *settings = qApp->ValentinaSettings(); + const Unit unit = qApp->patternUnit(); + + // write Margins top, right, bottom, left + QMarginsF margins = QMarginsF( + ui->doubleSpinBoxLeftField->value(), + ui->doubleSpinBoxTopField->value(), + ui->doubleSpinBoxRightField->value(), + ui->doubleSpinBoxBottomField->value() + ); + settings->SetTiledPDFMargins(margins,unit); +} diff --git a/src/libs/vtools/undocommands/changegroupvisibility.h b/src/app/valentina/dialogs/dialoglayoutscale.h similarity index 53% rename from src/libs/vtools/undocommands/changegroupvisibility.h rename to src/app/valentina/dialogs/dialoglayoutscale.h index f126718e4..757f9c6e6 100644 --- a/src/libs/vtools/undocommands/changegroupvisibility.h +++ b/src/app/valentina/dialogs/dialoglayoutscale.h @@ -1,14 +1,14 @@ /************************************************************************ ** - ** @file changegroupVisibility.h + ** @file dialoglayoutscale.h ** @author Roman Telezhynskyi - ** @date 14 7, 2019 + ** @date 21 3, 2020 ** ** @brief ** @copyright ** This source code is part of the Valentina project, a pattern making ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project + ** Copyright (C) 2020 Valentina project ** All Rights Reserved. ** ** Valentina is free software: you can redistribute it and/or modify @@ -25,31 +25,50 @@ ** along with Valentina. If not, see . ** *************************************************************************/ -#ifndef CHANGEGROUPVISIBILITY_H -#define CHANGEGROUPVISIBILITY_H +#ifndef DIALOGLAYOUTSCALE_H +#define DIALOGLAYOUTSCALE_H -#include "vundocommand.h" +#include -class ChangeGroupVisibility : public VUndoCommand +namespace Ui +{ + class DialogLayoutScale; +} + +class DialogLayoutScale : public QDialog { Q_OBJECT -public: - ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent = nullptr); - virtual ~ChangeGroupVisibility(); - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroup(vidtype id, bool visible); +public: + explicit DialogLayoutScale(bool printTiled, QWidget *parent = nullptr); + ~DialogLayoutScale(); + + void SetTiledMargins(QMarginsF margins); + QMarginsF GetTiledMargins() const; + + void SetXScale(qreal scale); + qreal GetXScale() const; + + void SetYScale(qreal scale); + qreal GetYScale() const; + +protected: + virtual void showEvent(QShowEvent *event) override; + +private slots: + void Save(); + void ToggleScaleConnection(); + void HorizontalScaleChanged(double d); + void VerticalScaleChanged(double d); private: - Q_DISABLE_COPY(ChangeGroupVisibility) + Q_DISABLE_COPY(DialogLayoutScale) + Ui::DialogLayoutScale *ui; + bool isInitialized{false}; + bool m_scaleConnected{true}; - bool m_oldVisibility{true}; - bool m_newVisibility{true}; - const QString m_nameActivDraw{}; - - void Do(bool visible); + void ReadSettings(); + void WriteSettings() const; }; -#endif // CHANGEGROUPVISIBILITY_H +#endif // DIALOGLAYOUTSCALE_H diff --git a/src/app/valentina/dialogs/dialoglayoutscale.ui b/src/app/valentina/dialogs/dialoglayoutscale.ui new file mode 100644 index 000000000..0cc38f3c5 --- /dev/null +++ b/src/app/valentina/dialogs/dialoglayoutscale.ui @@ -0,0 +1,334 @@ + + + DialogLayoutScale + + + + 0 + 0 + 404 + 211 + + + + Layout scale + + + + :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png + + + + + + + + true + + + Margins + + + false + + + + + + + 0 + 0 + + + + Left: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Right: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Top: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Bottom: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + + + + + Scale + + + + + + + + Horizontal: + + + + + + + Vertical: + + + + + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + + + 1 + + + 0 + + + 0 + + + + + + 10 + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + ... + + + + :/icon/32x32/link.png:/icon/32x32/link.png + + + + 32 + 32 + + + + QToolButton::DelayedPopup + + + + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + DialogLayoutScale + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + DialogLayoutScale + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index 1847c4286..04549ef52 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -292,6 +292,18 @@ void DialogLayoutSettings::SetSaveLength(bool save) ui->checkBoxSaveLength->setChecked(save); } +//--------------------------------------------------------------------------------------------------------------------- +bool DialogLayoutSettings::IsPreferOneSheetSolution() const +{ + return ui->checkBoxOneSheetSolution->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutSettings::SetPreferOneSheetSolution(bool prefer) +{ + ui->checkBoxOneSheetSolution->setChecked(prefer); +} + //--------------------------------------------------------------------------------------------------------------------- bool DialogLayoutSettings::IsUnitePages() const { @@ -600,6 +612,7 @@ void DialogLayoutSettings::DialogAccepted() generator->SetAutoCropLength(GetAutoCropLength()); generator->SetAutoCropWidth(GetAutoCropWidth()); generator->SetSaveLength(IsSaveLength()); + generator->SetPreferOneSheetSolution(IsPreferOneSheetSolution()); generator->SetUnitePages(IsUnitePages()); generator->SetStripOptimization(IsStripOptimization()); generator->SetMultiplier(GetMultiplier()); @@ -695,6 +708,7 @@ void DialogLayoutSettings::RestoreDefaults() SetNestingTime(VSettings::GetDefNestingTime()); SetEfficiencyCoefficient(VSettings::GetDefEfficiencyCoefficient()); SetNestQuantity(VSettings::GetDefLayoutNestQuantity()); + SetPreferOneSheetSolution(VSettings::GetDefLayoutPreferOneSheetSolution()); CorrectMaxFileds(); IgnoreAllFields(ui->checkBoxIgnoreFileds->isChecked()); @@ -1019,6 +1033,7 @@ void DialogLayoutSettings::ReadSettings() SetAutoCropLength(settings->GetLayoutAutoCropLength()); SetAutoCropWidth(settings->GetLayoutAutoCropWidth()); SetSaveLength(settings->GetLayoutSaveLength()); + SetPreferOneSheetSolution(settings->GetLayoutPreferOneSheetSolution()); SetUnitePages(settings->GetLayoutUnitePages()); SetFields(settings->GetFields(GetDefPrinterFields())); SetIgnoreAllFields(settings->GetIgnoreAllFields()); @@ -1046,6 +1061,7 @@ void DialogLayoutSettings::WriteSettings() const settings->SetLayoutAutoCropLength(GetAutoCropLength()); settings->SetLayoutAutoCropWidth(GetAutoCropWidth()); settings->SetLayoutSaveLength(IsSaveLength()); + settings->SetLayoutPreferOneSheetSolution(IsPreferOneSheetSolution()); settings->SetLayoutUnitePages(IsUnitePages()); settings->SetFields(GetFields()); settings->SetIgnoreAllFields(IsIgnoreAllFields()); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.h b/src/app/valentina/dialogs/dialoglayoutsettings.h index 778014b2b..bf6c9d8c7 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.h +++ b/src/app/valentina/dialogs/dialoglayoutsettings.h @@ -85,6 +85,9 @@ public: bool IsSaveLength() const; void SetSaveLength(bool save); + bool IsPreferOneSheetSolution() const; + void SetPreferOneSheetSolution(bool prefer); + bool IsUnitePages() const; void SetUnitePages(bool save); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.ui b/src/app/valentina/dialogs/dialoglayoutsettings.ui index 648e09b5a..d4407b8e6 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.ui +++ b/src/app/valentina/dialogs/dialoglayoutsettings.ui @@ -7,7 +7,7 @@ 0 0 601 - 600 + 645 @@ -384,7 +384,7 @@ Time given for the algorithm to find best layout. - min + min 1 @@ -429,7 +429,7 @@ Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - % + % 1 @@ -448,6 +448,16 @@ + + + + Enable this option to prefer getting one sheet solutions. + + + Prefer one sheet solution + + + diff --git a/src/app/valentina/dialogs/dialogs.h b/src/app/valentina/dialogs/dialogs.h index 122665410..2ca4e9ca3 100644 --- a/src/app/valentina/dialogs/dialogs.h +++ b/src/app/valentina/dialogs/dialogs.h @@ -36,5 +36,6 @@ #include "dialogaboutapp.h" #include "dialogpreferences.h" #include "dialogfinalmeasurements.h" +#include "dialoglayoutscale.h" #endif // DIALOGS_H diff --git a/src/app/valentina/dialogs/dialogs.pri b/src/app/valentina/dialogs/dialogs.pri index 2bb72de56..af53d7952 100644 --- a/src/app/valentina/dialogs/dialogs.pri +++ b/src/app/valentina/dialogs/dialogs.pri @@ -2,6 +2,7 @@ # This need for corect working file translations.pro HEADERS += \ + $$PWD/dialoglayoutscale.h \ $$PWD/dialogs.h \ $$PWD/dialogincrements.h \ $$PWD/dialoghistory.h \ @@ -26,6 +27,7 @@ HEADERS += \ SOURCES += \ $$PWD/dialogincrements.cpp \ $$PWD/dialoghistory.cpp \ + $$PWD/dialoglayoutscale.cpp \ $$PWD/dialogpatternproperties.cpp \ $$PWD/dialognewpattern.cpp \ $$PWD/dialogaboutapp.cpp \ @@ -47,6 +49,7 @@ SOURCES += \ FORMS += \ $$PWD/dialogincrements.ui \ $$PWD/dialoghistory.ui \ + $$PWD/dialoglayoutscale.ui \ $$PWD/dialogpatternproperties.ui \ $$PWD/dialognewpattern.ui \ $$PWD/dialogaboutapp.ui \ diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index fc095b21d..ecac7451b 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -151,26 +151,15 @@ DialogSaveLayout::DialogSaveLayout(int count, Draw mode, const QString &fileName InitTemplates(ui->comboBoxTemplates); + connect(ui->toolButtonScaleConnected, &QToolButton::clicked, this, &DialogSaveLayout::ToggleScaleConnection); + + connect(ui->doubleSpinBoxHorizontalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogSaveLayout::HorizontalScaleChanged); + connect(ui->doubleSpinBoxVerticalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogSaveLayout::VerticalScaleChanged); + ReadSettings(); - // connect for the template drop down box of the tiled pds - connect(ui->comboBoxTemplates, QOverload::of(&QComboBox::currentIndexChanged), - this, &DialogSaveLayout::WriteSettings); - - // connects for the margins of the tiled pdf - connect(ui->doubleSpinBoxLeftField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - connect(ui->doubleSpinBoxTopField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - connect(ui->doubleSpinBoxRightField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - connect(ui->doubleSpinBoxBottomField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - - // connects for the orientation buttons for the tiled pdf - connect(ui->toolButtonPortrait, &QToolButton::toggled, this, &DialogSaveLayout::WriteSettings); - connect(ui->toolButtonLandscape, &QToolButton::toggled, this, &DialogSaveLayout::WriteSettings); - ShowExample();//Show example for current format. } @@ -520,6 +509,8 @@ LayoutExportFormats DialogSaveLayout::Format() const //--------------------------------------------------------------------------------------------------------------------- void DialogSaveLayout::Save() { + WriteSettings(); + for (int i=0; i < count; ++i) { const QString name = Path()+'/'+FileName()+QString::number(i+1)+ExportFormatSuffix(Format()); @@ -623,6 +614,39 @@ void DialogSaveLayout::ShowExample() } } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::ToggleScaleConnection() +{ + m_scaleConnected = not m_scaleConnected; + + QIcon icon; + icon.addFile(m_scaleConnected ? QStringLiteral(":/icon/32x32/link.png") + : QStringLiteral(":/icon/32x32/broken_link.png")); + ui->toolButtonScaleConnected->setIcon(icon); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::HorizontalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxVerticalScale->blockSignals(true); + ui->doubleSpinBoxVerticalScale->setValue(d); + ui->doubleSpinBoxVerticalScale->blockSignals(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::VerticalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxHorizontalScale->blockSignals(true); + ui->doubleSpinBoxHorizontalScale->setValue(d); + ui->doubleSpinBoxHorizontalScale->blockSignals(false); + } +} + //--------------------------------------------------------------------------------------------------------------------- bool DialogSaveLayout::IsTextAsPaths() const { @@ -719,6 +743,30 @@ PageOrientation DialogSaveLayout::GetTiledPageOrientation() const } } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::SetXScale(qreal scale) +{ + ui->doubleSpinBoxHorizontalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogSaveLayout::GetXScale() const +{ + return ui->doubleSpinBoxHorizontalScale->value() / 100.; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::SetYScale(qreal scale) +{ + ui->doubleSpinBoxVerticalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogSaveLayout::GetYScale() const +{ + return ui->doubleSpinBoxVerticalScale->value() / 100.; +} + //--------------------------------------------------------------------------------------------------------------------- void DialogSaveLayout::showEvent(QShowEvent *event) { @@ -810,16 +858,15 @@ QVector > DialogSaveLayout::InitFormats( InitFormat(LayoutExportFormats::DXF_AC1021_AAMA); InitFormat(LayoutExportFormats::DXF_AC1024_AAMA); InitFormat(LayoutExportFormats::DXF_AC1027_AAMA); - // We will support them anyway -// InitFormat(LayoutExportFormats::DXF_AC1006_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1009_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1012_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1014_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1015_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1018_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1021_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1024_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1027_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1006_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1009_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1012_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1014_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1015_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1018_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1021_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1024_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1027_ASTM); InitFormat(LayoutExportFormats::PDFTiled); // InitFormat(LayoutExportFormats::NC); diff --git a/src/app/valentina/dialogs/dialogsavelayout.h b/src/app/valentina/dialogs/dialogsavelayout.h index 462c2330e..8f6d480f7 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.h +++ b/src/app/valentina/dialogs/dialogsavelayout.h @@ -86,6 +86,12 @@ public: void SetTiledPageOrientation(PageOrientation orientation); PageOrientation GetTiledPageOrientation() const; + void SetXScale(qreal scale); + qreal GetXScale() const; + + void SetYScale(qreal scale); + qreal GetYScale() const; + protected: virtual void showEvent(QShowEvent *event) override; void InitTemplates(QComboBox *comboBoxTemplates); @@ -94,6 +100,9 @@ private slots: void Save(); void PathChanged(const QString &text); void ShowExample(); + void ToggleScaleConnection(); + void HorizontalScaleChanged(double d); + void VerticalScaleChanged(double d); private: Q_DISABLE_COPY(DialogSaveLayout) Ui::DialogSaveLAyout *ui; @@ -101,6 +110,7 @@ private: bool isInitialized; Draw m_mode; bool m_tiledExportMode; + bool m_scaleConnected{true}; static bool havePdf; static bool tested; diff --git a/src/app/valentina/dialogs/dialogsavelayout.ui b/src/app/valentina/dialogs/dialogsavelayout.ui index c9440ace0..7d648eee7 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.ui +++ b/src/app/valentina/dialogs/dialogsavelayout.ui @@ -6,8 +6,8 @@ 0 0 - 719 - 314 + 493 + 391 @@ -17,20 +17,20 @@ :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png - - - - - Path: - - - - + + + + + + Path: + + + - + 0 0 @@ -46,7 +46,7 @@ - + 0 0 @@ -61,44 +61,229 @@ - - - - File format: - - + + + + + + + 0 + 0 + + + + File format: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - 0 - 0 - - - + + + + + + Options + + + + + + false + + + Binary form + + + + + + + true + + + Text as paths + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Scale + + + + + + + + Horizontal: + + + + + + + Vertical: + + + + + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + + + 1 + + + 0 + + + 0 + + + + + + 10 + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + ... + + + + :/icon/32x32/link.png:/icon/32x32/link.png + + + + 32 + 32 + + + + QToolButton::DelayedPopup + + + + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + + + + + + + - - - - false - - - Binary form - - - - - - - true - - - Text as paths - - - - + @@ -148,6 +333,9 @@ cm + + 0.100000000000000 + @@ -164,6 +352,9 @@ cm + + 0.100000000000000 + @@ -204,6 +395,9 @@ cm + + 0.100000000000000 + @@ -224,6 +418,9 @@ cm + + 0.100000000000000 + @@ -239,79 +436,75 @@ Paper format - - - - - + + + + + Templates: + + + + + + + + + + Orientation: + + + + + + + - Templates: + ... + + + + :/icon/16x16/portrait.png:/icon/16x16/portrait.png + + + true + + + true + + + true - - - - - + + - Orientation: + ... + + + + :/icon/16x16/landscape.png:/icon/16x16/landscape.png + + + true + + + true - - - - - - ... - - - - :/icon/16x16/portrait.png:/icon/16x16/portrait.png - - - true - - - true - - - true - - - - - - - ... - - - - :/icon/16x16/landscape.png:/icon/16x16/landscape.png - - - true - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + Qt::Horizontal + + + + 40 + 20 + + + @@ -320,19 +513,28 @@ - - - - File name: - - - - + + + QLayout::SetDefaultConstraint + + + + + + 0 + 0 + + + + File name: + + + - + 0 0 @@ -347,6 +549,12 @@ + + + 0 + 0 + + 130 @@ -363,7 +571,7 @@ - + Qt::Horizontal diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index 2145c6407..084ababfa 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -263,12 +263,44 @@ void VWidgetDetails::ShowContextMenu(const QPoint &pos) QAction *actionSelectAll = menu->addAction(tr("Select all")); QAction *actionSelectNone = menu->addAction(tr("Select none")); - QAction *actionSeparator = new QAction(this); - actionSeparator->setSeparator(true); - menu->addAction(actionSeparator); + menu->addSeparator(); QAction *actionInvertSelection = menu->addAction(tr("Invert selection")); + bool pieceMode = false; + QAction *actionPieceOptions = nullptr; + QAction *actionDeletePiece = nullptr; + VToolSeamAllowance *toolPiece = nullptr; + + QTableWidgetItem *selectedItem = ui->tableWidget->itemAt(pos); + if (selectedItem) + { + QTableWidgetItem *item = ui->tableWidget->item(selectedItem->row(), PieceColumn::InLayout); + const quint32 id = item->data(Qt::UserRole).toUInt(); + + try + { + toolPiece = qobject_cast(VAbstractPattern::getTool(id)); + if (toolPiece) + { + pieceMode = true; + menu->addSeparator(); + + actionPieceOptions = menu->addAction(QIcon::fromTheme(QStringLiteral("preferences-other")), + tr("Piece options")); + + actionDeletePiece = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), + tr("Delete piece")); + actionDeletePiece->setDisabled(toolPiece->referens() > 0); + } + } + catch (const VExceptionBadId &) + { + const QString errorMsg = tr("Cannot find piece by id '%1'").arg(id); + qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; + } + } + const QHash *allDetails = m_data->DataPieces(); if (allDetails->count() == 0) { @@ -333,6 +365,23 @@ void VWidgetDetails::ShowContextMenu(const QPoint &pos) qApp->getUndoStack()->endMacro(); } + else if (pieceMode && selectedAction == actionPieceOptions) + { + toolPiece->ShowOptions(); + } + else if (pieceMode && selectedAction == actionDeletePiece) + { + try + { + toolPiece->DeleteFromMenu(); + } + catch(const VExceptionToolWasDeleted &e) + { + Q_UNUSED(e); + return;//Leave this method immediately!!! + } + //Leave this method immediately after call!!! + } } //------------------------------------------------------------------------------------------------------------------ diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index 02e19b6a5..dfb5737cc 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -29,11 +29,11 @@ #include "vwidgetgroups.h" #include "ui_vwidgetgroups.h" #include "../vtools/dialogs/tools/dialoggroup.h" -#include "../vtools/undocommands/delgroup.h" -#include "../vtools/undocommands/changegroupvisibility.h" -#include "../vtools/undocommands/changemultiplegroupsvisibility.h" +#include "../vtools/undocommands/undogroup.h" #include "../vpatterndb/vcontainer.h" +#include "../vmisc/compatibility.h" +#include #include #include @@ -53,6 +53,7 @@ VWidgetGroups::VWidgetGroups(VAbstractPattern *doc, QWidget *parent) connect(ui->tableWidget, &QTableWidget::cellClicked, this, &VWidgetGroups::GroupVisibilityChanged); connect(ui->tableWidget, &QTableWidget::cellChanged, this, &VWidgetGroups::RenameGroup); connect(ui->tableWidget, &QTableWidget::customContextMenuRequested, this, &VWidgetGroups::CtxMenu); + connect(ui->lineEditTags, &QLineEdit::textChanged, this, &VWidgetGroups::UpdateGroups); } //--------------------------------------------------------------------------------------------------------------------- @@ -112,6 +113,32 @@ void VWidgetGroups::SetMultipleGroupsVisibility(const QVector &groups, qApp->getUndoStack()->push(changeGroups); } +//--------------------------------------------------------------------------------------------------------------------- +QMap VWidgetGroups::FilterGroups(const QMap &groups) +{ + QMap filtered; + QSet filterCategories = ConvertToSet(VAbstractPattern::FilterGroupTags(ui->lineEditTags->text())); + + if (filterCategories.isEmpty()) + { + return groups; + } + + auto i = groups.constBegin(); + while (i != groups.constEnd()) + { + const VGroupData &data = i.value(); + QSet groupCategories = ConvertToSet(data.tags); + if (SetIntersects(filterCategories, groupCategories)) + { + filtered.insert(i.key(), data); + } + ++i; + } + + return filtered; +} + //--------------------------------------------------------------------------------------------------------------------- int VWidgetGroups::GroupRow(vidtype id) const { @@ -150,9 +177,9 @@ void VWidgetGroups::RenameGroup(int row, int column) } const quint32 id = ui->tableWidget->item(row, 0)->data(Qt::UserRole).toUInt(); - doc->SetGroupName(id, ui->tableWidget->item(row, column)->text()); - - UpdateGroups(); + ::RenameGroup *renameGroup = new ::RenameGroup(doc, id, ui->tableWidget->item(row, column)->text()); + connect(renameGroup, &RenameGroup::UpdateGroups, this, &VWidgetGroups::UpdateGroups); + qApp->getUndoStack()->push(renameGroup); } //--------------------------------------------------------------------------------------------------------------------- @@ -187,7 +214,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos) menu->addAction(QIcon(QStringLiteral("://icon/16x16/closed_eye.png")), tr("Hide")) : menu->addAction(QIcon(QStringLiteral("://icon/16x16/open_eye.png")), tr("Show")); - QAction *actionRename = menu->addAction(tr("Rename")); + QAction *actionPreferences = menu->addAction(QIcon::fromTheme(preferencesOtherIcon), tr("Preferences")); QAction *actionDelete = menu->addAction(QIcon::fromTheme(editDeleteIcon), tr("Delete")); menu->addSeparator(); QAction *actionHideAll = menu->addAction(tr("Hide All")); @@ -201,19 +228,22 @@ void VWidgetGroups::CtxMenu(const QPoint &pos) { SetGroupVisibility(id, not doc->GetGroupVisibility(id)); } - else if (selectedAction == actionRename) + else if (selectedAction == actionPreferences) { QScopedPointer fackeContainer(new VContainer(qApp->TrVars(), qApp->patternUnitP(), VContainer::UniqueNamespace())); QScopedPointer dialog(new DialogGroup(fackeContainer.data(), NULL_ID, this)); dialog->SetName(doc->GetGroupName(id)); + dialog->SetTags(doc->GetGroupTags(id)); + dialog->SetGroupCategories(doc->GetGroupCategories()); const int result = dialog->exec(); if (result == QDialog::Accepted) { - doc->SetGroupName(id, dialog->GetName()); - item = ui->tableWidget->item(row, 1); - item->setText(dialog->GetName()); + ChangeGroupOptions *changeGroupOptions = new ChangeGroupOptions(doc, id, dialog->GetName(), + dialog->GetTags()); + connect(changeGroupOptions, &ChangeGroupOptions::UpdateGroups, this, &VWidgetGroups::UpdateGroups); + qApp->getUndoStack()->push(changeGroupOptions); } } else if (selectedAction == actionDelete) @@ -279,8 +309,12 @@ void VWidgetGroups::UpdateGroups() } //--------------------------------------------------------------------------------------------------------------------- -void VWidgetGroups::FillTable(const QMap > &groups) +void VWidgetGroups::FillTable(QMap groups) { + ui->lineEditTags->SetCompletion(doc->GetGroupCategories()); + + groups = FilterGroups(groups); + ui->tableWidget->blockSignals(true); ui->tableWidget->clear(); @@ -291,12 +325,12 @@ void VWidgetGroups::FillTable(const QMap > &groups while (i != groups.constEnd()) { ++currentRow; - const QPair data = i.value(); + const VGroupData data = i.value(); QTableWidgetItem *item = new QTableWidgetItem(); item->setTextAlignment(Qt::AlignHCenter); - (data.second) ? item->setIcon(QIcon("://icon/16x16/open_eye.png")) - : item->setIcon(QIcon("://icon/16x16/closed_eye.png")); + (data.visible) ? item->setIcon(QIcon("://icon/16x16/open_eye.png")) + : item->setIcon(QIcon("://icon/16x16/closed_eye.png")); item->setData(Qt::UserRole, i.key()); @@ -307,8 +341,9 @@ void VWidgetGroups::FillTable(const QMap > &groups ui->tableWidget->setItem(currentRow, 0, item); - item = new QTableWidgetItem(data.first); + item = new QTableWidgetItem(data.name); item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); + item->setToolTip(tr("Categories: %1.").arg(data.tags.join(", "))); if(doc->GroupIsEmpty(i.key())) { diff --git a/src/app/valentina/dialogs/vwidgetgroups.h b/src/app/valentina/dialogs/vwidgetgroups.h index 0d0838a68..ba4e0f17c 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.h +++ b/src/app/valentina/dialogs/vwidgetgroups.h @@ -34,6 +34,7 @@ class QTableWidgetItem; class VAbstractPattern; +struct VGroupData; namespace Ui { @@ -61,10 +62,12 @@ private: Ui::VWidgetGroups *ui; VAbstractPattern *doc; - void FillTable(const QMap > &groups); + void FillTable(QMap groups); void SetGroupVisibility(vidtype id, bool visible) const; void SetMultipleGroupsVisibility(const QVector &groups, bool visible) const; + QMap FilterGroups(const QMap &groups); + int GroupRow(vidtype id) const; }; diff --git a/src/app/valentina/dialogs/vwidgetgroups.ui b/src/app/valentina/dialogs/vwidgetgroups.ui index 006e30e6c..3a3ee72f3 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.ui +++ b/src/app/valentina/dialogs/vwidgetgroups.ui @@ -7,7 +7,7 @@ 0 0 371 - 279 + 438 @@ -18,6 +18,30 @@ :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Filter by tags + + + true + + + + + @@ -47,16 +71,23 @@ false - - false - 10 + + false + + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 427681cb6..f5bb15524 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -58,7 +58,7 @@ #include "tools/vtooluniondetails.h" #include "dialogs/dialogs.h" #include "dialogs/vwidgetgroups.h" -#include "../vtools/undocommands/addgroup.h" +#include "../vtools/undocommands/undogroup.h" #include "dialogs/vwidgetdetails.h" #include "../vpatterndb/vpiecepath.h" #include "../qmuparser/qmuparsererror.h" @@ -648,6 +648,12 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons case Tool::PlaceLabel: dialogTool->SetPiecesList(doc->GetActivePPPieces()); break; + case Tool::Rotation: + case Tool::Move: + case Tool::FlippingByAxis: + case Tool::FlippingByLine: + dialogTool->SetGroupCategories(doc->GetGroupCategories()); + break; default: break; } @@ -1241,7 +1247,8 @@ void MainWindow::ClosedDialogGroup(int result) { const QPointer dialog = qobject_cast(dialogTool); SCASSERT(not dialog.isNull()) - const QDomElement group = doc->CreateGroup(pattern->getNextId(), dialog->GetName(), dialog->GetGroup()); + const QDomElement group = doc->CreateGroup(pattern->getNextId(), dialog->GetName(), dialog->GetTags(), + dialog->GetGroup()); if (not group.isNull()) { AddGroup *addGroup = new AddGroup(group, doc); @@ -5527,6 +5534,8 @@ bool MainWindow::DoExport(const VCommandLinePtr &expParams) m_dialogSaveLayout->SelectFormat(static_cast(expParams->OptExportType())); m_dialogSaveLayout->SetBinaryDXFFormat(expParams->IsBinaryDXF()); m_dialogSaveLayout->SetTextAsPaths(expParams->IsTextAsPaths()); + m_dialogSaveLayout->SetXScale(expParams->ExportXScale()); + m_dialogSaveLayout->SetYScale(expParams->ExportYScale()); if (static_cast(expParams->OptExportType()) == LayoutExportFormats::PDFTiled) { @@ -5562,6 +5571,8 @@ bool MainWindow::DoExport(const VCommandLinePtr &expParams) m_dialogSaveLayout->SetDestinationPath(expParams->OptDestinationPath()); m_dialogSaveLayout->SelectFormat(static_cast(expParams->OptExportType())); m_dialogSaveLayout->SetBinaryDXFFormat(expParams->IsBinaryDXF()); + m_dialogSaveLayout->SetXScale(expParams->ExportXScale()); + m_dialogSaveLayout->SetYScale(expParams->ExportYScale()); if (static_cast(expParams->OptExportType()) == LayoutExportFormats::PDFTiled) { diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 14459be31..559a02dcd 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -41,6 +41,7 @@ #include "../vlayout/vlayoutgenerator.h" #include "dialogs/dialoglayoutprogress.h" #include "dialogs/dialogsavelayout.h" +#include "dialogs/dialoglayoutscale.h" #include "../vlayout/vposter.h" #include "../vpatterndb/floatItemData/vpiecelabeldata.h" #include "../vpatterndb/floatItemData/vpatternlabeldata.h" @@ -312,7 +313,7 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator) if (lGenerator.PapersCount() <= papersCount) { const qreal layoutEfficiency = lGenerator.LayoutEfficiency(); - if (efficiency < layoutEfficiency) + if (efficiency < layoutEfficiency || lGenerator.PapersCount() < papersCount) { efficiency = layoutEfficiency; if (VApplication::IsGUIMode()) @@ -403,7 +404,10 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator) || (nestingState == LayoutErrors::NoError && not qFuzzyIsNull(lGenerator.GetEfficiencyCoefficient()) && efficiency >= lGenerator.GetEfficiencyCoefficient())) { - break; + if (not lGenerator.IsPreferOneSheetSolution() || lGenerator.PapersCount() == 1) + { + break; + } } if (IsTimeout()) @@ -510,7 +514,16 @@ void MainWindowsNoGUI::ExportData(const QVector &listDetails) format == LayoutExportFormats::DXF_AC1018_AAMA || format == LayoutExportFormats::DXF_AC1021_AAMA || format == LayoutExportFormats::DXF_AC1024_AAMA || - format == LayoutExportFormats::DXF_AC1027_AAMA) + format == LayoutExportFormats::DXF_AC1027_AAMA || + format == LayoutExportFormats::DXF_AC1006_ASTM || + format == LayoutExportFormats::DXF_AC1009_ASTM || + format == LayoutExportFormats::DXF_AC1012_ASTM || + format == LayoutExportFormats::DXF_AC1014_ASTM || + format == LayoutExportFormats::DXF_AC1015_ASTM || + format == LayoutExportFormats::DXF_AC1018_ASTM || + format == LayoutExportFormats::DXF_AC1021_ASTM || + format == LayoutExportFormats::DXF_AC1024_ASTM || + format == LayoutExportFormats::DXF_AC1027_ASTM) { if (m_dialogSaveLayout->Mode() == Draw::Layout) { @@ -665,15 +678,31 @@ void MainWindowsNoGUI::ExportApparelLayout(const QVector &details, switch (format) { case LayoutExportFormats::DXF_AC1006_ASTM: + ASTMDxfFile(name, DRW::AC1006, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1009_ASTM: + ASTMDxfFile(name, DRW::AC1009, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1012_ASTM: + ASTMDxfFile(name, DRW::AC1012, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1014_ASTM: + ASTMDxfFile(name, DRW::AC1014, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1015_ASTM: + ASTMDxfFile(name, DRW::AC1015, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1018_ASTM: + ASTMDxfFile(name, DRW::AC1018, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1021_ASTM: + ASTMDxfFile(name, DRW::AC1021, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1024_ASTM: + ASTMDxfFile(name, DRW::AC1024, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1027_ASTM: - Q_UNREACHABLE(); // For now not supported + ASTMDxfFile(name, DRW::AC1027, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); break; case LayoutExportFormats::DXF_AC1006_AAMA: AAMADxfFile(name, DRW::AC1006, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); @@ -798,7 +827,6 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) ToPixel(printer->pageRect(QPrinter::Millimeter).height(), Unit::Mm)); const double xscale = printer->pageRect().width() / printerPageRect.width(); const double yscale = printer->pageRect().height() / printerPageRect.height(); - const double scale = qMin(xscale, yscale); QPainter painter; if (not painter.begin(printer)) @@ -844,7 +872,9 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) auto *paper = qgraphicsitem_cast(papers.at(i)); if (paper) { - *poster += posterazor->Calc(paper->rect().toRect(), i, orientation); + QRectF paperRect = paper->rect(); + QSizeF image(paperRect.width() * m_xscale, paperRect.height() * m_yscale); + *poster += posterazor->Calc(image.toSize(), i, orientation); } } @@ -949,7 +979,9 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) qreal x,y; if(printer->fullPage()) { - QMarginsF printerMargins = printer->pageLayout().margins(); + QPageLayout layout = printer->pageLayout(); + layout.setUnits(QPageLayout::Millimeter); + QMarginsF printerMargins = layout.margins(); x = qFloor(ToPixel(printerMargins.left(),Unit::Mm)); y = qFloor(ToPixel(printerMargins.top(),Unit::Mm)); } @@ -958,7 +990,7 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) x = 0; y = 0; } - QRectF target(x * scale, y * scale, source.width() * scale, source.height() * scale); + QRectF target(x * xscale, y * yscale, source.width() * xscale, source.height() * yscale); scenes.at(paperIndex)->render(&painter, target, source, Qt::IgnoreAspectRatio); @@ -1187,10 +1219,10 @@ void MainWindowsNoGUI::SvgFile(const QString &name, QGraphicsRectItem *paper, QG const QRectF r = paper->rect(); QSvgGenerator generator; generator.setFileName(name); - generator.setSize(QSize(qFloor(r.width() + margins.left() + margins.right()), - qFloor(r.height() + margins.top() + margins.bottom()))); - generator.setViewBox(QRectF(0, 0, r.width() + margins.left() + margins.right(), - r.height() + margins.top() + margins.bottom())); + generator.setSize(QSize(qFloor(r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right()), + qFloor(r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom()))); + generator.setViewBox(QRectF(0, 0, r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right(), + r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom())); generator.setTitle(tr("Pattern")); generator.setDescription(doc->GetDescription().toHtmlEscaped()); generator.setResolution(static_cast(PrintDPI)); @@ -1200,6 +1232,7 @@ void MainWindowsNoGUI::SvgFile(const QString &name, QGraphicsRectItem *paper, QG painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, qApp->Settings()->WidthHairLine(), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, r, r, Qt::IgnoreAspectRatio); painter.end(); } @@ -1214,8 +1247,8 @@ void MainWindowsNoGUI::PngFile(const QString &name, QGraphicsRectItem *paper, QG { const QRectF r = paper->rect(); // Create the image with the exact size of the shrunk scene - QImage image(QSize(qFloor(r.width() + margins.left() + margins.right()), - qFloor(r.height() + margins.top() + margins.bottom())), + QImage image(QSize(qFloor(r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right()), + qFloor(r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom())), QImage::Format_ARGB32); image.fill(Qt::white); QPainter painter(&image); @@ -1223,6 +1256,7 @@ void MainWindowsNoGUI::PngFile(const QString &name, QGraphicsRectItem *paper, QG painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, qApp->Settings()->WidthMainLine(), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, r, r, Qt::IgnoreAspectRatio); image.save(name); } @@ -1245,9 +1279,11 @@ void MainWindowsNoGUI::PdfFile(const QString &name, QGraphicsRectItem *paper, QG printer.setResolution(static_cast(PrintDPI)); printer.setOrientation(QPrinter::Portrait); printer.setFullPage(ignorePrinterFields); - if (not printer.setPageSize(QPageSize(QSizeF(FromPixel(r.width() + margins.left() + margins.right(), Unit::Mm), - FromPixel(r.height() + margins.top() + margins.bottom(), Unit::Mm)), - QPageSize::Millimeter))) + + qreal width = FromPixel(r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right(), Unit::Mm); + qreal height = FromPixel(r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom(), Unit::Mm); + + if (not printer.setPageSize(QPageSize(QSizeF(width, height), QPageSize::Millimeter))) { qWarning() << tr("Cannot set printer page size"); } @@ -1272,6 +1308,7 @@ void MainWindowsNoGUI::PdfFile(const QString &name, QGraphicsRectItem *paper, QG painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, qApp->Settings()->WidthMainLine(), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, r, r, Qt::IgnoreAspectRatio); painter.end(); } @@ -1297,6 +1334,9 @@ void MainWindowsNoGUI::PdfTiledFile(const QString &name) qWarning()<GetXScale(); + m_yscale = m_dialogSaveLayout->GetYScale(); + printer.setOutputFileName(name); printer.setResolution(static_cast(PrintDPI)); PrintPages(&printer); @@ -1395,7 +1435,11 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary PrepareTextForDXF(endStringPlaceholder, details); VDxfPaintDevice generator; generator.setFileName(name); - generator.setSize(paper->rect().size().toSize()); + + const QRectF r = paper->rect(); + generator.setSize(QSize(qFloor(r.width() * m_dialogSaveLayout->GetXScale()), + qFloor(r.height() * m_dialogSaveLayout->GetYScale()))); + generator.setResolution(PrintDPI); generator.SetVersion(static_cast(version)); generator.SetBinaryFormat(binary); @@ -1404,6 +1448,7 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary QPainter painter; if (painter.begin(&generator)) { + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio); painter.end(); } @@ -1413,6 +1458,23 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary //--------------------------------------------------------------------------------------------------------------------- void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary, const QSize &size, const QVector &details) const +{ + VDxfPaintDevice generator; + generator.setFileName(name); + generator.setSize(QSize(qCeil(size.width() * m_dialogSaveLayout->GetXScale()), + qCeil(size.height() * m_dialogSaveLayout->GetYScale()))); + generator.setResolution(PrintDPI); + generator.SetVersion(static_cast(version)); + generator.SetBinaryFormat(binary); + generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745 + generator.SetXScale(m_dialogSaveLayout->GetXScale()); + generator.SetYScale(m_dialogSaveLayout->GetYScale()); + generator.ExportToAAMA(details); +} + +//--------------------------------------------------------------------------------------------------------------------- +void MainWindowsNoGUI::ASTMDxfFile(const QString &name, int version, bool binary, const QSize &size, + const QVector &details) const { VDxfPaintDevice generator; generator.setFileName(name); @@ -1421,7 +1483,9 @@ void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary generator.SetVersion(static_cast(version)); generator.SetBinaryFormat(binary); generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745 - generator.ExportToAAMA(details); + generator.SetXScale(m_dialogSaveLayout->GetXScale()); + generator.SetYScale(m_dialogSaveLayout->GetYScale()); + generator.ExportToASTM(details); } QT_WARNING_POP @@ -1437,6 +1501,17 @@ void MainWindowsNoGUI::PreparePaper(int index) const shadows.at(index)->setVisible(false); paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));// border } + + QTransform matrix; + matrix.scale(m_xscale, m_yscale); + + QList paperDetails = details.at(index); + for (auto detail : paperDetails) + { + QTransform m = detail->transform(); + m *= matrix; + detail->setTransform(m); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -1451,6 +1526,17 @@ void MainWindowsNoGUI::RestorePaper(int index) const scenes.at(index)->setBackgroundBrush(brush); shadows.at(index)->setVisible(true); } + + QTransform matrix; + matrix.scale(1./m_xscale, 1./m_yscale); + + QList paperDetails = details.at(index); + for (auto detail : paperDetails) + { + QTransform m = detail->transform(); + m *= matrix; + detail->setTransform(m); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -1541,8 +1627,19 @@ void MainWindowsNoGUI::PrintPreview() return; } + { + DialogLayoutScale layoutScale(isTiled, this); + layoutScale.SetXScale(1); + layoutScale.SetYScale(1); + layoutScale.exec(); + + m_xscale = layoutScale.GetXScale(); + m_yscale = layoutScale.GetYScale(); + } + SetPrinterSettings(printer.data(), PrintType::PrintPreview); printer->setResolution(static_cast(PrintDPI)); + // display print preview dialog QPrintPreviewDialog preview(printer.data()); connect(&preview, &QPrintPreviewDialog::paintRequested, this, &MainWindowsNoGUI::PrintPages); @@ -1573,6 +1670,16 @@ void MainWindowsNoGUI::LayoutPrint() return; } + { + DialogLayoutScale layoutScale(isTiled, this); + layoutScale.SetXScale(1); + layoutScale.SetYScale(1); + layoutScale.exec(); + + m_xscale = layoutScale.GetXScale(); + m_yscale = layoutScale.GetYScale(); + } + SetPrinterSettings(printer.data(), PrintType::PrintNative); QPrintDialog dialog(printer.data(), this ); // If only user couldn't change page margins we could use method setMinMax(); diff --git a/src/app/valentina/mainwindowsnogui.h b/src/app/valentina/mainwindowsnogui.h index 7e9e289dd..77a69eb86 100644 --- a/src/app/valentina/mainwindowsnogui.h +++ b/src/app/valentina/mainwindowsnogui.h @@ -162,6 +162,9 @@ private: QString layoutPrinterName; + qreal m_xscale{1}; + qreal m_yscale{1}; + static QList CreateShadows(const QList &papers); static QList CreateScenes(const QList &papers, const QList &shadows, @@ -182,6 +185,8 @@ private: const QList > &details)const; void AAMADxfFile(const QString &name, int version, bool binary, const QSize &size, const QVector &details) const; + void ASTMDxfFile(const QString &name, int version, bool binary, const QSize &size, + const QVector &details) const; void PreparePaper(int index) const; void RestorePaper(int index) const; diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 53387a7e1..763ae9415 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -3450,6 +3450,22 @@ void VPattern::GarbageCollector(bool commit) { modElement.removeChild(modNode); cleared = true; + + // Clear history + try + { + vidtype id = GetParametrId(modNode); + auto record = std::find_if(history.begin(), history.end(), + [id](const VToolRecord &record) { return record.getId() == id; }); + if (record != history.end()) + { + history.erase(record); + } + } + catch(const VExceptionWrongId &) + { + // do nothing + } } } } diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index bf0597e5d..5d41d6883 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -58,6 +58,7 @@ schema/pattern/v0.8.4.xsd schema/pattern/v0.8.5.xsd schema/pattern/v0.8.6.xsd + schema/pattern/v0.8.7.xsd schema/standard_measurements/v0.3.0.xsd schema/standard_measurements/v0.4.0.xsd schema/standard_measurements/v0.4.1.xsd diff --git a/src/libs/ifc/schema/pattern/v0.8.7.xsd b/src/libs/ifc/schema/pattern/v0.8.7.xsd new file mode 100644 index 000000000..26e7571a0 --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.8.7.xsd @@ -0,0 +1,1254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 1f010cc0d..c45c7a026 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -135,7 +135,8 @@ const QString VAbstractPattern::AttrNumber = QStringLiteral("number") const QString VAbstractPattern::AttrCheckUniqueness = QStringLiteral("checkUniqueness"); const QString VAbstractPattern::AttrManualPassmarkLength = QStringLiteral("manualPassmarkLength"); const QString VAbstractPattern::AttrPassmarkLength = QStringLiteral("passmarkLength"); -const QString VAbstractPattern::AttrOpacity = QStringLiteral("opacity"); +const QString VAbstractPattern::AttrOpacity = QStringLiteral("opacity"); +const QString VAbstractPattern::AttrTags = QStringLiteral("tags"); const QString VAbstractPattern::AttrAll = QStringLiteral("all"); @@ -283,6 +284,17 @@ QMap AdjustMaterials(QMap materials) return materials; } + +//--------------------------------------------------------------------------------------------------------------------- +QString PrepareGroupTags(QStringList tags) +{ + for (auto &tag : tags) + { + tag = tag.simplified(); + } + + return ConvertToList(ConvertToSet(tags)).join(','); +} } //--------------------------------------------------------------------------------------------------------------------- @@ -1730,6 +1742,12 @@ void VAbstractPattern::SelectedDetail(quint32 id) emit ShowDetail(id); } +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::UpdateVisiblityGroups() +{ + emit UpdateGroups(); +} + //--------------------------------------------------------------------------------------------------------------------- void VAbstractPattern::ToolExists(const quint32 &id) { @@ -2422,17 +2440,22 @@ QDomElement VAbstractPattern::CreateGroups() } //--------------------------------------------------------------------------------------------------------------------- -QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const QMap &groupData) +QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const QStringList &tags, + const QMap &groupData, vidtype tool) { if (id == NULL_ID || groupData.isEmpty()) { return QDomElement(); } + const QString preparedTags = PrepareGroupTags(tags); + QDomElement group = createElement(TagGroup); SetAttribute(group, AttrId, id); SetAttribute(group, AttrName, name); SetAttribute(group, AttrVisible, true); + SetAttributeOrRemoveIf(group, AttrTool, tool, tool == null_id); + SetAttributeOrRemoveIf(group, AttrTags, preparedTags, preparedTags.isEmpty()); auto i = groupData.constBegin(); while (i != groupData.constEnd()) @@ -2446,73 +2469,102 @@ QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const return group; } +//--------------------------------------------------------------------------------------------------------------------- +vidtype VAbstractPattern::GroupLinkedToTool(vidtype toolId) const +{ + const QDomNodeList groups = elementsByTagName(TagGroup); + for (int i=0; i < groups.size(); ++i) + { + const QDomElement group = groups.at(i).toElement(); + if (not group.isNull() && group.hasAttribute(AttrTool)) + { + const quint32 id = GetParametrUInt(group, AttrTool, NULL_ID_STR); + + if (toolId == id) + { + return GetParametrUInt(group, AttrId, NULL_ID_STR); + } + } + } + + return null_id; +} //--------------------------------------------------------------------------------------------------------------------- QString VAbstractPattern::GetGroupName(quint32 id) { QString name = tr("New group"); - QDomElement groups = CreateGroups(); - if (not groups.isNull()) + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) { - QDomElement group = elementById(id, TagGroup); - if (group.isElement()) - { - name = GetParametrString(group, AttrName, name); - return name; - } - else - { - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } + name = GetParametrString(group, AttrName, name); - qDebug("Can't get group by id = %u.", id); - return name; - } - } - else - { - qDebug("Can't get tag Groups."); - return name; } + + return name; } //--------------------------------------------------------------------------------------------------------------------- void VAbstractPattern::SetGroupName(quint32 id, const QString &name) { - QDomElement groups = CreateGroups(); - if (not groups.isNull()) + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) { - QDomElement group = elementById(id, TagGroup); - if (group.isElement()) - { - group.setAttribute(AttrName, name); - modified = true; - emit patternChanged(false); - } - else - { - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } - - qDebug("Can't get group by id = %u.", id); - } - } - else - { - qDebug("Can't get tag Groups."); + group.setAttribute(AttrName, name); + modified = true; + emit patternChanged(false); } } //--------------------------------------------------------------------------------------------------------------------- -QMap > VAbstractPattern::GetGroups() +QStringList VAbstractPattern::GetGroupTags(vidtype id) { - QMap > data; + QStringList tags; + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) + { + tags = FilterGroupTags(GetParametrEmptyString(group, AttrTags)); + } + + return tags; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::SetGroupTags(quint32 id, const QStringList &tags) +{ + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) + { + const QString rawTags = tags.join(','); + SetAttributeOrRemoveIf(group, AttrTags, rawTags, rawTags.isEmpty()); + modified = true; + emit patternChanged(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList VAbstractPattern::GetGroupCategories() const +{ + QSet categories; + + const QDomNodeList groups = elementsByTagName(TagGroup); + for (int i=0; i < groups.size(); ++i) + { + const QDomElement group = groups.at(i).toElement(); + if (not group.isNull() && group.hasAttribute(AttrTags)) + { + QStringList groupTags = VAbstractPattern::FilterGroupTags(GetParametrEmptyString(group, AttrTags)); + categories.unite(ConvertToSet(groupTags)); + } + } + + return ConvertToList(categories); +} + +//--------------------------------------------------------------------------------------------------------------------- +QMap VAbstractPattern::GetGroups() +{ + QMap data; try { @@ -2529,11 +2581,13 @@ QMap > VAbstractPattern::GetGroups() { if (group.tagName() == TagGroup) { + VGroupData groupData; const quint32 id = GetParametrUInt(group, AttrId, QChar('0')); - const bool visible = GetParametrBool(group, AttrVisible, trueStr); - const QString name = GetParametrString(group, AttrName, tr("New group")); + groupData.visible = GetParametrBool(group, AttrVisible, trueStr); + groupData.name = GetParametrString(group, AttrName, tr("New group")); + groupData.tags = FilterGroupTags(GetParametrEmptyString(group, AttrTags)); - data.insert(id, qMakePair(name, visible)); + data.insert(id, groupData); } } } @@ -2547,7 +2601,7 @@ QMap > VAbstractPattern::GetGroups() } catch (const VExceptionConversionError &) { - return QMap >(); + return QMap(); } return data; @@ -2804,3 +2858,22 @@ QString VAbstractPattern::PieceDrawName(quint32 id) return draw.attribute(VAbstractPattern::AttrName); } + +//--------------------------------------------------------------------------------------------------------------------- +QStringList VAbstractPattern::FilterGroupTags(const QString &tags) +{ + if (tags.isEmpty()) + { + return QStringList(); + } + + QStringList list = tags.split(','); + for (auto &tag : list) + { + tag = tag.simplified(); + } + + list.removeAll(""); + + return ConvertToList(ConvertToSet(list)); +} diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 55167d2d0..6a3b7a981 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -78,6 +78,13 @@ struct VFinalMeasurement QString description; }; +struct VGroupData +{ + QString name{}; + bool visible{true}; + QStringList tags{}; +}; + QT_WARNING_POP class VAbstractPattern : public VDomDocument @@ -200,16 +207,27 @@ public: void ParseGroups(const QDomElement &domElement); QDomElement CreateGroups(); - QDomElement CreateGroup(quint32 id, const QString &name, const QMap &groupData); + QDomElement CreateGroup(quint32 id, const QString &name, const QStringList &tags, + const QMap &groupData, vidtype tool=null_id); + vidtype GroupLinkedToTool(vidtype toolId) const; + QString GetGroupName(quint32 id); void SetGroupName(quint32 id, const QString &name); - QMap > GetGroups(); + + QStringList GetGroupTags(vidtype id); + void SetGroupTags(quint32 id, const QStringList &tags); + + QStringList GetGroupCategories() const; + + QMap GetGroups(); QMap GetGroupsContainingItem(quint32 toolId, quint32 objectId, bool containItem); QDomElement AddItemToGroup(quint32 toolId, quint32 objectId, quint32 groupId); QDomElement RemoveItemFromGroup(quint32 toolId, quint32 objectId, quint32 groupId); bool GroupIsEmpty(quint32 id); bool GetGroupVisibility(quint32 id); + static QStringList FilterGroupTags(const QString &tags); + QString PieceDrawName(quint32 id); static const QString TagPattern; @@ -288,6 +306,7 @@ public: static const QString AttrManualPassmarkLength; static const QString AttrPassmarkLength; static const QString AttrOpacity; + static const QString AttrTags; static const QString AttrAll; @@ -404,7 +423,8 @@ signals: /** * @brief UpdateGroups emit if the groups have been updated */ - void UpdateGroups(); + void UpdateGroups(); + void UpdateToolTip(); public slots: virtual void LiteParseTree(const Document &parse)=0; @@ -413,6 +433,7 @@ public slots: void ClearScene(); void CheckInLayoutList(); void SelectedDetail(quint32 id); + void UpdateVisiblityGroups(); protected: /** @brief nameActivDraw name current pattern peace. */ diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index 40941545d..cd0733d4c 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -264,7 +264,7 @@ VDomDocument::~VDomDocument() } //--------------------------------------------------------------------------------------------------------------------- -QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) +QDomElement VDomDocument::elementById(quint32 id, const QString &tagName, bool updateCache) { if (id == 0) { @@ -273,16 +273,27 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) if (m_elementIdCache.contains(id)) { - const QDomElement e = m_elementIdCache.value(id); - if (e.parentNode().nodeType() != QDomNode::BaseNode) - { - return e; - } - m_elementIdCache.remove(id); + const QDomElement e = m_elementIdCache.value(id); + if (e.parentNode().nodeType() != QDomNode::BaseNode) + { + if (not tagName.isEmpty()) + { + if (e.tagName() == tagName) + { + return e; + } + } + else + { + return e; + } + } } - // Cached missed - RefreshElementIdCache(); + if (updateCache) + { // Cached missed + RefreshElementIdCache(); + } if (tagName.isEmpty()) { @@ -290,10 +301,8 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) QHash tmpCache; if (VDomDocument::find(tmpCache, this->documentElement(), id)) { - m_elementIdCache = tmpCache; - return m_elementIdCache.value(id); + return tmpCache.value(id); } - m_elementIdCache = tmpCache; } else { @@ -305,7 +314,6 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) { const quint32 elementId = GetParametrUInt(domElement, AttrId, NULL_ID_STR); - m_elementIdCache.insert(elementId, domElement); if (elementId == id) { return domElement; diff --git a/src/libs/ifc/xml/vdomdocument.h b/src/libs/ifc/xml/vdomdocument.h index ed3b2f108..238851546 100644 --- a/src/libs/ifc/xml/vdomdocument.h +++ b/src/libs/ifc/xml/vdomdocument.h @@ -96,7 +96,7 @@ public: explicit VDomDocument(QObject *parent = nullptr); virtual ~VDomDocument(); - QDomElement elementById(quint32 id, const QString &tagName = QString()); + QDomElement elementById(quint32 id, const QString &tagName = QString(), bool updateCache=true); template void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const; diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 1c29121a5..a38a9dbfc 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -59,8 +59,8 @@ class QDomElement; */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.4"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.8.6"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.8.6.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.8.7"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.8.7.xsd"); //VPatternConverter::PatternMinVer; // <== DON'T FORGET TO UPDATE TOO!!!! //VPatternConverter::PatternMaxVer; // <== DON'T FORGET TO UPDATE TOO!!!! @@ -236,7 +236,8 @@ QString VPatternConverter::XSDSchema(int ver) const std::make_pair(FORMAT_VERSION(0, 8, 3), QStringLiteral("://schema/pattern/v0.8.3.xsd")), std::make_pair(FORMAT_VERSION(0, 8, 4), QStringLiteral("://schema/pattern/v0.8.4.xsd")), std::make_pair(FORMAT_VERSION(0, 8, 5), QStringLiteral("://schema/pattern/v0.8.5.xsd")), - std::make_pair(FORMAT_VERSION(0, 8, 6), CurrentSchema) + std::make_pair(FORMAT_VERSION(0, 8, 6), QStringLiteral("://schema/pattern/v0.8.6.xsd")), + std::make_pair(FORMAT_VERSION(0, 8, 7), CurrentSchema) }; if (schemas.contains(ver)) @@ -481,6 +482,10 @@ void VPatternConverter::ApplyPatches() ValidateXML(XSDSchema(FORMAT_VERSION(0, 8, 6))); Q_FALLTHROUGH(); case (FORMAT_VERSION(0, 8, 6)): + ToV0_8_7(); + ValidateXML(XSDSchema(FORMAT_VERSION(0, 8, 7))); + Q_FALLTHROUGH(); + case (FORMAT_VERSION(0, 8, 7)): break; default: InvalidVersion(m_ver); @@ -498,7 +503,7 @@ void VPatternConverter::DowngradeToCurrentMaxVersion() bool VPatternConverter::IsReadOnly() const { // Check if attribute readOnly was not changed in file format - Q_STATIC_ASSERT_X(VPatternConverter::PatternMaxVer == FORMAT_VERSION(0, 8, 6), + Q_STATIC_ASSERT_X(VPatternConverter::PatternMaxVer == FORMAT_VERSION(0, 8, 7), "Check attribute readOnly."); // Possibly in future attribute readOnly will change position etc. @@ -1128,6 +1133,16 @@ void VPatternConverter::ToV0_8_6() Save(); } +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::ToV0_8_7() +{ + // TODO. Delete if minimal supported version is 0.8.7 + Q_STATIC_ASSERT_X(VPatternConverter::PatternMinVer < FORMAT_VERSION(0, 8, 7), + "Time to refactor the code."); + SetVersion(QStringLiteral("0.8.7")); + Save(); +} + //--------------------------------------------------------------------------------------------------------------------- void VPatternConverter::TagUnitToV0_2_0() { diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 944820654..1adaabee3 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -53,7 +53,7 @@ public: static const QString PatternMaxVerStr; static const QString CurrentSchema; static Q_DECL_CONSTEXPR const int PatternMinVer = FORMAT_VERSION(0, 1, 4); - static Q_DECL_CONSTEXPR const int PatternMaxVer = FORMAT_VERSION(0, 8, 6); + static Q_DECL_CONSTEXPR const int PatternMaxVer = FORMAT_VERSION(0, 8, 7); protected: virtual int MinVer() const override; @@ -129,6 +129,7 @@ private: void ToV0_8_4(); void ToV0_8_5(); void ToV0_8_6(); + void ToV0_8_7(); void TagUnitToV0_2_0(); void TagIncrementToV0_2_0(); diff --git a/src/libs/vdxf/dxiface.cpp b/src/libs/vdxf/dxiface.cpp index fb7b743ef..88372d63f 100644 --- a/src/libs/vdxf/dxiface.cpp +++ b/src/libs/vdxf/dxiface.cpp @@ -43,9 +43,12 @@ bool dx_iface::fileExport(bool binary) void dx_iface::writeEntity(DRW_Entity* e){ switch (e->eType) { - case DRW::POINT: + case DRW::POINT: dxfW->writePoint(static_cast(e)); break; + case DRW::ASTMNOTCH: + dxfW->writeASTMNotch(static_cast(e)); + break; case DRW::LINE: dxfW->writeLine(static_cast(e)); break; @@ -283,6 +286,107 @@ void dx_iface::AddAAMAHeaderData() cData.headerC.addStr("$CLAYER", "1", 8); // Current layer name } +void dx_iface::AddASTMLayers() +{ + DRW_Layer layer; + + layer.name = '1';// piece boundary + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Do not support +// layer.name = '2';// turn points +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + // Do not support +// layer.name = '3';// curve points +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + layer.name = '4';// V-notch and slit notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Do not support +// layer.name = '5';// grade reference and alternate grade reference line(s) +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + // Do not support +// layer.name = '6';// mirror line +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + layer.name = '7';// grainline + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = '8';// internal line(s) + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Do not support +// layer.name = '9';// stripe reference line(s) +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + // Do not support +// layer.name = '10';// plaid reference line(s) +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + layer.name = "11";// internal cutout(s) + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Layer 12 intentionally left blank by the standard + + layer.name = "13";// drill holes + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "14";// sew line(s) + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "15";// annotation text + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "80";// T-notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "81";// castle notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "82";// check notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "83";// U-notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "84";// piece boundary quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "85";// internal lines quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "86";// internal cutouts quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "87";// sew lines quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); +} + void dx_iface::AddDefLayers() { DRW_Layer defLayer; diff --git a/src/libs/vdxf/dxiface.h b/src/libs/vdxf/dxiface.h index 15adc34f3..78c9b11d2 100644 --- a/src/libs/vdxf/dxiface.h +++ b/src/libs/vdxf/dxiface.h @@ -124,6 +124,7 @@ public: void AddDefLayers(); void AddAAMALayers(); void AddAAMAHeaderData(); + void AddASTMLayers(); private: Q_DISABLE_COPY(dx_iface) diff --git a/src/libs/vdxf/libdxfrw/drw_entities.cpp b/src/libs/vdxf/libdxfrw/drw_entities.cpp index 8f2c8a677..1450a07dc 100644 --- a/src/libs/vdxf/libdxfrw/drw_entities.cpp +++ b/src/libs/vdxf/libdxfrw/drw_entities.cpp @@ -224,6 +224,18 @@ void DRW_Point::parseCode(int code, dxfReader *reader){ } } +void DRW_ASTMNotch::parseCode(int code, dxfReader *reader) +{ + switch (code) { + case 50: + angle = reader->getDouble(); + break; + default: + DRW_Point::parseCode(code, reader); + break; + } +} + void DRW_Line::parseCode(int code, dxfReader *reader){ switch (code) { case 11: diff --git a/src/libs/vdxf/libdxfrw/drw_entities.h b/src/libs/vdxf/libdxfrw/drw_entities.h index 1b4719a94..667007d2a 100644 --- a/src/libs/vdxf/libdxfrw/drw_entities.h +++ b/src/libs/vdxf/libdxfrw/drw_entities.h @@ -80,6 +80,7 @@ namespace DRW { VIEWPORT, // WIPEOUT, //WIPEOUTVARIABLE XLINE, + ASTMNOTCH, // ASTM NOTCH UNKNOWN }; @@ -251,6 +252,22 @@ public: // the UCS in effect when the point was drawn }; + +class DRW_ASTMNotch : public DRW_Point { + SETENTFRIENDS +public: + DRW_ASTMNotch() + { + eType = DRW::ASTMNOTCH; + } + +protected: + void parseCode(int code, dxfReader *reader); + +public: + double angle{0}; /*!< angle, code 50 */ +}; + //! Class to handle line entity /*! * Class to handle line entity diff --git a/src/libs/vdxf/libdxfrw/libdxfrw.cpp b/src/libs/vdxf/libdxfrw/libdxfrw.cpp index 3f775a573..3f74513ba 100644 --- a/src/libs/vdxf/libdxfrw/libdxfrw.cpp +++ b/src/libs/vdxf/libdxfrw/libdxfrw.cpp @@ -553,6 +553,15 @@ bool dxfRW::writePoint(DRW_Point *ent) { return true; } +bool dxfRW::writeASTMNotch(DRW_ASTMNotch *ent) +{ + writePoint(ent); + writer->writeDouble(50, ent->angle); + writer->writeDouble(39, ent->thickness); // Defined, but not used in point + + return true; +} + bool dxfRW::writeLine(DRW_Line *ent) { writer->writeString(0, "LINE"); writeEntity(ent); diff --git a/src/libs/vdxf/libdxfrw/libdxfrw.h b/src/libs/vdxf/libdxfrw/libdxfrw.h index 6e3e17679..fa20baced 100644 --- a/src/libs/vdxf/libdxfrw/libdxfrw.h +++ b/src/libs/vdxf/libdxfrw/libdxfrw.h @@ -47,6 +47,7 @@ public: bool writeVport(DRW_Vport *ent); bool writeAppId(DRW_AppId *ent); bool writePoint(DRW_Point *ent); + bool writeASTMNotch(DRW_ASTMNotch *ent); bool writeLine(DRW_Line *ent); bool writeRay(DRW_Ray *ent); bool writeXline(DRW_Xline *ent); diff --git a/src/libs/vdxf/vdxfengine.cpp b/src/libs/vdxf/vdxfengine.cpp index af8f5546b..f023ea186 100644 --- a/src/libs/vdxf/vdxfengine.cpp +++ b/src/libs/vdxf/vdxfengine.cpp @@ -55,6 +55,23 @@ static const qreal AAMATextHeight = 2.5; +namespace +{ +QVector PieceOutline(const VLayoutPiece &detail) +{ + QVector outline; + if (detail.IsSeamAllowance() && not detail.IsSeamAllowanceBuiltIn()) + { + outline = detail.GetMappedSeamAllowancePoints(); + } + else + { + outline = detail.GetMappedContourPoints(); + } + return outline; +} +} + //--------------------------------------------------------------------------------------------------------------------- static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures() { @@ -570,6 +587,30 @@ void VDxfEngine::setInsunits(const VarInsunits &var) varInsunits = var; } +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfEngine::GetXScale() const +{ + return m_xscale; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::SetXScale(const qreal &xscale) +{ + m_xscale = xscale; +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfEngine::GetYScale() const +{ + return m_yscale; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::SetYScale(const qreal &yscale) +{ + m_yscale = yscale; +} + //--------------------------------------------------------------------------------------------------------------------- QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Wswitch-default") @@ -623,9 +664,9 @@ bool VDxfEngine::ExportToAAMA(const QVector &details) } input->AddAAMALayers(); - ExportAAMAGlobalText(input, details); + ExportStyleSystemText(input, details); - for(auto &detail : details) + for(auto detail : details) { dx_ifaceBlock *detailBlock = new dx_ifaceBlock(); @@ -638,12 +679,14 @@ bool VDxfEngine::ExportToAAMA(const QVector &details) detailBlock->name = blockName.toStdString(); detailBlock->layer = '1'; + detail.Scale(m_xscale, m_yscale); + ExportAAMAOutline(detailBlock, detail); ExportAAMADraw(detailBlock, detail); ExportAAMAIntcut(detailBlock, detail); ExportAAMANotch(detailBlock, detail); ExportAAMAGrainline(detailBlock, detail); - ExportAAMAText(detailBlock, detail); + ExportPieceText(detailBlock, detail); ExportAAMADrill(detailBlock, detail); input->AddBlock(detailBlock); @@ -661,17 +704,7 @@ bool VDxfEngine::ExportToAAMA(const QVector &details) //--------------------------------------------------------------------------------------------------------------------- void VDxfEngine::ExportAAMAOutline(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) { - QVector outline; - if (detail.IsSeamAllowance() && not detail.IsSeamAllowanceBuiltIn()) - { - outline = detail.GetMappedSeamAllowancePoints(); - } - else - { - outline = detail.GetMappedContourPoints(); - } - - DRW_Entity *e = AAMAPolygon(outline, QChar('1'), true); + DRW_Entity *e = AAMAPolygon(PieceOutline(detail), QChar('1'), true); if (e) { detailBlock->ent.push_back(e); @@ -761,20 +794,20 @@ void VDxfEngine::ExportAAMAGrainline(dx_ifaceBlock *detailBlock, const VLayoutPi } //--------------------------------------------------------------------------------------------------------------------- -void VDxfEngine::ExportAAMAText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +void VDxfEngine::ExportPieceText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) { const QStringList list = detail.GetPieceText(); const QPointF startPos = detail.GetPieceTextPosition(); for (int i = 0; i < list.size(); ++i) { - QPointF pos(startPos.x(), startPos.y() - ToPixel(AAMATextHeight, varInsunits)*(list.size() - i-1)); + QPointF pos(startPos.x(), startPos.y() - ToPixel(AAMATextHeight * m_yscale, varInsunits)*(list.size() - i-1)); detailBlock->ent.push_back(AAMAText(pos, list.at(i), QChar('1'))); } } //--------------------------------------------------------------------------------------------------------------------- -void VDxfEngine::ExportAAMAGlobalText(const QSharedPointer &input, const QVector &details) +void VDxfEngine::ExportStyleSystemText(const QSharedPointer &input, const QVector &details) { for(auto &detail : details) { @@ -783,7 +816,8 @@ void VDxfEngine::ExportAAMAGlobalText(const QSharedPointer &input, con { for (int j = 0; j < strings.size(); ++j) { - QPointF pos(0, getSize().height() - ToPixel(AAMATextHeight, varInsunits)*(strings.size() - j-1)); + QPointF pos(0, getSize().height() - + ToPixel(AAMATextHeight * m_yscale, varInsunits)*(strings.size() - j-1)); input->AddEntity(AAMAText(pos, strings.at(j), QChar('1'))); } return; @@ -812,6 +846,263 @@ void VDxfEngine::ExportAAMADrill(dx_ifaceBlock *detailBlock, const VLayoutPiece } } +//--------------------------------------------------------------------------------------------------------------------- +bool VDxfEngine::ExportToASTM(const QVector &details) +{ + if (size.isValid() == false) + { + qWarning()<<"VDxfEngine::begin(), size is not valid"; + return false; + } + + input = QSharedPointer(new dx_iface(getFileNameForLocale(), m_version, varMeasurement, + varInsunits)); + + input->AddAAMAHeaderData(); + if (m_version > DRW::AC1009) + { + input->AddDefLayers(); + } + input->AddASTMLayers(); + + ExportStyleSystemText(input, details); + + for(auto detail : details) + { + dx_ifaceBlock *detailBlock = new dx_ifaceBlock(); + + QString blockName = detail.GetName(); + if (m_version <= DRW::AC1009) + { + blockName.replace(' ', '_'); + } + + detailBlock->name = blockName.toStdString(); + detailBlock->layer = '1'; + + detail.Scale(m_xscale, m_yscale); + + ExportASTMPieceBoundary(detailBlock, detail); + ExportASTMSewLine(detailBlock, detail); + ExportASTMInternalLine(detailBlock, detail); + ExportASTMInternalCutout(detailBlock, detail); + ExportASTMNotch(detailBlock, detail); + ExportAAMAGrainline(detailBlock, detail); + ExportPieceText(detailBlock, detail); + ExportASTMDrill(detailBlock, detail); + ExportASTMAnnotationText(detailBlock, detail); + + input->AddBlock(detailBlock); + + DRW_Insert *insert = new DRW_Insert(); + insert->name = blockName.toStdString(); + insert->layer = '1'; + + input->AddEntity(insert); + } + + return input->fileExport(m_binary); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMPieceBoundary(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + QVector pieceBoundary = PieceOutline(detail); + + // Piece boundary + DRW_Entity *e = AAMAPolygon(PieceOutline(detail), QChar('1'), true); + if (e) + { + detailBlock->ent.push_back(e); + } + + // Piece boundary quality validation curves + DRW_Entity *q = AAMAPolygon(PieceOutline(detail), "84", true); + if (q) + { + detailBlock->ent.push_back(q); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMSewLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + if (not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn()) + { + QVector sewLine = detail.GetMappedContourPoints(); + + // Sew lines + if (DRW_Entity *e = AAMAPolygon(sewLine, "14", true)) + { + detailBlock->ent.push_back(e); + } + + // Sew lines quality validation curves + if (DRW_Entity *e = AAMAPolygon(sewLine, "87", true)) + { + detailBlock->ent.push_back(e); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMInternalLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + const QVector> drawIntCut = detail.InternalPathsForCut(false); + for(auto &intCut : drawIntCut) + { + // Internal line + if (DRW_Entity *e = AAMAPolygon(intCut, QChar('8'), false)) + { + detailBlock->ent.push_back(e); + } + + // Internal lines quality validation curves + if (DRW_Entity *e = AAMAPolygon(intCut, "85", false)) + { + detailBlock->ent.push_back(e); + } + } + + const QVector labels = detail.GetPlaceLabels(); + for(auto &label : labels) + { + if (label.type != PlaceLabelType::Doubletree && label.type != PlaceLabelType::Button + && label.type != PlaceLabelType::Circle) + { + for(auto &p : qAsConst(label.shape)) + { + // Internal line (placelabel) + if (DRW_Entity *e = AAMAPolygon(p, QChar('8'), false)) + { + detailBlock->ent.push_back(e); + } + + // Internal lines quality validation curves + if (DRW_Entity *e = AAMAPolygon(p, "85", false)) + { + detailBlock->ent.push_back(e); + } + } + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMInternalCutout(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + QVector> drawIntCut = detail.InternalPathsForCut(true); + for(auto &intCut : drawIntCut) + { + // Internal cutout + if (DRW_Entity *e = AAMAPolygon(intCut, "11", false)) + { + detailBlock->ent.push_back(e); + } + + // Internal cutouts quality validation curves + if (DRW_Entity *e = AAMAPolygon(intCut, "86", false)) + { + detailBlock->ent.push_back(e); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMAnnotationText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + QString name = detail.GetName(); + QPointF textPos = detail.VLayoutPiece::DetailBoundingRect().center(); + + QPointF pos(textPos.x(), textPos.y() - ToPixel(AAMATextHeight, varInsunits)); + detailBlock->ent.push_back(AAMAText(pos, name, "15")); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMDrill(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + const QVector labels = detail.GetPlaceLabels(); + + for(auto &label : labels) + { + if (label.type == PlaceLabelType::Doubletree || label.type == PlaceLabelType::Button + || label.type == PlaceLabelType::Circle) + { + const QPointF center = detail.GetMatrix().map(label.center); + DRW_Point *point = new DRW_Point(); + point->basePoint = DRW_Coord(FromPixel(center.x(), varInsunits), + FromPixel(getSize().height() - center.y(), varInsunits), 0); + point->layer = "13"; + + detailBlock->ent.push_back(point); + + // TODO. Investigate drill category +// QPointF pos(center.x(), center.y() - ToPixel(AAMATextHeight, varInsunits)); +// detailBlock->ent.push_back(AAMAText(pos, category, "13")); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMNotch(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + if (detail.IsSeamAllowance()) + { + const QVector passmarks = detail.GetPassmarks(); + for(auto &passmark : passmarks) + { + DRW_ASTMNotch *notch = new DRW_ASTMNotch(); + const QPointF center = passmark.baseLine.p1(); + + notch->basePoint = DRW_Coord(FromPixel(center.x(), varInsunits), + FromPixel(getSize().height() - center.y(), varInsunits), + FromPixel(passmark.baseLine.length(), varInsunits)); + + notch->angle = passmark.baseLine.angle(); + + if (passmark.type == PassmarkLineType::OneLine || passmark.type == PassmarkLineType::TwoLines + || passmark.type == PassmarkLineType::ThreeLines) + { // Slit notch + notch->layer = "4"; + } + else if (passmark.type == PassmarkLineType::VMark || passmark.type == PassmarkLineType::VMark2) + { + QLineF boundaryLine = QLineF(passmark.lines.first().p2(), passmark.lines.last().p2()); + notch->thickness = FromPixel(boundaryLine.length(), varInsunits); // width + + notch->layer = "4"; + } + else if (passmark.type == PassmarkLineType::TMark) + { + qreal width = FromPixel(passmark.lines.last().length(), varInsunits); + notch->thickness = FromPixel(width, varInsunits); + + notch->layer = "80"; + } + else if (passmark.type == PassmarkLineType::BoxMark) + { + QPointF start = passmark.lines.first().p1(); + QPointF end = passmark.lines.last().p2(); + + notch->layer = "81"; + + notch->thickness = FromPixel(QLineF(start, end).length(), varInsunits); + } + else if (passmark.type == PassmarkLineType::UMark) + { + QPointF start = passmark.lines.first().p1(); + QPointF end = passmark.lines.last().p2(); + + notch->thickness = FromPixel(QLineF(start, end).length(), varInsunits); + + notch->layer = "83"; + } + + detailBlock->ent.push_back(notch); + } + } +} + //--------------------------------------------------------------------------------------------------------------------- DRW_Entity *VDxfEngine::AAMAPolygon(const QVector &polygon, const QString &layer, bool forceClosed) { diff --git a/src/libs/vdxf/vdxfengine.h b/src/libs/vdxf/vdxfengine.h index 0c8c261e3..de1e8d0bf 100644 --- a/src/libs/vdxf/vdxfengine.h +++ b/src/libs/vdxf/vdxfengine.h @@ -92,6 +92,12 @@ public: void setMeasurement(const VarMeasurement &var); void setInsunits(const VarInsunits &var); + qreal GetXScale() const; + void SetXScale(const qreal &xscale); + + qreal GetYScale() const; + void SetYScale(const qreal &yscale); + private: Q_DISABLE_COPY(VDxfEngine) QSize size; @@ -104,6 +110,8 @@ private: VarMeasurement varMeasurement; VarInsunits varInsunits; DRW_Text *textBuffer; + qreal m_xscale{1}; + qreal m_yscale{1}; Q_REQUIRED_RESULT double FromPixel(double pix, const VarInsunits &unit) const; Q_REQUIRED_RESULT double ToPixel(double val, const VarInsunits &unit) const; @@ -114,10 +122,19 @@ private: void ExportAAMAIntcut(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); void ExportAAMANotch(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); void ExportAAMAGrainline(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); - void ExportAAMAText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); - void ExportAAMAGlobalText(const QSharedPointer &input, const QVector &details); + void ExportPieceText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportStyleSystemText(const QSharedPointer &input, const QVector &details); void ExportAAMADrill(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + bool ExportToASTM(const QVector &details); + void ExportASTMPieceBoundary(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMSewLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMInternalLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMInternalCutout(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMAnnotationText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMDrill(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMNotch(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + Q_REQUIRED_RESULT DRW_Entity *AAMAPolygon(const QVector &polygon, const QString &layer, bool forceClosed); Q_REQUIRED_RESULT DRW_Entity *AAMALine(const QLineF &line, const QString &layer); Q_REQUIRED_RESULT DRW_Entity *AAMAText(const QPointF &pos, const QString &text, const QString &layer); diff --git a/src/libs/vdxf/vdxfpaintdevice.cpp b/src/libs/vdxf/vdxfpaintdevice.cpp index a45414e96..23622d211 100644 --- a/src/libs/vdxf/vdxfpaintdevice.cpp +++ b/src/libs/vdxf/vdxfpaintdevice.cpp @@ -162,6 +162,40 @@ void VDxfPaintDevice::setInsunits(const VarInsunits &var) engine->setInsunits(var); } +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfPaintDevice::GetXScale() const +{ + return engine->GetYScale(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfPaintDevice::SetXScale(const qreal &xscale) +{ + if (engine->isActive()) + { + qWarning("VDxfPaintDevice::SetXScale(), cannot set x scale while Dxf is being generated"); + return; + } + engine->SetXScale(xscale); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfPaintDevice::GetYScale() const +{ + return engine->GetXScale(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfPaintDevice::SetYScale(const qreal &yscale) +{ + if (engine->isActive()) + { + qWarning("VDxfPaintDevice::SetYScale(), cannot set y scale while Dxf is being generated"); + return; + } + engine->SetYScale(yscale); +} + //--------------------------------------------------------------------------------------------------------------------- bool VDxfPaintDevice::ExportToAAMA(const QVector &details) const { @@ -171,7 +205,16 @@ bool VDxfPaintDevice::ExportToAAMA(const QVector &details) const return res; } - //--------------------------------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------------------------------- +bool VDxfPaintDevice::ExportToASTM(const QVector &details) const +{ + engine->setActive(true); + const bool res = engine->ExportToASTM(details); + engine->setActive(false); + return res; +} + +//--------------------------------------------------------------------------------------------------------------------- int VDxfPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const { switch (metric) diff --git a/src/libs/vdxf/vdxfpaintdevice.h b/src/libs/vdxf/vdxfpaintdevice.h index e6fac0510..a78f762f8 100644 --- a/src/libs/vdxf/vdxfpaintdevice.h +++ b/src/libs/vdxf/vdxfpaintdevice.h @@ -66,7 +66,14 @@ public: void setMeasurement(const VarMeasurement &var); void setInsunits(const VarInsunits &var); + qreal GetXScale() const; + void SetXScale(const qreal &xscale); + + qreal GetYScale() const; + void SetYScale(const qreal &yscale); + bool ExportToAAMA(const QVector &details) const; + bool ExportToASTM(const QVector &details) const; protected: virtual int metric(PaintDeviceMetric metric) const override; diff --git a/src/libs/vformat/vpatternrecipe.cpp b/src/libs/vformat/vpatternrecipe.cpp index 57f86b31d..6a2756448 100644 --- a/src/libs/vformat/vpatternrecipe.cpp +++ b/src/libs/vformat/vpatternrecipe.cpp @@ -37,6 +37,7 @@ #include "../vgeometry/vsplinepath.h" #include "../vgeometry/vcubicbezierpath.h" #include "../vtools/tools/drawTools/drawtools.h" +#include "../vpatterndb/calculator.h" namespace { @@ -88,7 +89,7 @@ VPatternRecipe::VPatternRecipe(VContainer *data, VAbstractPattern *pattern, QObj QDomElement recipeElement = createElement(QStringLiteral("recipe")); recipeElement.appendChild(createComment(FileComment())); - SetAttribute(recipeElement, QStringLiteral("version"), QStringLiteral("1.0.0")); + SetAttribute(recipeElement, QStringLiteral("version"), QStringLiteral("1.1.0")); recipeElement.appendChild(Prerequisite()); recipeElement.appendChild(Content()); @@ -252,6 +253,8 @@ QDomElement VPatternRecipe::Content() content.appendChild(Draft(draw)); } + content.appendChild(FinalMeasurements()); + return content; } @@ -402,6 +405,46 @@ QT_WARNING_POP throw VExceptionInvalidHistory(tr("Can't create history record for the tool.")); } +//--------------------------------------------------------------------------------------------------------------------- +QDomElement VPatternRecipe::FinalMeasurements() +{ + QDomElement recipeFinalMeasurements = createElement(QStringLiteral("finalMeasurements")); + + const QVector measurements = m_pattern->GetFinalMeasurements(); + + for (auto &m : measurements) + { + recipeFinalMeasurements.appendChild(FinalMeasurement(m)); + } + + return recipeFinalMeasurements; +} + +//--------------------------------------------------------------------------------------------------------------------- +QDomElement VPatternRecipe::FinalMeasurement(const VFinalMeasurement &fm) +{ + QDomElement recipeFinalMeasurement = createElement(QStringLiteral("finalMeasurement")); + + SetAttribute(recipeFinalMeasurement, QStringLiteral("description"), fm.description); + SetAttribute(recipeFinalMeasurement, QStringLiteral("name"), fm.name); + SetAttribute(recipeFinalMeasurement, QStringLiteral("formula"), fm.formula); // TODO: localize + + QScopedPointer cal(new Calculator()); + const qreal result = cal->EvalFormula(m_data->DataVariables(), fm.formula); + if (qIsInf(result) || qIsNaN(result)) + { + const QString errorMsg = QString("%1\n\n%1").arg(tr("Reading final measurements error."), + tr("Value for final measurtement '%1' is infinite or NaN. " + "Please, check your calculations.").arg(fm.name)); + qApp->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; + } + + SetAttribute(recipeFinalMeasurement, QStringLiteral("value"), result); + + return recipeFinalMeasurement; +} + //--------------------------------------------------------------------------------------------------------------------- QDomElement VPatternRecipe::BasePoint(const VToolRecord &record) { diff --git a/src/libs/vformat/vpatternrecipe.h b/src/libs/vformat/vpatternrecipe.h index 3beb05267..4b53304a2 100644 --- a/src/libs/vformat/vpatternrecipe.h +++ b/src/libs/vformat/vpatternrecipe.h @@ -37,6 +37,7 @@ class VIncrement; class VToolRecord; class VFormula; class VAbstractOperation; +struct VFinalMeasurement; class VPatternRecipe : public VDomDocument { @@ -65,6 +66,9 @@ private: QDomElement Draft(const QDomElement &draft); QDomElement Step(const VToolRecord &tool); + QDomElement FinalMeasurements(); + QDomElement FinalMeasurement(const VFinalMeasurement &fm); + QDomElement BasePoint(const VToolRecord &record); QDomElement EndLine(const VToolRecord &record); QDomElement Line(const VToolRecord &record); diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 649a4af02..ff7eef16b 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -51,7 +51,7 @@ const quint32 VAbstractPieceData::streamHeader = 0x05CDD73A; // CRC-32Q string "VAbstractPieceData" const quint16 VAbstractPieceData::classVersion = 2; -const qreal maxL = 2.5; +const qreal maxL = 3.5; const qreal VSAPoint::passmarkFactor = 0.5; const qreal VSAPoint::maxPassmarkLength = (10/*mm*/ / 25.4) * PrintDPI; diff --git a/src/libs/vlayout/vbank.cpp b/src/libs/vlayout/vbank.cpp index 32a72881c..1df82536c 100644 --- a/src/libs/vlayout/vbank.cpp +++ b/src/libs/vlayout/vbank.cpp @@ -29,6 +29,7 @@ #include "vbank.h" #include +#include #include "../vmisc/diagnostic.h" #include "../vmisc/vabstractapplication.h" @@ -334,8 +335,9 @@ bool VBank::PrepareUnsorted() const qint64 square = details.at(i).Square(); if (square <= 0) { - qCCritical(lBank, "Preparing data for layout error: Detail '%s' square <= 0", - qUtf8Printable(details.at(i).GetName())); + qCCritical(lBank) << VAbstractApplication::patternMessageSignature + + tr("Preparing data for layout error: Detail '%1' square <= 0") + .arg(details.at(i).GetName()); prepare = false; return prepare; } @@ -358,14 +360,16 @@ bool VBank::PrepareDetails() { if (layoutWidth <= 0) { - qCCritical(lBank, "Preparing data for layout error: Layout paper sheet <= 0"); + qCCritical(lBank) << VAbstractApplication::patternMessageSignature + + tr("Preparing data for layout error: Layout paper sheet <= 0"); prepare = false; return prepare; } if (details.isEmpty()) { - qCCritical(lBank, "Preparing data for layout error: List of details is empty"); + qCCritical(lBank) << VAbstractApplication::patternMessageSignature + + tr("Preparing data for layout error: List of details is empty"); prepare = false; return prepare; } diff --git a/src/libs/vlayout/vbank.h b/src/libs/vlayout/vbank.h index 7dd5a6c41..37b821e72 100644 --- a/src/libs/vlayout/vbank.h +++ b/src/libs/vlayout/vbank.h @@ -53,6 +53,7 @@ enum class Cases : qint8 { CaseThreeGroup = 0, CaseTwoGroup, CaseDesc, UnknownCa class VBank { + Q_DECLARE_TR_FUNCTIONS(VBank) public: VBank(); diff --git a/src/libs/vlayout/vcontour.cpp b/src/libs/vlayout/vcontour.cpp index 7a565e105..76fb6adce 100644 --- a/src/libs/vlayout/vcontour.cpp +++ b/src/libs/vlayout/vcontour.cpp @@ -278,8 +278,10 @@ QLineF VContour::GlobalEdge(int i) const const QLineF emptyEdge = EmptySheetEdge(); const qreal nShift = emptyEdge.length()/GlobalEdgesCount(); - edge = IsPortrait() ? QLineF(nShift*(i-1), emptyEdge.y1(), nShift*i, emptyEdge.y2()) : - QLineF(emptyEdge.x1(), nShift*(i-1), emptyEdge.x2(), nShift*i); + edge = IsPortrait() ? QLineF(nShift*(i-1) + emptyEdge.x1(), emptyEdge.y1(), + nShift*i + emptyEdge.x1(), emptyEdge.y2()) : + QLineF(emptyEdge.x1(), nShift*(i-1) + emptyEdge.y1(), + emptyEdge.x2(), nShift*i + emptyEdge.y1()); } else { @@ -445,7 +447,7 @@ bool VContour::IsPortrait() const QLineF VContour::EmptySheetEdge() const { const int offset = qRound(accuracyPointOnLine*4.); - const int layoutOffset = qCeil(d->layoutWidth - accuracyPointOnLine*4.); + const int layoutOffset = qCeil(d->layoutWidth - accuracyPointOnLine*2.); return IsPortrait() ? QLineF(offset, -layoutOffset, d->paperWidth-offset, -layoutOffset) : QLineF(-layoutOffset, offset, -layoutOffset, d->paperHeight-offset); } diff --git a/src/libs/vlayout/vlayoutgenerator.cpp b/src/libs/vlayout/vlayoutgenerator.cpp index db19d5bd8..c34d403c3 100644 --- a/src/libs/vlayout/vlayoutgenerator.cpp +++ b/src/libs/vlayout/vlayoutgenerator.cpp @@ -275,12 +275,7 @@ qreal VLayoutGenerator::LayoutEfficiency() const qreal efficiency = 0; if (not papers.isEmpty()) { - for(auto &paper : papers) - { - efficiency += paper.Efficiency(); - } - - efficiency /= papers.size(); + efficiency = MasterPage().Efficiency(); } return efficiency; } @@ -613,7 +608,7 @@ void VLayoutGenerator::UnitePages() } //--------------------------------------------------------------------------------------------------------------------- -void VLayoutGenerator::UniteDetails(int j, QList > &nDetails, qreal length, int i) +void VLayoutGenerator::UniteDetails(int j, QList > &nDetails, qreal length, int i) const { if ((j == 0 && nDetails.isEmpty()) || j >= nDetails.size()) {//First or new details in paper @@ -639,7 +634,7 @@ void VLayoutGenerator::UnitePapers(int j, QList &papersLength, qreal leng } //--------------------------------------------------------------------------------------------------------------------- -QList VLayoutGenerator::MoveDetails(qreal length, const QVector &details) +QList VLayoutGenerator::MoveDetails(qreal length, const QVector &details) const { if (qFuzzyIsNull(length)) { @@ -656,6 +651,87 @@ QList VLayoutGenerator::MoveDetails(qreal length, const QVector > nDetails; + qreal length = 0; + const int j = 0; // papers count. Always 1. + + for (int i = 0; i < papers.size(); ++i) + { + if (IsPortrait()) + { + int paperHeight = 0; + if (autoCropLength) + { + const QRectF rec = papers.at(i).DetailsBoundingRect(); + paperHeight = qRound(rec.y() + rec.height()); + } + else + { + paperHeight = papers.at(i).GetHeight(); + } + + if (i != papers.size()-1) + { + paperHeight = qRound(paperHeight + bank->GetLayoutWidth()*2); + } + + UniteDetails(j, nDetails, length, i); + length += paperHeight; + } + else + { + int paperWidth = 0; + if (autoCropLength) + { + const QRectF rec = papers.at(i).DetailsBoundingRect(); + paperWidth = qRound(rec.x() + rec.width()); + } + else + { + paperWidth = papers.at(i).GetWidth(); + } + + if (i != papers.size()-1) + { + paperWidth = qRound(paperWidth + bank->GetLayoutWidth()*2); + } + + UniteDetails(j, nDetails, length, i); + length += paperWidth; + } + } + + const int height = IsPortrait() ? qRound(length+accuracyPointOnLine*4) : PageHeight(); + const int width = IsPortrait() ? PageWidth() : qRound(length+accuracyPointOnLine*4); + + VLayoutPaper paper(height, width, bank->GetLayoutWidth()); + paper.SetShift(shift); + paper.SetPaperIndex(static_cast(0)); + paper.SetRotate(rotate); + paper.SetFollowGrainline(followGrainline); + paper.SetRotationNumber(rotationNumber); + paper.SetSaveLength(saveLength); + paper.SetDetails(nDetails.at(0)); + + return paper; +} + //--------------------------------------------------------------------------------------------------------------------- bool VLayoutGenerator::IsUnitePages() const { @@ -680,6 +756,18 @@ void VLayoutGenerator::SetSaveLength(bool value) saveLength = value; } +//--------------------------------------------------------------------------------------------------------------------- +bool VLayoutGenerator::IsPreferOneSheetSolution() const +{ + return preferOneSheetSolution; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VLayoutGenerator::SetPreferOneSheetSolution(bool value) +{ + preferOneSheetSolution = value; +} + //--------------------------------------------------------------------------------------------------------------------- bool VLayoutGenerator::GetAutoCropLength() const { diff --git a/src/libs/vlayout/vlayoutgenerator.h b/src/libs/vlayout/vlayoutgenerator.h index 2115140da..e7c4d011b 100644 --- a/src/libs/vlayout/vlayoutgenerator.h +++ b/src/libs/vlayout/vlayoutgenerator.h @@ -117,6 +117,9 @@ public: bool IsSaveLength() const; void SetSaveLength(bool value); + bool IsPreferOneSheetSolution() const; + void SetPreferOneSheetSolution(bool value); + bool IsUnitePages() const; void SetUnitePages(bool value); @@ -154,6 +157,7 @@ private: bool autoCropLength; bool autoCropWidth; bool saveLength; + bool preferOneSheetSolution{false}; bool unitePages; bool stripOptimizationEnabled; quint8 multiplier; @@ -167,9 +171,10 @@ private: void GatherPages(); void UnitePages(); - void UniteDetails(int j, QList > &nDetails, qreal length, int i); + void UniteDetails(int j, QList > &nDetails, qreal length, int i) const; void UnitePapers(int j, QList &papersLength, qreal length); - QList MoveDetails(qreal length, const QVector &details); + QList MoveDetails(qreal length, const QVector &details) const; + VLayoutPaper MasterPage() const; }; #endif // VLAYOUTGENERATOR_H diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index e7a1fb53e..7d4fbb5cb 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -354,7 +354,7 @@ QVector ConvertPassmarks(const VPiece &piece, const VContainer } if (qApp->Settings()->IsDoublePassmark() - && not piece.IsHideMainPath() + && (qApp->Settings()->IsPieceShowMainPath() || not piece.IsHideMainPath()) && pData.isMainPathNode && pData.passmarkAngleType != PassmarkAngleType::Intersection && pData.passmarkAngleType != PassmarkAngleType::IntersectionOnlyLeft @@ -466,7 +466,8 @@ VLayoutPiece VLayoutPiece::Create(const VPiece &piece, vidtype id, const VContai qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; } - det.SetCountourPoints(futureMainPath.result(), piece.IsHideMainPath()); + det.SetCountourPoints(futureMainPath.result(), + qApp->Settings()->IsPieceShowMainPath() ? false : piece.IsHideMainPath()); det.SetSeamAllowancePoints(futureSeamAllowance.result(), piece.IsSeamAllowance(), piece.IsSeamAllowanceBuiltIn()); det.SetInternalPaths(futureInternalPaths.result()); det.SetPassmarks(futurePassmarks.result()); @@ -543,6 +544,7 @@ QVector VLayoutPiece::Map(QVectormatrix.map(passmarks.at(i).baseLine); } return passmarks; @@ -828,6 +830,14 @@ void VLayoutPiece::Translate(qreal dx, qreal dy) d->matrix *= m; } +//--------------------------------------------------------------------------------------------------------------------- +void VLayoutPiece::Scale(qreal sx, qreal sy) +{ + QTransform m; + m.scale(sx, sy); + d->matrix *= m; +} + //--------------------------------------------------------------------------------------------------------------------- void VLayoutPiece::Rotate(const QPointF &originPoint, qreal degrees) { diff --git a/src/libs/vlayout/vlayoutpiece.h b/src/libs/vlayout/vlayoutpiece.h index f0471e84f..509bf18ac 100644 --- a/src/libs/vlayout/vlayoutpiece.h +++ b/src/libs/vlayout/vlayoutpiece.h @@ -126,6 +126,7 @@ public: void SetMirror(bool value); void Translate(qreal dx, qreal dy); + void Scale(qreal sx, qreal sy); void Rotate(const QPointF &originPoint, qreal degrees); void Mirror(const QLineF &edge); void Mirror(); diff --git a/src/libs/vlayout/vposter.cpp b/src/libs/vlayout/vposter.cpp index b278c564e..82069b214 100644 --- a/src/libs/vlayout/vposter.cpp +++ b/src/libs/vlayout/vposter.cpp @@ -124,7 +124,7 @@ VPoster::VPoster(const QPrinter *printer) } //--------------------------------------------------------------------------------------------------------------------- -QVector VPoster::Calc(const QRect &imageRect, int page, PageOrientation orientation) const +QVector VPoster::Calc(const QSize &imageRect, int page, PageOrientation orientation) const { QVector poster; @@ -390,7 +390,7 @@ int VPoster::CountColumns(int width, PageOrientation orientation) const } //--------------------------------------------------------------------------------------------------------------------- -PosterData VPoster::Cut(int i, int j, const QRect &imageRect, PageOrientation orientation) const +PosterData VPoster::Cut(int i, int j, const QSize &imageRect, PageOrientation orientation) const { Q_UNUSED(imageRect) @@ -431,7 +431,9 @@ QRect VPoster::PageRect() const if(printer->fullPage()) { - QMarginsF pMargins = printer->pageLayout().margins(); + QPageLayout layout = printer->pageLayout(); + layout.setUnits(QPageLayout::Millimeter); + QMarginsF pMargins = layout.margins(); QRectF newRect = rect.marginsRemoved(pMargins); const QRect pageRectFP(0, 0, qFloor(ToPixel(newRect.width())), qFloor(ToPixel(newRect.height()))); return pageRectFP; diff --git a/src/libs/vlayout/vposter.h b/src/libs/vlayout/vposter.h index 4860765f3..056b5fb3b 100644 --- a/src/libs/vlayout/vposter.h +++ b/src/libs/vlayout/vposter.h @@ -68,7 +68,7 @@ class VPoster public: explicit VPoster(const QPrinter *printer); - QVector Calc(const QRect &imageRect, int page, PageOrientation orientation) const; + QVector Calc(const QSize &imageRect, int page, PageOrientation orientation) const; QVector Tile(QGraphicsItem *parent, const PosterData &img, int sheets, const VWatermarkData &watermarkData, const QString &watermarkPath) const; @@ -84,7 +84,7 @@ private: int CountRows(int height, PageOrientation orientation) const; int CountColumns(int width, PageOrientation orientation) const; - PosterData Cut(int i, int j, const QRect &imageRect, PageOrientation orientation) const; + PosterData Cut(int i, int j, const QSize &imageRect, PageOrientation orientation) const; QRect PageRect() const; diff --git a/src/libs/vlayout/warnings.pri b/src/libs/vlayout/warnings.pri index f2b2a2224..2f715e3cc 100644 --- a/src/libs/vlayout/warnings.pri +++ b/src/libs/vlayout/warnings.pri @@ -45,7 +45,8 @@ unix { # Key -isystem disable checking errors in system headers. -isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + $$CLANG_DEBUG_CXXFLAGS \# See common.pri for more details. + -Wno-gnu-zero-variadic-macro-arguments\ # See macros qCCritical checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings QMAKE_CXXFLAGS += -Werror diff --git a/src/libs/vmisc/commandoptions.cpp b/src/libs/vmisc/commandoptions.cpp index 1a2eefe37..6499f46d5 100644 --- a/src/libs/vmisc/commandoptions.cpp +++ b/src/libs/vmisc/commandoptions.cpp @@ -53,6 +53,8 @@ const QString LONG_OPTION_BINARYDXF = QStringLiteral("bdxf"); const QString LONG_OPTION_TEXT2PATHS = QStringLiteral("text2paths"); const QString LONG_OPTION_EXPORTONLYDETAILS = QStringLiteral("exportOnlyDetails"); const QString LONG_OPTION_EXPORTSUCHDETAILS = QStringLiteral("exportSuchDetails"); +const QString LONG_OPTION_EXPXSCALE = QStringLiteral("xscale"); +const QString LONG_OPTION_EXPYSCALE = QStringLiteral("yscale"); const QString LONG_OPTION_CROP_LENGTH = QStringLiteral("crop"); const QString SINGLE_OPTION_CROP_LENGTH = QStringLiteral("c"); @@ -134,6 +136,7 @@ const QString LONG_OPTION_MANUAL_PRIORITY = QStringLiteral("manualPriority"); const QString LONG_OPTION_LANDSCAPE_ORIENTATION = QStringLiteral("landscapeOrientation"); const QString LONG_OPTION_NEST_QUANTITY = QStringLiteral("nestQuantity"); +const QString LONG_OPTION_PREFER_ONE_SHEET_SOLUTION = QStringLiteral("preferOneSheetSolution"); //--------------------------------------------------------------------------------------------------------------------- /** @@ -153,6 +156,8 @@ QStringList AllKeys() LONG_OPTION_TEXT2PATHS, LONG_OPTION_EXPORTONLYDETAILS, LONG_OPTION_EXPORTSUCHDETAILS, + LONG_OPTION_EXPXSCALE, + LONG_OPTION_EXPYSCALE, LONG_OPTION_CROP_LENGTH, SINGLE_OPTION_CROP_LENGTH, LONG_OPTION_CROP_WIDTH, LONG_OPTION_UNITE, SINGLE_OPTION_UNITE, @@ -189,6 +194,7 @@ QStringList AllKeys() LONG_OPTION_FOLLOW_GRAINLINE, LONG_OPTION_MANUAL_PRIORITY, LONG_OPTION_LANDSCAPE_ORIENTATION, - LONG_OPTION_NEST_QUANTITY + LONG_OPTION_NEST_QUANTITY, + LONG_OPTION_PREFER_ONE_SHEET_SOLUTION }; } diff --git a/src/libs/vmisc/commandoptions.h b/src/libs/vmisc/commandoptions.h index cd8c57ed5..a4737440e 100644 --- a/src/libs/vmisc/commandoptions.h +++ b/src/libs/vmisc/commandoptions.h @@ -50,6 +50,8 @@ extern const QString LONG_OPTION_BINARYDXF; extern const QString LONG_OPTION_TEXT2PATHS; extern const QString LONG_OPTION_EXPORTONLYDETAILS; extern const QString LONG_OPTION_EXPORTSUCHDETAILS; +extern const QString LONG_OPTION_EXPXSCALE; +extern const QString LONG_OPTION_EXPYSCALE; extern const QString LONG_OPTION_CROP_LENGTH; extern const QString SINGLE_OPTION_CROP_LENGTH; @@ -128,6 +130,7 @@ extern const QString LONG_OPTION_FOLLOW_GRAINLINE; extern const QString LONG_OPTION_MANUAL_PRIORITY; extern const QString LONG_OPTION_LANDSCAPE_ORIENTATION; extern const QString LONG_OPTION_NEST_QUANTITY; +extern const QString LONG_OPTION_PREFER_ONE_SHEET_SOLUTION; QStringList AllKeys(); diff --git a/src/libs/vmisc/compatibility.h b/src/libs/vmisc/compatibility.h index 982f3ed91..f00bdccf0 100644 --- a/src/libs/vmisc/compatibility.h +++ b/src/libs/vmisc/compatibility.h @@ -195,4 +195,27 @@ inline void AppendTo(Cont &container, const Input &input) #endif // QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) } +//--------------------------------------------------------------------------------------------------------------------- +template +inline bool SetIntersects(const QSet &set1, const QSet &set2) +{ +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + return set1.intersects(set2); +#else + const bool otherIsBigger = set2.size() > set1.size(); + const QSet &smallestSet = otherIsBigger ? set1 : set2; + const QSet &biggestSet = otherIsBigger ? set2 : set1; + typename QSet::const_iterator i = smallestSet.cbegin(); + typename QSet::const_iterator e = smallestSet.cend(); + while (i != e) + { + if (biggestSet.contains(*i)) + return true; + ++i; + } + return false; + +#endif +} + #endif // COMPATIBILITY_H diff --git a/src/libs/vmisc/customevents.h b/src/libs/vmisc/customevents.h index f3d2fbc55..72638e16c 100644 --- a/src/libs/vmisc/customevents.h +++ b/src/libs/vmisc/customevents.h @@ -107,8 +107,6 @@ private: QtMsgType m_severity; }; -#endif // CUSTOMEVENTS_H - inline QString PatternMessageEvent::Message() const { return m_message; @@ -118,3 +116,5 @@ inline QtMsgType PatternMessageEvent::Severity() const { return m_severity; } + +#endif // CUSTOMEVENTS_H diff --git a/src/libs/vmisc/share/resources/icon.qrc b/src/libs/vmisc/share/resources/icon.qrc index ebd7ae48f..f4cff9ed5 100644 --- a/src/libs/vmisc/share/resources/icon.qrc +++ b/src/libs/vmisc/share/resources/icon.qrc @@ -85,5 +85,9 @@ icon/32x32/font_preferences.png icon/24x24/font_preferences@2x.png icon/24x24/font_preferences.png + icon/32x32/broken_link.png + icon/32x32/broken_link@2x.png + icon/32x32/link.png + icon/32x32/link@2x.png diff --git a/src/libs/vmisc/share/resources/icon/32x32/broken_link.png b/src/libs/vmisc/share/resources/icon/32x32/broken_link.png new file mode 100644 index 000000000..e9eda1311 Binary files /dev/null and b/src/libs/vmisc/share/resources/icon/32x32/broken_link.png differ diff --git a/src/libs/vmisc/share/resources/icon/32x32/broken_link@2x.png b/src/libs/vmisc/share/resources/icon/32x32/broken_link@2x.png new file mode 100644 index 000000000..7c709416c Binary files /dev/null and b/src/libs/vmisc/share/resources/icon/32x32/broken_link@2x.png differ diff --git a/src/libs/vmisc/share/resources/icon/32x32/link.png b/src/libs/vmisc/share/resources/icon/32x32/link.png new file mode 100644 index 000000000..2b227e48e Binary files /dev/null and b/src/libs/vmisc/share/resources/icon/32x32/link.png differ diff --git a/src/libs/vmisc/share/resources/icon/32x32/link@2x.png b/src/libs/vmisc/share/resources/icon/32x32/link@2x.png new file mode 100644 index 000000000..46527dab9 Binary files /dev/null and b/src/libs/vmisc/share/resources/icon/32x32/link@2x.png differ diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 1b9369cb3..5a4bfa8b4 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -238,6 +238,11 @@ VCommonSettings::VCommonSettings(Format format, Scope scope, const QString &orga :QSettings(format, scope, organization, application, parent) {} +//--------------------------------------------------------------------------------------------------------------------- +VCommonSettings::VCommonSettings(const QString &fileName, QSettings::Format format, QObject *parent) + :QSettings(fileName, format, parent) +{} + //--------------------------------------------------------------------------------------------------------------------- QString VCommonSettings::SharePath(const QString &shareItem) { diff --git a/src/libs/vmisc/vcommonsettings.h b/src/libs/vmisc/vcommonsettings.h index da65ccd61..26f5acd17 100644 --- a/src/libs/vmisc/vcommonsettings.h +++ b/src/libs/vmisc/vcommonsettings.h @@ -44,6 +44,7 @@ class VCommonSettings : public QSettings public: VCommonSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(), QObject *parent = nullptr); + VCommonSettings(const QString &fileName, Format format, QObject *parent = nullptr); static QString SharePath(const QString &shareItem); static QString MultisizeTablesPath(); diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 12330741d..dbe6ff220 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -91,6 +91,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutNestQuantity, (QLatin1Stri Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutAutoCropLength, (QLatin1String("layout/autoCropLength"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutAutoCropWidth, (QLatin1String("layout/autoCropWidth"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutSaveLength, (QLatin1String("layout/saveLength"))) +Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutPreferOneSheetSolution, + (QLatin1String("layout/preferOneSheetSolution"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutUnitePages, (QLatin1String("layout/unitePages"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFields, (QLatin1String("layout/fields"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIgnoreFields, (QLatin1String("layout/ignoreFields"))) @@ -137,6 +139,13 @@ VSettings::VSettings(Format format, Scope scope, const QString &organization, co qRegisterMetaTypeStreamOperators("QMarginsF"); } +//--------------------------------------------------------------------------------------------------------------------- +VSettings::VSettings(const QString &fileName, QSettings::Format format, QObject *parent) + :VCommonSettings(fileName, format, parent) +{ + qRegisterMetaTypeStreamOperators("QMarginsF"); +} + //--------------------------------------------------------------------------------------------------------------------- template inline T VSettings::ValueOrDef(const QString &setting, const T &defValue) const @@ -419,6 +428,24 @@ void VSettings::SetLayoutSaveLength(bool value) setValue(*settingLayoutSaveLength, value); } +//--------------------------------------------------------------------------------------------------------------------- +bool VSettings::GetLayoutPreferOneSheetSolution() const +{ + return value(*settingLayoutPreferOneSheetSolution, GetDefLayoutPreferOneSheetSolution()).toBool(); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VSettings::GetDefLayoutPreferOneSheetSolution() +{ + return false; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VSettings::SetLayoutPreferOneSheetSolution(bool value) +{ + setValue(*settingLayoutPreferOneSheetSolution, value); +} + //--------------------------------------------------------------------------------------------------------------------- bool VSettings::GetLayoutUnitePages() const { diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index 47b8f831a..8b6d0aacd 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -45,6 +45,7 @@ class VSettings : public VCommonSettings public: VSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(), QObject *parent = nullptr); + VSettings(const QString &fileName, Format format, QObject *parent = nullptr); QString GetLabelLanguage() const; void SetLabelLanguage(const QString &value); @@ -109,6 +110,10 @@ public: static bool GetDefLayoutSaveLength(); void SetLayoutSaveLength(bool value); + bool GetLayoutPreferOneSheetSolution() const; + static bool GetDefLayoutPreferOneSheetSolution(); + void SetLayoutPreferOneSheetSolution(bool value); + bool GetLayoutUnitePages() const; static bool GetDefLayoutUnitePages(); void SetLayoutUnitePages(bool value); diff --git a/src/libs/vpatterndb/vpassmark.cpp b/src/libs/vpatterndb/vpassmark.cpp index 825e9f05e..8db56a243 100644 --- a/src/libs/vpatterndb/vpassmark.cpp +++ b/src/libs/vpatterndb/vpassmark.cpp @@ -660,7 +660,7 @@ QVector VPassmark::FullPassmark(const VPiece &piece, const VContainer *d QVector lines; lines += SAPassmark(piece, data, PassmarkSide::All); if (qApp->Settings()->IsDoublePassmark() - && not piece.IsHideMainPath() + && (qApp->Settings()->IsPieceShowMainPath() || not piece.IsHideMainPath()) && m_data.isMainPathNode && m_data.passmarkAngleType != PassmarkAngleType::Intersection && m_data.passmarkAngleType != PassmarkAngleType::IntersectionOnlyLeft diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index a45b55c91..aa4870654 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -47,15 +47,7 @@ //--------------------------------------------------------------------------------------------------------------------- VTranslateVars::VTranslateVars() - :VTranslateMeasurements(), - PMSystemNames(QMap()), - PMSystemAuthors(QMap()), - PMSystemBooks(QMap()), - variables(QMap()), - functions(QMap()), - placeholders(QMap()), - stDescriptions(QMap()), - translatedFunctions(QMap()) + :VTranslateMeasurements() { InitPatternMakingSystems(); InitVariables(); @@ -408,45 +400,140 @@ void VTranslateVars::InitVariables() void VTranslateVars::InitFunctions() { functions.insert(degTorad_F, translate("VTranslateVars", "degTorad", "converts degrees to radian")); + functionsDescriptions.insert(degTorad_F, translate("VTranslateVars", "converts degrees to radian", + "functionm degTorad")); + functions.insert(radTodeg_F, translate("VTranslateVars", "radTodeg", "converts radian to degrees")); + functionsDescriptions.insert(radTodeg_F, translate("VTranslateVars", "converts radian to degrees", + "function radTodeg")); + functions.insert(sin_F, translate("VTranslateVars", "sin", "sine function working with radians")); + functionsDescriptions.insert(sin_F, translate("VTranslateVars", "sine function working with radians", + "function sin")); + functions.insert(cos_F, translate("VTranslateVars", "cos", "cosine function working with radians")); + functionsDescriptions.insert(cos_F, translate("VTranslateVars", "cosine function working with radians", + "function cos")); + functions.insert(tan_F, translate("VTranslateVars", "tan", "tangens function working with radians")); + functionsDescriptions.insert(tan_F, translate("VTranslateVars", "tangens function working with radians", + "function tan")); + functions.insert(asin_F, translate("VTranslateVars", "asin", "arcus sine function working with radians")); + functionsDescriptions.insert(asin_F, translate("VTranslateVars", "arcus sine function working with radians", + "function asin")); + functions.insert(acos_F, translate("VTranslateVars", "acos", "arcus cosine function working with radians")); + functionsDescriptions.insert(acos_F, translate("VTranslateVars", "arcus cosine function working with radians", + "function acos")); + functions.insert(atan_F, translate("VTranslateVars", "atan", "arcus tangens function working with radians")); + functionsDescriptions.insert(atan_F, translate("VTranslateVars", "arcus tangens function working with radians", + "function atan")); + functions.insert(sinh_F, translate("VTranslateVars", "sinh", "hyperbolic sine function")); + functionsDescriptions.insert(sinh_F, translate("VTranslateVars", "hyperbolic sine function", "function sinh")); + functions.insert(cosh_F, translate("VTranslateVars", "cosh", "hyperbolic cosine")); + functionsDescriptions.insert(cosh_F, translate("VTranslateVars", "hyperbolic cosine", "function cosh")); + functions.insert(tanh_F, translate("VTranslateVars", "tanh", "hyperbolic tangens function")); + functionsDescriptions.insert(tanh_F, translate("VTranslateVars", "hyperbolic tangens function", "function tanh")); + functions.insert(asinh_F, translate("VTranslateVars", "asinh", "hyperbolic arcus sine function")); + functionsDescriptions.insert(asinh_F, translate("VTranslateVars", "hyperbolic arcus sine function", + "function asinh")); + functions.insert(acosh_F, translate("VTranslateVars", "acosh", "hyperbolic arcus cosine function")); + functionsDescriptions.insert(acosh_F, translate("VTranslateVars", "hyperbolic arcus cosine function", + "function acosh")); + functions.insert(atanh_F, translate("VTranslateVars", "atanh", "hyperbolic arcur tangens function")); + functionsDescriptions.insert(atanh_F, translate("VTranslateVars", "hyperbolic arcur tangens function", + "function atanh")); + functions.insert(sinD_F, translate("VTranslateVars", "sinD", "sine function working with degrees")); + functionsDescriptions.insert(sinD_F, translate("VTranslateVars", "sine function working with degrees", + "function sinD")); + functions.insert(cosD_F, translate("VTranslateVars", "cosD", "cosine function working with degrees")); + functionsDescriptions.insert(cosD_F, translate("VTranslateVars", "cosine function working with degrees", + "function cosD")); + functions.insert(tanD_F, translate("VTranslateVars", "tanD", "tangens function working with degrees")); + functionsDescriptions.insert(tanD_F, translate("VTranslateVars", "tangens function working with degrees", + "function tanD")); + functions.insert(asinD_F, translate("VTranslateVars", "asinD", "arcus sine function working with degrees")); + functionsDescriptions.insert(asinD_F, translate("VTranslateVars", "arcus sine function working with degrees", + "function asinD")); + functions.insert(acosD_F, translate("VTranslateVars", "acosD", "arcus cosine function working with degrees")); + functionsDescriptions.insert(acosD_F, translate("VTranslateVars", "arcus cosine function working with degrees", + "function acosD")); + functions.insert(atanD_F, translate("VTranslateVars", "atanD", "arcus tangens function working with degrees")); + functionsDescriptions.insert(atanD_F, translate("VTranslateVars", "arcus tangens function working with degrees", + "function atanD")); + functions.insert(log2_F, translate("VTranslateVars", "log2", "logarithm to the base 2")); + functionsDescriptions.insert(log2_F, translate("VTranslateVars", "logarithm to the base 2", "function log2")); + functions.insert(log10_F, translate("VTranslateVars", "log10", "logarithm to the base 10")); + functionsDescriptions.insert(log10_F, translate("VTranslateVars", "logarithm to the base 10", "function log10")); + functions.insert(log_F, translate("VTranslateVars", "log", "logarithm to the base 10")); + functionsDescriptions.insert(log_F, translate("VTranslateVars", "logarithm to the base 10", "function log")); + functions.insert(ln_F, translate("VTranslateVars", "ln", "logarithm to base e (2.71828...)")); + functionsDescriptions.insert(ln_F, translate("VTranslateVars", "logarithm to base e (2.71828...)", "function ln")); + functions.insert(exp_F, translate("VTranslateVars", "exp", "e raised to the power of x")); + functionsDescriptions.insert(exp_F, translate("VTranslateVars", "e raised to the power of x", "function exp")); + functions.insert(sqrt_F, translate("VTranslateVars", "sqrt", "square root of a value")); + functionsDescriptions.insert(sqrt_F, translate("VTranslateVars", "square root of a value", "function sqrt")); + functions.insert(sign_F, translate("VTranslateVars", "sign", "sign function -1 if x<0; 1 if x>0")); + functionsDescriptions.insert(sign_F, translate("VTranslateVars", "sign function -1 if x<0; 1 if x>0", + "function sign")); + functions.insert(rint_F, translate("VTranslateVars", "rint", "round to nearest integer")); + functionsDescriptions.insert(rint_F, translate("VTranslateVars", "round to nearest integer", "function rint")); + functions.insert(r2cm_F, translate("VTranslateVars", "r2cm", "round to up to 1 decimal")); + functionsDescriptions.insert(r2cm_F, translate("VTranslateVars", "round to up to 1 decimal", "function r2cm")); + functions.insert(csrCm_F, translate("VTranslateVars", "csrCm", "cut, split and rotate modeling operation. Takes" " cm units.")); + functionsDescriptions.insert(csrCm_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes " + "cm units.", "function csrCm")); + functions.insert(csrInch_F, translate("VTranslateVars", "csrInch", "cut, split and rotate modeling operation. Takes" - " inch units.")); + " inch units.")); + functionsDescriptions.insert(csrInch_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes" + " inch units.", "function csrInch")); + functions.insert(abs_F, translate("VTranslateVars", "abs", "absolute value")); + functionsDescriptions.insert(abs_F, translate("VTranslateVars", "absolute value", "function abs")); + functions.insert(min_F, translate("VTranslateVars", "min", "min of all arguments")); + functionsDescriptions.insert(min_F, translate("VTranslateVars", "min of all arguments", "function min")); + functions.insert(max_F, translate("VTranslateVars", "max", "max of all arguments")); + functionsDescriptions.insert(max_F, translate("VTranslateVars", "max of all arguments", "function max")); + functions.insert(sum_F, translate("VTranslateVars", "sum", "sum of all arguments")); + functionsDescriptions.insert(sum_F, translate("VTranslateVars", "sum of all arguments", "function sum")); + functions.insert(avg_F, translate("VTranslateVars", "avg", "mean value of all arguments")); + functionsDescriptions.insert(avg_F, translate("VTranslateVars", "mean value of all arguments", "function avg")); + functions.insert(fmod_F, translate("VTranslateVars", "fmod", "Returns the floating-point remainder of numer/denom (rounded towards zero)")); + functionsDescriptions.insert(fmod_F, translate("VTranslateVars", "Returns the floating-point remainder of " + "numer/denom (rounded towards zero)", + "function fmod")); } //--------------------------------------------------------------------------------------------------------------------- @@ -1094,6 +1181,7 @@ void VTranslateVars::Retranslate() PMSystemBooks.clear(); variables.clear(); functions.clear(); + functionsDescriptions.clear(); stDescriptions.clear(); InitPatternMakingSystems(); @@ -1115,3 +1203,9 @@ QMap VTranslateVars::GetFunctions() const { return functions; } + +//--------------------------------------------------------------------------------------------------------------------- +QMap VTranslateVars::GetFunctionsDescriptions() const +{ + return functionsDescriptions; +} diff --git a/src/libs/vpatterndb/vtranslatevars.h b/src/libs/vpatterndb/vtranslatevars.h index c7842fdef..c5d02c94d 100644 --- a/src/libs/vpatterndb/vtranslatevars.h +++ b/src/libs/vpatterndb/vtranslatevars.h @@ -67,19 +67,21 @@ public: QMap GetTranslatedFunctions() const; QMap GetFunctions() const; + QMap GetFunctionsDescriptions() const; static void BiasTokens(int position, int bias, QMap &tokens); private: Q_DISABLE_COPY(VTranslateVars) - QMap PMSystemNames; - QMap PMSystemAuthors; - QMap PMSystemBooks; - QMap variables; - QMap functions; - QMap placeholders; - QMap stDescriptions; - QMap translatedFunctions; + QMap PMSystemNames{}; + QMap PMSystemAuthors{}; + QMap PMSystemBooks{}; + QMap variables{}; + QMap functions{}; + QMap functionsDescriptions{}; + QMap placeholders{}; + QMap stDescriptions{}; + QMap translatedFunctions{}; void InitPatternMakingSystems(); void InitVariables(); diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp index 912fec524..a7d3663ab 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -612,6 +612,7 @@ void DialogEditWrongFormula::ShowFunctions() ui->tableWidget->setColumnHidden(ColumnFullName, true); ui->labelDescription->setText(QString()); + const QMap functionsDescriptions = qApp->TrVars()->GetFunctionsDescriptions(); const QMap functions = qApp->TrVars()->GetFunctions(); QMap::const_iterator i = functions.constBegin(); while (i != functions.constEnd()) @@ -622,7 +623,10 @@ void DialogEditWrongFormula::ShowFunctions() font.setBold(true); item->setFont(font); ui->tableWidget->setItem(ui->tableWidget->rowCount()-1, ColumnName, item); - item->setToolTip(i.value().getMdisambiguation()); + + functionsDescriptions.contains(i.key()) + ? item->setToolTip(functionsDescriptions.value(i.key()).translate(qApp->Settings()->GetLocale())) + : item->setToolTip(i.value().getMdisambiguation()); ++i; } diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index 5032edb41..b8cef020f 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -151,7 +151,7 @@ void DialogEndLine::EvalLength() formulaData.labelEditFormula = ui->labelEditFormula; formulaData.labelResult = ui->labelResultCalculation; formulaData.postfix = UnitsToStr(qApp->patternUnit(), true); - formulaData.checkLessThanZero = true; + formulaData.checkLessThanZero = false; Eval(formulaData, flagFormula); } diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp index b9e746971..e370fc820 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -67,6 +68,7 @@ DialogFlippingByAxis::DialogFlippingByAxis(const VContainer *data, quint32 toolI stage1(true), m_suffix(), flagName(true), + flagGroupName(true), flagError(false) { ui->setupUi(this); @@ -81,6 +83,7 @@ DialogFlippingByAxis::DialogFlippingByAxis(const VContainer *data, quint32 toolI ui->comboBoxOriginPoint->setCurrentIndex(-1); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogFlippingByAxis::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogFlippingByAxis::GroupNameChanged); connect(ui->comboBoxOriginPoint, &QComboBox::currentTextChanged, this, &DialogFlippingByAxis::PointChanged); @@ -147,6 +150,49 @@ QVector DialogFlippingByAxis::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogFlippingByAxis::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogFlippingByAxis::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogFlippingByAxis::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByAxis::ShowDialog(bool click) { @@ -277,6 +323,27 @@ void DialogFlippingByAxis::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByAxis::ShowVisualization() { @@ -295,6 +362,18 @@ void DialogFlippingByAxis::SaveData() operation->SetOriginPointId(GetOriginPointId()); operation->SetAxisType(GetAxisType()); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h index 0b31ac1ce..234261fe0 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h @@ -65,6 +65,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -73,6 +84,7 @@ public slots: private slots: void SuffixChanged(); + void GroupNameChanged(); protected: virtual void ShowVisualization() override; @@ -96,15 +108,18 @@ private: QString m_suffix; bool flagName; + bool flagGroupName; bool flagError; + QStringList m_groupTags{}; + static void FillComboBoxAxisType(QComboBox *box); }; //--------------------------------------------------------------------------------------------------------------------- inline bool DialogFlippingByAxis::IsValid() const { - return flagError && flagName; + return flagError && flagName && flagGroupName; } #endif // DIALOGFLIPPINGBYAXIS_H diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui index d21839e55..9ebf2e47f 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui @@ -6,8 +6,8 @@ 0 0 - 285 - 146 + 304 + 237 @@ -48,6 +48,61 @@
+ + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Name: + + + + + + + Flipping by axis + + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -60,6 +115,13 @@ + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp b/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp index bf62e73c3..9532bd364 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -67,6 +68,7 @@ DialogFlippingByLine::DialogFlippingByLine(const VContainer *data, quint32 toolI stage1(true), m_suffix(), flagName(true), + flagGroupName(true), flagError(false) { ui->setupUi(this); @@ -79,6 +81,7 @@ DialogFlippingByLine::DialogFlippingByLine(const VContainer *data, quint32 toolI FillComboBoxPoints(ui->comboBoxSecondLinePoint); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogFlippingByLine::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogFlippingByLine::GroupNameChanged); connect(ui->comboBoxFirstLinePoint, &QComboBox::currentTextChanged, this, &DialogFlippingByLine::PointChanged); connect(ui->comboBoxSecondLinePoint, &QComboBox::currentTextChanged, @@ -142,6 +145,49 @@ QVector DialogFlippingByLine::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogFlippingByLine::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogFlippingByLine::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogFlippingByLine::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByLine::ShowDialog(bool click) { @@ -301,6 +347,27 @@ void DialogFlippingByLine::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByLine::ShowVisualization() { @@ -319,6 +386,18 @@ void DialogFlippingByLine::SaveData() operation->SetFirstLinePointId(GetFirstLinePointId()); operation->SetSecondLinePointId(GetSecondLinePointId()); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.h b/src/libs/vtools/dialogs/tools/dialogflippingbyline.h index b4334b4e7..27a4314a2 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.h +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.h @@ -65,6 +65,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -73,6 +84,7 @@ public slots: private slots: void SuffixChanged(); + void GroupNameChanged(); protected: virtual void ShowVisualization() override; @@ -96,13 +108,16 @@ private: QString m_suffix; bool flagName; + bool flagGroupName; bool flagError; + + QStringList m_groupTags{}; }; //--------------------------------------------------------------------------------------------------------------------- inline bool DialogFlippingByLine::IsValid() const { - return flagError && flagName; + return flagError && flagName && flagGroupName; } #endif // DIALOGFLIPPINGBYLINE_H diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui b/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui index fc76e9099..788368f5c 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui @@ -6,8 +6,8 @@ 0 0 - 285 - 146 + 304 + 237 @@ -52,6 +52,61 @@ + + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Name: + + + + + + + Flipping by line + + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -64,6 +119,13 @@ + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.cpp b/src/libs/vtools/dialogs/tools/dialoggroup.cpp index 8aad034bf..3b5f4a713 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.cpp +++ b/src/libs/vtools/dialogs/tools/dialoggroup.cpp @@ -28,6 +28,7 @@ #include "dialoggroup.h" +#include #include #include "ui_dialoggroup.h" @@ -63,6 +64,24 @@ QString DialogGroup::GetName() const return ui->lineEditName->text(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogGroup::SetTags(const QStringList &tags) +{ + ui->lineEditTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogGroup::GetTags() const +{ + return ui->lineEditTags->text().split(","); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogGroup::SetGroupCategories(const QStringList &categories) +{ + ui->lineEditTags->SetCompletion(categories); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogGroup::ShowDialog(bool click) { diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.h b/src/libs/vtools/dialogs/tools/dialoggroup.h index ec0efd4c9..ca9632c89 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.h +++ b/src/libs/vtools/dialogs/tools/dialoggroup.h @@ -54,6 +54,11 @@ public: void SetName(const QString &name); QString GetName() const; + void SetTags(const QStringList &tags); + QStringList GetTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + QMap GetGroup() const; virtual void ShowDialog(bool click) override; diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.ui b/src/libs/vtools/dialogs/tools/dialoggroup.ui index 3983b99f8..436f2229f 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.ui +++ b/src/libs/vtools/dialogs/tools/dialoggroup.ui @@ -6,8 +6,8 @@ 0 0 - 397 - 80 + 294 + 104
@@ -19,22 +19,45 @@ - - + + Group name: - + - Unique pattern piece name + Choose group name + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + @@ -51,6 +74,13 @@ + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/libs/vtools/dialogs/tools/dialogmove.cpp b/src/libs/vtools/dialogs/tools/dialogmove.cpp index 2c9a3ee2a..c079a97a5 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.cpp +++ b/src/libs/vtools/dialogs/tools/dialogmove.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -85,7 +86,8 @@ DialogMove::DialogMove(const VContainer *data, quint32 toolId, QWidget *parent) flagAngle(false), flagRotationAngle(false), flagLength(false), - flagName(true) + flagName(true), + flagGroupName(true) { ui->setupUi(this); @@ -118,6 +120,7 @@ DialogMove::DialogMove(const VContainer *data, quint32 toolId, QWidget *parent) ui->comboBoxRotationOriginPoint->blockSignals(false); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogMove::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogMove::GroupNameChanged); connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogMove::FXAngle); connect(ui->toolButtonExprRotationAngle, &QPushButton::clicked, this, &DialogMove::FXRotationAngle); connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogMove::FXLength); @@ -257,6 +260,49 @@ QVector DialogMove::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogMove::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogMove::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogMove::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogMove::ShowDialog(bool click) { @@ -481,6 +527,27 @@ void DialogMove::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogMove::ShowVisualization() { @@ -504,6 +571,18 @@ void DialogMove::SaveData() operation->SetRotationAngle(formulaRotationAngle); operation->SetRotationOriginPointId(GetRotationOrigPointId()); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogmove.h b/src/libs/vtools/dialogs/tools/dialogmove.h index 632ad3b26..741d8d144 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.h +++ b/src/libs/vtools/dialogs/tools/dialogmove.h @@ -70,6 +70,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -87,6 +98,7 @@ private slots: void FXLength(); void SuffixChanged(); + void GroupNameChanged(); protected: virtual void ShowVisualization() override; @@ -129,6 +141,9 @@ private: bool flagRotationAngle; bool flagLength; bool flagName; + bool flagGroupName; + + QStringList m_groupTags{}; void EvalAngle(); void EvalRotationAngle(); @@ -138,7 +153,7 @@ private: //--------------------------------------------------------------------------------------------------------------------- inline bool DialogMove::IsValid() const { - return flagAngle && flagRotationAngle && flagLength && flagName; + return flagAngle && flagRotationAngle && flagLength && flagName && flagGroupName; } #endif // DIALOGMOVING_H diff --git a/src/libs/vtools/dialogs/tools/dialogmove.ui b/src/libs/vtools/dialogs/tools/dialogmove.ui index 2dcc1d530..defd52ef1 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.ui +++ b/src/libs/vtools/dialogs/tools/dialogmove.ui @@ -6,8 +6,8 @@ 0 0 - 292 - 332 + 424 + 432 @@ -591,6 +591,61 @@
+ + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Name: + + + + + + + Move + + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -604,6 +659,11 @@ + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
VPlainTextEdit QPlainTextEdit diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index cc9d0404e..306477be9 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -77,6 +78,7 @@ DialogRotation::DialogRotation(const VContainer *data, quint32 toolId, QWidget * m_firstRelease(false), flagAngle(false), flagName(true), + flagGroupName(true), flagError(false) { ui->setupUi(this); @@ -94,6 +96,7 @@ DialogRotation::DialogRotation(const VContainer *data, quint32 toolId, QWidget * FillComboBoxPoints(ui->comboBoxOriginPoint); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogRotation::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogRotation::GroupNameChanged); connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogRotation::FXAngle); connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, [this]() { @@ -170,6 +173,49 @@ QVector DialogRotation::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogRotation::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogRotation::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogRotation::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogRotation::ShowDialog(bool click) { @@ -366,6 +412,27 @@ void DialogRotation::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogRotation::ShowVisualization() { @@ -385,6 +452,18 @@ void DialogRotation::SaveData() operation->SetOriginPointId(GetOrigPointId()); operation->SetAngle(formulaAngle); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.h b/src/libs/vtools/dialogs/tools/dialogrotation.h index f26194389..89b1221d5 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.h +++ b/src/libs/vtools/dialogs/tools/dialogrotation.h @@ -63,6 +63,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -74,6 +85,7 @@ private slots: void DeployAngleTextEdit(); void FXAngle(); void SuffixChanged(); + void GroupNameChanged(); void EvalAngle(); protected: @@ -111,13 +123,16 @@ private: /** @brief flagAngle true if value of angle is correct */ bool flagAngle; bool flagName; + bool flagGroupName; bool flagError; + + QStringList m_groupTags{}; }; //--------------------------------------------------------------------------------------------------------------------- inline bool DialogRotation::IsValid() const { - return flagAngle && flagName && flagError; + return flagAngle && flagName && flagError && flagGroupName; } #endif // DIALOGROTATION_H diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.ui b/src/libs/vtools/dialogs/tools/dialogrotation.ui index cae139a96..84bc08968 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.ui +++ b/src/libs/vtools/dialogs/tools/dialogrotation.ui @@ -6,8 +6,8 @@ 0 0 - 285 - 189 + 392 + 282 @@ -222,6 +222,61 @@
+ + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Tags: + + + + + + + Rotation + + + true + + + + + + + Name: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -235,6 +290,11 @@ + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
VPlainTextEdit QPlainTextEdit diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index 2e69eb12c..79e6aab56 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -419,10 +419,10 @@ QString DialogTool::GetNodeName(const VPieceNode &node, bool showPassmarkDetails name += QLatin1Char('|'); break; case PassmarkLineType::TwoLines: - name += QLatin1Literal("||"); + name += QLatin1String("||"); break; case PassmarkLineType::ThreeLines: - name += QLatin1Literal("|||"); + name += QLatin1String("|||"); break; case PassmarkLineType::TMark: name += QStringLiteral("┴"); @@ -799,6 +799,13 @@ void DialogTool::SetToolId(const quint32 &value) toolId = value; } +//--------------------------------------------------------------------------------------------------------------------- +void DialogTool::SetGroupCategories(const QStringList &categories) +{ + Q_UNUSED(categories) + // do nothing +} + //--------------------------------------------------------------------------------------------------------------------- void DialogTool::ShowDialog(bool click) { diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 46e3775ae..c13c54651 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -90,6 +90,8 @@ public: quint32 GetToolId() const; void SetToolId(const quint32 &value); + virtual void SetGroupCategories(const QStringList &categories); + static void MoveListRowTop(QListWidget *list); static void MoveListRowUp(QListWidget *list); static void MoveListRowDown(QListWidget *list); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui index 9ef8c80b0..abf5627fc 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui +++ b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui @@ -325,7 +325,7 @@ - + :/icon/24x24/equal.png @@ -561,7 +561,7 @@ - + :/icon/24x24/equal.png @@ -760,7 +760,7 @@ - + :/icon/24x24/equal.png @@ -1045,7 +1045,7 @@ - = + = Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1527,7 +1527,7 @@ - + :/icon/24x24/equal.png diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index 5672d9325..86db51444 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -3059,6 +3059,12 @@ void DialogSeamAllowance::InitPatternPieceDataTab() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::InitLabelsTab() { + QString labelValue = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); + uiTabLabels->lineEditDLWidthFormula->setPlainText(labelValue); + uiTabLabels->lineEditDLHeightFormula->setPlainText(labelValue); + uiTabLabels->lineEditPLWidthFormula->setPlainText(labelValue); + uiTabLabels->lineEditPLHeightFormula->setPlainText(labelValue); + m_DLWidthBaseHeight = uiTabLabels->lineEditDLWidthFormula->height(); m_DLHeightBaseHeight = uiTabLabels->lineEditDLHeightFormula->height(); m_DLAngleBaseHeight = uiTabLabels->lineEditDLAngleFormula->height(); @@ -3125,6 +3131,9 @@ void DialogSeamAllowance::InitLabelsTab() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::InitGrainlineTab() { + uiTabGrainline->lineEditLenFormula->setPlainText( + QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit()))); + connect(uiTabGrainline->groupBoxGrainline, &QGroupBox::toggled, this, &DialogSeamAllowance::EnabledGrainline); connect(uiTabGrainline->pushButtonRot, &QPushButton::clicked, this, &DialogSeamAllowance::EditGrainlineFormula); connect(uiTabGrainline->pushButtonLen, &QPushButton::clicked, this, &DialogSeamAllowance::EditGrainlineFormula); @@ -3349,7 +3358,7 @@ void DialogSeamAllowance::SetGrainlineLength(QString lengthFormula) { if (lengthFormula.isEmpty()) { - lengthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + lengthFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(lengthFormula, qApp->Settings()->GetOsSeparator()); @@ -3369,7 +3378,7 @@ void DialogSeamAllowance::SetDLWidth(QString widthFormula) { if (widthFormula.isEmpty()) { - widthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + widthFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->GetOsSeparator()); @@ -3389,7 +3398,7 @@ void DialogSeamAllowance::SetDLHeight(QString heightFormula) { if (heightFormula.isEmpty()) { - heightFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + heightFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->GetOsSeparator()); @@ -3429,7 +3438,7 @@ void DialogSeamAllowance::SetPLWidth(QString widthFormula) { if (widthFormula.isEmpty()) { - widthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + widthFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->GetOsSeparator()); @@ -3449,7 +3458,7 @@ void DialogSeamAllowance::SetPLHeight(QString heightFormula) { if (heightFormula.isEmpty()) { - heightFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + heightFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->GetOsSeparator()); diff --git a/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui b/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui index 7fd7e499d..fda806bec 100644 --- a/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui +++ b/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui @@ -172,7 +172,7 @@ - = + = Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp index e64036d7d..ca558230f 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp @@ -74,6 +74,8 @@ void VToolFlippingByAxis::setDialog() dialogTool->SetOriginPointId(m_originPointId); dialogTool->SetAxisType(m_axisType); dialogTool->SetSuffix(suffix); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -89,6 +91,9 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(const QPointer &dia initData.axisType = dialogTool->GetAxisType(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -123,6 +128,11 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(VToolFlippingByAxisInitData ini if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("Flipping by axis")); + } + VAbstractTool::AddRecord(initData.id, Tool::FlippingByAxis, initData.doc); VToolFlippingByAxis *tool = new VToolFlippingByAxis(initData); initData.scene->addItem(tool); @@ -133,6 +143,13 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(VToolFlippingByAxisInitData ini { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -208,6 +225,10 @@ void VToolFlippingByAxis::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetOriginPointId())); doc->SetAttribute(domElement, AttrAxisType, QString().setNum(static_cast(dialogTool->GetAxisType()))); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -234,8 +255,10 @@ void VToolFlippingByAxis::SaveOptions(QDomElement &tag, QSharedPointer //--------------------------------------------------------------------------------------------------------------------- QString VToolFlippingByAxis::MakeToolTip() const { - return QStringLiteral(" %1: %2 ") - .arg(tr("Origin point"), OriginPointName()); + return QStringLiteral(" %1: %2 " + "%3") + .arg(tr("Origin point"), OriginPointName()) // 1, 2 + .arg(VisibilityGroupToolTip()); // 3 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp index 97d161154..e862a99b7 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp @@ -74,6 +74,8 @@ void VToolFlippingByLine::setDialog() dialogTool->SetFirstLinePointId(m_firstLinePointId); dialogTool->SetSecondLinePointId(m_secondLinePointId); dialogTool->SetSuffix(suffix); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -89,6 +91,9 @@ VToolFlippingByLine *VToolFlippingByLine::Create(const QPointer &dia initData.secondLinePointId = dialogTool->GetSecondLinePointId(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -116,6 +121,11 @@ VToolFlippingByLine *VToolFlippingByLine::Create(VToolFlippingByLineInitData ini if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("flipping by line")); + } + VAbstractTool::AddRecord(initData.id, Tool::FlippingByLine, initData.doc); VToolFlippingByLine *tool = new VToolFlippingByLine(initData); initData.scene->addItem(tool); @@ -127,6 +137,13 @@ VToolFlippingByLine *VToolFlippingByLine::Create(VToolFlippingByLineInitData ini { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -195,6 +212,10 @@ void VToolFlippingByLine::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstLinePointId())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondLinePointId())); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -222,8 +243,11 @@ void VToolFlippingByLine::SaveOptions(QDomElement &tag, QSharedPointer QString VToolFlippingByLine::MakeToolTip() const { return QStringLiteral(" %1: %2 " - " %3: %4 ") - .arg(tr("First line point"), FirstLinePointName(), tr("Second line point"), SecondLinePointName()); + " %3: %4 " + "%5") + .arg(tr("First line point"), FirstLinePointName(), + tr("Second line point"), SecondLinePointName()) // 1, 2, 3, 4 + .arg(VisibilityGroupToolTip()); // 5 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp index 9d1ad8a3f..cda19cca6 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp @@ -29,12 +29,44 @@ #include "vabstractoperation.h" #include "../../../undocommands/label/operationmovelabel.h" #include "../../../undocommands/label/operationshowlabel.h" +#include "../../../undocommands/savetooloptions.h" +#include "../../../undocommands/undogroup.h" +#include "../../../undocommands/deltool.h" #include "../vgeometry/vpointf.h" const QString VAbstractOperation::TagItem = QStringLiteral("item"); const QString VAbstractOperation::TagSource = QStringLiteral("source"); const QString VAbstractOperation::TagDestination = QStringLiteral("destination"); +namespace +{ +/** + * @brief VisibilityGroupDataFromSource converts source list to visibility group list. + * @param data container with pattern data + * @param source list with source objects + * @return visibility group data + */ +QMap VisibilityGroupDataFromSource(const VContainer *data, const QVector &source) +{ + QMap groupData; + + for (auto &sId : source) + { + try + { + groupData.insert(sId, data->GetGObject(sId)->getIdTool()); + } + catch (const VExceptionBadId &) + { + // ignore + } + + } + + return groupData; +} +} + //--------------------------------------------------------------------------------------------------------------------- QString VAbstractOperation::getTagName() const { @@ -498,6 +530,26 @@ VAbstractOperation::VAbstractOperation(VAbstractPattern *doc, VContainer *data, destination(destination), operatedObjects() { + connect(doc, &VAbstractPattern::UpdateToolTip, this, [this]() + { + QMapIterator i(operatedObjects); + while (i.hasNext()) + { + i.next(); + if (i.value()->GetType() == GOType::Point) + { + VSimplePoint *item = qobject_cast(i.value()); + SCASSERT(item != nullptr) + item->setToolTip(ComplexPointToolTip(i.key())); + } + else + { + VSimpleCurve *item = qobject_cast(i.value()); + SCASSERT(item != nullptr) + item->setToolTip(ComplexCurveToolTip(i.key())); + } + } + }); } //--------------------------------------------------------------------------------------------------------------------- @@ -528,6 +580,95 @@ void VAbstractOperation::ChangeLabelVisibility(quint32 id, bool visible) } } +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractOperation::ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement) +{ + bool updateToolOptions = + newDependencies != oldDependencies || not VDomDocument::Compare(newDomElement, oldDomElement); + bool updateVisibilityOptions = NeedUpdateVisibilityGroup(); + + if (updateToolOptions && updateVisibilityOptions) + { + qApp->getUndoStack()->beginMacro(tr("operation options")); + } + + if (updateToolOptions) + { + SaveToolOptions *saveOptions = new SaveToolOptions(oldDomElement, newDomElement, oldDependencies, + newDependencies, doc, m_id); + connect(saveOptions, &SaveToolOptions::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + qApp->getUndoStack()->push(saveOptions); + } + + if (updateVisibilityOptions) + { + vidtype group = doc->GroupLinkedToTool(m_id); + + if (hasLinkedGroup) + { + if (group != null_id) + { + ChangeGroupOptions *groupOptions = new ChangeGroupOptions(doc, group, groupName, groupTags); + connect(groupOptions, &ChangeGroupOptions::UpdateGroups, doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(groupOptions); + } + else + { + VAbstractOperationInitData initData; + initData.id = m_id; + initData.hasLinkedVisibilityGroup = hasLinkedGroup; + initData.visibilityGroupName = groupName; + initData.visibilityGroupTags = groupTags; + initData.data = &(VDataTool::data); + initData.doc = doc; + initData.source = source; + + VAbstractOperation::CreateVisibilityGroup(initData); + } + } + else + { + DelGroup *delGroup = new DelGroup(doc, group); + connect(delGroup, &DelGroup::UpdateGroups, doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(delGroup); + } + } + + if (updateToolOptions && updateVisibilityOptions) + { + qApp->getUndoStack()->endMacro(); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractOperation::PerformDelete() +{ + vidtype group = doc->GroupLinkedToTool(m_id); + bool deleteGroup = group != null_id; + + qCDebug(vTool, "Begin deleting."); + if (deleteGroup) + { + qApp->getUndoStack()->beginMacro(tr("delete operation")); + + qCDebug(vTool, "Deleting the linked group."); + DelGroup *delGroup = new DelGroup(doc, group); + connect(delGroup, &DelGroup::UpdateGroups, doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(delGroup); + } + + qCDebug(vTool, "Deleting the tool."); + DelTool *delTool = new DelTool(doc, m_id); + connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); + qApp->getUndoStack()->push(delTool); + + if (deleteGroup) + { + qApp->getUndoStack()->endMacro(); + } +} + //--------------------------------------------------------------------------------------------------------------------- void VAbstractOperation::UpdateNamePosition(quint32 id, const QPointF &pos) { @@ -641,6 +782,33 @@ void VAbstractOperation::AllowCurveSelecting(bool enabled, GOType type) } } +//--------------------------------------------------------------------------------------------------------------------- +bool VAbstractOperation::NeedUpdateVisibilityGroup() const +{ + vidtype group = doc->GroupLinkedToTool(m_id); + + if (hasLinkedGroup) + { + if (group != null_id) + { + if (groupName != doc->GetGroupName(group) || groupTags != doc->GetGroupTags(group)) + { + return true; // rename group + } + } + else + { + return true; // create group + } + } + else + { + return group != null_id; // remove group + } + + return false; +} + //--------------------------------------------------------------------------------------------------------------------- void VAbstractOperation::InitOperatedObjects() { @@ -725,3 +893,38 @@ QString VAbstractOperation::ComplexCurveToolTip(quint32 itemId) const .arg(UnitsToStr(qApp->patternUnit(), true), MakeToolTip()); return toolTip; } + +//--------------------------------------------------------------------------------------------------------------------- +QString VAbstractOperation::VisibilityGroupToolTip() const +{ + vidtype group = doc->GroupLinkedToTool(m_id); + if (group != null_id) + { + return QStringLiteral(" %1: %2 ") + .arg(tr("Visibility group"), doc->GetGroupName(group)); // 1, 2 + } + + return QString(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractOperation::CreateVisibilityGroup(const VAbstractOperationInitData &initData) +{ + if (not initData.hasLinkedVisibilityGroup && not initData.visibilityGroupName.isEmpty()) + { + return; + } + + const QMap groupData = VisibilityGroupDataFromSource(initData.data, initData.source); + vidtype groupId = initData.data->getNextId(); + const QDomElement group = initData.doc->CreateGroup(groupId, initData.visibilityGroupName, + initData.visibilityGroupTags, groupData, initData.id); + if (not group.isNull()) + { + AddGroup *addGroup = new AddGroup(group, initData.doc); + connect(addGroup, &AddGroup::UpdateGroups, initData.doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(addGroup); + } + + return; +} diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h index 411b25d90..926411a72 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h @@ -53,15 +53,15 @@ struct DestinationItem struct VAbstractOperationInitData : VAbstractToolInitData { VAbstractOperationInitData() - : VAbstractToolInitData(), - suffix(), - source(), - destination() + : VAbstractToolInitData() {} - QString suffix; - QVector source; - QVector destination; + QString suffix{}; + QVector source{}; + QVector destination{}; + QString visibilityGroupName{}; + QStringList visibilityGroupTags{}; + bool hasLinkedVisibilityGroup{false}; }; // FIXME. I don't know how to use QGraphicsItem properly, so just took first available finished class. @@ -133,12 +133,19 @@ protected: QMap operatedObjects; + bool hasLinkedGroup{false}; + QString groupName{}; + QStringList groupTags{}; + VAbstractOperation(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &suffix, const QVector &source, const QVector &destination, QGraphicsItem *parent = nullptr); virtual void AddToFile() override; virtual void ChangeLabelVisibility(quint32 id, bool visible) override; + virtual void ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement) override; + virtual void PerformDelete() override; void UpdateNamePosition(quint32 id, const QPointF &pos); void SaveSourceDestination(QDomElement &tag); @@ -146,6 +153,9 @@ protected: template void ShowToolVisualization(bool show); + template + void SetDialogVisibilityGroupData(QPointer dialogTool); + void InitCurve(quint32 id, VContainer *data, GOType curveType, SceneObject sceneType); template @@ -155,13 +165,38 @@ protected: QString ComplexPointToolTip(quint32 itemId) const; QString ComplexCurveToolTip(quint32 itemId) const; + QString VisibilityGroupToolTip() const; + + static void CreateVisibilityGroup(const VAbstractOperationInitData & initData); private: Q_DISABLE_COPY(VAbstractOperation) void AllowCurveHover(bool enabled, GOType type); void AllowCurveSelecting(bool enabled, GOType type); + + bool NeedUpdateVisibilityGroup() const; }; +//--------------------------------------------------------------------------------------------------------------------- +template +void VAbstractOperation::SetDialogVisibilityGroupData(QPointer dialogTool) +{ + SCASSERT(not dialogTool.isNull()) + + vidtype group = doc->GroupLinkedToTool(m_id); + dialogTool->SetGroupCategories(doc->GetGroupCategories()); + if (group != null_id) + { + dialogTool->SetHasLinkedVisibilityGroup(true); + dialogTool->SetVisibilityGroupName(doc->GetGroupName(group)); + dialogTool->SetVisibilityGroupTags(doc->GetGroupTags(group)); + } + else + { + dialogTool->SetHasLinkedVisibilityGroup(false); + } +} + //--------------------------------------------------------------------------------------------------------------------- template void VAbstractOperation::ShowToolVisualization(bool show) diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index c0bf390e3..24c5bf9b4 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -128,6 +128,8 @@ void VToolMove::setDialog() dialogTool->SetLength(formulaLength); dialogTool->SetSuffix(suffix); dialogTool->SetRotationOrigPointId(origPointId); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -145,6 +147,9 @@ VToolMove *VToolMove::Create(const QPointer &dialog, VMainGraphicsSc initData.rotationOrigin = dialogTool->GetRotationOrigPointId(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -309,6 +314,11 @@ QT_WARNING_POP if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("move")); + } + VAbstractTool::AddRecord(initData.id, Tool::Move, initData.doc); VToolMove *tool = new VToolMove(initData); initData.scene->addItem(tool); @@ -324,6 +334,13 @@ QT_WARNING_POP { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -464,6 +481,10 @@ void VToolMove::SaveDialog(QDomElement &domElement, QList &oldDependenc doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetRotationOrigPointId())); doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -497,7 +518,8 @@ QString VToolMove::MakeToolTip() const return QStringLiteral(" %1: %2° " " %3: %4 %5 " " %6: %7° " - " %8: %9 ") + " %8: %9 " + "%10") .arg(tr("Angle")) // 1 .arg(GetFormulaAngle().getDoubleValue()) // 2 .arg(tr("Length")) // 3 @@ -506,7 +528,8 @@ QString VToolMove::MakeToolTip() const tr("Rotation angle")) // 6 .arg(GetFormulaRotationAngle().getDoubleValue()) // 7 .arg(tr("Rotation origin point"), // 8 - OriginPointName()); // 9 + OriginPointName()) // 9 + .arg(VisibilityGroupToolTip()); // 10 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index efbaf0083..1d4428f33 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -98,6 +98,8 @@ void VToolRotation::setDialog() dialogTool->SetOrigPointId(origPointId); dialogTool->SetAngle(formulaAngle); dialogTool->SetSuffix(suffix); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -113,6 +115,9 @@ VToolRotation *VToolRotation::Create(const QPointer &dialog, VMainGr initData.angle = dialogTool->GetAngle(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -251,6 +256,11 @@ QT_WARNING_POP if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("rotate")); + } + VAbstractTool::AddRecord(initData.id, Tool::Rotation, initData.doc); VToolRotation *tool = new VToolRotation(initData); initData.scene->addItem(tool); @@ -261,6 +271,13 @@ QT_WARNING_POP { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -344,6 +361,10 @@ void VToolRotation::SaveDialog(QDomElement &domElement, QList &oldDepen doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetOrigPointId())); doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -371,9 +392,11 @@ void VToolRotation::SaveOptions(QDomElement &tag, QSharedPointer &obj) QString VToolRotation::MakeToolTip() const { return QStringLiteral(" %1: %2 " - " %3: %4° ") - .arg(tr("Origin point"), OriginPointName(), tr("Rotation angle")) - .arg(GetFormulaAngle().getDoubleValue()); + " %3: %4° " + "%5") + .arg(tr("Origin point"), OriginPointName(), tr("Rotation angle")) // 1, 2, 3 + .arg(GetFormulaAngle().getDoubleValue()) // 4 + .arg(VisibilityGroupToolTip()); // 5 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.cpp b/src/libs/vtools/tools/drawTools/vdrawtool.cpp index 682a9c368..1abee64b1 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.cpp +++ b/src/libs/vtools/tools/drawTools/vdrawtool.cpp @@ -114,14 +114,7 @@ void VDrawTool::SaveDialogChange(const QString &undoText) QList oldDependencies; QList newDependencies; SaveDialog(newDomElement, oldDependencies, newDependencies); - - if (newDependencies != oldDependencies || not VDomDocument::Compare(newDomElement, oldDomElement)) - { - SaveToolOptions *saveOptions = new SaveToolOptions(oldDomElement, newDomElement, oldDependencies, - newDependencies, doc, m_id); - connect(saveOptions, &SaveToolOptions::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); - qApp->getUndoStack()->push(saveOptions); - } + ApplyToolOptions(oldDependencies, newDependencies, oldDomElement, newDomElement); } else { @@ -129,6 +122,19 @@ void VDrawTool::SaveDialogChange(const QString &undoText) } } +//--------------------------------------------------------------------------------------------------------------------- +void VDrawTool::ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement) +{ + if (newDependencies != oldDependencies || not VDomDocument::Compare(newDomElement, oldDomElement)) + { + SaveToolOptions *saveOptions = new SaveToolOptions(oldDomElement, newDomElement, oldDependencies, + newDependencies, doc, m_id); + connect(saveOptions, &SaveToolOptions::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + qApp->getUndoStack()->push(saveOptions); + } +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief AddToFile add tag with informations about tool into file. diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.h b/src/libs/vtools/tools/drawTools/vdrawtool.h index 396401400..b8de88334 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.h +++ b/src/libs/vtools/tools/drawTools/vdrawtool.h @@ -51,9 +51,7 @@ #include "../vwidgets/vabstractmainwindow.h" #include "../vdatatool.h" #include "../vgeometry/vpointf.h" -#include "../vtools/undocommands/addgroup.h" -#include "../vtools/undocommands/additemtogroup.h" -#include "../vtools/undocommands/removeitemfromgroup.h" +#include "../vtools/undocommands/undogroup.h" /** * @brief The VDrawTool abstract class for all draw tool. @@ -101,6 +99,8 @@ protected: virtual void SaveDialog(QDomElement &domElement, QList &oldDependencies, QList &newDependencies)=0; virtual void SaveDialogChange(const QString &undoText = QString()) final; + virtual void ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement); virtual void AddToFile() override; void SaveOption(QSharedPointer &obj); virtual void SaveOptions(QDomElement &tag, QSharedPointer &obj); diff --git a/src/libs/vtools/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp index 17b459939..0488f935a 100644 --- a/src/libs/vtools/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -224,10 +224,7 @@ void VAbstractTool::DeleteToolWithConfirm(bool ask) } } - qCDebug(vTool, "Begin deleting."); - DelTool *delTool = new DelTool(doc, m_id); - connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); - qApp->getUndoStack()->push(delTool); + PerformDelete(); // Throw exception, this will help prevent case when we forget to immediately quit function. VExceptionToolWasDeleted e("Tool was used after deleting."); @@ -239,6 +236,15 @@ void VAbstractTool::DeleteToolWithConfirm(bool ask) } } +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractTool::PerformDelete() +{ + qCDebug(vTool, "Begin deleting."); + DelTool *delTool = new DelTool(doc, m_id); + connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); + qApp->getUndoStack()->push(delTool); +} + //--------------------------------------------------------------------------------------------------------------------- int VAbstractTool::ConfirmDeletion() { diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index 00f467654..80d6135b2 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -159,6 +159,7 @@ protected: */ virtual void RemoveReferens() {} virtual void DeleteToolWithConfirm(bool ask = true); + virtual void PerformDelete(); static int ConfirmDeletion(); template diff --git a/src/libs/vtools/tools/vtoolseamallowance.h b/src/libs/vtools/tools/vtoolseamallowance.h index c2e256f99..9de9c5d8b 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.h +++ b/src/libs/vtools/tools/vtoolseamallowance.h @@ -133,6 +133,8 @@ public slots: void Highlight(quint32 id); void UpdateDetailLabel(); void UpdatePatternInfo(); + void ShowOptions(); + void DeleteFromMenu(); protected slots: void UpdateGrainline(); void SaveMoveDetail(const QPointF &ptPos); @@ -161,11 +163,9 @@ protected: virtual void SaveDialogChange(const QString &undoText = QString()) final; private slots: - void ShowOptions(); void ToggleInLayout(bool checked); void ToggleForbidFlipping(bool checked); void ToggleForceFlipping(bool checked); - void DeleteFromMenu(); void ToggleExcludeState(quint32 id); void ToggleNodePointAngleType(quint32 id, PieceNodeAngle type); void ToggleNodePointPassmark(quint32 id, bool toggle); diff --git a/src/libs/vtools/undocommands/addgroup.cpp b/src/libs/vtools/undocommands/addgroup.cpp deleted file mode 100644 index c0eab5ff0..000000000 --- a/src/libs/vtools/undocommands/addgroup.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.cpp - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#include "addgroup.h" - -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- -AddGroup::AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent) - : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("add group")); - nodeId = doc->GetParametrId(xml); -} - -//--------------------------------------------------------------------------------------------------------------------- -AddGroup::~AddGroup() -{ -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddGroup::undo() -{ - qCDebug(vUndo, "Undo."); - - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - group.setAttribute(VAbstractPattern::AttrVisible, trueStr); - doc->ParseGroups(groups); - if (groups.removeChild(group).isNull()) - { - qCDebug(vUndo, "Can't delete group."); - return; - } - emit UpdateGroups(); - } - else - { - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } - - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo - } -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddGroup::redo() -{ - qCDebug(vUndo, "Redo."); - - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - groups.appendChild(xml); - doc->ParseGroups(groups); - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); -} diff --git a/src/libs/vtools/undocommands/addgroup.h b/src/libs/vtools/undocommands/addgroup.h deleted file mode 100644 index 0c8b21267..000000000 --- a/src/libs/vtools/undocommands/addgroup.h +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.h - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef ADDGROUP_H -#define ADDGROUP_H - -#include -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class AddGroup : public VUndoCommand -{ - Q_OBJECT -public: - AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent = nullptr); - virtual ~AddGroup(); - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -private: - Q_DISABLE_COPY(AddGroup) - const QString nameActivDraw; -}; - -#endif // ADDGROUP_H diff --git a/src/libs/vtools/undocommands/additemtogroup.cpp b/src/libs/vtools/undocommands/additemtogroup.cpp deleted file mode 100644 index 2c5af9d5e..000000000 --- a/src/libs/vtools/undocommands/additemtogroup.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.h - ** @author Ronan Le Tiec - ** @date 31 3, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#include "additemtogroup.h" - -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "../vtools/tools/vdatatool.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- -AddItemToGroup::AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent) - : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("Add item to group")); - nodeId = groupId; -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddItemToGroup::undo() -{ - qCDebug(vUndo, "Undo the add item to group"); - performUndoRedo(true); -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddItemToGroup::redo() -{ - qCDebug(vUndo, "Redo the add item to group"); - performUndoRedo(false); -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddItemToGroup::performUndoRedo(bool isUndo) -{ - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - if(isUndo) - { - if (group.removeChild(xml).isNull()) - { - qCDebug(vUndo, "Can't delete item."); - return; - } - - // set the item visible. Because if the undo is done when unvisible and it's not in any group after the - // undo, it stays unvisible until the entire drawing is completly rerendered. - quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); - quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); - VDataTool* tool = VAbstractPattern::getTool(toolId); - tool->GroupVisibility(objectId,true); - } - else // is redo - { - - if (group.appendChild(xml).isNull()) - { - qCDebug(vUndo, "Can't add item."); - return; - } - } - - doc->SetModified(true); - emit qApp->getCurrentDocument()->patternChanged(false); - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo - } -} diff --git a/src/libs/vtools/undocommands/additemtogroup.h b/src/libs/vtools/undocommands/additemtogroup.h deleted file mode 100644 index 3f8d9c7b8..000000000 --- a/src/libs/vtools/undocommands/additemtogroup.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.h - ** @author Ronan Le Tiec - ** @date 31 3, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef ADDITEMTOGROUP_H -#define ADDITEMTOGROUP_H - -#include -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class AddItemToGroup : public VUndoCommand -{ - Q_OBJECT -public: - AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); - virtual ~AddItemToGroup()=default; - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -protected: - void performUndoRedo(bool isUndo); -private: - Q_DISABLE_COPY(AddItemToGroup) - const QString nameActivDraw; -}; - -#endif // ADDITEMTOGROUP_H diff --git a/src/libs/vtools/undocommands/changegroupvisibility.cpp b/src/libs/vtools/undocommands/changegroupvisibility.cpp deleted file mode 100644 index ef511f084..000000000 --- a/src/libs/vtools/undocommands/changegroupvisibility.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/************************************************************************ - ** - ** @file changegroupVisibility.cpp - ** @author Roman Telezhynskyi - ** @date 14 7, 2019 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ -#include "changegroupvisibility.h" -#include "../vmisc/vabstractapplication.h" -#include "../vwidgets/vmaingraphicsview.h" - -//--------------------------------------------------------------------------------------------------------------------- -ChangeGroupVisibility::ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent) - : VUndoCommand(QDomElement(), doc, parent), - m_newVisibility(visible), - m_nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("change group visibility")); - nodeId = id; - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - m_oldVisibility = doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr); - } - else - { - qDebug("Can't get group by id = %u.", id); - } -} - -//--------------------------------------------------------------------------------------------------------------------- -ChangeGroupVisibility::~ChangeGroupVisibility() -{} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeGroupVisibility::undo() -{ - qCDebug(vUndo, "Undo."); - - Do(m_oldVisibility); -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeGroupVisibility::redo() -{ - qCDebug(vUndo, "Redo."); - - Do(m_newVisibility); -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeGroupVisibility::Do(bool visible) -{ - doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change - - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - doc->SetAttribute(group, VAbstractPattern::AttrVisible, visible); - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } - - emit UpdateGroup(nodeId, visible); - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - } - else - { - qDebug("Can't get group by id = %u.", nodeId); - } -} diff --git a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp b/src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp deleted file mode 100644 index 47e16355c..000000000 --- a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/************************************************************************ - ** - ** @file changemultiplegroupsVisibility.cpp - ** @author Roman Telezhynskyi - ** @date 15 7, 2019 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ -#include "changemultiplegroupsvisibility.h" -#include "../vmisc/vabstractapplication.h" -#include "../vwidgets/vmaingraphicsview.h" - -//--------------------------------------------------------------------------------------------------------------------- -ChangeMultipleGroupsVisibility::ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, - bool visible, QUndoCommand *parent) - : VUndoCommand(QDomElement(), doc, parent), - m_groups(groups), - m_newVisibility(visible), - m_nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("change multiple groups visibility")); - - for(auto & groupId : m_groups) - { - QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - m_oldVisibility.insert(groupId, doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr)); - } - else - { - qDebug("Can't get group by id = %u.", groupId); - } - } - -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeMultipleGroupsVisibility::undo() -{ - qCDebug(vUndo, "Undo."); - - doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change - - QMap groupsState; - - QMap::const_iterator i = m_oldVisibility.constBegin(); - while (i != m_oldVisibility.constEnd()) - { - QDomElement group = doc->elementById(i.key(), VAbstractPattern::TagGroup); - if (group.isElement()) - { - doc->SetAttribute(group, VAbstractPattern::AttrVisible, i.value()); - groupsState.insert(i.key(), i.value()); - } - else - { - qDebug("Can't get group by id = %u.", i.key()); - } - ++i; - } - - if (not groupsState.isEmpty()) - { - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - - emit UpdateMultipleGroups(groupsState); - } -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeMultipleGroupsVisibility::redo() -{ - qCDebug(vUndo, "ChangeMultipleGroupsVisibility::redo"); - - doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change - - QMap groupsState; - - for (auto& groupId : m_groups) - { - QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - doc->SetAttribute(group, VAbstractPattern::AttrVisible, m_newVisibility); - groupsState.insert(groupId, m_newVisibility); - } - else - { - qDebug("Can't get group by id = %u.", groupId); - } - } - - if (not groupsState.isEmpty()) - { - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - - emit UpdateMultipleGroups(groupsState); - } -} diff --git a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.h b/src/libs/vtools/undocommands/changemultiplegroupsvisibility.h deleted file mode 100644 index 4a70c65c8..000000000 --- a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************ - ** - ** @file changemultiplegroupsVisibility.h - ** @author Roman Telezhynskyi - ** @date 15 7, 2019 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ -#ifndef CHANGEMULTIPLEGROUPSVISIBILITY_H -#define CHANGEMULTIPLEGROUPSVISIBILITY_H - -#include "vundocommand.h" - -class ChangeMultipleGroupsVisibility : public VUndoCommand -{ - Q_OBJECT -public: - ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, bool visible, - QUndoCommand *parent = nullptr); - virtual ~ChangeMultipleGroupsVisibility() =default; - virtual void undo() override; - virtual void redo() override; - -signals: - void UpdateMultipleGroups(const QMap &groups); - -private: - Q_DISABLE_COPY(ChangeMultipleGroupsVisibility) - - QVector m_groups; - bool m_newVisibility{true}; - QMap m_oldVisibility{}; - const QString m_nameActivDraw{}; -}; - -#endif // CHANGEMULTIPLEGROUPSVISIBILITY_H diff --git a/src/libs/vtools/undocommands/delgroup.cpp b/src/libs/vtools/undocommands/delgroup.cpp deleted file mode 100644 index 87e818c25..000000000 --- a/src/libs/vtools/undocommands/delgroup.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************ - ** - ** @file delgroup.cpp - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#include "delgroup.h" - -#include -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- -DelGroup::DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent) - : VUndoCommand(QDomElement(), doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("delete group")); - nodeId = id; - xml = doc->CloneNodeById(nodeId); -} - -//--------------------------------------------------------------------------------------------------------------------- -DelGroup::~DelGroup() -{ -} - -//--------------------------------------------------------------------------------------------------------------------- -void DelGroup::undo() -{ - qCDebug(vUndo, "Undo."); - - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change - } - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - groups.appendChild(xml); - doc->ParseGroups(groups); - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); -} - -//--------------------------------------------------------------------------------------------------------------------- -void DelGroup::redo() -{ - qCDebug(vUndo, "Redo."); - - if (qApp->GetDrawMode() == Draw::Calculation) - {//Keep first! - emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change - } - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - group.setAttribute(VAbstractPattern::AttrVisible, trueStr); - doc->ParseGroups(groups); - if (groups.removeChild(group).isNull()) - { - qCDebug(vUndo, "Can't delete group."); - return; - } - emit UpdateGroups(); - - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } - } - else - { - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); -} diff --git a/src/libs/vtools/undocommands/delgroup.h b/src/libs/vtools/undocommands/delgroup.h deleted file mode 100644 index bdd5120f1..000000000 --- a/src/libs/vtools/undocommands/delgroup.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************ - ** - ** @file delgroup.h - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef DELGROUP_H -#define DELGROUP_H - -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class DelGroup : public VUndoCommand -{ - Q_OBJECT -public: - DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent = nullptr); - virtual ~DelGroup(); - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -private: - Q_DISABLE_COPY(DelGroup) - const QString nameActivDraw; -}; - -#endif // DELGROUP_H diff --git a/src/libs/vtools/undocommands/removeitemfromgroup.cpp b/src/libs/vtools/undocommands/removeitemfromgroup.cpp deleted file mode 100644 index 27b905ebe..000000000 --- a/src/libs/vtools/undocommands/removeitemfromgroup.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/************************************************************************ - ** - ** @file removeitemfromgroup.cpp - ** @author Ronan Le Tiec - ** @date 1 4, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#include "removeitemfromgroup.h" - -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "../vtools/tools/vdatatool.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- - -RemoveItemFromGroup::RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent) - : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("Remove item from group")); - nodeId = groupId; -} - -//--------------------------------------------------------------------------------------------------------------------- -void RemoveItemFromGroup::undo() -{ - qCDebug(vUndo, "Undo the remove item from group"); - performUndoRedo(true); -} - -//--------------------------------------------------------------------------------------------------------------------- -void RemoveItemFromGroup::redo() -{ - qCDebug(vUndo, "Redo the add item to group"); - performUndoRedo(false); -} - -//--------------------------------------------------------------------------------------------------------------------- -void RemoveItemFromGroup::performUndoRedo(bool isUndo) -{ - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - if(isUndo) - { - if (group.appendChild(xml).isNull()) - { - qCDebug(vUndo, "Can't add the item."); - return; - } - } - else // is redo - { - if (group.removeChild(xml).isNull()) - { - qCDebug(vUndo, "Can't delete item."); - return; - } - - // set the item visible. Because if the undo is done when unvisibile and it's not in any group after the - // undo, it stays unvisible until the entire drawing is completly rerendered. - quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); - quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); - VDataTool* tool = VAbstractPattern::getTool(toolId); - tool->GroupVisibility(objectId,true); - } - - doc->SetModified(true); - emit qApp->getCurrentDocument()->patternChanged(false); - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo - } -} diff --git a/src/libs/vtools/undocommands/removeitemfromgroup.h b/src/libs/vtools/undocommands/removeitemfromgroup.h deleted file mode 100644 index e19873476..000000000 --- a/src/libs/vtools/undocommands/removeitemfromgroup.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************ - ** - ** @file removeitemfromgroup.h - ** @author Ronan Le Tiec - ** @date 31 3, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef REMOVEITEMFROMGROUP_H -#define REMOVEITEMFROMGROUP_H - -#include -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class RemoveItemFromGroup : public VUndoCommand -{ - Q_OBJECT -public: - RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); - virtual ~RemoveItemFromGroup()=default; - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -protected: - void performUndoRedo(bool isUndo); -private: - Q_DISABLE_COPY(RemoveItemFromGroup) - const QString nameActivDraw; -}; - -#endif // REMOVEITEMFROMGROUP_H diff --git a/src/libs/vtools/undocommands/undocommands.pri b/src/libs/vtools/undocommands/undocommands.pri index 310cb557c..37d8a34b6 100644 --- a/src/libs/vtools/undocommands/undocommands.pri +++ b/src/libs/vtools/undocommands/undocommands.pri @@ -4,20 +4,17 @@ HEADERS += \ $$PWD/addtocalc.h \ $$PWD/addpatternpiece.h \ - $$PWD/changegroupvisibility.h \ - $$PWD/changemultiplegroupsvisibility.h \ $$PWD/movespoint.h \ $$PWD/movespline.h \ $$PWD/movesplinepath.h \ $$PWD/savetooloptions.h \ $$PWD/deltool.h \ $$PWD/deletepatternpiece.h \ + $$PWD/undogroup.h \ $$PWD/vundocommand.h \ $$PWD/renamepp.h \ $$PWD/label/movelabel.h \ $$PWD/label/movedoublelabel.h \ - $$PWD/addgroup.h \ - $$PWD/delgroup.h \ $$PWD/label/moveabstractlabel.h \ $$PWD/label/operationmovelabel.h \ $$PWD/addpiece.h \ @@ -29,27 +26,22 @@ HEADERS += \ $$PWD/label/showdoublelabel.h \ $$PWD/label/operationshowlabel.h \ $$PWD/saveplacelabeloptions.h \ - $$PWD/togglepiecestate.h \ - $$PWD/additemtogroup.h \ - $$PWD/removeitemfromgroup.h + $$PWD/togglepiecestate.h SOURCES += \ $$PWD/addtocalc.cpp \ $$PWD/addpatternpiece.cpp \ - $$PWD/changegroupvisibility.cpp \ - $$PWD/changemultiplegroupsvisibility.cpp \ $$PWD/movespoint.cpp \ $$PWD/movespline.cpp \ $$PWD/movesplinepath.cpp \ $$PWD/savetooloptions.cpp \ $$PWD/deltool.cpp \ $$PWD/deletepatternpiece.cpp \ + $$PWD/undogroup.cpp \ $$PWD/vundocommand.cpp \ $$PWD/renamepp.cpp \ $$PWD/label/movelabel.cpp \ $$PWD/label/movedoublelabel.cpp \ - $$PWD/addgroup.cpp \ - $$PWD/delgroup.cpp \ $$PWD/label/moveabstractlabel.cpp \ $$PWD/label/operationmovelabel.cpp \ $$PWD/addpiece.cpp \ @@ -61,6 +53,4 @@ SOURCES += \ $$PWD/label/showdoublelabel.cpp \ $$PWD/label/operationshowlabel.cpp \ $$PWD/saveplacelabeloptions.cpp \ - $$PWD/togglepiecestate.cpp \ - $$PWD/additemtogroup.cpp \ - $$PWD/removeitemfromgroup.cpp + $$PWD/togglepiecestate.cpp diff --git a/src/libs/vtools/undocommands/undogroup.cpp b/src/libs/vtools/undocommands/undogroup.cpp new file mode 100644 index 000000000..1ef1cec28 --- /dev/null +++ b/src/libs/vtools/undocommands/undogroup.cpp @@ -0,0 +1,596 @@ +/************************************************************************ + ** + ** @file undogroup.cpp + ** @author Roman Telezhynskyi + ** @date 18 3, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina 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. + ** + ** Valentina 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 Valentina. If not, see . + ** + *************************************************************************/ + +#include "undogroup.h" + +#include +#include + +#include "../vmisc/vabstractapplication.h" +#include "../vmisc/def.h" +#include "../vwidgets/vmaingraphicsview.h" +#include "../ifc/xml/vabstractpattern.h" +#include "vundocommand.h" +#include "../vtools/tools/vdatatool.h" + +//AddGroup +//--------------------------------------------------------------------------------------------------------------------- +AddGroup::AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent) + : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("add group")); + nodeId = doc->GetParametrId(xml); +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddGroup::undo() +{ + qCDebug(vUndo, "Undo."); + + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + group.setAttribute(VAbstractPattern::AttrVisible, trueStr); + doc->ParseGroups(groups); + if (groups.removeChild(group).isNull()) + { + qCDebug(vUndo, "Can't delete group."); + return; + } + emit UpdateGroups(); + } + else + { + if (groups.childNodes().isEmpty()) + { + QDomNode parent = groups.parentNode(); + parent.removeChild(groups); + } + + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddGroup::redo() +{ + qCDebug(vUndo, "Redo."); + + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + groups.appendChild(xml); + doc->ParseGroups(groups); + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); +} + +//RenameGroup +//--------------------------------------------------------------------------------------------------------------------- +RenameGroup::RenameGroup(VAbstractPattern *doc, quint32 id, const QString &name, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + newName(name) +{ + setText(tr("rename group")); + nodeId = id; + oldName = doc->GetGroupName(nodeId); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RenameGroup::undo() +{ + qCDebug(vUndo, "Undo."); + doc->SetGroupName(nodeId, oldName); + emit UpdateGroups(); + emit doc->UpdateToolTip(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RenameGroup::redo() +{ + qCDebug(vUndo, "Redo."); + + doc->SetGroupName(nodeId, newName); + emit UpdateGroups(); + emit doc->UpdateToolTip(); +} + +//ChangeGroupOptions +//--------------------------------------------------------------------------------------------------------------------- +ChangeGroupOptions::ChangeGroupOptions(VAbstractPattern *doc, quint32 id, const QString &name, const QStringList &tags, + QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + newName(name), + newTags(tags) +{ + setText(tr("rename group")); + nodeId = id; + oldName = doc->GetGroupName(nodeId); + oldTags = doc->GetGroupTags(nodeId); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupOptions::undo() +{ + qCDebug(vUndo, "Undo."); + doc->SetGroupName(nodeId, oldName); + doc->SetGroupTags(nodeId, oldTags); + emit UpdateGroups(); + emit doc->UpdateToolTip(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupOptions::redo() +{ + qCDebug(vUndo, "Redo."); + doc->SetGroupName(nodeId, newName); + doc->SetGroupTags(nodeId, newTags); + emit UpdateGroups(); + emit doc->UpdateToolTip(); +} + +//AddItemToGroup +//--------------------------------------------------------------------------------------------------------------------- +AddItemToGroup::AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent) + : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("Add item to group")); + nodeId = groupId; +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddItemToGroup::undo() +{ + qCDebug(vUndo, "Undo the add item to group"); + performUndoRedo(true); +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddItemToGroup::redo() +{ + qCDebug(vUndo, "Redo the add item to group"); + performUndoRedo(false); +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddItemToGroup::performUndoRedo(bool isUndo) +{ + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + if(isUndo) + { + if (group.removeChild(xml).isNull()) + { + qCDebug(vUndo, "Can't delete item."); + return; + } + + // set the item visible. Because if the undo is done when unvisible and it's not in any group after the + // undo, it stays unvisible until the entire drawing is completly rerendered. + quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); + quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); + VDataTool* tool = VAbstractPattern::getTool(toolId); + tool->GroupVisibility(objectId,true); + } + else // is redo + { + + if (group.appendChild(xml).isNull()) + { + qCDebug(vUndo, "Can't add item."); + return; + } + } + + doc->SetModified(true); + emit qApp->getCurrentDocument()->patternChanged(false); + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo + } +} + +//RemoveItemFromGroup +//--------------------------------------------------------------------------------------------------------------------- +RemoveItemFromGroup::RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, + QUndoCommand *parent) + : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("Remove item from group")); + nodeId = groupId; +} + +//--------------------------------------------------------------------------------------------------------------------- +void RemoveItemFromGroup::undo() +{ + qCDebug(vUndo, "Undo the remove item from group"); + performUndoRedo(true); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RemoveItemFromGroup::redo() +{ + qCDebug(vUndo, "Redo the add item to group"); + performUndoRedo(false); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RemoveItemFromGroup::performUndoRedo(bool isUndo) +{ + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + if(isUndo) + { + if (group.appendChild(xml).isNull()) + { + qCDebug(vUndo, "Can't add the item."); + return; + } + } + else // is redo + { + if (group.removeChild(xml).isNull()) + { + qCDebug(vUndo, "Can't delete item."); + return; + } + + // set the item visible. Because if the undo is done when unvisibile and it's not in any group after the + // undo, it stays unvisible until the entire drawing is completly rerendered. + quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); + quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); + VDataTool* tool = VAbstractPattern::getTool(toolId); + tool->GroupVisibility(objectId,true); + } + + doc->SetModified(true); + emit qApp->getCurrentDocument()->patternChanged(false); + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo + } +} + +//ChangeGroupVisibility +//--------------------------------------------------------------------------------------------------------------------- +ChangeGroupVisibility::ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + m_newVisibility(visible), + m_nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("change group visibility")); + nodeId = id; + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + m_oldVisibility = doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr); + } + else + { + qDebug("Can't get group by id = %u.", id); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupVisibility::undo() +{ + qCDebug(vUndo, "Undo."); + + Do(m_oldVisibility); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupVisibility::redo() +{ + qCDebug(vUndo, "Redo."); + + Do(m_newVisibility); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupVisibility::Do(bool visible) +{ + doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change + + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + doc->SetAttribute(group, VAbstractPattern::AttrVisible, visible); + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } + + emit UpdateGroup(nodeId, visible); + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + } + else + { + qDebug("Can't get group by id = %u.", nodeId); + } +} + +//ChangeMultipleGroupsVisibility +//--------------------------------------------------------------------------------------------------------------------- +ChangeMultipleGroupsVisibility::ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, + bool visible, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + m_groups(groups), + m_newVisibility(visible), + m_nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("change multiple groups visibility")); + + for(auto & groupId : m_groups) + { + QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + m_oldVisibility.insert(groupId, doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr)); + } + else + { + qDebug("Can't get group by id = %u.", groupId); + } + } + +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeMultipleGroupsVisibility::undo() +{ + qCDebug(vUndo, "Undo."); + + doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change + + QMap groupsState; + + QMap::const_iterator i = m_oldVisibility.constBegin(); + while (i != m_oldVisibility.constEnd()) + { + QDomElement group = doc->elementById(i.key(), VAbstractPattern::TagGroup); + if (group.isElement()) + { + doc->SetAttribute(group, VAbstractPattern::AttrVisible, i.value()); + groupsState.insert(i.key(), i.value()); + } + else + { + qDebug("Can't get group by id = %u.", i.key()); + } + ++i; + } + + if (not groupsState.isEmpty()) + { + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + + emit UpdateMultipleGroups(groupsState); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeMultipleGroupsVisibility::redo() +{ + qCDebug(vUndo, "ChangeMultipleGroupsVisibility::redo"); + + doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change + + QMap groupsState; + + for (auto& groupId : m_groups) + { + QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + doc->SetAttribute(group, VAbstractPattern::AttrVisible, m_newVisibility); + groupsState.insert(groupId, m_newVisibility); + } + else + { + qDebug("Can't get group by id = %u.", groupId); + } + } + + if (not groupsState.isEmpty()) + { + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + + emit UpdateMultipleGroups(groupsState); + } +} + +//DelGroup +//--------------------------------------------------------------------------------------------------------------------- +DelGroup::DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("delete group")); + nodeId = id; + xml = doc->CloneNodeById(nodeId); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DelGroup::undo() +{ + qCDebug(vUndo, "Undo."); + + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change + } + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + groups.appendChild(xml); + doc->ParseGroups(groups); + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DelGroup::redo() +{ + qCDebug(vUndo, "Redo."); + + if (qApp->GetDrawMode() == Draw::Calculation) + {//Keep first! + emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change + } + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + group.setAttribute(VAbstractPattern::AttrVisible, trueStr); + doc->ParseGroups(groups); + if (groups.removeChild(group).isNull()) + { + qCDebug(vUndo, "Can't delete group."); + return; + } + emit UpdateGroups(); + + if (groups.childNodes().isEmpty()) + { + QDomNode parent = groups.parentNode(); + parent.removeChild(groups); + } + } + else + { + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); +} diff --git a/src/libs/vtools/undocommands/undogroup.h b/src/libs/vtools/undocommands/undogroup.h new file mode 100644 index 000000000..e3185fc8c --- /dev/null +++ b/src/libs/vtools/undocommands/undogroup.h @@ -0,0 +1,184 @@ +/************************************************************************ + ** + ** @file undogroup.h + ** @author Roman Telezhynskyi + ** @date 18 3, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina 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. + ** + ** Valentina 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 Valentina. If not, see . + ** + *************************************************************************/ +#ifndef UNDOGROUP_H +#define UNDOGROUP_H + + +#include +#include +#include +#include +#include +#include + +#include "vundocommand.h" + +class AddGroup : public VUndoCommand +{ + Q_OBJECT +public: + AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent = nullptr); + virtual ~AddGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(AddGroup) + const QString nameActivDraw; +}; + +class RenameGroup : public VUndoCommand +{ + Q_OBJECT +public: + RenameGroup(VAbstractPattern *doc, quint32 id, const QString &name, QUndoCommand *parent = nullptr); + virtual ~RenameGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(RenameGroup) + QString newName; + QString oldName{}; +}; + +class ChangeGroupOptions : public VUndoCommand +{ + Q_OBJECT +public: + ChangeGroupOptions(VAbstractPattern *doc, quint32 id, const QString &name, const QStringList &tags, + QUndoCommand *parent = nullptr); + virtual ~ChangeGroupOptions()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(ChangeGroupOptions) + QString newName; + QString oldName{}; + QStringList newTags; + QStringList oldTags{}; +}; + +class AddItemToGroup : public VUndoCommand +{ + Q_OBJECT +public: + AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); + virtual ~AddItemToGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +protected: + void performUndoRedo(bool isUndo); +private: + Q_DISABLE_COPY(AddItemToGroup) + const QString nameActivDraw; +}; + +class RemoveItemFromGroup : public VUndoCommand +{ + Q_OBJECT +public: + RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); + virtual ~RemoveItemFromGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +protected: + void performUndoRedo(bool isUndo); +private: + Q_DISABLE_COPY(RemoveItemFromGroup) + const QString nameActivDraw; +}; + +class ChangeGroupVisibility : public VUndoCommand +{ + Q_OBJECT +public: + ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent = nullptr); + virtual ~ChangeGroupVisibility()=default; + virtual void undo() override; + virtual void redo() override; + +signals: + void UpdateGroup(vidtype id, bool visible); + +private: + Q_DISABLE_COPY(ChangeGroupVisibility) + + bool m_oldVisibility{true}; + bool m_newVisibility{true}; + const QString m_nameActivDraw{}; + + void Do(bool visible); +}; + +class ChangeMultipleGroupsVisibility : public VUndoCommand +{ + Q_OBJECT +public: + ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, bool visible, + QUndoCommand *parent = nullptr); + virtual ~ChangeMultipleGroupsVisibility() =default; + virtual void undo() override; + virtual void redo() override; + +signals: + void UpdateMultipleGroups(const QMap &groups); + +private: + Q_DISABLE_COPY(ChangeMultipleGroupsVisibility) + + QVector m_groups; + bool m_newVisibility{true}; + QMap m_oldVisibility{}; + const QString m_nameActivDraw{}; +}; + +class DelGroup : public VUndoCommand +{ + Q_OBJECT +public: + DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent = nullptr); + virtual ~DelGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(DelGroup) + const QString nameActivDraw; +}; + +#endif // UNDOGROUP_H diff --git a/src/libs/vwidgets/vlineedit.cpp b/src/libs/vwidgets/vlineedit.cpp index d00e656f6..e919a5456 100644 --- a/src/libs/vwidgets/vlineedit.cpp +++ b/src/libs/vwidgets/vlineedit.cpp @@ -28,6 +28,66 @@ #include "vlineedit.h" +#include +#include +#include +#include +#include + +#include "../vmisc/compatibility.h" + +namespace +{ +class MultiSelectCompleter : public QCompleter +{ +public: + explicit MultiSelectCompleter(QObject* parent=nullptr); + virtual ~MultiSelectCompleter() =default; + + virtual QString pathFromIndex(const QModelIndex& index) const override; + virtual QStringList splitPath(const QString& path) const override; + +private: + Q_DISABLE_COPY(MultiSelectCompleter) +}; +} + +//MultiSelectCompleter +//--------------------------------------------------------------------------------------------------------------------- +MultiSelectCompleter::MultiSelectCompleter(QObject *parent) + : QCompleter(parent) +{} + +//--------------------------------------------------------------------------------------------------------------------- +QString MultiSelectCompleter::pathFromIndex(const QModelIndex& index) const +{ + QString path = QCompleter::pathFromIndex(index); + + QString text = static_cast(widget())->text(); + + int pos = text.lastIndexOf(','); + if (pos >= 0) + { + path = text.left(pos) + ", " + path; + } + + return path; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList MultiSelectCompleter::splitPath( const QString& path ) const +{ + int pos = path.lastIndexOf(',') + 1; + + while (pos < path.length() && path.at(pos) == QLatin1Char(' ')) + { + pos++; + } + + return QStringList(path.mid(pos)); +} + +//VLineEdit //--------------------------------------------------------------------------------------------------------------------- VLineEdit::VLineEdit(QWidget *parent) : QLineEdit(parent), @@ -74,3 +134,59 @@ void VLineEdit::mousePressEvent(QMouseEvent *e) } } +// VCompleterLineEdit +//--------------------------------------------------------------------------------------------------------------------- +VCompleterLineEdit::VCompleterLineEdit(QWidget *parent) + : VLineEdit(parent), + m_model(new QStringListModel(this)) +{ + setCompleter(new MultiSelectCompleter()); + completer()->setModel(m_model); + completer()->setCompletionMode(QCompleter::PopupCompletion); + completer()->setCaseSensitivity(Qt::CaseInsensitive); + connect(this, &VCompleterLineEdit::textEdited, this, &VCompleterLineEdit::ShowCompletion); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::SetCompletion(const QStringList &list) +{ + m_model->setStringList(list); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::focusInEvent(QFocusEvent *e) +{ + QLineEdit::focusInEvent(e); + // force completion when line edit is focued in + completer()->complete(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::ShowCompletion() +{ +// PrepareCompletion(); + + // force to show all items when text is empty + completer()->setCompletionMode(text().isEmpty() ? QCompleter::UnfilteredPopupCompletion + : QCompleter::PopupCompletion); + if (text().isEmpty()) + { + // completion list will be hidden now; we will show it again after a delay + QTimer::singleShot(100, this, &VCompleterLineEdit::CompletionPopup); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::CompletionPopup() +{ + // apparently, complete() works only in event handler + QApplication::postEvent(this, new QEvent(QEvent::User)); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::customEvent(QEvent *e) +{ + QLineEdit::customEvent(e); + // force completion after text is deleted + completer()->complete(); +} diff --git a/src/libs/vwidgets/vlineedit.h b/src/libs/vwidgets/vlineedit.h index 096eef4e4..23a75a35c 100644 --- a/src/libs/vwidgets/vlineedit.h +++ b/src/libs/vwidgets/vlineedit.h @@ -31,6 +31,8 @@ #include +class QStringListModel; + class VLineEdit : public QLineEdit { Q_OBJECT @@ -47,4 +49,31 @@ private: bool m_selectOnMousePress; }; +/*! Line edit widget with auto completion based on QStringListModel. + Modified behaviour: completion list will appear even when contents of + line edit is empty. Full list of options will be showed when line edit + has focus and is empty. + */ +class VCompleterLineEdit : public VLineEdit +{ + Q_OBJECT +public: + explicit VCompleterLineEdit(QWidget *parent = nullptr); + + //! Set list of options used for completion. + void SetCompletion(const QStringList &list); + +protected: + virtual void focusInEvent(QFocusEvent *e) override; + virtual void customEvent(QEvent* e) override; + +private slots: + void ShowCompletion(); + void CompletionPopup(); + +private: + Q_DISABLE_COPY(VCompleterLineEdit) + QStringListModel *m_model; +}; + #endif // VLINEEDIT_H diff --git a/src/test/TranslationsTest/tst_tstranslation.cpp b/src/test/TranslationsTest/tst_tstranslation.cpp index e89bbc673..ac4103284 100644 --- a/src/test/TranslationsTest/tst_tstranslation.cpp +++ b/src/test/TranslationsTest/tst_tstranslation.cpp @@ -171,6 +171,34 @@ void TST_TSTranslation::CheckEllipsis() } } +//--------------------------------------------------------------------------------------------------------------------- +void TST_TSTranslation::CheckInvalidCharacter_data() +{ + PrepareOriginalStrings(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void TST_TSTranslation::CheckInvalidCharacter() +{ + QFETCH(QString, source); + QFETCH(QDomElement, message); + + if (source == QChar('=') or source == QChar('%')) + { + const QDomNode context = message.parentNode(); + if (context.isNull()) + { + QFAIL("Can't get context."); + } + + const QString contextName = context.firstChildElement(TagName).text(); + const QString error = QString("String contains invalid character '%1' in context '%2'. It should not be " + "marked for translation.") + .arg(source, contextName); + QFAIL(qUtf8Printable(error)); + } +} + //--------------------------------------------------------------------------------------------------------------------- void TST_TSTranslation::PrepareOriginalStrings() { diff --git a/src/test/TranslationsTest/tst_tstranslation.h b/src/test/TranslationsTest/tst_tstranslation.h index 06f1f2bdf..7ebe87971 100644 --- a/src/test/TranslationsTest/tst_tstranslation.h +++ b/src/test/TranslationsTest/tst_tstranslation.h @@ -44,6 +44,8 @@ private slots: void CheckEmptyToolButton(); void CheckEllipsis_data(); void CheckEllipsis(); + void CheckInvalidCharacter_data(); + void CheckInvalidCharacter(); private: Q_DISABLE_COPY(TST_TSTranslation) diff --git a/src/test/ValentinaTest/share/Issue_298_case1/output.json b/src/test/ValentinaTest/share/Issue_298_case1/output.json index 1a44b8e0a..f7c9f2516 100644 --- a/src/test/ValentinaTest/share/Issue_298_case1/output.json +++ b/src/test/ValentinaTest/share/Issue_298_case1/output.json @@ -117,13 +117,8 @@ }, { "type": "QPointF", - "x": 1033.62206579804, - "y": 991.8906443458876 - }, - { - "type": "QPointF", - "x": 940.8759712878797, - "y": 1031.2978406173477 + "x": 1034.5174749200823, + "y": 1122.8420636232784 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_548_case1/output.json b/src/test/ValentinaTest/share/Issue_548_case1/output.json index 042cd5f37..0efb7d010 100644 --- a/src/test/ValentinaTest/share/Issue_548_case1/output.json +++ b/src/test/ValentinaTest/share/Issue_548_case1/output.json @@ -27,13 +27,8 @@ }, { "type": "QPointF", - "x": 29.78045942584839, - "y": 314.5929172205191 - }, - { - "type": "QPointF", - "x": 17.016714467558195, - "y": 305.7450353602103 + "x": 11.986528767485936, + "y": 326.6317413168879 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/tst_vposter.cpp b/src/test/ValentinaTest/tst_vposter.cpp index 5613ad178..6f7ae25e6 100644 --- a/src/test/ValentinaTest/tst_vposter.cpp +++ b/src/test/ValentinaTest/tst_vposter.cpp @@ -55,7 +55,7 @@ void TST_VPoster::BigPoster() printer.setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter); - const QRect image(0, 0, 2622, 3178); // Little bit bigger than A1 + const QSize image(2622, 3178); // Little bit bigger than A1 VPoster posterazor(&printer); const QVector poster = posterazor.Calc(image, 0, PageOrientation::Portrait); @@ -75,7 +75,7 @@ void TST_VPoster::SmallPoster() printer.setResolution(96);// By default printer.setPageSize(QPageSize(QPageSize::A4)); - const QRect image(0, 0, 700, 1000); // Little bit less than A4 + const QSize image(700, 1000); // Little bit less than A4 VPoster posterazor(&printer); const QVector poster = posterazor.Calc(image, 0, PageOrientation::Portrait);