Symbol texts: width and height, each fixed or not

In a symbol text's properties, "Width (fixed)" and the new "Height
(fixed)" each carry a tick box. Not ticked, the field follows the text
and shows the size it has now, ready to be fixed; ticked, it keeps the
size beside the box.

A fixed height is new: the field keeps it whatever is written, and the
lines that do not fit are cut off, neither drawn nor picked, to shorten
a text where room is short. It is saved as text_height on the text,
only when set, and changed through an undoable property command like
the width. Translations for all languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DaTweety
2026-10-19 13:54:19 +02:00
parent 2f4af977b7
commit 255def181c
42 changed files with 1222 additions and 15 deletions
+25
View File
@@ -3974,6 +3974,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>العرض (ثابت)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>الارتفاع (ثابت)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>عند التحديد يحتفظ حقل النص بهذا العرض ويلتف النص داخله. بدون تحديد يكون بعرض النص.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>عند التحديد يحتفظ حقل النص بهذا الارتفاع وتُقص الأسطر التي لا تتسع. بدون تحديد يكون بارتفاع النص.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>تغيير ارتفاع نص العنصر</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3895,6 +3895,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Amplada (fixa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Alçada (fixa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Marcat, el camp de text manté aquesta amplada i el text s&apos;ajusta a dins. Sense marcar, és tan ample com el text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Marcat, el camp de text manté aquesta alçada i les línies que no hi caben es tallen. Sense marcar, és tan alt com el text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Canviar l&apos;alçada d&apos;un text d&apos;element</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3921,6 +3921,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Šířka (pevná)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Výška (pevná)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Zaškrtnuto: textové pole si drží tuto šířku a text se v něm zalamuje. Nezaškrtnuto: je široké jako text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Zaškrtnuto: textové pole si drží tuto výšku a řádky, které se nevejdou, se oříznou. Nezaškrtnuto: je vysoké jako text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Změnit výšku textu prvku</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3875,6 +3875,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Bredde (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Højde (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Markeret beholder tekstfeltet denne bredde, og teksten ombrydes i det. Ikke markeret er det lige så bredt som teksten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Markeret beholder tekstfeltet denne højde, og linjer der ikke er plads til, skæres af. Ikke markeret er det lige så højt som teksten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Ændr højden på en elementtekst</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3897,6 +3897,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Breite (fixiert)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Höhe (fixiert)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Angehakt behält das Textfeld diese Breite, der Text bricht darin um. Nicht angehakt ist es so breit wie der Text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Angehakt behält das Textfeld diese Höhe, Zeilen, die nicht hineinpassen, werden abgeschnitten. Nicht angehakt ist es so hoch wie der Text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Höhe eines Elementtextes ändern</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3894,6 +3894,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Πλάτος (σταθερό)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Ύψος (σταθερό)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Επιλεγμένο: το πεδίο κειμένου κρατά αυτό το πλάτος και το κείμενο αναδιπλώνεται μέσα του. Μη επιλεγμένο: είναι όσο φαρδύ είναι το κείμενο.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Επιλεγμένο: το πεδίο κειμένου κρατά αυτό το ύψος και οι γραμμές που δεν χωρούν αποκόπτονται. Μη επιλεγμένο: είναι όσο ψηλό είναι το κείμενο.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Αλλαγή ύψους κειμένου στοιχείου</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3894,6 +3894,31 @@ Hold Shift and drag to move this text on its own</translation>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Width (fixed)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Height (fixed)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Change the height of an element text</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3897,6 +3897,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Ancho (fijo)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Alto (fijo)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Marcado, el campo de texto mantiene este ancho y el texto se ajusta dentro. Sin marcar, es tan ancho como el texto.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Marcado, el campo de texto mantiene este alto y las líneas que no caben se cortan. Sin marcar, es tan alto como el texto.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Cambiar el alto de un texto de elemento</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3870,6 +3870,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Leveys (kiinteä)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Korkeus (kiinteä)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Valittuna tekstikenttä pitää tämän leveyden ja teksti rivittyy sen sisään. Valitsematta se on tekstin levyinen.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Valittuna tekstikenttä pitää tämän korkeuden ja rivit, jotka eivät mahdu, katkaistaan. Valitsematta se on tekstin korkuinen.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Muuta elementtitekstin korkeutta</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3895,6 +3895,31 @@ Maintenir Maj et faire glisser pour déplacer ce texte seul</translation>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Largeur (fixe)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Hauteur (fixe)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Cochée, le champ de texte garde cette largeur et le texte y passe à la ligne. Non cochée, il est aussi large que le texte.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Cochée, le champ de texte garde cette hauteur et les lignes qui ne tiennent pas sont coupées. Non cochée, il est aussi haut que le texte.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Modifier la hauteur d&apos;un texte d&apos;élément</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3895,6 +3895,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Širina (fiksna)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Visina (fiksna)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Označeno: tekstno polje zadržava ovu širinu i tekst se u njemu prelama. Neoznačeno: široko je koliko i tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Označeno: tekstno polje zadržava ovu visinu, a redci koji ne stanu se odrežu. Neoznačeno: visoko je koliko i tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Promijeni visinu teksta elementa</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3874,6 +3874,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Szélesség (rögzített)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Magasság (rögzített)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Bejelölve a szövegmező megtartja ezt a szélességet, és a szöveg benne tördelődik. Bejelöletlenül olyan széles, mint a szöveg.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Bejelölve a szövegmező megtartja ezt a magasságot, és a bele nem férő sorok levágódnak. Bejelöletlenül olyan magas, mint a szöveg.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Elemszöveg magasságának módosítása</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3894,6 +3894,31 @@ Tieni premuto Maiusc e trascina per spostare solo questo testo</translation>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Larghezza (fissa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Altezza (fissa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Spuntato, il campo di testo mantiene questa larghezza e il testo va a capo al suo interno. Non spuntato, è largo quanto il testo.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Spuntato, il campo di testo mantiene questa altezza e le righe che non entrano vengono tagliate. Non spuntato, è alto quanto il testo.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Modifica l&apos;altezza di un testo dell&apos;elemento</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="269"/>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="824"/>
+25
View File
@@ -3866,6 +3866,31 @@ Shift を押しながらドラッグすると、このテキストだけを移
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>幅(固定)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>高さ(固定)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>チェックするとテキスト欄はこの幅を保ち、テキストはその中で折り返します。チェックしないとテキストの幅になります。</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>チェックするとテキスト欄はこの高さを保ち、収まらない行は切り捨てられます。チェックしないとテキストの高さになります。</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>要素テキストの高さを変更</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3866,6 +3866,31 @@ Shift를 누른 채 끌면 이 텍스트만 이동합니다</translation>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>너비 (고정)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>높이 (고정)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>선택하면 텍스트 필드가 이 너비를 유지하고 텍스트가 그 안에서 줄 바꿈됩니다. 선택하지 않으면 텍스트 너비와 같습니다.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>선택하면 텍스트 필드가 이 높이를 유지하고 들어가지 않는 줄은 잘립니다. 선택하지 않으면 텍스트 높이와 같습니다.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>요소 텍스트의 높이 변경</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3877,6 +3877,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Өргөн (тогтмол)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Өндөр (тогтмол)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Тэмдэглэсэн үед текстийн талбар энэ өргөнийг хадгалж, текст дотор нь шилжинэ. Тэмдэглээгүй үед текстийн өргөнтэй тэнцүү.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Тэмдэглэсэн үед текстийн талбар энэ өндрийг хадгалж, багтахгүй мөрүүд таслагдана. Тэмдэглээгүй үед текстийн өндөртэй тэнцүү.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Элементийн текстийн өндрийг өөрчлөх</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3878,6 +3878,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Bredde (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Høyde (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Avkrysset beholder tekstfeltet denne bredden, og teksten brytes inni det. Ikke avkrysset er det like bredt som teksten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Avkrysset beholder tekstfeltet denne høyden, og linjer som ikke får plass, kuttes. Ikke avkrysset er det like høyt som teksten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Endre høyden på en elementtekst</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3875,6 +3875,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Breedte (vast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Hoogte (vast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Aangevinkt houdt het tekstveld deze breedte en loopt de tekst erin door. Niet aangevinkt is het zo breed als de tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Aangevinkt houdt het tekstveld deze hoogte en worden regels die niet passen afgesneden. Niet aangevinkt is het zo hoog als de tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>De hoogte van een elementtekst wijzigen</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3895,6 +3895,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Breedte (vast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Hoogte (vast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Aangevinkt houdt het tekstveld deze breedte en loopt de tekst erin door. Niet aangevinkt is het zo breed als de tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Aangevinkt houdt het tekstveld deze hoogte en worden regels die niet passen afgesneden. Niet aangevinkt is het zo hoog als de tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>De hoogte van een elementtekst wijzigen</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -2697,6 +2697,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Breedte (vast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Hoogte (vast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Aangevinkt houdt het tekstveld deze breedte en loopt de tekst erin door. Niet aangevinkt is het zo breed als de tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Aangevinkt houdt het tekstveld deze hoogte en worden regels die niet passen afgesneden. Niet aangevinkt is het zo hoog als de tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>De hoogte van een elementtekst wijzigen</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3870,6 +3870,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Bredde (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Høyde (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Avkrysset beholder tekstfeltet denne bredden, og teksten brytes inni det. Ikke avkrysset er det like bredt som teksten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Avkrysset beholder tekstfeltet denne høyden, og linjer som ikke får plass, kuttes. Ikke avkrysset er det like høyt som teksten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Endre høyden på en elementtekst</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3935,6 +3935,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Szerokość (stała)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Wysokość (stała)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Zaznaczone: pole tekstowe zachowuje tę szerokość, a tekst jest w nim zawijany. Niezaznaczone: jest tak szerokie jak tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Zaznaczone: pole tekstowe zachowuje tę wysokość, a wiersze, które się nie mieszczą, są obcinane. Niezaznaczone: jest tak wysokie jak tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Zmień wysokość tekstu elementu</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3896,6 +3896,31 @@ Mantenha Shift premido e arraste para mover este texto sozinho</translation>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Largura (fixa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Altura (fixa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Marcado, o campo de texto mantém esta largura e o texto quebra dentro dele. Desmarcado, é tão largo como o texto.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Marcado, o campo de texto mantém esta altura e as linhas que não cabem são cortadas. Desmarcado, é tão alto como o texto.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Alterar a altura de um texto de elemento</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3895,6 +3895,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Largura (fixa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Altura (fixa)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Marcado, o campo de texto mantém esta largura e o texto quebra dentro dele. Desmarcado, é tão largo quanto o texto.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Marcado, o campo de texto mantém esta altura e as linhas que não cabem são cortadas. Desmarcado, é tão alto quanto o texto.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Alterar a altura de um texto de elemento</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3894,6 +3894,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Lățime (fixă)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Înălțime (fixă)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Bifat, câmpul de text păstrează această lățime și textul se încadrează în el. Nebifat, este cât textul de lat.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Bifat, câmpul de text păstrează această înălțime și rândurile care nu încap sunt tăiate. Nebifat, este cât textul de înalt.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Modifică înălțimea unui text de element</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3894,6 +3894,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Širina (fiksna)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Visina (fiksna)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Označeno: tekstualno polje zadržava ovu širinu i tekst se u njemu prelama. Neoznačeno: široko je koliko i tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Označeno: tekstualno polje zadržava ovu visinu, a redovi koji ne stanu se odsecaju. Neoznačeno: visoko je koliko i tekst.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Promeni visinu teksta elementa</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3932,6 +3932,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Ширина (фиксированная)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Высота (фиксированная)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Если отмечено, текстовое поле сохраняет эту ширину, и текст переносится внутри него. Если не отмечено, поле по ширине текста.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Если отмечено, текстовое поле сохраняет эту высоту, а не поместившиеся строки обрезаются. Если не отмечено, поле по высоте текста.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Изменить высоту текста элемента</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3912,6 +3912,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Šírka (pevná)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Výška (pevná)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Začiarknuté: textové pole si drží túto šírku a text sa v ňom zalamuje. Nezačiarknuté: je široké ako text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Začiarknuté: textové pole si drží túto výšku a riadky, ktoré sa nezmestia, sa orežú. Nezačiarknuté: je vysoké ako text.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Zmeniť výšku textu prvku</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3918,6 +3918,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Širina (fiksna)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Višina (fiksna)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Označeno: besedilno polje ohrani to širino in besedilo se v njem prelamlja. Neoznačeno: je široko kot besedilo.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Označeno: besedilno polje ohrani to višino, vrstice, ki ne gredo vanj, se odrežejo. Neoznačeno: je visoko kot besedilo.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Spremeni višino besedila elementa</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3894,6 +3894,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Ширина (фиксна)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Висина (фиксна)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Означено: текстуално поље задржава ову ширину и текст се у њему прелама. Неозначено: широко је колико и текст.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Означено: текстуално поље задржава ову висину, а редови који не стану се одсецају. Неозначено: високо је колико и текст.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Промени висину текста елемента</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3875,6 +3875,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Bredd (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Höjd (fast)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Markerat behåller textfältet denna bredd och texten radbryts i det. Omarkerat är det lika brett som texten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Markerat behåller textfältet denna höjd och rader som inte får plats skärs av. Omarkerat är det lika högt som texten.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Ändra höjden på en elementtext</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3874,6 +3874,31 @@ Bu metni tek başına taşımak için Shift tuşunu basılı tutup sürükleyin<
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Genişlik (sabit)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Yükseklik (sabit)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>İşaretliyse metin alanı bu genişliği korur ve metin içinde kaydırılır. İşaretli değilse metin kadar geniştir.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>İşaretliyse metin alanı bu yüksekliği korur ve sığmayan satırlar kesilir. İşaretli değilse metin kadar yüksektir.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Bir öğe metninin yüksekliğini değiştir</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3922,6 +3922,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>Ширина (фіксована)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>Висота (фіксована)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>Якщо позначено, текстове поле зберігає цю ширину, і текст переноситься всередині. Якщо ні, поле за шириною тексту.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>Якщо позначено, текстове поле зберігає цю висоту, а рядки, що не вміщуються, обрізаються. Якщо ні, поле за висотою тексту.</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>Змінити висоту тексту елемента</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3865,6 +3865,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>宽度(固定)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>高度(固定)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>勾选后文本框保持此宽度,文本在其中换行。不勾选时与文本同宽。</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>勾选后文本框保持此高度,放不下的行被截断。不勾选时与文本同高。</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>更改元件文本的高度</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
+25
View File
@@ -3865,6 +3865,31 @@ Hold Shift and drag to move this text on its own</source>
</context>
<context>
<name>DynamicElementTextModel</name>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="309"/>
<source>Width (fixed)</source>
<translation>寬度(固定)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="325"/>
<source>Height (fixed)</source>
<translation>高度(固定)</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="311"/>
<source>Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text.</source>
<translation>勾選後文字框保持此寬度,文字在其中換行。不勾選時與文字同寬。</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="327"/>
<source>Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text.</source>
<translation>勾選後文字框保持此高度,放不下的行會被截斷。不勾選時與文字同高。</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="649"/>
<source>Change the height of an element text</source>
<translation>變更元件文字的高度</translation>
</message>
<message>
<location filename="../sources/ui/dynamicelementtextmodel.cpp" line="70"/>
<source>Property</source>
@@ -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
@@ -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;
+72 -14
View File
@@ -48,11 +48,12 @@ 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 height_txt_row = 9;
static int x_txt_row = 10;
static int y_txt_row = 11;
static int rot_txt_row = 12;
static int keep_rot_row = 13;
static int align_txt_row = 14;
static int align_grp_row = 0;
static int x_grp_row = 1;
@@ -96,6 +97,27 @@ DynamicElementTextModel::~DynamicElementTextModel()
setConnection(group, false);
}
/**
@brief setSizeItems
Show the width and the height of @a deti: ticked with the size set
when it is fixed, not ticked with the size the field has now when it
follows the text, so that ticking it fixes what one sees.
*/
static void setSizeItems(QStandardItem *width, QStandardItem *height, DynamicElementTextItem *deti)
{
const QRectF box = deti->boundingRect();
if (width) {
const bool fixed = deti->textWidth() > 0;
width->setCheckState(fixed ? Qt::Checked : Qt::Unchecked);
width->setData(qRound(fixed ? deti->textWidth() : box.width()), Qt::EditRole);
}
if (height) {
const bool fixed = deti->textHeight() > 0;
height->setCheckState(fixed ? Qt::Checked : Qt::Unchecked);
height->setData(qRound(fixed ? deti->textHeight() : box.height()), Qt::EditRole);
}
}
/**
@brief DynamicElementTextModel::indexIsInGroup
@param index
@@ -281,20 +303,41 @@ QList<QStandardItem *> DynamicElementTextModel::itemsForText(
qsi_list << frame << frame_a;
qsi->appendRow(qsi_list);
//Width
QStandardItem *width = new QStandardItem(tr("Width"));
//Width and height: ticked, the field keeps the size given beside
//it; not ticked, it follows the text, and the size shown is the
//one it has now, ready to be fixed
QStandardItem *width = new QStandardItem(tr("Width (fixed)"));
width->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
width->setToolTip(tr("Ticked, the text field keeps this width and the text wraps inside it. Not ticked, it is as wide as the text."));
QStandardItem *width_a = new QStandardItem;
width_a->setData(deti->textWidth(), Qt::EditRole);
width_a->setCheckable(true);
width_a->setData(DynamicElementTextModel::textWidth, Qt::UserRole+1);
width_a->setFlags(Qt::ItemIsSelectable
| Qt::ItemIsEnabled
| Qt::ItemIsEditable);
| Qt::ItemIsEditable
| Qt::ItemIsUserCheckable);
qsi_list.clear();
qsi_list << width << width_a;
qsi->appendRow(qsi_list);
QStandardItem *height = new QStandardItem(tr("Height (fixed)"));
height->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
height->setToolTip(tr("Ticked, the text field keeps this height and the lines that do not fit are cut off. Not ticked, it is as high as the text."));
QStandardItem *height_a = new QStandardItem;
height_a->setCheckable(true);
height_a->setData(DynamicElementTextModel::textHeight, Qt::UserRole+1);
height_a->setFlags(Qt::ItemIsSelectable
| Qt::ItemIsEnabled
| Qt::ItemIsEditable
| Qt::ItemIsUserCheckable);
qsi_list.clear();
qsi_list << height << height_a;
qsi->appendRow(qsi_list);
setSizeItems(width_a, height_a, deti);
if(deti->parentGroup() == nullptr)
{
@@ -587,13 +630,24 @@ 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();
QStandardItem *width_item = text_qsi->child(width_txt_row, 1);
qreal text_width = width_item->checkState() == Qt::Checked
? width_item->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"));
}
QStandardItem *height_item = text_qsi->child(height_txt_row, 1);
qreal text_height = height_item->checkState() == Qt::Checked
? height_item->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))
@@ -1388,6 +1442,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 +1580,16 @@ void DynamicElementTextModel::updateDataFromText(DynamicElementTextItem *deti,
break;
}
case textWidth:
case textHeight:
{
qsi->child(width_txt_row,1)->setData(deti->textWidth(), Qt::EditRole);
setSizeItems(qsi->child(width_txt_row,1), qsi->child(height_txt_row,1), 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 +1817,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;
+1
View File
@@ -53,6 +53,7 @@ class DynamicElementTextModel : public QStandardItemModel
rotation,
keepVisualRotation,
textWidth,
textHeight,
grpAlignment,
grpPos,
grpRotation,
+9
View File
@@ -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 $<TARGET_FILE:qelectrotech>
--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
+60
View File
@@ -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)
+129
View File
@@ -0,0 +1,129 @@
// 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 (fixed)" and "Height (fixed)" each
// carry a tick box. Not ticked, the field follows the text and shows the
// size it has now; ticked, it keeps the size beside the box. 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 <QApplication>
#include <QDomDocument>
#include <QFontDatabase>
#include <QSettings>
#include <QTemporaryDir>
#include <cstdio>
#include <stdexcept>
#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 ticked, the size the field has now.
DynamicElementTextModel model(element);
QStandardItem *width = cell(model, text, DynamicElementTextModel::textWidth);
QStandardItem *height = cell(model, text, DynamicElementTextModel::textHeight);
check(width->isCheckable() && width->checkState() == Qt::Unchecked, "width not fixed: not ticked");
check(height->isCheckable() && height->checkState() == Qt::Unchecked, "height not fixed: not ticked");
check(qAbs(width->data(Qt::EditRole).toDouble() - text->boundingRect().width()) <= 1,
"it shows the width the field has now");
// Fix the width at 50: the text wraps onto more lines.
const qreal one_line = text->boundingRect().height();
width->setData(50, Qt::EditRole);
width->setCheckState(Qt::Checked);
scene->undoStack().push(model.undoForEditedText(text));
check(qFuzzyCompare(text->textWidth(), 50), "ticked, the width is fixed at the value beside it");
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->setData(qRound(one_line), Qt::EditRole);
height->setCheckState(Qt::Checked);
scene->undoStack().push(model.undoForEditedText(text));
check(qFuzzyCompare(text->textHeight(), qRound(one_line)), "ticked, the height is fixed");
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::textHeight)->checkState() == Qt::Unchecked,
"and the properties show it not fixed");
width->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;
}