[qet] qet/qet: [5880] Diagram editor : when plugin qet-tb-generator

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


Revision: 5880
Author:   scorpio810
Date:     2019-05-20 16:54:04 +0200 (Mon, 20 May 2019)
Log Message:
-----------
Diagram editor : when plugin qet-tb-generator
"generate terminal blocks and connectors" isn't installed show an
QMessageBox instruction now depending on the operating system for
install it 
Add in QMessageBox url encoding/decoding for easy download packages

Modified Paths:
--------------
    trunk/sources/qetdiagrameditor.cpp

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2019-05-19 20:00:54 UTC (rev 5879)
+++ trunk/sources/qetdiagrameditor.cpp	2019-05-20 14:54:04 UTC (rev 5880)
@@ -2227,35 +2227,93 @@
 	
 #endif
 	if ( !success ) {
+	#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
 		QMessageBox::warning(nullptr,
 							 tr("Error launching qet_tb_generator plugin"), 
-							 tr("To install the plugin qet_tb_generator\nVisit https://pypi.python.org/pypi/qet-tb-generator/\n";
-								"\n"
-								"Requires python 3.5 or above.\n"
-								">> First install on Linux\n"
-								"1. check you have pip3 installed: pip3 --version\n"
-								"If not install with: sudo apt-get install python3-pip\n"
-								"2. Install the program: sudo pip3 install qet_tb_generator\n"
-								"3. Run the program: qet_tb_generator\n"
-								">> Update on Linux\n"
-								"sudo pip3 install --upgrade qet_tb_generator \n"
-								"\n"
-								">> First install on Windows\n"
-								"1. Install, if required, python 3.5 or above \n"
-								" Visit https://www.python.org/downloads/ \n"
-								"2. pip install qet_tb_generator\n"
-								">> Update on Windows\n"
-								"python -m pip install --upgrade qet_tb_generator\n"
-								">>user could launch in a terminal this script in this directory \n"
-								" C:\\users\\XXXX\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts \n"
-								"\n"
-								">> First install on macOSX \n"
-								"1. Install, if required, python 3.5 or above \n"
-								" Visit https://qelectrotech.org/forum/viewtopic.php?pid=5674#p5674 \n"
-								"2. pip3 install qet_tb_generator \n"
-								">> Update on macOSX \n"
-								" pip3 install --upgrade qet_tb_generator \n"
+							 tr("To install the plugin qet_tb_generator"
+								 "<br>"
+								 "Visit "
+								 "<br>"
+								 "<a href='https://pypi.python.org/pypi/qet-tb-generator'>qet-tb-generator</a>"
+								 "<br>"	
+								"Requires python 3.5 or above."
+								"<br>"
+								">> First install on Windows"
+								 "<br>"
+								"1. Install, if required, python 3.5 or above"
+								 "<br>"
+								" Visit "
+								 "<br>"
+								"<a href='https://www.python.org/downloads/'>python.org</a>"
+								 "<br>"
+								"2. pip install qet_tb_generator"
+								 "<br>"
+								">> Update on Windows"
+								 "<br>"
+								"python -m pip install --upgrade qet_tb_generator"
+								 "<br>"
+								">>user could launch in a terminal this script in this directory"
+								 "<br>"
+								" C:\\users\\XXXX\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts"
+								 "<br>"
 								));
 	}
 }
+#elif defined(Q_OS_MAC)
+		QMessageBox::warning(nullptr,
+							 tr("Error launching qet_tb_generator plugin"), 
+							 tr("To install the plugin qet_tb_generator"
+							 "<br>"
+							 "Visit "
+							 "<br>"
+							 "<a href='https://pypi.python.org/pypi/qet-tb-generator'>qet-tb-generator</a>"
+							 "<br>"
+								">> First install on macOSX"
+								"<br>"
+								"1. Install, if required, python 3.5 "
+								"<br>"
+								" Visit"
+								"<br>"
+								"<a href='https://qelectrotech.org/forum/viewtopic.php?pid=5674#p5674'>howto</a>"
+								"<br>"
+								"2. pip3 install qet_tb_generator"
+								"<br>"
+								">> Update on macOSX"
+								"<br>"
+								" pip3 install --upgrade qet_tb_generator"
+								"<br>"
+								));
+	}
+}
 
+#else
+		QMessageBox::warning(nullptr,
+							 tr("Error launching qet_tb_generator plugin"), 
+							 tr( "To install the plugin qet_tb_generator"
+								 "<br>"
+								 "Visit "
+								 "<br>"
+								 "<a href='https://pypi.python.org/pypi/qet-tb-generator'>qet-tb-generator</a>"
+								 "<br>"	
+								"Requires python 3.5 or above."
+								"<br>"
+								">> First install on Linux"
+								"<br>"
+								"1. check you have pip3 installed: pip3 --version"
+								"<br>"
+								"If not install with: sudo apt-get install python3-pip"
+								"<br>"
+								"2. Install the program: sudo pip3 install qet_tb_generator"
+								"<br>"
+								"3. Run the program: qet_tb_generator"
+								"<br>"
+								">> Update on Linux"
+								"<br>"
+								"sudo pip3 install --upgrade qet_tb_generator"
+								"<br>"
+								));
+	}
+}
+
+#endif
+


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