Add new fields "Quantity, Unity" onproperties of the selection widget

and for csv export


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5626 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-12-02 15:54:08 +00:00
parent e8c03da193
commit e0c6cc6768
5 changed files with 18 additions and 2 deletions

View File

@@ -184,6 +184,8 @@ namespace autonum
str.replace("%{manufacturer}", dc.value("manufacturer").toString());
str.replace("%{manufacturer-reference}", dc.value("manufacturer-reference").toString());
str.replace("%{provider}", dc.value("provider").toString());
str.replace("%{quantity}", dc.value("quantity").toString());
str.replace("%{unity}", dc.value("unity").toString());
str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
str.replace("%{auxiliary2}", dc.value("auxiliary2").toString());
str.replace("%{machine-manufacturer-reference}", dc.value("machine-manufacturer-reference").toString());

View File

@@ -38,6 +38,8 @@
* 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
* quantity -> quantity of the element
* unity -> unity of the element
* auxiliary1 -> auxiliary 1 of element
* auxiliary2 -> auxiliary 2 of element
* machine-manufacturer-reference -> reference of the manufacturer machine

View File

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

View File

@@ -96,7 +96,9 @@ QString nomenclature::getNomenclature()
""+ 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
""+ QObject::tr("L001") +";" //:Don't translate this text! //ID for supplier
""+ QObject::tr("L001") +";" //:Don't translate this text! //ID for quantity
""+ QObject::tr("L002") +";" //:Don't translate this text! //ID for Unity
""+ QObject::tr("L003") +";" //:Don't translate this text! //ID for supplier
""+ QObject::tr("M001") +";" //:Don't translate this text! //ID for auxiliary field 1
""+ QObject::tr("M002") +";" //:Don't translate this text! //ID for auciliary field 2
""+ QObject::tr("N001")+";" //:Don't translate this text! //ID for internal number
@@ -115,6 +117,8 @@ QString nomenclature::getNomenclature()
""+ QObject::tr("Fabricant") +";"
""+ QObject::tr("Reference Fabricant") +";"
""+ QObject::tr("Fournisseur") +";"
""+ QObject::tr("Quantité") +";"
""+ QObject::tr("Unité") +";"
""+ QObject::tr("Bloc auxiliaire 1") +";"
""+ QObject::tr("Bloc auxiliaire 2") +";"
""+ QObject::tr("Machine-reference") +";"
@@ -174,6 +178,8 @@ QString nomenclature::getElementInfo(Element *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) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["provider"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["quantity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["unity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary1"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary2"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
info += autonum::AssignVariables::formulaToLabel(elmt_info["machine-manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";

View File

@@ -300,6 +300,8 @@ QStringList QETApp::elementInfoKeys()
<< "manufacturer"
<< "manufacturer-reference"
<< "provider"
<< "quantity"
<< "unity"
<< "auxiliary1"
<< "auxiliary2"
<< "machine-manufacturer-reference"
@@ -326,6 +328,8 @@ QString QETApp::elementTranslatedInfoKey(const QString &info)
else if (info == "manufacturer") return tr("Fabricant");
else if (info == "manufacturer-reference") return tr("Numéro de commande");
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");
@@ -351,6 +355,8 @@ QString QETApp::elementInfoToVar(const QString &info)
else if (info == "manufacturer") return QString("%{manufacturer}");
else if (info == "manufacturer-reference") return QString("%{manufacturer-reference}");
else if (info == "provider") return QString("%{provider}");
else if (info == "quantity") return QString("%{quantity}");
else if (info == "unity") return QString("%{unity}");
else if (info == "auxiliary1") return QString("%{auxiliary1}");
else if (info == "auxiliary2") return QString("%{auxiliary2}");
else if (info == "machine-manufacturer-reference") return QString("%{machine-manufacturer-reference}");