Updated qet_labels xml. Element formula now works with all elements types (logic, hydraulic, pneumatic and energy)

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4679 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
dfochi
2016-08-31 19:58:58 +00:00
parent 96d2f1c131
commit 47b0fd7f10
2 changed files with 15 additions and 2 deletions

View File

@@ -273,6 +273,7 @@
<category name="beckhoff"> <category name="beckhoff">
<category name="80building_management"></category> <category name="80building_management"></category>
</category> </category>
<category name="automation"></category>
<category name="beka"></category> <category name="beka"></category>
<category name="bosch_rexroth"></category> <category name="bosch_rexroth"></category>
<category name="bti"> <category name="bti">
@@ -320,6 +321,7 @@
<category name="20_frequency_drives"></category> <category name="20_frequency_drives"></category>
</category> </category>
<category name="gce"></category> <category name="gce"></category>
<category name="gefran"></category>
<category name="geindustrial"> <category name="geindustrial">
<category name="10_sofstarters"></category> <category name="10_sofstarters"></category>
</category> </category>
@@ -513,6 +515,7 @@
<category name="02_human_machine_interface"> <category name="02_human_machine_interface">
<category name="terminal_operateur"></category> <category name="terminal_operateur"></category>
</category> </category>
<category name="05_bus_topology"></category>
<category name="10_softstarter"></category> <category name="10_softstarter"></category>
<category name="20_frequency_drives"></category> <category name="20_frequency_drives"></category>
<category name="23_sinamics_drives"></category> <category name="23_sinamics_drives"></category>
@@ -571,6 +574,6 @@
</category> </category>
<category name="99_miscellaneous&amp;unsorted"></category> <category name="99_miscellaneous&amp;unsorted"></category>
<report> <report>
<directories>361</directories> <directories>364</directories>
</report> </report>
</labels> </labels>

View File

@@ -288,7 +288,7 @@ void CustomElement::parseLabels() {
} }
// Only Electric labels created so far // Only Electric labels created so far
if (current_location.fileName() != "10_electric") return; //if (current_location.fileName() != "10_electric")
QString qet_labels = "10_electric/qet_labels.xml"; QString qet_labels = "10_electric/qet_labels.xml";
QString filepath = QETApp::commonElementsDir().append(qet_labels); QString filepath = QETApp::commonElementsDir().append(qet_labels);
QFile file(filepath); QFile file(filepath);
@@ -335,6 +335,16 @@ void CustomElement::parseLabels() {
} }
rxml.readNext(); rxml.readNext();
} }
if (prefix == "") {
if (!(location().project()->elementAutoNumCurrentFormula().isEmpty()) && (location().project()->elementAutoNumCurrentFormula() != "") &&
(this->linkType()!=Element::Slave) && (this->linkType()!=Element::Terminale)) {
QString formula = location().project()->elementAutoNumCurrentFormula();
this->setPrefix(prefix);
DiagramContext &dc = this->rElementInformations();
dc.addValue("label", formula);
this->setTaggedText("label",formula);
}
}
} }
//apply formula to specific label - This condition specify elements which have different labels e.g KM //apply formula to specific label - This condition specify elements which have different labels e.g KM
//that are already specified in the element label (inside .elmt file). This method is not called if elements //that are already specified in the element label (inside .elmt file). This method is not called if elements