[qet] [4707] Add new action in help menu for launch the Manual online with browser by

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


Revision: 4707
Author:   scorpio810
Date:     2016-09-15 05:02:56 +0200 (Thu, 15 Sep 2016)
Log Message:
-----------
Add new action in help menu for launch the Manual online with browser by
default

Modified Paths:
--------------
    trunk/sources/qetmainwindow.cpp
    trunk/sources/qetmainwindow.h

Modified: trunk/sources/qetmainwindow.cpp
===================================================================
--- trunk/sources/qetmainwindow.cpp	2016-09-14 13:58:44 UTC (rev 4706)
+++ trunk/sources/qetmainwindow.cpp	2016-09-15 03:02:56 UTC (rev 4707)
@@ -20,6 +20,7 @@
 #include <QMenu>
 #include <QMenuBar>
 #include <QDragEnterEvent>
+#include <QDesktopServices>
 
 #include "qetmainwindow.h"
 #include "qeticons.h"
@@ -72,6 +73,14 @@
 	about_qet_ -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip"));
 	connect(about_qet_,  SIGNAL(triggered()), qet_app, SLOT(aboutQET()));
 	
+	manual_online_ = new QAction(QET::Icons::QETLogo, tr("Manuel QElectroTech en ligne"), this);
+	manual_online_ -> setStatusTip(tr("Lance le navigateur par defaut vers le manuel en ligne de QElectroTech", "status bar tip"));
+	
+	connect(manual_online_, &QAction::triggered, [this](bool) {
+	QString link = "http://download.tuxfamily.org/qet/joshua/html/QET.html";;
+	QDesktopServices::openUrl(QUrl(link));
+	});
+	
 	about_qt_ = new QAction(QET::Icons::QtLogo,  tr("À propos de &Qt"), this);
 	about_qt_ -> setStatusTip(tr("Affiche des informations sur la bibliothèque Qt", "status bar tip"));
 	connect(about_qt_, SIGNAL(triggered()), qet_app, SLOT(aboutQt()));
@@ -91,6 +100,7 @@
 	help_menu_ -> addAction(whatsthis_action_);
 	help_menu_ -> addSeparator();
 	help_menu_ -> addAction(about_qet_);
+	help_menu_ -> addAction(manual_online_);
 	help_menu_ -> addAction(about_qt_);
 	
 	insertMenu(0, settings_menu_);

Modified: trunk/sources/qetmainwindow.h
===================================================================
--- trunk/sources/qetmainwindow.h	2016-09-14 13:58:44 UTC (rev 4706)
+++ trunk/sources/qetmainwindow.h	2016-09-15 03:02:56 UTC (rev 4707)
@@ -56,6 +56,7 @@
 	QAction *fullscreen_action_;             ///< Toggle full screen
 	QAction *whatsthis_action_;              ///< Toggle "What's this" mode
 	QAction *about_qet_;                     ///< Launch the "About QElectroTech" dialog
+	QAction *manual_online_;                 ///< Launch browser on QElectroTech manual on line
 	QAction *about_qt_;                      ///< launch the "About Qt" dialog
 	QMenu *settings_menu_;                   ///< Settings menu
 	QMenu *help_menu_;                       ///< Help menu


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