Add new field "Group function" on properties of the selection widget and

for csv export


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5627 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-12-03 13:13:27 +00:00
parent e0c6cc6768
commit 4ba3f477f8
5 changed files with 32 additions and 16 deletions

View File

@@ -178,6 +178,7 @@ namespace autonum
{
QString str = formula;
str.replace("%{label}", dc.value("label").toString());
str.replace("%{group-function}", dc.value("group-function").toString());
str.replace("%{comment}", dc.value("comment").toString());
str.replace("%{description}", dc.value("description").toString());
str.replace("%{designation}", dc.value("designation").toString());

View File

@@ -35,6 +35,7 @@
* formula -> formula used to create the label (formula is make with variable)
* designation -> exhaustive comment used to explain what the element does.
* description -> exhaustive description used to explain what the element does.
* group-function -> the group function of element
* comment -> a little comment wich can be displayed in the folio
* manufacturer -> the manufacturer of the element
* manufacturer-reference -> the manufacturer reference of the element

View File

@@ -152,7 +152,7 @@ void ElementPropertiesEditorWidget::updateTree()
*/
void ElementPropertiesEditorWidget::populateTree()
{
QStringList keys{"label", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "provider", "quantity", "unity", "machine-manufacturer-reference"};
QStringList keys{"label", "group-function", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "provider", "quantity", "unity", "machine-manufacturer-reference"};
for(const QString& key : keys)
{

View File

@@ -93,6 +93,7 @@ QString nomenclature::getNomenclature()
""+ QObject::tr("F002") +";" //:Don't translate this text! //ID for label formula of element
""+ QObject::tr("G001") +";" //:Don't translate this text! //ID for order number
""+ QObject::tr("H001") +";" //:Don't translate this text! //ID for article description
""+ QObject::tr("H002") +";" //:Don't translate this text! //ID for group function description
""+ QObject::tr("I001") +";" //:Don't translate this text! //ID for comment
""+ QObject::tr("J001") +";" //:Don't translate this text! //ID for manufacturer
""+ QObject::tr("K001") +";" //:Don't translate this text! //ID for article number
@@ -113,15 +114,16 @@ QString nomenclature::getNomenclature()
""+ QObject::tr("Formule du label") +";"
""+ QObject::tr("Désignation") +";"
""+ QObject::tr("Description") +";"
""+ QObject::tr("Groupe fonctionnel") +";"
""+ QObject::tr("Commentaire") +";"
""+ QObject::tr("Fabricant") +";"
""+ QObject::tr("Reference Fabricant") +";"
""+ QObject::tr("Numéro de commande") +";"
""+ QObject::tr("Fournisseur") +";"
""+ QObject::tr("Quantité") +";"
""+ QObject::tr("Unité") +";"
""+ QObject::tr("Bloc auxiliaire 1") +";"
""+ QObject::tr("Bloc auxiliaire 2") +";"
""+ QObject::tr("Machine-reference") +";"
""+ QObject::tr("Numéro interne") +";"
""+ QObject::tr("Localisation") +";"
""+ QObject::tr("Fonction") +"\n";
@@ -174,6 +176,7 @@ QString nomenclature::getElementInfo(Element *elmt) {
info += autonum::AssignVariables::formulaToLabel(elmt_info["formula"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["designation"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["description"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["group-function"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["comment"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";

View File

@@ -294,20 +294,23 @@ QStringList QETApp::elementInfoKeys()
QStringList info_list;
info_list << "formula"
<< "label"
<< "group-function"
<< "location"
<< "comment"
<< "function"
<< "tension-protocol"
<< "auxiliary1"
<< "auxiliary2"
<< "description"
<< "designation"
<< "manufacturer"
<< "manufacturer-reference"
<< "machine-manufacturer-reference"
<< "provider"
<< "quantity"
<< "unity"
<< "auxiliary1"
<< "auxiliary2"
<< "machine-manufacturer-reference"
<< "location"
<< "function"
<< "tension-protocol";
<< "unity";
return info_list;
}
@@ -322,20 +325,27 @@ QString QETApp::elementTranslatedInfoKey(const QString &info)
{
if (info == "formula") return tr("formule du label");
else if (info == "label") return tr("Label");
else if (info == "group-function") return tr("Groupe fonctionnel");
else if (info == "location") return tr("Localisation");
else if (info == "comment") return tr("Commentaire");
else if (info == "function") return tr("Fonction");
else if (info == "tension-protocol") return tr("Tension / Protocole");
else if (info == "auxiliary1") return tr("Bloc auxiliaire 1");
else if (info == "auxiliary2") return tr("Bloc auxiliaire 2");
else if (info == "description") return tr("Description textuelle");
else if (info == "designation") return tr("Numéro d'article");
else if (info == "manufacturer") return tr("Fabricant");
else if (info == "manufacturer-reference") return tr("Numéro de commande");
else if (info == "machine-manufacturer-reference") return tr("Numéro interne");
else if (info == "provider") return tr("Fournisseur");
else if (info == "quantity") return tr("Quantité");
else if (info == "unity") return tr("Unité");
else if (info == "auxiliary1") return tr("Bloc auxiliaire 1");
else if (info == "auxiliary2") return tr("Bloc auxiliaire 2");
else if (info == "machine-manufacturer-reference") return tr("Numéro interne");
else if (info == "location") return tr("Localisation");
else if (info == "function") return tr("Fonction");
else if (info == "tension-protocol") return tr("Tension / Protocole");
return (info);
}
@@ -349,6 +359,7 @@ QString QETApp::elementInfoToVar(const QString &info)
{
if (info == "formula") return QString("%{formula}");
else if (info == "label") return QString("%{label}");
else if (info == "group-function") return QString("%{group-function}");
else if (info == "comment") return QString("%{comment}");
else if (info == "description") return QString("%{description}");
else if (info == "designation") return QString("%{designation}");