[qet] qet/qet: [5467] title block editor : add '%saveddate' and '%savedtime' as available

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


Revision: 5467
Author:   scorpio810
Date:     2018-08-06 17:32:19 +0200 (Mon, 06 Aug 2018)
Log Message:
-----------
title block editor : add '%saveddate' and '%savedtime' as available
values, for moment only when user "save as" project

Modified Paths:
--------------
    trunk/sources/qetproject.cpp
    trunk/sources/titleblock/templatecellwidget.cpp

Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp	2018-08-06 00:19:56 UTC (rev 5466)
+++ trunk/sources/qetproject.cpp	2018-08-06 15:32:19 UTC (rev 5467)
@@ -255,6 +255,10 @@
 		setReadOnly(false);
 	}
 	
+	project_properties_.addValue("saveddate", QDate::currentDate().toString("yyyy-MM-dd"));
+	project_properties_.addValue("savedtime", QDateTime::currentDateTime().toString("HH:mm"));
+	
+	
 	emit(projectFilePathChanged(this, m_file_path));
 	emit(projectInformationsChanged(this));
 	updateDiagramsFolioData();

Modified: trunk/sources/titleblock/templatecellwidget.cpp
===================================================================
--- trunk/sources/titleblock/templatecellwidget.cpp	2018-08-06 00:19:56 UTC (rev 5466)
+++ trunk/sources/titleblock/templatecellwidget.cpp	2018-08-06 15:32:19 UTC (rev 5467)
@@ -447,6 +447,8 @@
 		"<li>%{projecttitle} : titre du projet</li>"
 		"<li>%{projectpath} : chemin du projet</li>"
 		"<li>%{projectfilename} : nom du fichier</li>"
+		"<li>%{saveddate} : date d'enregistrement du fichier</li>"
+		"<li>%{savedtime} : heure d'enregistrement du fichier</li>"
 		"</ul>"
 	);
 	return(def_var_string);


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