mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Add new action in help menu for launch the Manual online with browser by
default git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4707 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QDragEnterEvent>
|
#include <QDragEnterEvent>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
#include "qetmainwindow.h"
|
#include "qetmainwindow.h"
|
||||||
#include "qeticons.h"
|
#include "qeticons.h"
|
||||||
@@ -72,6 +73,14 @@ void QETMainWindow::initCommonActions() {
|
|||||||
about_qet_ -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip"));
|
about_qet_ -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip"));
|
||||||
connect(about_qet_, SIGNAL(triggered()), qet_app, SLOT(aboutQET()));
|
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_ = 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"));
|
about_qt_ -> setStatusTip(tr("Affiche des informations sur la bibliothèque Qt", "status bar tip"));
|
||||||
connect(about_qt_, SIGNAL(triggered()), qet_app, SLOT(aboutQt()));
|
connect(about_qt_, SIGNAL(triggered()), qet_app, SLOT(aboutQt()));
|
||||||
@@ -91,6 +100,7 @@ void QETMainWindow::initCommonMenus() {
|
|||||||
help_menu_ -> addAction(whatsthis_action_);
|
help_menu_ -> addAction(whatsthis_action_);
|
||||||
help_menu_ -> addSeparator();
|
help_menu_ -> addSeparator();
|
||||||
help_menu_ -> addAction(about_qet_);
|
help_menu_ -> addAction(about_qet_);
|
||||||
|
help_menu_ -> addAction(manual_online_);
|
||||||
help_menu_ -> addAction(about_qt_);
|
help_menu_ -> addAction(about_qt_);
|
||||||
|
|
||||||
insertMenu(0, settings_menu_);
|
insertMenu(0, settings_menu_);
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ class QETMainWindow : public QMainWindow {
|
|||||||
QAction *fullscreen_action_; ///< Toggle full screen
|
QAction *fullscreen_action_; ///< Toggle full screen
|
||||||
QAction *whatsthis_action_; ///< Toggle "What's this" mode
|
QAction *whatsthis_action_; ///< Toggle "What's this" mode
|
||||||
QAction *about_qet_; ///< Launch the "About QElectroTech" dialog
|
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
|
QAction *about_qt_; ///< launch the "About Qt" dialog
|
||||||
QMenu *settings_menu_; ///< Settings menu
|
QMenu *settings_menu_; ///< Settings menu
|
||||||
QMenu *help_menu_; ///< Help menu
|
QMenu *help_menu_; ///< Help menu
|
||||||
|
|||||||
Reference in New Issue
Block a user