mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d509cd468c | ||
|
|
81c06ddadc | ||
|
|
d121c50f5a | ||
|
|
57dc12c148 | ||
|
|
11cc09a637 | ||
|
|
5178de2c15 | ||
|
|
bcab13fdde |
17
ChangeLog
17
ChangeLog
@@ -1,3 +1,20 @@
|
|||||||
|
====== ChangeLog from 0.6 to 0.61 ======
|
||||||
|
|
||||||
|
* Backport HiDPI fix.
|
||||||
|
* Backport commit 5284 : Fix bug N° 157.
|
||||||
|
* Backport commit 5307 : Function for search conductor at the same potential.
|
||||||
|
When the search function is searching in a terminal element, they search only for the first terminal found, no matter if the terminal element have more than two terminals.
|
||||||
|
So the list of conductors at the same potential is missing some conductors.
|
||||||
|
This commit fix it, now the search function search for every terminals of a terminal element
|
||||||
|
* Backport commit 5311, 5312 : elements connections change propertie to terminal, fixed by commit svn 5307
|
||||||
|
* GCC 8.1 fix
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
====== ChangeLog from 0.5 to 0.6 ======
|
====== ChangeLog from 0.5 to 0.6 ======
|
||||||
In the official collection, there are now 4106 elements, and 539 categoris for a total of 4645 files
|
In the official collection, there are now 4106 elements, and 539 categoris for a total of 4645 files
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="11">
|
<definition hotspot_x="11" hotspot_y="4" version="0.70" type="element" height="20" orientation="dyyy" link_type="terminal" width="30">
|
||||||
<uuid uuid="{8ef9d490-8db2-450a-ab89-22d2b35c01ed}"/>
|
<uuid uuid="{141e7e1e-4f7f-456d-9f04-52c32109b969}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="it">Collegamento</name>
|
|
||||||
<name lang="en">Combine</name>
|
<name lang="en">Combine</name>
|
||||||
<name lang="ru">Соединение</name>
|
|
||||||
<name lang="pl">Połączenie 1</name>
|
|
||||||
<name lang="fr">Jonction</name>
|
<name lang="fr">Jonction</name>
|
||||||
<name lang="cs">Spoj</name>
|
|
||||||
<name lang="es">Unión</name>
|
<name lang="es">Unión</name>
|
||||||
|
<name lang="it">Collegamento</name>
|
||||||
|
<name lang="pl">Połączenie 1</name>
|
||||||
|
<name lang="ar">وصلة</name>
|
||||||
|
<name lang="ru">Соединение</name>
|
||||||
|
<name lang="cs">Spoj</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="7" y1="0" end2="none" x2="1" antialias="false" end1="none" length2="1.5"/>
|
<line end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" antialias="false" x1="7" length1="1.5" x2="1" y2="0" length2="1.5" end1="none"/>
|
||||||
<input x="2" y="13.5" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text text_from="UserText" y="8.5" uuid="{43af2b14-2822-4ba2-988b-bda2005f69fd}" x="2" frame="false" z="2" rotation="0" text_width="-1" font_size="1">
|
||||||
<line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="6" end2="none" x2="6" antialias="false" end1="none" length2="1.5"/>
|
<text>_</text>
|
||||||
<terminal orientation="w" x="-4" y="0"/>
|
</dynamic_text>
|
||||||
<terminal orientation="s" x="0" y="10"/>
|
<line end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="6" antialias="false" x1="0" length1="1.5" x2="6" y2="0" length2="1.5" end1="none"/>
|
||||||
<terminal orientation="e" x="10" y="0"/>
|
<terminal y="0" x="-4" orientation="w"/>
|
||||||
|
<terminal y="10" x="0" orientation="s"/>
|
||||||
|
<terminal y="0" x="10" orientation="e"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="7" width="20" hotspot_x="11">
|
<definition hotspot_y="7" width="20" orientation="dyyy" type="element" height="20" version="0.70" hotspot_x="11" link_type="terminal">
|
||||||
<uuid uuid="{2c6c492e-8d8e-402e-a449-0cf5a7462ced}"/>
|
<uuid uuid="{2d505b61-db0f-4784-9b9c-189366058272}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="en">Corner</name>
|
|
||||||
<name lang="it">Angolo</name>
|
|
||||||
<name lang="ru">Угол</name>
|
|
||||||
<name lang="fr">Coin</name>
|
|
||||||
<name lang="pl">Narożnik</name>
|
|
||||||
<name lang="cs">Roh</name>
|
|
||||||
<name lang="es">Esquina</name>
|
<name lang="es">Esquina</name>
|
||||||
|
<name lang="en">Corner</name>
|
||||||
|
<name lang="cs">Roh</name>
|
||||||
|
<name lang="fr">Coin</name>
|
||||||
|
<name lang="ru">Угол</name>
|
||||||
|
<name lang="pl">Narożnik</name>
|
||||||
|
<name lang="ar">ركن</name>
|
||||||
|
<name lang="it">Angolo</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<input x="-0.5" y="-0.45" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text rotation="0" x="-0.5" y="-5.45" uuid="{9b8dd22d-096a-4989-b6f7-1de9e0339f53}" font_size="1" z="1" frame="false" text_from="UserText" text_width="-1">
|
||||||
<terminal orientation="s" x="0" y="4"/>
|
<text>_</text>
|
||||||
<terminal orientation="w" x="-4" y="0"/>
|
</dynamic_text>
|
||||||
|
<terminal x="0" y="4" orientation="s"/>
|
||||||
|
<terminal x="-4" y="0" orientation="w"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="9" width="20" hotspot_x="9">
|
<definition height="20" link_type="terminal" hotspot_x="9" width="20" orientation="dyyy" hotspot_y="9" version="0.70" type="element">
|
||||||
<uuid uuid="{eb8040c8-6998-4f43-818b-1d368825ffac}"/>
|
<uuid uuid="{8c0d3e9c-dc37-41d7-bfd5-fe4dbf8dc4fb}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="en">Cross</name>
|
|
||||||
<name lang="it">Croce</name>
|
|
||||||
<name lang="ru">Пересечение</name>
|
<name lang="ru">Пересечение</name>
|
||||||
<name lang="fr">Croix</name>
|
|
||||||
<name lang="pl">Połączenie 2</name>
|
|
||||||
<name lang="cs">Kříž</name>
|
<name lang="cs">Kříž</name>
|
||||||
|
<name lang="pl">Połączenie 2</name>
|
||||||
|
<name lang="it">Croce</name>
|
||||||
<name lang="es">Cruzar</name>
|
<name lang="es">Cruzar</name>
|
||||||
|
<name lang="en">Cross</name>
|
||||||
|
<name lang="ar">صليب</name>
|
||||||
|
<name lang="fr">Croix</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<circle x="-1" y="-1" style="line-style:normal;line-weight:normal;filling:black;color:black" antialias="true" diameter="2"/>
|
<circle y="-1" style="line-style:normal;line-weight:normal;filling:black;color:black" x="-1" antialias="true" diameter="2"/>
|
||||||
<input x="-0.5" y="-4.45" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text uuid="{fc5c039b-1fca-40d9-a6ff-a9e1775de38b}" text_width="-1" frame="false" y="-9.45" font_size="1" x="-0.5" z="2" rotation="0" text_from="UserText">
|
||||||
<terminal orientation="e" x="4" y="0"/>
|
<text>_</text>
|
||||||
<terminal orientation="s" x="0" y="4"/>
|
</dynamic_text>
|
||||||
<terminal orientation="n" x="0" y="-4"/>
|
<terminal y="0" orientation="e" x="4"/>
|
||||||
<terminal orientation="w" x="-4" y="0"/>
|
<terminal y="4" orientation="s" x="0"/>
|
||||||
|
<terminal y="-4" orientation="n" x="0"/>
|
||||||
|
<terminal y="0" orientation="w" x="-4"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -1,19 +1,23 @@
|
|||||||
<definition type="element" height="30" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="14" width="10" hotspot_x="5">
|
<definition width="10" hotspot_y="14" hotspot_x="5" height="30" link_type="terminal" orientation="dyyy" version="0.70" type="element">
|
||||||
<uuid uuid="{cd8b3f5f-5eae-416c-9966-c7b5529b6e63}"/>
|
<uuid uuid="{b5abb4c2-455d-45ff-95f2-328521f4e2e1}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="en">Jump</name>
|
<name lang="en">Jump</name>
|
||||||
<name lang="it">Salto</name>
|
|
||||||
<name lang="ru">Перемычка</name>
|
|
||||||
<name lang="fr">Saut</name>
|
<name lang="fr">Saut</name>
|
||||||
<name lang="pl">Brak połączenia</name>
|
<name lang="ar">قفز</name>
|
||||||
<name lang="cs">Skok</name>
|
<name lang="cs">Skok</name>
|
||||||
|
<name lang="it">Salto</name>
|
||||||
|
<name lang="pl">Brak połączenia</name>
|
||||||
|
<name lang="ru">Перемычка</name>
|
||||||
<name lang="es">Puente</name>
|
<name lang="es">Puente</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<arc height="6" start="90" angle="-180" x="-3" y="-3" style="line-style:normal;line-weight:normal;filling:none;color:black" antialias="true" width="6"/>
|
<arc x="-3" antialias="true" style="line-style:normal;line-weight:normal;filling:none;color:black" width="6" start="90" y="-3" height="6" angle="-180"/>
|
||||||
<input x="1.5" y="-6.45" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text font_size="1" x="1.5" text_from="UserText" z="2" y="-11.45" rotation="0" uuid="{1a3e4d91-15cc-424b-99d0-25930d779fb6}" frame="false" text_width="-1">
|
||||||
<terminal orientation="n" x="0" y="-7"/>
|
<text>_</text>
|
||||||
<terminal orientation="s" x="0" y="7"/>
|
</dynamic_text>
|
||||||
|
<terminal x="0" y="-7" orientation="n"/>
|
||||||
|
<terminal x="0" y="7" orientation="s"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<name lang="ru">Соединения</name>
|
<name lang="ru">Соединения</name>
|
||||||
<name lang="de">Verbindungen</name>
|
<name lang="de">Verbindungen</name>
|
||||||
<name lang="en">Connections</name>
|
<name lang="en">Connections</name>
|
||||||
<name lang="es">Conexiones</name>
|
|
||||||
<name lang="fr">Connections</name>
|
<name lang="fr">Connections</name>
|
||||||
<name lang="it">Collegamenti</name>
|
<name lang="it">Collegamenti</name>
|
||||||
<name lang="pl">Połączenia</name>
|
<name lang="pl">Połączenia</name>
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="17">
|
<definition type="element" height="20" width="30" orientation="dyyy" version="0.70" hotspot_y="4" link_type="terminal" hotspot_x="17">
|
||||||
<uuid uuid="{0f807068-d5a4-4628-85f4-0644e6d3129f}"/>
|
<uuid uuid="{709e6400-adc2-4faf-ba46-aa513d1dcaf1}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="en">Splice</name>
|
|
||||||
<name lang="it">Spaziatura</name>
|
|
||||||
<name lang="ru">Сращивание</name>
|
|
||||||
<name lang="fr">Epissure</name>
|
<name lang="fr">Epissure</name>
|
||||||
<name lang="pl">Połączenie 3</name>
|
<name lang="pl">Połączenie 3</name>
|
||||||
<name lang="cs">Spojka</name>
|
<name lang="cs">Spojka</name>
|
||||||
|
<name lang="en">Splice</name>
|
||||||
|
<name lang="it">Spaziatura</name>
|
||||||
|
<name lang="ru">Сращивание</name>
|
||||||
<name lang="es">Empalme</name>
|
<name lang="es">Empalme</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<input x="1.5" y="3.55" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text text_width="-1" x="1.5" rotation="0" frame="false" uuid="{b653b162-d4c8-4660-a5ca-e6ca05a56de9}" font_size="1" z="1" text_from="ElementInfo" y="-1.45">
|
||||||
<line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="6" end2="none" x2="-6" antialias="false" end1="none" length2="1.5"/>
|
<text></text>
|
||||||
<line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="1" y1="0" end2="none" x2="-5" antialias="false" end1="none" length2="1.5"/>
|
<info_name>label</info_name>
|
||||||
<terminal orientation="s" x="0" y="10"/>
|
</dynamic_text>
|
||||||
<terminal orientation="w" x="-10" y="0"/>
|
<line x2="-6" antialias="false" x1="0" end2="none" y2="0" end1="none" length2="1.5" length1="1.5" y1="6" style="line-style:normal;line-weight:normal;filling:none;color:black"/>
|
||||||
<terminal orientation="e" x="4" y="0"/>
|
<line x2="-5" antialias="false" x1="1" end2="none" y2="0" end1="none" length2="1.5" length1="1.5" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black"/>
|
||||||
|
<terminal x="0" orientation="s" y="10"/>
|
||||||
|
<terminal x="-10" orientation="w" y="0"/>
|
||||||
|
<terminal x="4" orientation="e" y="0"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="17">
|
<definition hotspot_y="4" height="20" hotspot_x="17" type="element" width="30" link_type="terminal" orientation="dyyy" version="0.70">
|
||||||
<uuid uuid="{a1ced185-e98f-4cf1-8a62-3f8ea691bcb6}"/>
|
<uuid uuid="{9e88368e-1b20-4a56-8941-5d17a4cce2d4}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="en">Thru left</name>
|
<name lang="cs">Levé spojení</name>
|
||||||
<name lang="it">Collegamento sinistro</name>
|
|
||||||
<name lang="ru">Справа налево</name>
|
<name lang="ru">Справа налево</name>
|
||||||
<name lang="fr">Liaison gauche</name>
|
<name lang="fr">Liaison gauche</name>
|
||||||
|
<name lang="en">Thru left</name>
|
||||||
|
<name lang="ar">ربط يسار</name>
|
||||||
|
<name lang="it">Collegamento sinistro</name>
|
||||||
<name lang="pl">Połączenie 4</name>
|
<name lang="pl">Połączenie 4</name>
|
||||||
<name lang="cs">Levé spojení</name>
|
|
||||||
<name lang="es">A la izquierda</name>
|
<name lang="es">A la izquierda</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<input x="1.5" y="3.55" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text font_size="1" rotation="0" uuid="{5ff9bef8-b6a8-4cf8-ba82-4dabe7b1820f}" text_width="-1" frame="false" text_from="UserText" z="1" x="1.5" y="-1.45">
|
||||||
<line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="6" end2="none" x2="-6" antialias="false" end1="none" length2="1.5"/>
|
<text>_</text>
|
||||||
<line y2="5" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="0" end2="none" x2="0" antialias="false" end1="none" length2="1.5"/>
|
</dynamic_text>
|
||||||
<terminal orientation="e" x="4" y="0"/>
|
<line x1="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="6" y2="0" end1="none" antialias="false" x2="-6"/>
|
||||||
<terminal orientation="w" x="-10" y="0"/>
|
<line x1="0" length1="1.5" end2="none" length2="1.5" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" y2="5" end1="none" antialias="false" x2="0"/>
|
||||||
<terminal orientation="s" x="0" y="10"/>
|
<terminal x="4" orientation="e" y="0"/>
|
||||||
|
<terminal x="-10" orientation="w" y="0"/>
|
||||||
|
<terminal x="0" orientation="s" y="10"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -1,22 +1,26 @@
|
|||||||
<definition type="element" height="20" orientation="dyyy" version="0.5" link_type="simple" hotspot_y="4" width="30" hotspot_x="14">
|
<definition link_type="terminal" width="30" hotspot_x="14" orientation="dyyy" height="20" version="0.70" hotspot_y="4" type="element">
|
||||||
<uuid uuid="{5d72394b-8aa0-4368-bc88-0f738478ca45}"/>
|
<uuid uuid="{6e40fff3-691c-4622-b9aa-4ff930a5b981}"/>
|
||||||
<names>
|
<names>
|
||||||
<name lang="en">Thru right</name>
|
<name lang="en">Thru right</name>
|
||||||
<name lang="it">Collegamento destro</name>
|
|
||||||
<name lang="ru">Слева направо</name>
|
<name lang="ru">Слева направо</name>
|
||||||
<name lang="fr">Liaison droite</name>
|
|
||||||
<name lang="pl">Połączenie 5</name>
|
|
||||||
<name lang="cs">Pravé spojení</name>
|
<name lang="cs">Pravé spojení</name>
|
||||||
|
<name lang="fr">Liaison droite</name>
|
||||||
|
<name lang="it">Collegamento destro</name>
|
||||||
<name lang="es">A la derecha</name>
|
<name lang="es">A la derecha</name>
|
||||||
|
<name lang="ar">ربط يمين</name>
|
||||||
|
<name lang="pl">Połączenie 5</name>
|
||||||
</names>
|
</names>
|
||||||
|
<elementInformations/>
|
||||||
<informations></informations>
|
<informations></informations>
|
||||||
<description>
|
<description>
|
||||||
<input x="5.5" y="4.55" size="1" tagg="label" rotate="true" text="_"/>
|
<dynamic_text text_width="-1" y="-0.45" rotation="0" uuid="{ab829572-e7d6-4e5c-9c6e-a0852fea788e}" x="5.5" frame="false" text_from="UserText" font_size="1" z="1">
|
||||||
<line y2="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="0" end2="none" x2="-6" antialias="false" end1="none" length2="1.5"/>
|
<text>_</text>
|
||||||
<line y2="5" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="0" y1="0" end2="none" x2="0" antialias="false" end1="none" length2="1.5"/>
|
</dynamic_text>
|
||||||
<line y2="6" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" x1="6" y1="0" end2="none" x2="0" antialias="false" end1="none" length2="1.5"/>
|
<line antialias="false" x1="0" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" end2="none" end1="none" y2="0" length2="1.5" x2="-6"/>
|
||||||
<terminal orientation="s" x="0" y="10"/>
|
<line antialias="false" x1="0" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" end2="none" end1="none" y2="5" length2="1.5" x2="0"/>
|
||||||
<terminal orientation="w" x="-10" y="0"/>
|
<line antialias="false" x1="6" y1="0" style="line-style:normal;line-weight:normal;filling:none;color:black" length1="1.5" end2="none" end1="none" y2="6" length2="1.5" x2="0"/>
|
||||||
<terminal orientation="e" x="10" y="0"/>
|
<terminal orientation="s" y="10" x="0"/>
|
||||||
|
<terminal orientation="w" y="0" x="-10"/>
|
||||||
|
<terminal orientation="e" y="0" x="10"/>
|
||||||
</description>
|
</description>
|
||||||
</definition>
|
</definition>
|
||||||
|
|||||||
@@ -354,7 +354,25 @@ void DiagramPrintDialog::browseFilePrintTypeDialog() {
|
|||||||
*/
|
*/
|
||||||
void DiagramPrintDialog::print(const QList<Diagram *> &diagrams, bool fit_page, const ExportProperties options) {
|
void DiagramPrintDialog::print(const QList<Diagram *> &diagrams, bool fit_page, const ExportProperties options) {
|
||||||
//qDebug() << "Demande d'impression de " << diagrams.count() << "schemas.";
|
//qDebug() << "Demande d'impression de " << diagrams.count() << "schemas.";
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
qDebug() << "--";
|
||||||
|
qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << printer_->resolution();
|
||||||
|
qDebug() << "DiagramPrintDialog::print screennumber " << QApplication::desktop()->screenNumber();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QScreen *srn = QApplication::screens().at(QApplication::desktop()->screenNumber());
|
||||||
|
qreal dotsPerInch = (qreal)srn->logicalDotsPerInch();
|
||||||
|
printer_->setResolution(dotsPerInch);
|
||||||
|
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch;
|
||||||
|
qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << printer_->resolution();
|
||||||
|
qDebug() << "--";
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
// QPainter utiliser pour effectuer le rendu
|
// QPainter utiliser pour effectuer le rendu
|
||||||
QPainter qp(printer_);
|
QPainter qp(printer_);
|
||||||
|
|
||||||
|
|||||||
@@ -32,14 +32,10 @@ int main(int argc, char **argv)
|
|||||||
QCoreApplication::setApplicationName("QElectroTech");
|
QCoreApplication::setApplicationName("QElectroTech");
|
||||||
//Creation and execution of the application
|
//Creation and execution of the application
|
||||||
//HighDPI
|
//HighDPI
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 6, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||||
#if defined Q_OS_MAC
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
|
|
||||||
#elif !defined(Q_OS_MAC)
|
|
||||||
QApplication::setAttribute (Qt::AA_DisableHighDpiScaling);
|
|
||||||
#else
|
#else
|
||||||
qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("1"));
|
qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("auto"));
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
return(QETApp(argc, argv).exec());
|
return(QETApp(argc, argv).exec());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
*/
|
*/
|
||||||
namespace QET {
|
namespace QET {
|
||||||
/// QElectroTech version (as string, used to mark projects and elements XML documents)
|
/// QElectroTech version (as string, used to mark projects and elements XML documents)
|
||||||
const QString version = "0.60";
|
const QString version = "0.61";
|
||||||
/// QElectroTech displayed version
|
/// QElectroTech displayed version
|
||||||
const QString displayedVersion = "0.60";
|
const QString displayedVersion = "0.61";
|
||||||
QString license();
|
QString license();
|
||||||
|
|
||||||
/// Oriented movements
|
/// Oriented movements
|
||||||
|
|||||||
@@ -310,16 +310,16 @@ void QETDiagramEditor::setUpActions()
|
|||||||
QAction *open_file = m_file_actions_group.addAction( QET::Icons::DocumentOpen, tr("&Ouvrir") );
|
QAction *open_file = m_file_actions_group.addAction( QET::Icons::DocumentOpen, tr("&Ouvrir") );
|
||||||
save_file = m_file_actions_group.addAction( QET::Icons::DocumentSave, tr("&Enregistrer") );
|
save_file = m_file_actions_group.addAction( QET::Icons::DocumentSave, tr("&Enregistrer") );
|
||||||
save_file_as = m_file_actions_group.addAction( QET::Icons::DocumentSaveAs, tr("Enregistrer sous") );
|
save_file_as = m_file_actions_group.addAction( QET::Icons::DocumentSaveAs, tr("Enregistrer sous") );
|
||||||
close_file = m_file_actions_group.addAction( QET::Icons::ProjectClose, tr("&Fermer") );
|
m_close_file = m_file_actions_group.addAction( QET::Icons::ProjectClose, tr("&Fermer") );
|
||||||
|
|
||||||
new_file -> setShortcut( QKeySequence::New );
|
new_file -> setShortcut( QKeySequence::New );
|
||||||
open_file -> setShortcut( QKeySequence::Open );
|
open_file -> setShortcut( QKeySequence::Open );
|
||||||
close_file -> setShortcut( QKeySequence::Close );
|
m_close_file -> setShortcut( QKeySequence::Close );
|
||||||
save_file -> setShortcut( QKeySequence::Save );
|
save_file -> setShortcut( QKeySequence::Save );
|
||||||
|
|
||||||
new_file -> setStatusTip( tr("Crée un nouveau projet", "status bar tip") );
|
new_file -> setStatusTip( tr("Crée un nouveau projet", "status bar tip") );
|
||||||
open_file -> setStatusTip( tr("Ouvre un projet existant", "status bar tip") );
|
open_file -> setStatusTip( tr("Ouvre un projet existant", "status bar tip") );
|
||||||
close_file -> setStatusTip( tr("Ferme le projet courant", "status bar tip") );
|
m_close_file -> setStatusTip( tr("Ferme le projet courant", "status bar tip") );
|
||||||
save_file -> setStatusTip( tr("Enregistre le projet courant et tous ses folios", "status bar tip") );
|
save_file -> setStatusTip( tr("Enregistre le projet courant et tous ses folios", "status bar tip") );
|
||||||
save_file_as -> setStatusTip( tr("Enregistre le projet courant avec un autre nom de fichier", "status bar tip") );
|
save_file_as -> setStatusTip( tr("Enregistre le projet courant avec un autre nom de fichier", "status bar tip") );
|
||||||
|
|
||||||
@@ -327,7 +327,7 @@ void QETDiagramEditor::setUpActions()
|
|||||||
connect(save_file, SIGNAL( triggered() ), this, SLOT( save() ) );
|
connect(save_file, SIGNAL( triggered() ), this, SLOT( save() ) );
|
||||||
connect(new_file, SIGNAL( triggered() ), this, SLOT( newProject() ) );
|
connect(new_file, SIGNAL( triggered() ), this, SLOT( newProject() ) );
|
||||||
connect(open_file, SIGNAL( triggered() ), this, SLOT( openProject() ) );
|
connect(open_file, SIGNAL( triggered() ), this, SLOT( openProject() ) );
|
||||||
connect(close_file, SIGNAL( triggered() ), this, SLOT( closeCurrentProject() ) );
|
connect(m_close_file, SIGNAL( triggered() ), this, SLOT( closeCurrentProject() ) );
|
||||||
|
|
||||||
//Row and Column actions
|
//Row and Column actions
|
||||||
QAction *add_column = m_row_column_actions_group.addAction( QET::Icons::EditTableInsertColumnRight, tr("Ajouter une colonne") );
|
QAction *add_column = m_row_column_actions_group.addAction( QET::Icons::EditTableInsertColumnRight, tr("Ajouter une colonne") );
|
||||||
@@ -673,23 +673,12 @@ void QETDiagramEditor::closeEvent(QCloseEvent *qce) {
|
|||||||
/**
|
/**
|
||||||
* @brief QETDiagramEditor::event
|
* @brief QETDiagramEditor::event
|
||||||
* Reimplemented to :
|
* Reimplemented to :
|
||||||
* -avoid conflic with shortcut "Ctrl+W" (QKeySequence::Close)
|
|
||||||
* -Load elements collection when WindowActivate.
|
* -Load elements collection when WindowActivate.
|
||||||
* @param e
|
* @param e
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
bool QETDiagramEditor::event(QEvent *e)
|
bool QETDiagramEditor::event(QEvent *e)
|
||||||
{
|
{
|
||||||
if (e -> type() == QEvent::ShortcutOverride)
|
|
||||||
{
|
|
||||||
QKeyEvent *shortcut_event = static_cast<QKeyEvent *>(e);
|
|
||||||
if (shortcut_event && shortcut_event -> matches(QKeySequence::Close))
|
|
||||||
{
|
|
||||||
close_file -> trigger();
|
|
||||||
e -> accept();
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_first_show && e->type() == QEvent::WindowActivate)
|
if (m_first_show && e->type() == QEvent::WindowActivate)
|
||||||
{
|
{
|
||||||
m_first_show = false;
|
m_first_show = false;
|
||||||
@@ -1320,7 +1309,7 @@ void QETDiagramEditor::slot_updateActions()
|
|||||||
bool opened_diagram = dv;
|
bool opened_diagram = dv;
|
||||||
bool editable_project = (pv && !pv -> project() -> isReadOnly());
|
bool editable_project = (pv && !pv -> project() -> isReadOnly());
|
||||||
|
|
||||||
close_file -> setEnabled(opened_project);
|
m_close_file -> setEnabled(opened_project);
|
||||||
save_file -> setEnabled(opened_project);
|
save_file -> setEnabled(opened_project);
|
||||||
save_file_as -> setEnabled(opened_project);
|
save_file_as -> setEnabled(opened_project);
|
||||||
prj_edit_prop -> setEnabled(opened_project);
|
prj_edit_prop -> setEnabled(opened_project);
|
||||||
@@ -1541,6 +1530,15 @@ void QETDiagramEditor::addProjectView(ProjectView *project_view)
|
|||||||
sub_window -> setWindowIcon(project_view -> windowIcon());
|
sub_window -> setWindowIcon(project_view -> windowIcon());
|
||||||
sub_window -> systemMenu() -> clear();
|
sub_window -> systemMenu() -> clear();
|
||||||
|
|
||||||
|
//By defaut QMdiSubWindow have a QAction "close" with shortcut QKeySequence::Close
|
||||||
|
//But the QAction m_close_file of this class have the same shortcut too.
|
||||||
|
//We remove the shortcut of the QAction of QMdiSubWindow for avoid conflic
|
||||||
|
for(QAction *act : sub_window->actions())
|
||||||
|
{
|
||||||
|
if(act->shortcut() == QKeySequence::Close)
|
||||||
|
act->setShortcut(QKeySequence());
|
||||||
|
}
|
||||||
|
|
||||||
//Display the new window
|
//Display the new window
|
||||||
if (maximise) project_view -> showMaximized();
|
if (maximise) project_view -> showMaximized();
|
||||||
else project_view -> show();
|
else project_view -> show();
|
||||||
@@ -1627,7 +1625,7 @@ void QETDiagramEditor::slot_updateWindowsMenu() {
|
|||||||
foreach(QAction *a, windows_menu -> actions()) windows_menu -> removeAction(a);
|
foreach(QAction *a, windows_menu -> actions()) windows_menu -> removeAction(a);
|
||||||
|
|
||||||
// actions de fermeture
|
// actions de fermeture
|
||||||
windows_menu -> addAction(close_file);
|
windows_menu -> addAction(m_close_file);
|
||||||
//windows_menu -> addAction(closeAllAct);
|
//windows_menu -> addAction(closeAllAct);
|
||||||
|
|
||||||
// actions de reorganisation des fenetres
|
// actions de reorganisation des fenetres
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ class QETDiagramEditor : public QETMainWindow {
|
|||||||
QAction *find_element; ///< Find the selected element in the panel
|
QAction *find_element; ///< Find the selected element in the panel
|
||||||
|
|
||||||
QActionGroup m_file_actions_group; ///Actions related to file (open, close, save...)
|
QActionGroup m_file_actions_group; ///Actions related to file (open, close, save...)
|
||||||
QAction *close_file; ///< Close current project file
|
QAction *m_close_file; ///< Close current project file
|
||||||
QAction *save_file; ///< Save current project
|
QAction *save_file; ///< Save current project
|
||||||
QAction *save_file_as; ///< Save current project as a specific file
|
QAction *save_file_as; ///< Save current project as a specific file
|
||||||
|
|
||||||
|
|||||||
@@ -1517,12 +1517,14 @@ void Conductor::displayedTextChanged()
|
|||||||
* part of the returned QSet.
|
* part of the returned QSet.
|
||||||
* @param all_diagram : if true search in all diagram of the project,
|
* @param all_diagram : if true search in all diagram of the project,
|
||||||
* false search only in the parent diagram of this conductor
|
* false search only in the parent diagram of this conductor
|
||||||
* @param t_list, a list of terminal already cheched for the serach of potential.
|
* @param t_list, a list of terminal already found for this potential.
|
||||||
* @return a QSet of conductor at the same potential.
|
* @return a QSet of conductor at the same potential.
|
||||||
*/
|
*/
|
||||||
QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram, QList <Terminal *> *t_list) {
|
QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram, QList <Terminal *> *t_list)
|
||||||
|
{
|
||||||
bool declar_t_list = false;
|
bool declar_t_list = false;
|
||||||
if (t_list == 0) {
|
if (t_list == nullptr)
|
||||||
|
{
|
||||||
declar_t_list = true;
|
declar_t_list = true;
|
||||||
t_list = new QList <Terminal *>;
|
t_list = new QList <Terminal *>;
|
||||||
}
|
}
|
||||||
@@ -1531,23 +1533,29 @@ QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram,
|
|||||||
QList <Terminal *> this_terminal;
|
QList <Terminal *> this_terminal;
|
||||||
this_terminal << terminal1 << terminal2;
|
this_terminal << terminal1 << terminal2;
|
||||||
|
|
||||||
// Return all conductor of terminal 1 and 2
|
// Return all conductors of terminal 1 and 2
|
||||||
foreach (Terminal *terminal, this_terminal) {
|
for (Terminal *terminal : this_terminal)
|
||||||
if (!t_list -> contains(terminal)) {
|
{
|
||||||
t_list -> append(terminal);
|
if (!t_list->contains(terminal))
|
||||||
QList <Conductor *> other_conductors_list_t = terminal -> conductors();
|
{
|
||||||
|
t_list->append(terminal);
|
||||||
|
QList <Conductor *> other_conductors_list_t = terminal->conductors();
|
||||||
|
|
||||||
//get terminal share the same potential of @terminal, of parent element
|
//Get the other terminals of the parent element of @terminal, who share the same potential
|
||||||
Terminal *t1_bis = relatedPotentialTerminal(terminal, all_diagram);
|
//This is use for element type "folio report" and "terminal element"
|
||||||
if (t1_bis && !t_list->contains(t1_bis)) {
|
for (Terminal *t : relatedPotentialTerminal(terminal, all_diagram))
|
||||||
t_list -> append(t1_bis);
|
{
|
||||||
other_conductors_list_t += t1_bis->conductors();
|
if (!t_list->contains(t))
|
||||||
|
{
|
||||||
|
t_list -> append(t);
|
||||||
|
other_conductors_list_t += t->conductors();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
other_conductors_list_t.removeAll(this);
|
other_conductors_list_t.removeAll(this);
|
||||||
// Research the conductors connected to conductors already found
|
//Get the conductors at the same potential for each conductors of other_conductors_list_t
|
||||||
foreach (Conductor *c, other_conductors_list_t) {
|
for (Conductor *c : other_conductors_list_t) {
|
||||||
other_conductors += c -> relatedPotentialConductors(all_diagram, t_list);
|
other_conductors += c->relatedPotentialConductors(all_diagram, t_list);
|
||||||
}
|
}
|
||||||
other_conductors += other_conductors_list_t.toSet();
|
other_conductors += other_conductors_list_t.toSet();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -765,24 +765,27 @@ Element *Terminal::parentElement() const {
|
|||||||
* @param t terminal to start search
|
* @param t terminal to start search
|
||||||
* @param all_diagram :if true return all related terminal,
|
* @param all_diagram :if true return all related terminal,
|
||||||
* false return only terminal in the same diagram of @t
|
* false return only terminal in the same diagram of @t
|
||||||
* @return
|
* @return the list of terminal at the same potential
|
||||||
*/
|
*/
|
||||||
Terminal * relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram) {
|
QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram)
|
||||||
|
{
|
||||||
// If terminal parent element is a folio report.
|
// If terminal parent element is a folio report.
|
||||||
if (all_diagram && terminal -> parentElement() -> linkType() & Element::AllReport) {
|
if (all_diagram && terminal -> parentElement() -> linkType() & Element::AllReport)
|
||||||
|
{
|
||||||
QList <Element *> elmt_list = terminal -> parentElement() -> linkedElements();
|
QList <Element *> elmt_list = terminal -> parentElement() -> linkedElements();
|
||||||
if (!elmt_list.isEmpty()) {
|
if (!elmt_list.isEmpty())
|
||||||
return (elmt_list.first() -> terminals().first());
|
{
|
||||||
|
return (elmt_list.first()->terminals());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If terminal parent element is a Terminal element.
|
// If terminal parent element is a Terminal element.
|
||||||
else if (terminal -> parentElement() -> linkType() & Element::Terminale) {
|
else if (terminal -> parentElement() -> linkType() & Element::Terminale)
|
||||||
QList <Terminal *> terminals = terminal -> parentElement() -> terminals();
|
{
|
||||||
terminals.removeAll(const_cast<Terminal *> (terminal));
|
QList <Terminal *> terminals = terminal->parentElement()->terminals();
|
||||||
if (!terminals.isEmpty())
|
terminals.removeAll(const_cast<Terminal *>(terminal));
|
||||||
return terminals.first();
|
return terminals;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return QList<Terminal *>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,6 +169,6 @@ inline QString Terminal::name() const {
|
|||||||
return(name_terminal_);
|
return(name_terminal_);
|
||||||
}
|
}
|
||||||
|
|
||||||
Terminal * relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram = true);
|
QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram = true);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "importelementdialog.h"
|
#include "importelementdialog.h"
|
||||||
#include "ui_importelementdialog.h"
|
#include "ui_importelementdialog.h"
|
||||||
|
#include <QButtonGroup>
|
||||||
|
|
||||||
ImportElementDialog::ImportElementDialog(QWidget *parent) :
|
ImportElementDialog::ImportElementDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
|
|||||||
Reference in New Issue
Block a user