Topic: How to debug QElectrotech source code

I want to debug the QElectrotech source code.I downloaded the QT5.15.2 version in windows, how do I get started?

Re: How to debug QElectrotech source code

https://doc.qt.io/qtcreator/creator-debug-mode.html

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

https://qelectrotech.org/wiki_new/winstatic/winstatic

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

Hello, I need to change the name of the component in the QElectrotech collection to Chinese, what should I do, can you please tell me in detail?

Re: How to debug QElectrotech source code

Hello,

see this topic:
https://qelectrotech.org/forum/viewtopi … 027#p16027

Download:
https://download.qelectrotech.org/qet/b … translate/

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

In elements directory
in each folder you have a qet_directory file open it with a good text editor:
its purpose is to contain the translation of the  directory name  according to the language chosen by the user

example

qet/elements/10_electric/10_allpole$ cat qet_directory
<qet-directory>
    <names>
        <name lang="pl">Schematy wieloliniowe</name>
        <name lang="pt_br">Multifilar</name>
        <name lang="cs">Vícežilový</name>
        <name lang="it">Multifilare</name>
        <name lang="el">Πολυγραμμικό</name>
        <name lang="fr">Multifilaire</name>
        <name lang="de">Allpolig</name>
        <name lang="en">All-pole</name>
        <name lang="nl">Veel polig</name>
        <name lang="ru">Многополюсные</name>
        <name lang="da">Flere ledere</name>
        <name lang="es">Multifilar</name>
        <name lang="ja">複線</name>
        <name lang="hu">Többvonalas szimbólumok</name>
    </names>
</qet-directory>

For elmt element is the same, example with a coil it contain translation tag and after the XML for draw this element and some tag use by QET program

qet/elements/10_electric/10_allpole/310_relays_contactors_contacts/01_coils$ cat bobine_tempo_travail.elmt
<definition type="element" link_type="master" hotspot_x="20" hotspot_y="29" version="0.5" width="40" height="60">
<uuid uuid="{14D69713-ADDE-4ACD-8654-50E3E60B61F7}"/><names>
        <name lang="be">Spoel met inschakel vertraging</name>
        <name lang="en">Coil with on delay</name>
        <name lang="hu">Tekercs be késleltetéssel</name>
        <name lang="fr">Bobine tempo travail</name>
        <name lang="ru">Обмотка</name>
        <name lang="es">Bobina de trabajo temporizado</name>
        <name lang="nl">mechanisch met opkomvertraging</name>
        <name lang="cs">Relé se zpožděným zapnutím</name>
        <name lang="de">Relais ansprechverzögert</name>
        <name lang="it">Bobina di relè ritardato</name>
        <name lang="el">Πηνίο χρονικού, καθυστέρηση ενεργοποίησης</name>
        <name lang="ar">ملف مُؤقت مع تاخير الإستجابة</name>
        <name lang="pl">Cewka przekaźnika działająca ze zwłoką przy wzbudzeniu</name>
    </names>
    <kindInformations>
        <kindInformation name="type" show="1">coil</kindInformation>
    </kindInformations>
    <informations>Author: The QElectroTech team
License: see http://qelectrotech.org/wiki/doc/elements_license</informations>
    <description>
        <rect x="10" y="-8" antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" width="4" height="16"/>
        <rect x="-14" y="-8" antialias="true" style="line-style:normal;line-weight:normal;filling:none;color:black" width="28" height="16"/>
        <line x1="14" end1="none" antialias="true" x2="10" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-8" y2="8"/>
        <line x1="10" end1="none" antialias="true" x2="14" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-8" y2="8"/>
        <line x1="0" end1="none" antialias="false" x2="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-20" y2="-8"/>
        <input x="2" tagg="none" y="19.3333" size="4" rotate="true" text="A2"/>
        <input x="2" tagg="none" y="-16.6667" size="4" rotate="true" text="A1"/>
        <line x1="0" end1="none" antialias="false" x2="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="8" y2="20"/>
        <input x="25" tagg="label" y="3.3333" size="9" text="_"/>
        <terminal x="0" y="-21" orientation="n"/>
        <terminal x="0" y="21" orientation="s"/>
    </description>
</definition>

BTW, you have also other utils, Linux script to help translator here
https://download.qelectrotech.org/qet/scripts/


[07:28:59] laurent@debian:~/Qet-svn/git/qelectrotech-elements$ ./count_elements.sh 
8336 elements dans 1109 categories (soit 9445 fichiers)

https://download.qelectrotech.org/qet/s … lements.sh
Open it and change the lang country, I changer en to fr for FRANCE, make it executable on linux and run it in terminal

