Backport commit 5307, 5311, 5312

Update changelog 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60@5314 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-04-08 04:05:18 +00:00
parent 5178de2c15
commit 11cc09a637
12 changed files with 167 additions and 113 deletions

View File

@@ -1,3 +1,19 @@
====== 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
====== 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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View 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();
} }

View File

@@ -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 *>();
} }

View File

@@ -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