mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -273,6 +273,7 @@
|
||||
<category name="beckhoff">
|
||||
<category name="80building_management"></category>
|
||||
</category>
|
||||
<category name="automation"></category>
|
||||
<category name="beka"></category>
|
||||
<category name="bosch_rexroth"></category>
|
||||
<category name="bti">
|
||||
@@ -320,6 +321,7 @@
|
||||
<category name="20_frequency_drives"></category>
|
||||
</category>
|
||||
<category name="gce"></category>
|
||||
<category name="gefran"></category>
|
||||
<category name="geindustrial">
|
||||
<category name="10_sofstarters"></category>
|
||||
</category>
|
||||
@@ -513,6 +515,7 @@
|
||||
<category name="02_human_machine_interface">
|
||||
<category name="terminal_operateur"></category>
|
||||
</category>
|
||||
<category name="05_bus_topology"></category>
|
||||
<category name="10_softstarter"></category>
|
||||
<category name="20_frequency_drives"></category>
|
||||
<category name="23_sinamics_drives"></category>
|
||||
@@ -571,6 +574,6 @@
|
||||
</category>
|
||||
<category name="99_miscellaneous&unsorted"></category>
|
||||
<report>
|
||||
<directories>361</directories>
|
||||
<directories>364</directories>
|
||||
</report>
|
||||
</labels>
|
||||
|
||||
@@ -288,7 +288,7 @@ void CustomElement::parseLabels() {
|
||||
}
|
||||
|
||||
// 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 filepath = QETApp::commonElementsDir().append(qet_labels);
|
||||
QFile file(filepath);
|
||||
@@ -335,6 +335,16 @@ void CustomElement::parseLabels() {
|
||||
}
|
||||
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
|
||||
//that are already specified in the element label (inside .elmt file). This method is not called if elements
|
||||
|
||||
Reference in New Issue
Block a user