#!/bin/bash

lang=${1:-fr}

# detecte les elements sans traduction anglaise
find . -type f -a \( -name "*.elmt" -o -name "qet_directory" \) -print0 | xargs -0 grep -L "<name lang=\"$lang\""
[07:36:19] laurent@debian:~/Qet-svn/git/qelectrotech-elements$ ./detect_non_translated_elements.sh

It's extract a list of file that not contain translation fr tag.

Example here:


[07:35:20] laurent@debian:~/Qet-svn/git/qelectrotech-elements$ cat ./60_energy/21_refrigeration/Climatizacion/clima-vrv/te-vrv.elmt

<definition hotspot_x="24" hotspot_y="14" width="50" type="element" version="0.5" height="50" link_type="simple">
<uuid uuid="{2CA8558B-6381-4658-82A3-1B870D31FA5F}"/><names>
        <name lang="es">Te tuberias VRV</name>
    </names>
    <informations></informations>
    <description>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="7.59375" width="2.24" antialias="false" height="5.04957" x="17.28"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="-10.6299" width="5.88" antialias="false" height="2.10692" x="-19.72"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="8.43534" width="12.8" antialias="false" height="3.36638" x="-16.8"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="-11.1566" width="1.68" antialias="false" height="3.16038" x="2.12"/>
        <polygon x14="-4" y7="26.1088" x4="1.32" y14="7.59375" y3="11.8017" y16="14.3265" antialias="false" x3="17.28" y4="11.8017" x2="17.28" y12="15.1681" x1="-4" style="line-style:normal;line-weight:normal;filling:none;color:black" x16="1.32" x6="8.768" x7="8.768" y5="14.3265" x11="1.32" x5="7.704" y10="16.8513" closed="false" y8="26.1088" x15="1.32" y15="7.59375" x9="6.64" y11="14.3265" y2="8.43534" x8="6.64" x10="6.108" x13="-4" y6="16.0097" y1="8.43534" y13="12.6433" y9="17.6929" x12="1.32"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="7.59375" width="2.8" antialias="false" height="5.04957" x="-19.6"/>
        <polygon x14="-13.84" y7="0.431397" x4="-9.85" y14="-11.1566" y3="-8.52298" y16="-6.94279" antialias="false" x3="2.12" y4="-8.52298" x2="2.12" y12="-6.41606" x1="-13.84" style="line-style:normal;line-weight:normal;filling:none;color:black" x16="-9.85" x6="-4.264" x7="-4.264" y5="-6.94279" x11="-9.85" x5="-5.062" y10="-5.3626" closed="false" y8="0.431397" x15="-9.85" y15="-11.1566" x9="-5.86" y11="-6.94279" y2="-10.6299" x8="-5.86" x10="-6.259" x13="-13.84" y6="-5.88933" y1="-10.6299" y13="-7.99625" y9="-4.83586" x12="-9.85"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="26.1088" width="4.2" antialias="false" height="3.36638" x="5.6"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="-11.1566" width="1.68" antialias="false" height="3.16038" x="-21.4"/>
        <rect style="line-style:normal;line-weight:normal;filling:none;color:black" y="0.431397" width="2.52" antialias="false" height="2.10692" x="-6.28"/>
        <input rotate="true" text="vrv" tagg="label" y="25.5" x="-13" size="3"/>
        <terminal y="30.3168" x="7.7" orientation="s"/>
        <terminal y="-10" x="-20" orientation="w"/>
        <terminal y="10.1185" x="-19.6" orientation="w"/>
        <terminal y="10.1185" x="20.08" orientation="e"/>
        <terminal y="3" x="-5" orientation="s"/>
        <terminal y="-10" x="4" orientation="e"/>
    </description>
</definition>

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

It's a huge job, but to be faster with qet_translate, if you work on this remember to please upload your work to the github https://github.com/qelectrotech/qelectrotech-elements by a Pull request.
If you don't know Github please send me a archive of your elements and qet_directory and I try to merge it to github repository.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

Hello, I carefully read the information in the link you sent me, and downloaded qet_translate-0.0.0.3, looked at the PDF document information inside, it seems that there is no instruction that can be translated into Chinese, I don't know how to use it, can you tell me how to do it?

Re: How to debug QElectrotech source code

I tested the DC relays in the comm_courant_continue.elmt file and changed the DC relays to Chinese > the DC relays of the < name lang="en",</name> which can also be used after compiling with the command indicator. But it seems that it can only modify the English name of the component, not the names Electric, logics, Hydraulic, etc.

