[qet] qet/qet: [5627] Add new field "Group function" on properties of the selection widget and

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5627
Author:   scorpio810
Date:     2018-12-03 14:13:27 +0100 (Mon, 03 Dec 2018)
Log Message:
-----------
Add new field "Group function" on properties of the selection widget and
for csv export

Modified Paths:
--------------
    trunk/sources/autoNum/assignvariables.cpp
    trunk/sources/diagramcontext.h
    trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
    trunk/sources/nomenclature.cpp
    trunk/sources/qetapp.cpp

Modified: trunk/sources/autoNum/assignvariables.cpp
===================================================================
--- trunk/sources/autoNum/assignvariables.cpp	2018-12-02 15:54:08 UTC (rev 5626)
+++ trunk/sources/autoNum/assignvariables.cpp	2018-12-03 13:13:27 UTC (rev 5627)
@@ -178,6 +178,7 @@
 	{
 		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());

Modified: trunk/sources/diagramcontext.h
===================================================================
--- trunk/sources/diagramcontext.h	2018-12-02 15:54:08 UTC (rev 5626)
+++ trunk/sources/diagramcontext.h	2018-12-03 13:13:27 UTC (rev 5627)
@@ -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

Modified: trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
===================================================================
--- trunk/sources/editor/ui/elementpropertieseditorwidget.cpp	2018-12-02 15:54:08 UTC (rev 5626)
+++ trunk/sources/editor/ui/elementpropertieseditorwidget.cpp	2018-12-03 13:13:27 UTC (rev 5627)
@@ -152,7 +152,7 @@
  */
 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)
 	{

Modified: trunk/sources/nomenclature.cpp
===================================================================
--- trunk/sources/nomenclature.cpp	2018-12-02 15:54:08 UTC (rev 5626)
+++ trunk/sources/nomenclature.cpp	2018-12-03 13:13:27 UTC (rev 5627)
@@ -93,6 +93,7 @@
     ""+ 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 @@
 	""+ 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 @@
 	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) + ";";

Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp	2018-12-02 15:54:08 UTC (rev 5626)
+++ trunk/sources/qetapp.cpp	2018-12-03 13:13:27 UTC (rev 5627)
@@ -294,20 +294,23 @@
 	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 @@
 {
 	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 @@
 {
 	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}");


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/