From 7ef74361180d9e3dff6c821cd194c7443d5b0a24 Mon Sep 17 00:00:00 2001 From: Kjell Kernen Date: Sun, 9 Feb 2014 01:12:01 +0100 Subject: [PATCH] Fixes #495 Added link to OpenTX documentation page in the help menu --- companion/src/mainwindow.cpp | 12 ++++++++++++ companion/src/mainwindow.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index fd9cfc9f9..df57d182c 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include "mainwindow.h" #include "mdichild.h" #include "burnconfigdialog.h" @@ -686,6 +687,11 @@ void MainWindow::newFile() child->show(); } +void MainWindow::openDocumentURL() +{ + QString link = "http://www.open-tx.org/documents.html"; + QDesktopServices::openUrl(QUrl(link)); +} void MainWindow::openFile() { @@ -1900,6 +1906,11 @@ void MainWindow::createActions() russianLanguageAct = new QAction(tr("Russian"),this); russianLanguageAct->setStatusTip(tr("Use Russian in menus")); connect(russianLanguageAct, SIGNAL(triggered()), this, SLOT(setRULanguage())); + + openDocumentURLAct = new QAction(tr("Manuals and other Documents"),this); + openDocumentURLAct->setStatusTip(tr("Open the OpenTX document page in a web browser")); + connect(openDocumentURLAct, SIGNAL(triggered()), this, SLOT(openDocumentURL())); + } void MainWindow::createMenus() @@ -1992,6 +2003,7 @@ void MainWindow::createMenus() helpMenu->addAction(checkForUpdatesAct); helpMenu->addSeparator(); helpMenu->addAction(aboutAct); + helpMenu->addAction(openDocumentURLAct); helpMenu->addSeparator(); helpMenu->addAction(changelogAct); helpMenu->addAction(fwchangelogAct); diff --git a/companion/src/mainwindow.h b/companion/src/mainwindow.h index 60d6759fc..34472d123 100644 --- a/companion/src/mainwindow.h +++ b/companion/src/mainwindow.h @@ -83,6 +83,8 @@ public slots: void unloadProfile(); private slots: + void openDocumentURL(); + void setLanguage(QString langString); void setDefaultLanguage() {setLanguage("");}; void setCZLanguage() {setLanguage("cs_CZ");}; @@ -270,6 +272,7 @@ private: QAction *portugueseLanguageAct; QAction *swedishLanguageAct; QAction *russianLanguageAct; + QAction *openDocumentURLAct; QString fwToUpdate; QToolButton * profileButton; };