[qet] qet/qet: [5464] title block editor : show 'projectfilename' as available value

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


Revision: 5464
Author:   scorpio810
Date:     2018-08-05 18:27:14 +0200 (Sun, 05 Aug 2018)
Log Message:
-----------
title block editor : show 'projectfilename' as available value

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

Modified: trunk/sources/qetproject.cpp
===================================================================
--- trunk/sources/qetproject.cpp	2018-08-05 15:04:15 UTC (rev 5463)
+++ trunk/sources/qetproject.cpp	2018-08-05 16:27:14 UTC (rev 5464)
@@ -1731,6 +1731,7 @@
 	DiagramContext project_wide_properties = project_properties_;
 	project_wide_properties.addValue("projecttitle", title());
 	project_wide_properties.addValue("projectpath", filePath());
+	project_wide_properties.addValue("projectfilename", QFileInfo( filePath()).baseName());
 	
 	for (int i = 0 ; i < total_folio ; ++ i) {
 		QString title = m_diagrams_list[i] -> title();

Modified: trunk/sources/titleblock/templatecellwidget.cpp
===================================================================
--- trunk/sources/titleblock/templatecellwidget.cpp	2018-08-05 15:04:15 UTC (rev 5463)
+++ trunk/sources/titleblock/templatecellwidget.cpp	2018-08-05 16:27:14 UTC (rev 5464)
@@ -446,6 +446,7 @@
 		"<li>%{folio-total} : nombre total de folios dans le projet</li>"
 		"<li>%{projecttitle} : titre du projet</li>"
 		"<li>%{projectpath} : chemin du projet</li>"
+		"<li>%{projectfilename} : nom du fichier</li>"
 		"</ul>"
 	);
 	return(def_var_string);


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