diff --git a/lang/qet_ar.ts b/lang/qet_ar.ts
index 558ba8c2a..1d51ae998 100644
--- a/lang/qet_ar.ts
+++ b/lang/qet_ar.ts
@@ -3974,6 +3974,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ الارتفاع
+
+
+
+ Width fixed
+ العرض ثابت
+
+
+
+ Height fixed
+ الارتفاع ثابت
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ عند التحديد يحتفظ حقل النص بالعرض أعلاه ويلتف النص داخله. بدون تحديد يكون بعرض النص.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ عند التحديد يحتفظ حقل النص بالارتفاع أعلاه وتُقص الأسطر التي لا تتسع. بدون تحديد يكون بارتفاع النص.
+
+
+
+ Change the height of an element text
+ تغيير ارتفاع نص العنصر
+ Property
diff --git a/lang/qet_ca.ts b/lang/qet_ca.ts
index 1ba3ea190..6d2e76483 100644
--- a/lang/qet_ca.ts
+++ b/lang/qet_ca.ts
@@ -3895,6 +3895,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Alçada
+
+
+
+ Width fixed
+ Amplada fixa
+
+
+
+ Height fixed
+ Alçada fixa
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Marcat, el camp de text manté l'amplada de dalt i el text s'ajusta a dins. Sense marcar, és tan ample com el text.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Marcat, el camp de text manté l'alçada de dalt i les línies que no hi caben es tallen. Sense marcar, és tan alt com el text.
+
+
+
+ Change the height of an element text
+ Canviar l'alçada d'un text d'element
+ Property
diff --git a/lang/qet_cs.ts b/lang/qet_cs.ts
index f37ca087d..098c0cafb 100644
--- a/lang/qet_cs.ts
+++ b/lang/qet_cs.ts
@@ -3921,6 +3921,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Výška
+
+
+
+ Width fixed
+ Pevná šířka
+
+
+
+ Height fixed
+ Pevná výška
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Zaškrtnuto: textové pole si drží šířku výše a text se v něm zalamuje. Nezaškrtnuto: je široké jako text.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Zaškrtnuto: textové pole si drží výšku výše a řádky, které se nevejdou, se oříznou. Nezaškrtnuto: je vysoké jako text.
+
+
+
+ Change the height of an element text
+ Změnit výšku textu prvku
+ Property
diff --git a/lang/qet_da.ts b/lang/qet_da.ts
index 38f41e744..aa16f82bf 100644
--- a/lang/qet_da.ts
+++ b/lang/qet_da.ts
@@ -3875,6 +3875,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Højde
+
+
+
+ Width fixed
+ Fast bredde
+
+
+
+ Height fixed
+ Fast højde
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Markeret beholder tekstfeltet bredden ovenfor, og teksten ombrydes i det. Ikke markeret er det lige så bredt som teksten.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Markeret beholder tekstfeltet højden ovenfor, og linjer der ikke er plads til, skæres af. Ikke markeret er det lige så højt som teksten.
+
+
+
+ Change the height of an element text
+ Ændr højden på en elementtekst
+ Property
diff --git a/lang/qet_de.ts b/lang/qet_de.ts
index 747912959..216bfe6c3 100644
--- a/lang/qet_de.ts
+++ b/lang/qet_de.ts
@@ -3897,6 +3897,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Höhe
+
+
+
+ Width fixed
+ Breite fixiert
+
+
+
+ Height fixed
+ Höhe fixiert
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Angehakt behält das Textfeld die Breite darüber, der Text bricht darin um. Nicht angehakt ist es so breit wie der Text.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Angehakt behält das Textfeld die Höhe darüber, Zeilen, die nicht hineinpassen, werden abgeschnitten. Nicht angehakt ist es so hoch wie der Text.
+
+
+
+ Change the height of an element text
+ Höhe eines Elementtextes ändern
+ Property
diff --git a/lang/qet_el.ts b/lang/qet_el.ts
index 73f0aaf39..9f6adcc7f 100644
--- a/lang/qet_el.ts
+++ b/lang/qet_el.ts
@@ -3894,6 +3894,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Ύψος
+
+
+
+ Width fixed
+ Σταθερό πλάτος
+
+
+
+ Height fixed
+ Σταθερό ύψος
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Επιλεγμένο: το πεδίο κειμένου κρατά το παραπάνω πλάτος και το κείμενο αναδιπλώνεται μέσα του. Μη επιλεγμένο: είναι όσο φαρδύ είναι το κείμενο.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Επιλεγμένο: το πεδίο κειμένου κρατά το παραπάνω ύψος και οι γραμμές που δεν χωρούν αποκόπτονται. Μη επιλεγμένο: είναι όσο ψηλό είναι το κείμενο.
+
+
+
+ Change the height of an element text
+ Αλλαγή ύψους κειμένου στοιχείου
+ Property
diff --git a/lang/qet_en.ts b/lang/qet_en.ts
index 595e603c1..c18871e12 100644
--- a/lang/qet_en.ts
+++ b/lang/qet_en.ts
@@ -3894,6 +3894,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Height
+
+
+
+ Width fixed
+ Width fixed
+
+
+
+ Height fixed
+ Height fixed
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+
+
+
+ Change the height of an element text
+ Change the height of an element text
+ Property
diff --git a/lang/qet_es.ts b/lang/qet_es.ts
index 123e65718..a0f002690 100644
--- a/lang/qet_es.ts
+++ b/lang/qet_es.ts
@@ -3897,6 +3897,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Alto
+
+
+
+ Width fixed
+ Ancho fijo
+
+
+
+ Height fixed
+ Alto fijo
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Marcado, el campo de texto mantiene el ancho de arriba y el texto se ajusta dentro. Sin marcar, es tan ancho como el texto.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Marcado, el campo de texto mantiene el alto de arriba y las líneas que no caben se cortan. Sin marcar, es tan alto como el texto.
+
+
+
+ Change the height of an element text
+ Cambiar el alto de un texto de elemento
+ Property
diff --git a/lang/qet_fi.ts b/lang/qet_fi.ts
index a3cbacc62..9b54480fa 100644
--- a/lang/qet_fi.ts
+++ b/lang/qet_fi.ts
@@ -3870,6 +3870,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Korkeus
+
+
+
+ Width fixed
+ Kiinteä leveys
+
+
+
+ Height fixed
+ Kiinteä korkeus
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Valittuna tekstikenttä pitää yllä olevan leveyden ja teksti rivittyy sen sisään. Valitsematta se on tekstin levyinen.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Valittuna tekstikenttä pitää yllä olevan korkeuden ja rivit, jotka eivät mahdu, katkaistaan. Valitsematta se on tekstin korkuinen.
+
+
+
+ Change the height of an element text
+ Muuta elementtitekstin korkeutta
+ Property
diff --git a/lang/qet_fr.ts b/lang/qet_fr.ts
index 6c49e975d..80975527e 100644
--- a/lang/qet_fr.ts
+++ b/lang/qet_fr.ts
@@ -3895,6 +3895,36 @@ Maintenir Maj et faire glisser pour déplacer ce texte seul
DynamicElementTextModel
+
+
+ Height
+ Hauteur
+
+
+
+ Width fixed
+ Largeur fixe
+
+
+
+ Height fixed
+ Hauteur fixe
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Cochée, le champ de texte garde la largeur ci-dessus et le texte y passe à la ligne. Non cochée, il est aussi large que le texte.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Cochée, le champ de texte garde la hauteur ci-dessus et les lignes qui ne tiennent pas sont coupées. Non cochée, il est aussi haut que le texte.
+
+
+
+ Change the height of an element text
+ Modifier la hauteur d'un texte d'élément
+ Property
diff --git a/lang/qet_hr.ts b/lang/qet_hr.ts
index 8d36a9dbd..86159c114 100644
--- a/lang/qet_hr.ts
+++ b/lang/qet_hr.ts
@@ -3895,6 +3895,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Visina
+
+
+
+ Width fixed
+ Fiksna širina
+
+
+
+ Height fixed
+ Fiksna visina
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Označeno: tekstno polje zadržava gornju širinu i tekst se u njemu prelama. Neoznačeno: široko je koliko i tekst.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Označeno: tekstno polje zadržava gornju visinu, a redci koji ne stanu se odrežu. Neoznačeno: visoko je koliko i tekst.
+
+
+
+ Change the height of an element text
+ Promijeni visinu teksta elementa
+ Property
diff --git a/lang/qet_hu.ts b/lang/qet_hu.ts
index ea6bca5ad..51f760d40 100644
--- a/lang/qet_hu.ts
+++ b/lang/qet_hu.ts
@@ -3874,6 +3874,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Magasság
+
+
+
+ Width fixed
+ Rögzített szélesség
+
+
+
+ Height fixed
+ Rögzített magasság
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Bejelölve a szövegmező megtartja a fenti szélességet, és a szöveg benne tördelődik. Bejelöletlenül olyan széles, mint a szöveg.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Bejelölve a szövegmező megtartja a fenti magasságot, és a bele nem férő sorok levágódnak. Bejelöletlenül olyan magas, mint a szöveg.
+
+
+
+ Change the height of an element text
+ Elemszöveg magasságának módosítása
+ Property
diff --git a/lang/qet_it.ts b/lang/qet_it.ts
index 64641487d..bd4d34806 100644
--- a/lang/qet_it.ts
+++ b/lang/qet_it.ts
@@ -3894,6 +3894,36 @@ Tieni premuto Maiusc e trascina per spostare solo questo testo
DynamicElementTextModel
+
+
+ Height
+ Altezza
+
+
+
+ Width fixed
+ Larghezza fissa
+
+
+
+ Height fixed
+ Altezza fissa
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Spuntato, il campo di testo mantiene la larghezza sopra e il testo va a capo al suo interno. Non spuntato, è largo quanto il testo.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Spuntato, il campo di testo mantiene l'altezza sopra e le righe che non entrano vengono tagliate. Non spuntato, è alto quanto il testo.
+
+
+
+ Change the height of an element text
+ Modifica l'altezza di un testo dell'elemento
+
diff --git a/lang/qet_ja.ts b/lang/qet_ja.ts
index 99c819f1f..a9acf46ca 100644
--- a/lang/qet_ja.ts
+++ b/lang/qet_ja.ts
@@ -3866,6 +3866,36 @@ Shift を押しながらドラッグすると、このテキストだけを移
DynamicElementTextModel
+
+
+ Height
+ 高さ
+
+
+
+ Width fixed
+ 幅を固定
+
+
+
+ Height fixed
+ 高さを固定
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ チェックするとテキスト欄は上の幅を保ち、テキストはその中で折り返します。チェックしないとテキストの幅になります。
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ チェックするとテキスト欄は上の高さを保ち、収まらない行は切り捨てられます。チェックしないとテキストの高さになります。
+
+
+
+ Change the height of an element text
+ 要素テキストの高さを変更
+ Property
diff --git a/lang/qet_ko.ts b/lang/qet_ko.ts
index 8bd2c7497..7c7a20e5c 100644
--- a/lang/qet_ko.ts
+++ b/lang/qet_ko.ts
@@ -3866,6 +3866,36 @@ Shift를 누른 채 끌면 이 텍스트만 이동합니다
DynamicElementTextModel
+
+
+ Height
+ 높이
+
+
+
+ Width fixed
+ 너비 고정
+
+
+
+ Height fixed
+ 높이 고정
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ 선택하면 텍스트 필드가 위의 너비를 유지하고 텍스트가 그 안에서 줄 바꿈됩니다. 선택하지 않으면 텍스트 너비와 같습니다.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ 선택하면 텍스트 필드가 위의 높이를 유지하고 들어가지 않는 줄은 잘립니다. 선택하지 않으면 텍스트 높이와 같습니다.
+
+
+
+ Change the height of an element text
+ 요소 텍스트의 높이 변경
+ Property
diff --git a/lang/qet_mn.ts b/lang/qet_mn.ts
index 576800b31..6e738de0d 100644
--- a/lang/qet_mn.ts
+++ b/lang/qet_mn.ts
@@ -3877,6 +3877,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Өндөр
+
+
+
+ Width fixed
+ Тогтмол өргөн
+
+
+
+ Height fixed
+ Тогтмол өндөр
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Тэмдэглэсэн үед текстийн талбар дээрх өргөнийг хадгалж, текст дотор нь шилжинэ. Тэмдэглээгүй үед текстийн өргөнтэй тэнцүү.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Тэмдэглэсэн үед текстийн талбар дээрх өндрийг хадгалж, багтахгүй мөрүүд таслагдана. Тэмдэглээгүй үед текстийн өндөртэй тэнцүү.
+
+
+
+ Change the height of an element text
+ Элементийн текстийн өндрийг өөрчлөх
+ Property
diff --git a/lang/qet_nb.ts b/lang/qet_nb.ts
index 5c3d9fc6c..6b67e5639 100644
--- a/lang/qet_nb.ts
+++ b/lang/qet_nb.ts
@@ -3878,6 +3878,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Høyde
+
+
+
+ Width fixed
+ Fast bredde
+
+
+
+ Height fixed
+ Fast høyde
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Avkrysset beholder tekstfeltet bredden over, og teksten brytes inni det. Ikke avkrysset er det like bredt som teksten.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Avkrysset beholder tekstfeltet høyden over, og linjer som ikke får plass, kuttes. Ikke avkrysset er det like høyt som teksten.
+
+
+
+ Change the height of an element text
+ Endre høyden på en elementtekst
+ Property
diff --git a/lang/qet_nl.ts b/lang/qet_nl.ts
index 08c5e8d7d..5afb10479 100644
--- a/lang/qet_nl.ts
+++ b/lang/qet_nl.ts
@@ -3875,6 +3875,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Hoogte
+
+
+
+ Width fixed
+ Vaste breedte
+
+
+
+ Height fixed
+ Vaste hoogte
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Aangevinkt houdt het tekstveld de breedte hierboven en loopt de tekst erin door. Niet aangevinkt is het zo breed als de tekst.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Aangevinkt houdt het tekstveld de hoogte hierboven en worden regels die niet passen afgesneden. Niet aangevinkt is het zo hoog als de tekst.
+
+
+
+ Change the height of an element text
+ De hoogte van een elementtekst wijzigen
+ Property
diff --git a/lang/qet_nl_BE.ts b/lang/qet_nl_BE.ts
index 5c96dced5..346685a0f 100644
--- a/lang/qet_nl_BE.ts
+++ b/lang/qet_nl_BE.ts
@@ -3895,6 +3895,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Hoogte
+
+
+
+ Width fixed
+ Vaste breedte
+
+
+
+ Height fixed
+ Vaste hoogte
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Aangevinkt houdt het tekstveld de breedte hierboven en loopt de tekst erin door. Niet aangevinkt is het zo breed als de tekst.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Aangevinkt houdt het tekstveld de hoogte hierboven en worden regels die niet passen afgesneden. Niet aangevinkt is het zo hoog als de tekst.
+
+
+
+ Change the height of an element text
+ De hoogte van een elementtekst wijzigen
+ Property
diff --git a/lang/qet_nl_NL.ts b/lang/qet_nl_NL.ts
index d44405c00..976ff9935 100644
--- a/lang/qet_nl_NL.ts
+++ b/lang/qet_nl_NL.ts
@@ -2697,6 +2697,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Hoogte
+
+
+
+ Width fixed
+ Vaste breedte
+
+
+
+ Height fixed
+ Vaste hoogte
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Aangevinkt houdt het tekstveld de breedte hierboven en loopt de tekst erin door. Niet aangevinkt is het zo breed als de tekst.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Aangevinkt houdt het tekstveld de hoogte hierboven en worden regels die niet passen afgesneden. Niet aangevinkt is het zo hoog als de tekst.
+
+
+
+ Change the height of an element text
+ De hoogte van een elementtekst wijzigen
+ Property
diff --git a/lang/qet_no.ts b/lang/qet_no.ts
index 46cbdd84d..1ba4ba438 100644
--- a/lang/qet_no.ts
+++ b/lang/qet_no.ts
@@ -3870,6 +3870,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Høyde
+
+
+
+ Width fixed
+ Fast bredde
+
+
+
+ Height fixed
+ Fast høyde
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Avkrysset beholder tekstfeltet bredden over, og teksten brytes inni det. Ikke avkrysset er det like bredt som teksten.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Avkrysset beholder tekstfeltet høyden over, og linjer som ikke får plass, kuttes. Ikke avkrysset er det like høyt som teksten.
+
+
+
+ Change the height of an element text
+ Endre høyden på en elementtekst
+ Property
diff --git a/lang/qet_pl.ts b/lang/qet_pl.ts
index fdee219fe..d27298d4b 100644
--- a/lang/qet_pl.ts
+++ b/lang/qet_pl.ts
@@ -3935,6 +3935,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Wysokość
+
+
+
+ Width fixed
+ Stała szerokość
+
+
+
+ Height fixed
+ Stała wysokość
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Zaznaczone: pole tekstowe zachowuje szerokość powyżej, a tekst jest w nim zawijany. Niezaznaczone: jest tak szerokie jak tekst.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Zaznaczone: pole tekstowe zachowuje wysokość powyżej, a wiersze, które się nie mieszczą, są obcinane. Niezaznaczone: jest tak wysokie jak tekst.
+
+
+
+ Change the height of an element text
+ Zmień wysokość tekstu elementu
+ Property
diff --git a/lang/qet_pt.ts b/lang/qet_pt.ts
index 228fa076a..6cc5dc8cb 100644
--- a/lang/qet_pt.ts
+++ b/lang/qet_pt.ts
@@ -3896,6 +3896,36 @@ Mantenha Shift premido e arraste para mover este texto sozinho
DynamicElementTextModel
+
+
+ Height
+ Altura
+
+
+
+ Width fixed
+ Largura fixa
+
+
+
+ Height fixed
+ Altura fixa
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Marcado, o campo de texto mantém a largura acima e o texto quebra dentro dele. Desmarcado, é tão largo como o texto.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Marcado, o campo de texto mantém a altura acima e as linhas que não cabem são cortadas. Desmarcado, é tão alto como o texto.
+
+
+
+ Change the height of an element text
+ Alterar a altura de um texto de elemento
+ Property
diff --git a/lang/qet_pt_BR.ts b/lang/qet_pt_BR.ts
index a4b82f8e9..2024ab0ad 100644
--- a/lang/qet_pt_BR.ts
+++ b/lang/qet_pt_BR.ts
@@ -3895,6 +3895,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Altura
+
+
+
+ Width fixed
+ Largura fixa
+
+
+
+ Height fixed
+ Altura fixa
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Marcado, o campo de texto mantém a largura acima e o texto quebra dentro dele. Desmarcado, é tão largo quanto o texto.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Marcado, o campo de texto mantém a altura acima e as linhas que não cabem são cortadas. Desmarcado, é tão alto quanto o texto.
+
+
+
+ Change the height of an element text
+ Alterar a altura de um texto de elemento
+ Property
diff --git a/lang/qet_ro.ts b/lang/qet_ro.ts
index 725f28f87..bd4610356 100644
--- a/lang/qet_ro.ts
+++ b/lang/qet_ro.ts
@@ -3894,6 +3894,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Înălțime
+
+
+
+ Width fixed
+ Lățime fixă
+
+
+
+ Height fixed
+ Înălțime fixă
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Bifat, câmpul de text păstrează lățimea de deasupra și textul se încadrează în el. Nebifat, este cât textul de lat.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Bifat, câmpul de text păstrează înălțimea de deasupra și rândurile care nu încap sunt tăiate. Nebifat, este cât textul de înalt.
+
+
+
+ Change the height of an element text
+ Modifică înălțimea unui text de element
+ Property
diff --git a/lang/qet_rs.ts b/lang/qet_rs.ts
index f98b83674..8459d9eb7 100644
--- a/lang/qet_rs.ts
+++ b/lang/qet_rs.ts
@@ -3894,6 +3894,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Visina
+
+
+
+ Width fixed
+ Fiksna širina
+
+
+
+ Height fixed
+ Fiksna visina
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Označeno: tekstualno polje zadržava gornju širinu i tekst se u njemu prelama. Neoznačeno: široko je koliko i tekst.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Označeno: tekstualno polje zadržava gornju visinu, a redovi koji ne stanu se odsecaju. Neoznačeno: visoko je koliko i tekst.
+
+
+
+ Change the height of an element text
+ Promeni visinu teksta elementa
+ Property
diff --git a/lang/qet_ru.ts b/lang/qet_ru.ts
index 0376d4638..61e7dc16a 100644
--- a/lang/qet_ru.ts
+++ b/lang/qet_ru.ts
@@ -3932,6 +3932,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Высота
+
+
+
+ Width fixed
+ Фиксированная ширина
+
+
+
+ Height fixed
+ Фиксированная высота
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Если отмечено, текстовое поле сохраняет ширину выше, и текст переносится внутри него. Если не отмечено, поле по ширине текста.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Если отмечено, текстовое поле сохраняет высоту выше, а не поместившиеся строки обрезаются. Если не отмечено, поле по высоте текста.
+
+
+
+ Change the height of an element text
+ Изменить высоту текста элемента
+ Property
diff --git a/lang/qet_sk.ts b/lang/qet_sk.ts
index 99b7650d1..79fbe29c5 100644
--- a/lang/qet_sk.ts
+++ b/lang/qet_sk.ts
@@ -3912,6 +3912,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Výška
+
+
+
+ Width fixed
+ Pevná šírka
+
+
+
+ Height fixed
+ Pevná výška
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Začiarknuté: textové pole si drží šírku vyššie a text sa v ňom zalamuje. Nezačiarknuté: je široké ako text.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Začiarknuté: textové pole si drží výšku vyššie a riadky, ktoré sa nezmestia, sa orežú. Nezačiarknuté: je vysoké ako text.
+
+
+
+ Change the height of an element text
+ Zmeniť výšku textu prvku
+ Property
diff --git a/lang/qet_sl.ts b/lang/qet_sl.ts
index 349d867f7..49d811688 100644
--- a/lang/qet_sl.ts
+++ b/lang/qet_sl.ts
@@ -3918,6 +3918,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Višina
+
+
+
+ Width fixed
+ Fiksna širina
+
+
+
+ Height fixed
+ Fiksna višina
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Označeno: besedilno polje ohrani zgornjo širino in besedilo se v njem prelamlja. Neoznačeno: je široko kot besedilo.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Označeno: besedilno polje ohrani zgornjo višino, vrstice, ki ne gredo vanj, se odrežejo. Neoznačeno: je visoko kot besedilo.
+
+
+
+ Change the height of an element text
+ Spremeni višino besedila elementa
+ Property
diff --git a/lang/qet_sr.ts b/lang/qet_sr.ts
index 2c0703bd3..0210eb356 100644
--- a/lang/qet_sr.ts
+++ b/lang/qet_sr.ts
@@ -3894,6 +3894,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Висина
+
+
+
+ Width fixed
+ Фиксна ширина
+
+
+
+ Height fixed
+ Фиксна висина
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Означено: текстуално поље задржава горњу ширину и текст се у њему прелама. Неозначено: широко је колико и текст.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Означено: текстуално поље задржава горњу висину, а редови који не стану се одсецају. Неозначено: високо је колико и текст.
+
+
+
+ Change the height of an element text
+ Промени висину текста елемента
+ Property
diff --git a/lang/qet_sv.ts b/lang/qet_sv.ts
index f2690c1d0..4f364c270 100644
--- a/lang/qet_sv.ts
+++ b/lang/qet_sv.ts
@@ -3875,6 +3875,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Höjd
+
+
+
+ Width fixed
+ Fast bredd
+
+
+
+ Height fixed
+ Fast höjd
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Markerat behåller textfältet bredden ovan och texten radbryts i det. Omarkerat är det lika brett som texten.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Markerat behåller textfältet höjden ovan och rader som inte får plats skärs av. Omarkerat är det lika högt som texten.
+
+
+
+ Change the height of an element text
+ Ändra höjden på en elementtext
+ Property
diff --git a/lang/qet_tr.ts b/lang/qet_tr.ts
index a987082d2..bfd70643f 100644
--- a/lang/qet_tr.ts
+++ b/lang/qet_tr.ts
@@ -3874,6 +3874,36 @@ Bu metni tek başına taşımak için Shift tuşunu basılı tutup sürükleyin<
DynamicElementTextModel
+
+
+ Height
+ Yükseklik
+
+
+
+ Width fixed
+ Sabit genişlik
+
+
+
+ Height fixed
+ Sabit yükseklik
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ İşaretliyse metin alanı yukarıdaki genişliği korur ve metin içinde kaydırılır. İşaretli değilse metin kadar geniştir.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ İşaretliyse metin alanı yukarıdaki yüksekliği korur ve sığmayan satırlar kesilir. İşaretli değilse metin kadar yüksektir.
+
+
+
+ Change the height of an element text
+ Bir öğe metninin yüksekliğini değiştir
+ Property
diff --git a/lang/qet_uk.ts b/lang/qet_uk.ts
index 7b5bdc34e..d0be7563a 100644
--- a/lang/qet_uk.ts
+++ b/lang/qet_uk.ts
@@ -3922,6 +3922,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ Висота
+
+
+
+ Width fixed
+ Фіксована ширина
+
+
+
+ Height fixed
+ Фіксована висота
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ Якщо позначено, текстове поле зберігає ширину вище, і текст переноситься всередині. Якщо ні, поле за шириною тексту.
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ Якщо позначено, текстове поле зберігає висоту вище, а рядки, що не вміщуються, обрізаються. Якщо ні, поле за висотою тексту.
+
+
+
+ Change the height of an element text
+ Змінити висоту тексту елемента
+ Property
diff --git a/lang/qet_zh.ts b/lang/qet_zh.ts
index d9420fc1e..02c788158 100644
--- a/lang/qet_zh.ts
+++ b/lang/qet_zh.ts
@@ -3865,6 +3865,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ 高度
+
+
+
+ Width fixed
+ 固定宽度
+
+
+
+ Height fixed
+ 固定高度
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ 勾选后文本框保持上面的宽度,文本在其中换行。不勾选时与文本同宽。
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ 勾选后文本框保持上面的高度,放不下的行被截断。不勾选时与文本同高。
+
+
+
+ Change the height of an element text
+ 更改元件文本的高度
+ Property
diff --git a/lang/qet_zh_TW.ts b/lang/qet_zh_TW.ts
index 09e05c3e0..b5bcb59e2 100644
--- a/lang/qet_zh_TW.ts
+++ b/lang/qet_zh_TW.ts
@@ -3865,6 +3865,36 @@ Hold Shift and drag to move this text on its own
DynamicElementTextModel
+
+
+ Height
+ 高度
+
+
+
+ Width fixed
+ 固定寬度
+
+
+
+ Height fixed
+ 固定高度
+
+
+
+ Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text.
+ 勾選後文字框保持上方的寬度,文字在其中換行。不勾選時與文字同寬。
+
+
+
+ Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text.
+ 勾選後文字框保持上方的高度,放不下的行會被截斷。不勾選時與文字同高。
+
+
+
+ Change the height of an element text
+ 變更元件文字的高度
+ Property
diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.cpp b/sources/qetgraphicsitem/dynamicelementtextitem.cpp
index 6e7ece16b..f016bdaa0 100644
--- a/sources/qetgraphicsitem/dynamicelementtextitem.cpp
+++ b/sources/qetgraphicsitem/dynamicelementtextitem.cpp
@@ -175,6 +175,8 @@ QDomElement DynamicElementTextItem::toXml(QDomDocument &dom_doc) const
root_element.setAttribute("uuid", m_uuid.toString());
root_element.setAttribute("frame", m_frame? "true" : "false");
root_element.setAttribute("text_width", QString::number(m_text_width));
+ if (m_text_height > 0)
+ root_element.setAttribute(QStringLiteral("text_height"), QString::number(m_text_height));
root_element.setAttribute("font", QETUtils::fontToString(font()));
root_element.setAttribute("keep_visual_rotation", m_keep_visual_rotation ? "true" : "false");
root_element.setAttribute("rotation_point_center", m_rotation_point_center ? "true" : "false");
@@ -262,6 +264,7 @@ void DynamicElementTextItem::fromXml(const QDomElement &dom_elmt)
m_uuid = QUuid(dom_elmt.attribute("uuid", QUuid::createUuid().toString()));
setFrame(dom_elmt.attribute("frame", "false") == "true"? true : false);
setTextWidth(dom_elmt.attribute("text_width", QString::number(-1)).toDouble());
+ setTextHeight(dom_elmt.attribute(QStringLiteral("text_height"), QStringLiteral("-1")).toDouble());
//Text from
QMetaEnum me = textFromMetaEnum();
@@ -867,7 +870,15 @@ void DynamicElementTextItem::paint(QPainter *painter, const QStyleOptionGraphics
if (m_jump_highlight)
painter->fillRect(boundingRect(), QColor(69, 137, 255, 90));
- DiagramTextItem::paint(painter, option, widget);
+ //A fixed height cuts off the lines that do not fit
+ if (m_text_height > 0) {
+ painter->save();
+ painter->setClipRect(boundingRect(), Qt::IntersectClip);
+ DiagramTextItem::paint(painter, option, widget);
+ painter->restore();
+ } else {
+ DiagramTextItem::paint(painter, option, widget);
+ }
if (m_frame)
{
@@ -2069,6 +2080,60 @@ void DynamicElementTextItem::setTextWidth(qreal width)
emit textWidthChanged(width);
}
+/**
+ @brief DynamicElementTextItem::setTextHeight
+ @param height : the height of the text field, -1 to follow the text.
+ With a height set, the field keeps it whatever is written: the lines
+ that do not fit are not drawn, to shorten a text where room is short.
+*/
+void DynamicElementTextItem::setTextHeight(qreal height)
+{
+ if (height <= 0)
+ height = -1;
+ if (qFuzzyCompare(height + 2, m_text_height + 2))
+ return;
+ prepareGeometryChange();
+ m_text_height = height;
+ update();
+ emit textHeightChanged(height);
+}
+
+/**
+ @brief DynamicElementTextItem::boundingRect
+ @return the text's own box, cut to the height set by the user
+*/
+QRectF DynamicElementTextItem::boundingRect() const
+{
+ QRectF rect = DiagramTextItem::boundingRect();
+ if (m_text_height > 0)
+ rect.setHeight(m_text_height);
+ return rect;
+}
+
+/**
+ @brief DynamicElementTextItem::shape
+ QGraphicsTextItem answers shape() and contains() from its own box, not
+ from boundingRect(): cut both to the height set by the user, so that
+ the lines cut off take no clicks either.
+*/
+QPainterPath DynamicElementTextItem::shape() const
+{
+ QPainterPath path = DiagramTextItem::shape();
+ if (m_text_height > 0) {
+ QPainterPath cut;
+ cut.addRect(boundingRect());
+ path = path.intersected(cut);
+ }
+ return path;
+}
+
+bool DynamicElementTextItem::contains(const QPointF &point) const
+{
+ if (m_text_height > 0 && !boundingRect().contains(point))
+ return false;
+ return DiagramTextItem::contains(point);
+}
+
/**
@brief DynamicElementTextItem::fitAutoTextWidth
With no width set by the user, a QTextDocument has no width to centre
diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.h b/sources/qetgraphicsitem/dynamicelementtextitem.h
index e6fc2134f..02ec85f79 100644
--- a/sources/qetgraphicsitem/dynamicelementtextitem.h
+++ b/sources/qetgraphicsitem/dynamicelementtextitem.h
@@ -51,6 +51,7 @@ class DynamicElementTextItem : public DiagramTextItem
Q_PROPERTY(QString compositeText READ compositeText WRITE setCompositeText NOTIFY compositeTextChanged)
Q_PROPERTY(bool frame READ frame WRITE setFrame NOTIFY frameChanged)
Q_PROPERTY(qreal textWidth READ textWidth WRITE setTextWidth NOTIFY textWidthChanged)
+ Q_PROPERTY(qreal textHeight READ textHeight WRITE setTextHeight NOTIFY textHeightChanged)
Q_PROPERTY(bool keepVisualRotation READ keepVisualRotation WRITE setKeepVisualRotation NOTIFY keepVisualRotationChanged)
Q_PROPERTY(bool rotationPointCenter READ rotationPointCenter WRITE setRotationPointCenter NOTIFY rotationPointCenterChanged)
public:
@@ -72,6 +73,7 @@ class DynamicElementTextItem : public DiagramTextItem
void frameChanged(bool frame);
void plainTextChanged();
void textWidthChanged(qreal width);
+ void textHeightChanged(qreal height);
void keepVisualRotationChanged(bool keep);
void rotationPointCenterChanged(bool center);
@@ -122,6 +124,13 @@ class DynamicElementTextItem : public DiagramTextItem
//centred or right-aligned, but the width is still "auto" (-1).
qreal textWidth() const {return m_text_width;}
void setTextWidth(qreal width);
+ //A height set by the user, -1 for "auto": lines that do not
+ //fit are cut off, as a text field of fixed size does
+ qreal textHeight() const {return m_text_height;}
+ void setTextHeight(qreal height);
+ QRectF boundingRect() const override;
+ QPainterPath shape() const override;
+ bool contains(const QPointF &point) const override;
void setXref_item(Qt::AlignmentFlag m_exHrefPos, int slave_offset = 0);
void setKeepVisualRotation(bool set);
@@ -204,6 +213,7 @@ class DynamicElementTextItem : public DiagramTextItem
QGraphicsTextItem *m_slave_Xref_item = nullptr;
qreal m_text_width = -1;
bool m_jump_highlight = false;
+ qreal m_text_height = -1;
/// The text was emptied with its alignment kept (setPlainText())
bool m_emptied_aligned = false;
QPointF m_initial_position;
diff --git a/sources/ui/dynamicelementtextmodel.cpp b/sources/ui/dynamicelementtextmodel.cpp
index ddfb58089..849ca44b0 100644
--- a/sources/ui/dynamicelementtextmodel.cpp
+++ b/sources/ui/dynamicelementtextmodel.cpp
@@ -48,11 +48,14 @@ static int font_txt_row = 5;
static int color_txt_row = 6;
static int frame_txt_row = 7;
static int width_txt_row = 8;
-static int x_txt_row = 9;
-static int y_txt_row = 10;
-static int rot_txt_row = 11;
-static int keep_rot_row = 12;
-static int align_txt_row = 13;
+static int width_fix_row = 9;
+static int height_txt_row = 10;
+static int height_fix_row = 11;
+static int x_txt_row = 12;
+static int y_txt_row = 13;
+static int rot_txt_row = 14;
+static int keep_rot_row = 15;
+static int align_txt_row = 16;
static int align_grp_row = 0;
static int x_grp_row = 1;
@@ -96,6 +99,39 @@ DynamicElementTextModel::~DynamicElementTextModel()
setConnection(group, false);
}
+/**
+ @brief setSizeItem
+ Show one size of a text, width or height, on two rows: the value, and
+ whether it is fixed. Fixed, the value is the size set, and it can be
+ edited. Not fixed, the field follows the text: the value shows the
+ size it has now, ready to be fixed, and cannot be edited.
+ @param value : the row of the value
+ @param fixed : the row of the tick box
+ @param size : the size set, -1 when not fixed
+ @param now : the size the field has now
+*/
+static void setSizeItem(QStandardItem *value, QStandardItem *fixed, qreal size, qreal now)
+{
+ if (!value || !fixed)
+ return;
+ const bool is_fixed = size > 0;
+ fixed->setCheckState(is_fixed ? Qt::Checked : Qt::Unchecked);
+ value->setData(qRound(is_fixed ? size : now), Qt::EditRole);
+ Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
+ if (is_fixed)
+ flags |= Qt::ItemIsEditable;
+ value->setFlags(flags);
+}
+
+static void setSizeItems(QStandardItem *text_qsi, DynamicElementTextItem *deti)
+{
+ const QRectF box = deti->boundingRect();
+ setSizeItem(text_qsi->child(width_txt_row, 1), text_qsi->child(width_fix_row, 1),
+ deti->textWidth(), box.width());
+ setSizeItem(text_qsi->child(height_txt_row, 1), text_qsi->child(height_fix_row, 1),
+ deti->textHeight(), box.height());
+}
+
/**
@brief DynamicElementTextModel::indexIsInGroup
@param index
@@ -281,20 +317,45 @@ QList DynamicElementTextModel::itemsForText(
qsi_list << frame << frame_a;
qsi->appendRow(qsi_list);
- //Width
- QStandardItem *width = new QStandardItem(tr("Width"));
- width->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
-
- QStandardItem *width_a = new QStandardItem;
- width_a->setData(deti->textWidth(), Qt::EditRole);
- width_a->setData(DynamicElementTextModel::textWidth, Qt::UserRole+1);
- width_a->setFlags(Qt::ItemIsSelectable
- | Qt::ItemIsEnabled
- | Qt::ItemIsEditable);
-
- qsi_list.clear();
- qsi_list << width << width_a;
- qsi->appendRow(qsi_list);
+ //Width and height, each on two rows: the value, and whether it
+ //is fixed. Not fixed, the field follows the text and the value
+ //only shows the size it has now.
+ const struct {
+ QString name, fixed_name, tip;
+ int value_type, fixed_type;
+ } sizes[] = {
+ {tr("Width"), tr("Width fixed"),
+ tr("Ticked, the text field keeps the width above and the text wraps inside it. Not ticked, it is as wide as the text."),
+ DynamicElementTextModel::textWidth, DynamicElementTextModel::textWidthFixed},
+ {tr("Height"), tr("Height fixed"),
+ tr("Ticked, the text field keeps the height above and the lines that do not fit are cut off. Not ticked, it is as high as the text."),
+ DynamicElementTextModel::textHeight, DynamicElementTextModel::textHeightFixed}
+ };
+ for (const auto &size : sizes)
+ {
+ QStandardItem *name = new QStandardItem(size.name);
+ name->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+ QStandardItem *value = new QStandardItem;
+ value->setData(size.value_type, Qt::UserRole+1);
+ qsi_list.clear();
+ qsi_list << name << value;
+ qsi->appendRow(qsi_list);
+
+ QStandardItem *fixed_name = new QStandardItem(size.fixed_name);
+ fixed_name->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
+ fixed_name->setToolTip(size.tip);
+ QStandardItem *fixed = new QStandardItem;
+ fixed->setCheckable(true);
+ fixed->setToolTip(size.tip);
+ fixed->setData(size.fixed_type, Qt::UserRole+1);
+ fixed->setFlags(Qt::ItemIsSelectable
+ | Qt::ItemIsEnabled
+ | Qt::ItemIsUserCheckable);
+ qsi_list.clear();
+ qsi_list << fixed_name << fixed;
+ qsi->appendRow(qsi_list);
+ }
+ setSizeItems(qsi, deti);
if(deti->parentGroup() == nullptr)
{
@@ -587,13 +648,22 @@ QUndoCommand *DynamicElementTextModel::undoForEditedText(
quc->setText(tr("Modify the frame of an element text"));
}
- qreal text_width = text_qsi->child(width_txt_row, 1)->data(Qt::EditRole).toDouble();
+ qreal text_width = text_qsi->child(width_fix_row, 1)->checkState() == Qt::Checked
+ ? text_qsi->child(width_txt_row, 1)->data(Qt::EditRole).toDouble() : -1;
if(text_width != deti->textWidth())
{
QPropertyUndoCommand *quc = new QPropertyUndoCommand(deti, "textWidth", QVariant(deti->textWidth()), QVariant(text_width), undo);
quc->setAnimated(true, false);
quc->setText(tr("Change the width of an element text"));
}
+
+ qreal text_height = text_qsi->child(height_fix_row, 1)->checkState() == Qt::Checked
+ ? text_qsi->child(height_txt_row, 1)->data(Qt::EditRole).toDouble() : -1;
+ if(text_height != deti->textHeight())
+ {
+ QPropertyUndoCommand *quc = new QPropertyUndoCommand(deti, "textHeight", QVariant(deti->textHeight()), QVariant(text_height), undo);
+ quc->setText(tr("Change the height of an element text"));
+ }
//When text is in a group, they're isn't item for position of the text
if(text_qsi->child(x_txt_row,1) && text_qsi->child(y_txt_row,1))
@@ -1340,6 +1410,18 @@ void DynamicElementTextModel::itemDataChanged(QStandardItem *qsi)
QString text = qsi->data(Qt::DisplayRole).toString();
text_qsi->setData(text, Qt::DisplayRole);
}
+ else if (qsi->data().toInt() == textWidthFixed || qsi->data().toInt() == textHeightFixed)
+ {
+ //The value can be edited as soon as it is fixed
+ const int row = qsi->data().toInt() == textWidthFixed ? width_txt_row : height_txt_row;
+ if (QStandardItem *value = text_qsi->child(row, 1)) {
+ Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
+ if (qsi->checkState() == Qt::Checked)
+ flags |= Qt::ItemIsEditable;
+ if (value->flags() != flags)
+ value->setFlags(flags);
+ }
+ }
else if (qsi->data().toInt() == infoText && deti->elementUseForInfo())
{
QString info = qsi->data(Qt::UserRole+2).toString();
@@ -1388,6 +1470,7 @@ void DynamicElementTextModel::setConnection(DynamicElementTextItem *deti, bool s
connection_list << connect(deti, &DynamicElementTextItem::frameChanged, [deti,this](){this->updateDataFromText(deti, frame);});
connection_list << connect(deti, &DynamicElementTextItem::rotationChanged, [deti,this](){this->updateDataFromText(deti, rotation);});
connection_list << connect(deti, &DynamicElementTextItem::textWidthChanged,[deti,this](){this->updateDataFromText(deti, textWidth);});
+ connection_list << connect(deti, &DynamicElementTextItem::textHeightChanged,[deti,this](){this->updateDataFromText(deti, textHeight);});
connection_list << connect(deti, &DynamicElementTextItem::compositeTextChanged, [deti, this]() {this->updateDataFromText(deti, compositeText);});
m_hash_text_connect.insert(deti, connection_list);
}
@@ -1525,15 +1608,16 @@ void DynamicElementTextModel::updateDataFromText(DynamicElementTextItem *deti,
break;
}
case textWidth:
+ case textHeight:
{
- qsi->child(width_txt_row,1)->setData(deti->textWidth(), Qt::EditRole);
+ setSizeItems(qsi, deti);
break;
}
default:break;
}
//Rotating or resizing the text moves its anchor point (Position X/Y)
- if ((type == rotation || type == textWidth)
+ if ((type == rotation || type == textWidth || type == textHeight)
&& qsi->child(x_txt_row,1) && qsi->child(y_txt_row,1))
{
qsi->child(x_txt_row,1)->setData(deti->anchorPos().x(), Qt::EditRole);
@@ -1761,10 +1845,12 @@ QWidget *DynamicTextItemDelegate::createEditor(
return sb;
}
case DynamicElementTextModel::textWidth:
+ case DynamicElementTextModel::textHeight:
{
QSpinBox *sb = new QSpinBox(parent);
- sb->setObjectName("width_spinbox");
- sb->setRange(-1, 500);
+ sb->setObjectName(index.data(Qt::UserRole+1).toInt() == DynamicElementTextModel::textWidth
+ ? "width_spinbox" : "height_spinbox");
+ sb->setRange(1, 1000);
sb->setFrame(false);
sb->setSuffix(" px");
return sb;
diff --git a/sources/ui/dynamicelementtextmodel.h b/sources/ui/dynamicelementtextmodel.h
index 013d9318b..02d29a214 100644
--- a/sources/ui/dynamicelementtextmodel.h
+++ b/sources/ui/dynamicelementtextmodel.h
@@ -53,6 +53,9 @@ class DynamicElementTextModel : public QStandardItemModel
rotation,
keepVisualRotation,
textWidth,
+ textWidthFixed,
+ textHeight,
+ textHeightFixed,
grpAlignment,
grpPos,
grpRotation,
diff --git a/tests/qttest/CMakeLists.txt b/tests/qttest/CMakeLists.txt
index 276982b83..cf2eca7e3 100644
--- a/tests/qttest/CMakeLists.txt
+++ b/tests/qttest/CMakeLists.txt
@@ -140,6 +140,15 @@ if(Python3_Interpreter_FOUND AND CMAKE_GENERATOR STREQUAL "Ninja")
--fixture ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/unlinked_contact_label.qet)
set_tests_properties(tst_textoutlineintegration PROPERTIES TIMEOUT 300 RUN_SERIAL TRUE
ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
+ # Width and height of a symbol's text, each fixed or not: a fixed
+ # height cuts off the lines that do not fit; saved and undone.
+ add_test(NAME tst_textfixedsizeintegration
+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_text_fixed_size_probe.py
+ --build ${CMAKE_BINARY_DIR} --binary $
+ --source ${CMAKE_CURRENT_SOURCE_DIR}/text_fixed_size_probe.cpp
+ --fixture ${CMAKE_CURRENT_SOURCE_DIR}/fixtures/unlinked_contact_label.qet)
+ set_tests_properties(tst_textfixedsizeintegration PROPERTIES TIMEOUT 300 RUN_SERIAL TRUE
+ ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
endif()
if(Python3_Interpreter_FOUND AND CMAKE_GENERATOR STREQUAL "Ninja")
add_test(NAME tst_darkimageintegration
diff --git a/tests/qttest/run_text_fixed_size_probe.py b/tests/qttest/run_text_fixed_size_probe.py
new file mode 100755
index 000000000..adf498ee1
--- /dev/null
+++ b/tests/qttest/run_text_fixed_size_probe.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python3
+"""Link the text fixed size integration probe using an existing Ninja app build.
+
+Reuses app objects without duplicating the app or introducing a core-library
+refactor. No application source or existing executable is replaced. The
+generated manifest, probe binary, reports and export fixtures stay in build/.
+"""
+import argparse
+import pathlib
+import re
+import shutil
+import subprocess
+import sys
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--build', required=True)
+parser.add_argument('--binary', required=True)
+parser.add_argument('--source', required=True)
+parser.add_argument('--fixture', required=True)
+args = parser.parse_args()
+build = pathlib.Path(args.build).resolve()
+binary = pathlib.Path(args.binary).resolve()
+source = pathlib.Path(args.source).resolve()
+fixture = pathlib.Path(args.fixture).resolve()
+manifest = (build / 'build.ninja').read_text(encoding='utf-8')
+match = re.search(r'^build (\S*?/sources/main\.cpp\.(?:obj|o)):', manifest, re.MULTILINE)
+if not match:
+ sys.exit('Cannot find the application main object in the Ninja build.')
+main_object = match.group(1)
+probe_object = main_object.replace('main.cpp.', 'text_fixed_size_probe.cpp.')
+probe_binary = binary.with_name('text_fixed_size_probe' + binary.suffix)
+def escape(path):
+ return pathlib.Path(path).as_posix().replace('$', '$$').replace(':', '$:').replace(' ', '$ ')
+main_source = source.parents[2] / 'sources' / 'main.cpp'
+manifest = manifest.replace(main_object, probe_object)
+manifest = manifest.replace(escape(main_source), escape(source))
+if binary.suffix:
+ manifest = manifest.replace(binary.name, probe_binary.name)
+else:
+ old_target = escape(binary.name if binary.parent == build else binary)
+ new_target = escape(probe_binary.name if probe_binary.parent == build else probe_binary)
+ manifest = manifest.replace('build ' + old_target + ':', 'build ' + new_target + ':')
+ old_file = binary.name if binary.parent == build else binary.as_posix()
+ new_file = probe_binary.name if probe_binary.parent == build else probe_binary.as_posix()
+ manifest = re.sub(r'^ TARGET_FILE = ' + re.escape(old_file) + r'$',
+ ' TARGET_FILE = ' + new_file, manifest, flags=re.MULTILINE)
+probe_manifest = build / 'text-fixed-size-probe.ninja'
+probe_manifest.write_text(manifest, encoding='utf-8')
+ninja = shutil.which('ninja')
+if not ninja:
+ sys.exit('Ninja is required for the integration probe.')
+target = probe_binary.name if probe_binary.parent == build else str(probe_binary)
+subprocess.run([ninja, '-C', str(build), '-f', probe_manifest.name, target], check=True)
+output = build / 'text-fixed-size'
+output.mkdir(exist_ok=True)
+report = output / 'results.txt'
+result = subprocess.run([str(probe_binary), str(fixture), str(report), str(output)], timeout=90)
+if report.exists():
+ print(report.read_text(encoding='utf-8', errors='replace'))
+sys.exit(result.returncode)
diff --git a/tests/qttest/text_fixed_size_probe.cpp b/tests/qttest/text_fixed_size_probe.cpp
new file mode 100644
index 000000000..f3e370896
--- /dev/null
+++ b/tests/qttest/text_fixed_size_probe.cpp
@@ -0,0 +1,137 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Width and height of a symbol's text, each fixed or not, linked against
+// the application's objects.
+//
+// In the text's properties, width and height each take two rows: the
+// value, and "fixed" with a tick box. Not fixed, the field follows the
+// text, and the value shows the size it has now and cannot be edited;
+// fixed, the field keeps the value, which can then be edited. A fixed
+// height cuts off the lines that do not fit, to shorten a text where
+// room is short: they are neither drawn nor picked. Both are saved with
+// the text and undone as any other change.
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "../../sources/diagram.h"
+#include "../../sources/qetproject.h"
+#include "../../sources/qetmessagebox.h"
+#include "../../sources/qetgraphicsitem/element.h"
+#include "../../sources/qetgraphicsitem/dynamicelementtextitem.h"
+#include "../../sources/ui/dynamicelementtextmodel.h"
+
+static void check(bool value, const char *message)
+{
+ if (!value) throw std::runtime_error(message);
+ std::printf("ok: %s\n", message);
+}
+
+/// The value cell of a text's row with the given type
+static QStandardItem *cell(DynamicElementTextModel &model, DynamicElementTextItem *text, int type)
+{
+ QStandardItem *row = model.itemFromIndex(model.indexFromText(text));
+ for (int r = 0; r < row->rowCount(); ++r)
+ if (QStandardItem *c = row->child(r, 1))
+ if (c->data(Qt::UserRole + 1).toInt() == type) return c;
+ throw std::runtime_error("row missing");
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ std::freopen(argv[2], "w", stdout);
+
+ QTemporaryDir settings;
+ QSettings::setDefaultFormat(QSettings::IniFormat);
+ QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, settings.path());
+ QCoreApplication::setOrganizationName("QETTextFixedSizeRegression");
+ QETProject::setBackupEnabled(false);
+ QET::QetMessageBox::setNonInteractive(true);
+ QFontDatabase::addApplicationFont(":/fonts/LiberationSans-Regular.ttf");
+
+ try
+ {
+ QETProject project(QString::fromLocal8Bit(argv[1]));
+ check(project.state() == QETProject::Ok, "fixture opens");
+ project.buildFolios(project.diagrams());
+ Diagram *scene = project.diagrams().first();
+
+ DynamicElementTextItem *text = nullptr;
+ Element *element = nullptr;
+ for (Element *e : scene->elements())
+ for (DynamicElementTextItem *t : e->dynamicTextItems())
+ if (!text) { text = t; element = e; }
+ check(text, "the fixture has a symbol with a text");
+ text->setTextFrom(DynamicElementTextItem::UserText);
+ text->setText(QStringLiteral("Sockets bathroom first floor, 5"));
+ text->setTextWidth(-1);
+ text->setTextHeight(-1);
+
+ // The properties: not fixed, the size the field has now, read only.
+ DynamicElementTextModel model(element);
+ QStandardItem *width = cell(model, text, DynamicElementTextModel::textWidth);
+ QStandardItem *width_fixed = cell(model, text, DynamicElementTextModel::textWidthFixed);
+ QStandardItem *height = cell(model, text, DynamicElementTextModel::textHeight);
+ QStandardItem *height_fixed = cell(model, text, DynamicElementTextModel::textHeightFixed);
+ check(width_fixed->isCheckable() && width_fixed->checkState() == Qt::Unchecked, "width not fixed: not ticked");
+ check(height_fixed->isCheckable() && height_fixed->checkState() == Qt::Unchecked, "height not fixed: not ticked");
+ check(!width->isCheckable() && !height->isCheckable(), "the values are rows of their own, without a tick box");
+ check(qAbs(width->data(Qt::EditRole).toDouble() - text->boundingRect().width()) <= 1,
+ "the width shows the size the field has now");
+ check(!(width->flags() & Qt::ItemIsEditable) && !(height->flags() & Qt::ItemIsEditable),
+ "and cannot be edited while not fixed");
+
+ // Fix the width: the value can be edited at once; at 50 the text wraps.
+ const qreal one_line = text->boundingRect().height();
+ width_fixed->setCheckState(Qt::Checked);
+ check(width->flags() & Qt::ItemIsEditable, "ticking fixed makes the width editable at once");
+ width->setData(50, Qt::EditRole);
+ scene->undoStack().push(model.undoForEditedText(text));
+ check(qFuzzyCompare(text->textWidth(), 50), "fixed, the width is the value above");
+ const qreal wrapped = text->boundingRect().height();
+ check(wrapped > one_line * 2, "the text wraps inside it");
+
+ // Fix the height at one line: the other lines are cut off.
+ height_fixed->setCheckState(Qt::Checked);
+ height->setData(qRound(one_line), Qt::EditRole);
+ scene->undoStack().push(model.undoForEditedText(text));
+ check(qFuzzyCompare(text->textHeight(), qRound(one_line)), "fixed, the height is the value above");
+ check(qAbs(text->boundingRect().height() - qRound(one_line)) < 0.01, "the field keeps that height");
+ const QPointF below(text->boundingRect().center().x(), wrapped - 2);
+ check(!text->contains(below) && !text->shape().contains(below), "the lines cut off are not picked");
+
+ // Kept in the file.
+ QDomDocument doc;
+ const QDomElement xml = text->toXml(doc);
+ check(xml.attribute("text_height").toDouble() == qRound(one_line), "the height is saved with the text");
+ text->setTextHeight(-1);
+ QDomElement copy = xml;
+ text->fromXml(copy);
+ check(qFuzzyCompare(text->textHeight(), qRound(one_line)), "and read back");
+
+ // Undo, untick.
+ scene->undoStack().undo();
+ check(text->textHeight() < 0 && qAbs(text->boundingRect().height() - wrapped) < 0.01,
+ "undo gives the text its full height back");
+ check(cell(model, text, DynamicElementTextModel::textHeightFixed)->checkState() == Qt::Unchecked
+ && !(cell(model, text, DynamicElementTextModel::textHeight)->flags() & Qt::ItemIsEditable),
+ "and the properties show it not fixed");
+ width_fixed->setCheckState(Qt::Unchecked);
+ scene->undoStack().push(model.undoForEditedText(text));
+ check(text->textWidth() < 0, "not ticked, the width follows the text again");
+ check(!text->toXml(doc).hasAttribute("text_height"), "a height that follows the text is not written");
+ std::puts("PASS");
+ }
+ catch (const std::exception &error)
+ {
+ std::printf("FAIL: %s\n", error.what());
+ std::fflush(stdout);
+ return 1;
+ }
+ std::fflush(stdout);
+ return 0;
+}