diff --git a/ChangeLog.txt b/ChangeLog.txt index 74b331d2f..cc924b47f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -85,6 +85,7 @@ - Fix dialog for tool Point along perpendicular. No memory of line color settings. - Fix crash after uniting three pieces in sequence. - Incorrect conversion to newer curve format. +- Elide a variable description in the formula wizard. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index 5ca1e2ee2..bf4ff24fc 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -54,7 +54,7 @@ ChangeGroupOptions rename group - + Přejmenovat skupinu @@ -691,11 +691,11 @@ Approximation scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Set approximation scale for this curve, 0 - use global value - Nastavit stupnici přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu + Nastavit měřítko přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu @@ -806,11 +806,11 @@ Approximation scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Set approximation scale for this curve, 0 - use global value - Nastavit stupnici přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu + Nastavit měřítko přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu @@ -988,11 +988,11 @@ Approximation Scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Set approximation scale for this curve, 0 - use global value - Nastavit stupnici přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu + Nastavit měřítko přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu @@ -1031,11 +1031,11 @@ Approximation scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Set approximation scale for this curve, 0 - use global value - Nastavit stupnici přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu + Nastavit měřítko přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu Cannot find point with id %1 @@ -2456,11 +2456,11 @@ Enable to create a visibility gropup from original objects - + Povolit vytvoření skupiny viditelnosti z původních předmětů Visibility Group - + Skupina viditelnosti Name: @@ -2472,15 +2472,15 @@ Tags: - + Značky: Separate each tag with comma. - + Oddělit každou značku čárkou. Add tags - + Přidat značky @@ -2523,11 +2523,11 @@ Enable to create a visibility gropup from original objects - + Povolit vytvoření skupiny viditelnosti z původních předmětů Visibility Group - + Skupina viditelnosti Name: @@ -2539,15 +2539,15 @@ Tags: - + Značky: Separate each tag with comma. - + Oddělit každou značku čárkou. Add tags - + Přidat značky @@ -2574,15 +2574,15 @@ Tags: - + Značky: Separate each tag with comma. - + Oddělit každou značku čárkou. Add tags - + Přidat značky @@ -3127,7 +3127,7 @@ DialogLayoutScale Layout scale - + Měřítko rozvržení Margins @@ -3155,15 +3155,15 @@ Scale - + Měřítko Horizontal: - + Vodorovná: Vertical: - + Svislá: @@ -3461,7 +3461,7 @@ Přesto použít nastavení? Prefer one sheet solution - + Upřednostnit jednolistové řešení min @@ -3470,7 +3470,7 @@ Přesto použít nastavení? Enable this option to prefer getting one sheet solutions. - + Povolit tuto volbu, aby se upřednostňovalo získání jednolistového řešení. @@ -3886,11 +3886,11 @@ Přesto použít nastavení? Enable to create a visibility gropup from original objects - + Povolit vytvoření skupiny viditelnosti z původních předmětů Visibility Group - + Skupina viditelnosti Name: @@ -3902,15 +3902,15 @@ Přesto použít nastavení? Tags: - + Značky: Separate each tag with comma. - + Oddělit každou značku čárkou. Add tags - + Přidat značky @@ -4843,7 +4843,7 @@ Přesto použít nastavení? Select main path objects, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation - + Vybrat hlavní cestu předmětů, <b>%1</b> - obrátit směr křivky, <b>%2</b> - dokončit vytvoření Manual length @@ -5584,11 +5584,11 @@ Přesto použít nastavení? Enable to create a visibility gropup from original objects - + Povolit vytvoření skupiny viditelnosti z původních předmětů Visibility Group - + Skupina viditelnosti Name: @@ -5596,15 +5596,15 @@ Přesto použít nastavení? Tags: - + Značky: Separate each tag with comma. - + Oddělit každou značku čárkou. Add tags - + Přidat značky @@ -5715,15 +5715,15 @@ Přesto použít nastavení? Scale - + Měřítko Horizontal: - + Vodorovná: Vertical: - + Svislá: @@ -5806,7 +5806,7 @@ Přesto použít nastavení? tiled - + dlážděný Numerical control @@ -6029,7 +6029,7 @@ Přesto použít nastavení? Select main path objects clockwise, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation - + Vybrat hlavní cestu předmětů po směru hodinových ručiček (doprava), <b>%1</b> - obrátit směr křivky, <b>%2</b> - dokončit vytvoření Circle @@ -6314,11 +6314,11 @@ Přesto použít nastavení? Approximation scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Set approximation scale for this curve, 0 - use global value - Nastavit stupnici přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu + Nastavit měřítko přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu @@ -6457,11 +6457,11 @@ Přesto použít nastavení? Approximation scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Set approximation scale for this curve, 0 - use global value - Nastavit stupnici přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu + Nastavit měřítko přibližnosti pro tuto křivku, 0 - použít celkovou hodnotu Cannot find point with id %1 @@ -6484,10 +6484,10 @@ Přesto použít nastavení? Followed %n option(s) require restart to take effect: %1. - - Následována %n volba, vyžaduje opětovné spuštění, aby se projevilo: %1. - Následovány %n volby, vyžaduje opětovné spuštění, aby se projevilo: %1. - Následováno %n voleb, vyžaduje opětovné spuštění, aby se projevilo: %1. + + Sledováno %n volba vyžaduje opětovné spuštění, aby se projevila %1. + Sledováno %n volby vyžaduje opětovné spuštění, aby se projevily %1. + Sledováno %n voleb vyžaduje opětovné spuštění, aby se projevilo %1. @@ -8341,15 +8341,15 @@ Chcete uložit své změny? Select path objects, <b>%1</b> - reverse direction curve - + Vyberte předměty cesty, <b>%1</b> - obrátitkřivku směru Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - finish creation - + Vyberte jeden nebo více předmětů, podržet <b>%1</b> - pro vícenásobný výběr, <b>%2</b> - dokončit vytvoření Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - confirm selection - + Vyberte jeden nebo více předmětů, podržet <b>%1</b> - pro vícenásobný výběr, <b>%2</b> - potvrdit výběr Point of intersection circle and segment @@ -8972,7 +8972,7 @@ Chcete uložit své změny? Scale scrolling sensitivity for mouse with sensor - Citlivost rozsahu posunování pro myš s čidlem + Citlivost posunování měřítka pro myš s čidlem Wheel: @@ -8981,7 +8981,7 @@ Chcete uložit své změny? Scale scrolling sensitivity for mouse with wheel - Citlivost rozsahu posunování pro myš s kolečkem + Citlivost posunování měřítka pro myš s kolečkem Acceleration: @@ -9155,7 +9155,7 @@ Chcete uložit své změny? Set default curve approximation scale - Nastavit stupnici přibližnosti výchozí křivky + Nastavit výchozí měřítko přibližnosti křivky Bold line width @@ -9527,11 +9527,11 @@ Tato volba se projeví po opětovném spuštění. Empty list of nodes for tool with id '%1'. - + Prázdný seznam uzlů pro nástroj s ID '%1'. Invalid formula '%1' for tool with id '%2'. %3. - + Neplatný vzorec '%1' pro nástroj s ID '%2'. %3. Can't convert toInt parameter @@ -9760,7 +9760,7 @@ Tato volba se projeví po opětovném spuštění. RenameGroup rename group - + Přejmenovat skupinu @@ -11541,7 +11541,7 @@ Chcete uložit změny? Visibility group - + Skupina viditelnosti @@ -12233,19 +12233,19 @@ Chcete uložit změny? Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). - + Nastavit vodorovné měřítko od 0.01 do 3.0 (výchozí = 1.0, režim vyvedení). Horizontal scale - + Vodorovné měřítko Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). - + Nastavit svislé měřítko od 0.01 do 3.0 (výchozí = 1.0, režim vyvedení). Vertical scale - + Svislé měřítko Prefer one sheet layout solution (export mode). @@ -13945,7 +13945,7 @@ Chcete uložit změny? Approximation scale: - Stupnice přibližnosti: + Měřítko přibližnosti: Rotation origin point: @@ -15810,11 +15810,11 @@ Chcete uložit změny? Tags: - + Značky: Separate each tag with comma. - + Oddělit každou značku čárkou. Filter by tags diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index 1c415e19a..cfbca3551 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -3165,22 +3165,6 @@ 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> - - DialogLayoutSettings @@ -3487,10 +3471,6 @@ Einstellungen trotzdem anwenden? Enable this option to prefer getting one sheet solutions. - - Enable this option to prefer getting one sheet solutions. - - DialogLine diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index 7fb63f5c3..cfcb145fc 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -1656,7 +1656,7 @@ DialogDuplicateDetail Dialog duplicate detail - + Strumento duplica dettaglio Click to place duplicate @@ -4715,7 +4715,7 @@ Applicare la configurazione comunque? Select if need designate the corner point as a passmark. Show only left passmark. - + Seleziona se vuoi impostare un punto ad angolo come tacca. Mostra solo tacca a sinistra dell'angolo. Intersection (only left) @@ -4723,7 +4723,7 @@ Applicare la configurazione comunque? Select if need designate the corner point as a passmark. Show only right passmark. - + Seleziona se vuoi impostare un punto ad angolo come tacca. Mostra solo tacca a destra dell'angolo. Intersection (only right) @@ -4739,7 +4739,7 @@ Applicare la configurazione comunque? Create a formula that regulates visibility. Values different from "0" make a path visible. - + Crea una formula che regola la visibilità. Valori differenti da 0 rendono un tracciato visibile. 1 @@ -4791,7 +4791,7 @@ Applicare la configurazione comunque? The path is a cut contour. Use to control export to DXF-AAMA - + Il tracciato e una linea di ritaglio. Usa per regolare l'esportazione nel formato DXF-AAMA The list of pieces is empty. Please, first create at least one piece for current pattern piece. @@ -4862,7 +4862,7 @@ Applicare la configurazione comunque? DialogPin Pin tool - + Strumento spillo Point: @@ -4874,7 +4874,7 @@ Applicare la configurazione comunque? Pin - + Spillo The list of pieces is empty. Please, first create at least one piece for current pattern piece. @@ -4985,7 +4985,7 @@ Applicare la configurazione comunque? Create a formula that regulates visibility. Values different from "0" make a path visible. - + Crea una formula che regola la visibilità. Valori differenti da 0 rendono un tracciato visibile. 1 @@ -5571,6 +5571,30 @@ Applicare la configurazione comunque? This point cannot be origin point. Please, select another origin point + Questo non può essere il punto di origine. Selezionane un altro, grazie + + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags @@ -5908,11 +5932,11 @@ Applicare la configurazione comunque? Pins - + Spilli no pin - + Nessuno spillo Labels @@ -5960,7 +5984,7 @@ Applicare la configurazione comunque? Workpiece tool - + Strumento crea dettaglio Segment @@ -6541,19 +6565,19 @@ Applicare la configurazione comunque? by first edge symmetry - + Secondo simmetria del primo contorno by second edge symmetry - + Secondo la simmetria del secondo contorno by first edge right angle - + Secondo l'angolo destro del primo contorno by second edge right angle - + Seguendo l'angolo destro del secondo contorno @@ -8139,11 +8163,11 @@ Vuoi salvare i cambiamenti? Pin tool - + Strumento spillo Select pin point - + Selezionare punto per spillo Insert node tool @@ -8183,7 +8207,7 @@ Vuoi salvare i cambiamenti? You can't use Layout mode yet. Please, include at least one detail in layout. - + Non puoi ancora usare la modalità Layout. Seleziona almeno un dettaglio per il layout, grazie. You can't use Layout mode yet. @@ -8227,7 +8251,7 @@ Vuoi salvare i cambiamenti? Workpiece tool - + Strumento crea dettaglio Internal path tool @@ -8884,7 +8908,7 @@ Vuoi salvare i cambiamenti? With OS options - + Come da opzioni del Sistema Operativo Centimeters @@ -8916,7 +8940,7 @@ Vuoi salvare i cambiamenti? Double click calls Zoom fit best for current pattern piece - + Doppio clic per zoom migliore adattamento per l'attuale pezzo del modello Scrolling @@ -8949,7 +8973,7 @@ Vuoi salvare i cambiamenti? Mouse scale - + Scala mouse Sensor: @@ -8971,7 +8995,7 @@ Vuoi salvare i cambiamenti? Acceleration: - + Accelerazione: User Interface @@ -9030,7 +9054,7 @@ Vuoi salvare i cambiamenti? My Templates - + I miei Modelli My label templates @@ -9077,7 +9101,7 @@ Vuoi salvare i cambiamenti? By default hide the main path if the seam allowance was enabled - + Nasconde automaticamente il tracciato principale se il margine di cucitura è abilitato Hide main path @@ -9149,7 +9173,7 @@ Vuoi salvare i cambiamenti? Line width: - + Spessore linea: Millimiters @@ -9417,15 +9441,15 @@ Questa opzione sarà effettiva dopo il riavvio del programma. Error in internal path '%1'. There is no intersection of first point with cutting countour - + Errore nel tracciato interno '%1'. Non c'è intersezione tra il primo punto e il contorno di ritaglio Error in internal path '%1'. There is no intersection of last point with cutting countour - + Errore nel tracciato interno '%1'. Non c'è intersezione tra l'ultimo punto e il contorno di ritaglio Cannot calculate a notch for point '%1' in piece '%2'. Seam allowance is empty. - + Impossibile calcolare una tacca per il punto '%1' nel pezzo '%2'. Il margine di cucitura non è ancora stato stabilito. Cannot calculate a notch for point '%1' in piece '%2'. Cannot find position for a notch. @@ -9433,15 +9457,15 @@ Questa opzione sarà effettiva dopo il riavvio del programma. Cannot calculate a notch for point '%1' in piece '%2'. Unable to fix a notch position. - + Impossibile calcolare una tacca per il punto '%1' nel pezzo '%2'. Impossibile trovare una posizione per la tacca. Cannot calculate a notch for point '%1' in piece '%2'. Notch collapse. - + Impossibile calcolare una tacca per il punto '%1' nel pezzo '%2'. La tacca collassa. Cannot calculate a notch for point '%1' in piece '%2'. Cannot find intersection. - + Impossibile calcolare una tacca per il punto '%1' nel pezzo '%2'. Impossibile trovare un'intersezione. Cannot get tokens from formula '%1'. Parser error: %2. @@ -10453,7 +10477,7 @@ Vuoi salvare le tue modifiche? Export from multisize measurements is not supported. - + Esportazione da misure multitaglia non supportata. Customer name: @@ -10477,7 +10501,7 @@ Vuoi salvare le tue modifiche? Measurement name in is empty. - + Nome della misura mancante. Merasurement '%1' doesn't match regex pattern. @@ -10497,7 +10521,7 @@ Vuoi salvare le tue modifiche? Error in row %1. - + Errore nella riga %1. Multisize measurements require at least 4 columns. @@ -10521,7 +10545,7 @@ Vuoi salvare le tue modifiche? Error in row %1. Measurement name is empty. - + Errore nella riga %1. Nome misura mancante. Cannot save settings. Access denied. @@ -10659,7 +10683,7 @@ Vuoi salvare le tue modifiche? Detail label visible - Dettaglio etichetta visibile + Attiva/Disattiva Etichetta del Dettaglio Width: @@ -10703,7 +10727,7 @@ Vuoi salvare le tue modifiche? Pattern label visible - Modello etichetta visibile + Attiva/Disattiva Etichetta del Modello Label template: @@ -10731,7 +10755,7 @@ Vuoi salvare le tue modifiche? A text field to add comments in - + Uno spazio di testo per aggiungere commenti Orientation: @@ -10751,11 +10775,11 @@ Vuoi salvare le tue modifiche? Edit piece label template - + Modifica modello di etichetta Options to control position a detail label. <b>Not available if a detail label template is empty</b>. - + Opzione per regolare la visibilità e posizione dell'etichetta. <b>Non disponibile se il modello etichetta non è stato caricato</b>. Options to control position a pattern label. <b>Not available if a pattern label template is empty</b>. @@ -10822,7 +10846,7 @@ Vuoi salvare le tue modifiche? Select if need designate the corner point as a passmark. Show only left passmark. - + Seleziona se vuoi impostare un punto ad angolo come tacca. Mostra solo tacca a sinistra dell'angolo. Intersection (only left) @@ -10830,7 +10854,7 @@ Vuoi salvare le tue modifiche? Select if need designate the corner point as a passmark. Show only right passmark. - + Seleziona se vuoi impostare un punto ad angolo come tacca. Mostra solo tacca a destra dell'angolo. Intersection (only right) @@ -11253,7 +11277,7 @@ Vuoi salvare le tue modifiche? With OS options - + Come da opzioni del Sistema Operativo User Interface @@ -11304,7 +11328,7 @@ Vuoi salvare le tue modifiche? My Templates - + I miei Modelli My Patterns @@ -11399,10 +11423,29 @@ Vuoi salvare le tue modifiche? Invalid version. Minimum supported format version is %1 - + Versione non valida. La versione minima supportata è %1 Invalid version. Maximum supported format version is %1 + Versione non valida. La versione massima supportata è %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 @@ -11692,6 +11735,21 @@ Vuoi salvare le tue modifiche? Invalid notch. + Tacca non valida. + + + + 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 @@ -11990,7 +12048,7 @@ Vuoi salvare le tue modifiche? Export text as paths. - + Esporta testo come tracciato. Export only details. Export details as they positioned in the details mode. Any layout related options will be ignored. @@ -12488,19 +12546,19 @@ Vuoi salvare le tue modifiche? by first edge symmetry - + Secondo simmetria del primo contorno by second edge symmetry - + Secondo la simmetria del secondo contorno by first edge right angle - + Secondo l'angolo destro del primo contorno by second edge right angle - + Seguendo l'angolo destro del secondo contorno Passmark @@ -12898,7 +12956,7 @@ Vuoi salvare le tue modifiche? VPiece Cannot calculate a notch for point '%1' in piece '%2'. - + Impossibile calcolare una tacca per il punto '%1' nel pezzo '%2'. Notch for point '%1' in piece '%2' will be disabled. Manual length is less than allowed value. diff --git a/share/translations/valentina_ru_RU.ts b/share/translations/valentina_ru_RU.ts index e54ecb08b..137b77895 100644 --- a/share/translations/valentina_ru_RU.ts +++ b/share/translations/valentina_ru_RU.ts @@ -5606,30 +5606,6 @@ Apply settings anyway? Add tags Добавить категории - - Enable to create a visibility gropup from original objects - - - - Visibility Group - - - - Name: - - - - Tags: - - - - Separate each tag with comma. - - - - Add tags - - DialogSaveLAyout @@ -13005,14 +12981,6 @@ Do you want to save your changes? 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. - - VPiece @@ -14049,7 +14017,7 @@ Do you want to save your changes? rotate - + поворот diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index dfb5737cc..827bf5ee2 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -343,7 +343,10 @@ void VWidgetGroups::FillTable(QMap groups) item = new QTableWidgetItem(data.name); item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); - item->setToolTip(tr("Categories: %1.").arg(data.tags.join(", "))); + if (not data.tags.isEmpty()) + { + item->setToolTip(tr("Categories: %1.").arg(data.tags.join(", "))); + } if(doc->GroupIsEmpty(i.key())) { diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui b/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui index 7b861987c..fa9c4c89a 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui @@ -9,8 +9,8 @@ 0 0 - 448 - 478 + 542 + 481 @@ -23,7 +23,7 @@ true - + @@ -172,34 +172,173 @@ - + - + - + - - - - 0 - 0 - - - - Input data + + + + + + 0 + 0 + + + + Input data + + + + + + + + 0 + 0 + + + + Measurements + + + true + + + + + + + + 0 + 0 + + + + Increments + + + + + + + Preview calculations + + + + + + + true + + + + 0 + 0 + + + + Length of lines + + + + + + + true + + + + 0 + 0 + + + + Length of curves + + + + + + + true + + + + 0 + 0 + + + + Angle of lines + + + + + + + + 0 + 0 + + + + Radius of arcs + + + + + + + + 0 + 0 + + + + Angles of curves + + + + + + + Lengths to control points + + + + + + + + 0 + 0 + + + + Functions + + + + + + + + + + + + + Filter list by keyword - - - - 0 - 0 - - + - Measurements + Hide empty measurements true @@ -207,117 +346,26 @@ - - - - 0 - 0 - + + + + 0 + 0 + - - Increments - - - - - - - Preview calculations - - - - - - - true - - - - 0 - 0 - - - - Length of lines - - - - - - - true - - - - 0 - 0 - - - - Length of curves - - - - - - - true - - - - 0 - 0 - - - - Angle of lines - - - - - - - - 0 - 0 - - - - Radius of arcs - - - - - - - - 0 - 0 - - - - Angles of curves - - - - - - - Lengths to control points - - - - - - - - 0 - 0 - - - - Functions + + PointingHandCursor + + + Name + + + + + Full name + + @@ -325,63 +373,25 @@ - - - - - Filter list by keyword - - - - - - - Hide empty measurements - - - true - - - - - - - - 0 - 0 - - - - PointingHandCursor - - - - Name - - - - - Full name - - - - - + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Raised + + - - - - - - - true - - - @@ -400,6 +410,12 @@ QPlainTextEdit
vplaintextedit.h
+ + VElidedLabel + QFrame +
velidedlabel.h
+ 1 +
toolButtonPutHere diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp index ca558230f..66317733e 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp @@ -226,9 +226,8 @@ void VToolFlippingByAxis::SaveDialog(QDomElement &domElement, QList &ol 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(); + // Save visibility data for later use + SaveVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp index e862a99b7..e2bda983b 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp @@ -213,9 +213,8 @@ void VToolFlippingByLine::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondLinePointId())); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); - // Save for later use. - hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); - groupName = dialogTool->GetVisibilityGroupName(); + // Save visibility data for later use + SaveVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h index 926411a72..ce120c4d8 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h @@ -156,6 +156,9 @@ protected: template void SetDialogVisibilityGroupData(QPointer dialogTool); + template + void SaveVisibilityGroupData(QPointer dialogTool); + void InitCurve(quint32 id, VContainer *data, GOType curveType, SceneObject sceneType); template @@ -197,6 +200,18 @@ void VAbstractOperation::SetDialogVisibilityGroupData(QPointer dialogTool) } } +//--------------------------------------------------------------------------------------------------------------------- +template +void VAbstractOperation::SaveVisibilityGroupData(QPointer dialogTool) +{ + SCASSERT(not dialogTool.isNull()) + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); + groupTags = dialogTool->GetVisibilityGroupTags(); +} + //--------------------------------------------------------------------------------------------------------------------- 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 24c5bf9b4..1e494a755 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -482,9 +482,8 @@ void VToolMove::SaveDialog(QDomElement &domElement, QList &oldDependenc doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetRotationOrigPointId())); doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle()); - // Save for later use. - hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); - groupName = dialogTool->GetVisibilityGroupName(); + // Save visibility data for later use + SaveVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 1d4428f33..b03cc7048 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -362,9 +362,8 @@ void VToolRotation::SaveDialog(QDomElement &domElement, QList &oldDepen doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); - // Save for later use. - hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); - groupName = dialogTool->GetVisibilityGroupName(); + // Save visibility data for later use + SaveVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vwidgets/velidedlabel.cpp b/src/libs/vwidgets/velidedlabel.cpp new file mode 100644 index 000000000..8eb740b5e --- /dev/null +++ b/src/libs/vwidgets/velidedlabel.cpp @@ -0,0 +1,152 @@ +/************************************************************************ + ** + ** @file velidedlabel.cpp + ** @author Roman Telezhynskyi + ** @date 8 5, 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 "velidedlabel.h" + +#include +#include +#include + +//--------------------------------------------------------------------------------------------------------------------- +VElidedLabel::VElidedLabel(QWidget *parent) + : QFrame(parent) +{ + // reserve size for one line of text + setMinimumHeight(fontMetrics().lineSpacing()); +} + +//--------------------------------------------------------------------------------------------------------------------- +VElidedLabel::VElidedLabel(const QString &text, QWidget *parent) + : QFrame(parent), + m_content(text) +{ + // reserve size for one line of text + setMinimumHeight(fontMetrics().lineSpacing()); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VElidedLabel::setText(const QString &text) +{ + m_content = text; + update(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VElidedLabel::paintEvent(QPaintEvent *event) +{ + QFrame::paintEvent(event); + + QPainter painter(this); + bool didElide = false; + int y = 0; + + // QTextLayout works with paragraphs + QStringList paragraphs = m_content.split('\n'); + for (int i = 0; i < paragraphs.size(); ++i) + { + if (not DrawParagraph(painter, paragraphs.at(i), y, didElide)) + { + // It text has empty strings a user will not see elided string, but we still want to show a tooltip. + if (i != paragraphs.size()-1 && !didElide) + { + didElide = true; + } + break; + } + } + + if (didElide != m_elided) + { + m_elided = didElide; + + if (m_showElided) + { + if (m_elided) + { + // Show a tooltip in case we cannot show a whole text in the widget + // Use dumb html tag to separate paragraphs. + QString toolTip; + for(int i = 0; i < paragraphs.size(); ++i) + { + if (i != 0) + { + toolTip.append(QString("
")); + } + toolTip.append(QString("%1").arg(paragraphs.at(i))); + } + setToolTip(toolTip); + } + else + { + setToolTip(QString()); + } + } + emit ElisionChanged(didElide); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VElidedLabel::DrawParagraph(QPainter &painter, const QString& paragraph, int &y, bool &didElide) +{ + QFontMetrics fontMetrics = painter.fontMetrics(); + + int lineSpacing = fontMetrics.lineSpacing(); + bool ok = true; + + QTextLayout textLayout(paragraph, painter.font()); + textLayout.beginLayout(); + forever + { + QTextLine line = textLayout.createLine(); + + if (!line.isValid()) + { + break; + } + + line.setLineWidth(width()); + int nextLineY = y + lineSpacing; + + if (height() >= nextLineY + lineSpacing) + { + line.draw(&painter, QPoint(0, y)); + y = nextLineY; + } + else + { + QString lastLine = paragraph.mid(line.textStart()); + QString elidedLastLine = fontMetrics.elidedText(lastLine, Qt::ElideRight, width()); + painter.drawText(QPoint(0, y + fontMetrics.ascent()), elidedLastLine); + y = nextLineY; + ok = false; + didElide = lastLine != elidedLastLine; + break; + } + } + textLayout.endLayout(); + return ok; +} diff --git a/src/libs/vwidgets/velidedlabel.h b/src/libs/vwidgets/velidedlabel.h new file mode 100644 index 000000000..6a1906cc1 --- /dev/null +++ b/src/libs/vwidgets/velidedlabel.h @@ -0,0 +1,90 @@ +/************************************************************************ + ** + ** @file velidedlabel.h + ** @author Roman Telezhynskyi + ** @date 8 5, 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 VELIDEDLABEL_H +#define VELIDEDLABEL_H + +#include + +class VElidedLabel : public QFrame +{ + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText) + Q_PROPERTY(bool IsElided READ IsElided) + Q_PROPERTY(bool showElided READ ShowElided WRITE SetShowElided) +public: + explicit VElidedLabel(QWidget *parent = nullptr); + explicit VElidedLabel(const QString &text, QWidget *parent = nullptr); + + void setText(const QString &text); + const QString& text() const; + + bool IsElided() const; + + bool ShowElided() const; + void SetShowElided(bool showElided); + +protected: + virtual void paintEvent(QPaintEvent *event) override; + +signals: + void ElisionChanged(bool m_elided); + +private: + Q_DISABLE_COPY(VElidedLabel) + bool m_elided{false}; + bool m_showElided{true}; + QString m_content{}; + + bool DrawParagraph(QPainter &painter, const QString& paragraph, int &y, bool &didElide); +}; + +//--------------------------------------------------------------------------------------------------------------------- +inline const QString &VElidedLabel::text() const +{ + return m_content; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline bool VElidedLabel::IsElided() const +{ + return m_elided; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline bool VElidedLabel::ShowElided() const +{ + return m_showElided; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline void VElidedLabel::SetShowElided(bool showElided) +{ + m_showElided = showElided; +} + +#endif // VELIDEDLABEL_H diff --git a/src/libs/vwidgets/vwidgets.pri b/src/libs/vwidgets/vwidgets.pri index 24c36c436..602602a14 100644 --- a/src/libs/vwidgets/vwidgets.pri +++ b/src/libs/vwidgets/vwidgets.pri @@ -3,6 +3,7 @@ SOURCES += \ $$PWD/vcomboboxdelegate.cpp \ + $$PWD/velidedlabel.cpp \ $$PWD/vmaingraphicsscene.cpp \ $$PWD/vmaingraphicsview.cpp \ $$PWD/vwidgetpopup.cpp \ @@ -32,6 +33,7 @@ SOURCES += \ HEADERS += \ $$PWD/stable.h \ $$PWD/vcomboboxdelegate.h \ + $$PWD/velidedlabel.h \ $$PWD/vmaingraphicsscene.h \ $$PWD/vmaingraphicsview.h \ $$PWD/vwidgetpopup.h \