Re: How to debug QElectrotech source code

https://www.onlinedoctranslator.com/app … rocess-pdf

Post's attachments

Attachment icon qet_translate.en.zh-CN.pdf 551.67 kb, 93 downloads since 2023-11-21 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

Example for coil element  english translation to chinese is for "Coil with on delay" -> "带导通延迟的线圈"
you need to add this line


<name lang="zh">工作节拍线圈</name>

<definition type="element" link_type="master" hotspot_x="20" hotspot_y="29" version="0.5" width="40" height="60">
<uuid uuid="{14D69713-ADDE-4ACD-8654-50E3E60B61F7}"/><names>
        <name lang="be">Spoel met inschakel vertraging</name>
        <name lang="en">Coil with on delay</name>
        <name lang="hu">Tekercs be késleltetéssel</name>
        <name lang="fr">Bobine tempo travail</name>
        <name lang="ru">Обмотка</name>
        <name lang="es">Bobina de trabajo temporizado</name>
        <name lang="nl">mechanisch met opkomvertraging</name>
        <name lang="cs">Relé se zpožděným zapnutím</name>
        <name lang="de">Relais ansprechverzögert</name>
        <name lang="it">Bobina di relè ritardato</name>
        <name lang="el">Πηνίο χρονικού, καθυστέρηση ενεργοποίησης</name>
        <name lang="ar">ملف مُؤقت مع تاخير الإستجابة</name>
        <name lang="pl">Cewka przekaźnika działająca ze zwłoką przy wzbudzeniu</name>
        <name lang="zh">带导通延迟的线圈</name>
    </names>
    <kindInformations>
        <kindInformation name="type" show="1">coil</kindInformation>
    </kindInformations>
    <informations>Author: The QElectroTech team
License: see http://qelectrotech.org/wiki/doc/elements_license</informations>
    <description>
        <rect x="10" y="-8" antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" width="4" height="16"/>
        <rect x="-14" y="-8" antialias="true" style="line-style:normal;line-weight:normal;filling:none;color:black" width="28" height="16"/>
        <line x1="14" end1="none" antialias="true" x2="10" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-8" y2="8"/>
        <line x1="10" end1="none" antialias="true" x2="14" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-8" y2="8"/>
        <line x1="0" end1="none" antialias="false" x2="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-20" y2="-8"/>
        <input x="2" tagg="none" y="19.3333" size="4" rotate="true" text="A2"/>
        <input x="2" tagg="none" y="-16.6667" size="4" rotate="true" text="A1"/>
        <line x1="0" end1="none" antialias="false" x2="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="8" y2="20"/>
        <input x="25" tagg="label" y="3.3333" size="9" text="_"/>
        <terminal x="0" y="-21" orientation="n"/>
        <terminal x="0" y="21" orientation="s"/>
    </description>
</definition>

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

For element translation you don't ned to compile program.
Copy the collection official to your personal collection by drad and drop by example

Open your coil. elmt with text editor add  <name lang="zh">your chinese translation</name> in the file
like my example, save file.

Now on collection widget right click -> reload collections if your GUI is set to Chinese language in the tree you saw now your coil symbol pixmap named 带导通延迟的线圈

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

Remember to send us your translations, otherwise your work will be of no use and will not follow the developments of the software and will not be visible on other OS like Linux/BSD like macOS, etc.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

I don't know how to upload the link, can I contact you guys when I'm done translating the collection?

Re: How to debug QElectrotech source code

You need to search "howto use github on windows"
Example:
https://www.simplilearn.com/tutorials/g … on-windows

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

I want to translate the names in the framework:"default", "double-logo", etc.
into Chinese, what should I do?

Re: How to debug QElectrotech source code

titleblocks?

https://github.com/qelectrotech/qelectr … block#L437

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

scorpio810 Hello,I would like to ask if QElectrorech will automatically generate a tabular type of terminal block after drawing the circuit diagram in QElectrorech

Re: How to debug QElectrotech source code

Hello,
Yes off course, search terminal block on forum and look us youtu.be channels video.

I' not acces to my setup machines, I only have a smartphone also please sorry me... .

You do search by yourself... On forum search motor on header.
I have major health problems at the moment...

Regards,
Laurent

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: How to debug QElectrotech source code

Well, I know what to do, now that the climate is getting colder, I wish you good health

Re: How to debug QElectrotech source code

I have another question, if I want to add a new component, how should I add it, can I add it directly in the QElectrorech software? Or do you add new components through a .elmt file.
The components are the components used in the internal work of our company.

Re: How to debug QElectrotech source code

Element is only a. elmt file....

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."