Merge pull request #672 from opentx/dvogonen/add_menu_help_link
Fixes #495
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QNetworkProxyFactory>
|
#include <QNetworkProxyFactory>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QDesktopServices>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "mdichild.h"
|
#include "mdichild.h"
|
||||||
#include "burnconfigdialog.h"
|
#include "burnconfigdialog.h"
|
||||||
@@ -686,6 +687,11 @@ void MainWindow::newFile()
|
|||||||
child->show();
|
child->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::openDocumentURL()
|
||||||
|
{
|
||||||
|
QString link = "http://www.open-tx.org/documents.html";
|
||||||
|
QDesktopServices::openUrl(QUrl(link));
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::openFile()
|
void MainWindow::openFile()
|
||||||
{
|
{
|
||||||
@@ -1900,6 +1906,11 @@ void MainWindow::createActions()
|
|||||||
russianLanguageAct = new QAction(tr("Russian"),this);
|
russianLanguageAct = new QAction(tr("Russian"),this);
|
||||||
russianLanguageAct->setStatusTip(tr("Use Russian in menus"));
|
russianLanguageAct->setStatusTip(tr("Use Russian in menus"));
|
||||||
connect(russianLanguageAct, SIGNAL(triggered()), this, SLOT(setRULanguage()));
|
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()
|
void MainWindow::createMenus()
|
||||||
@@ -1992,6 +2003,7 @@ void MainWindow::createMenus()
|
|||||||
helpMenu->addAction(checkForUpdatesAct);
|
helpMenu->addAction(checkForUpdatesAct);
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
helpMenu->addAction(aboutAct);
|
helpMenu->addAction(aboutAct);
|
||||||
|
helpMenu->addAction(openDocumentURLAct);
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
helpMenu->addAction(changelogAct);
|
helpMenu->addAction(changelogAct);
|
||||||
helpMenu->addAction(fwchangelogAct);
|
helpMenu->addAction(fwchangelogAct);
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ public slots:
|
|||||||
void unloadProfile();
|
void unloadProfile();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void openDocumentURL();
|
||||||
|
|
||||||
void setLanguage(QString langString);
|
void setLanguage(QString langString);
|
||||||
void setDefaultLanguage() {setLanguage("");};
|
void setDefaultLanguage() {setLanguage("");};
|
||||||
void setCZLanguage() {setLanguage("cs_CZ");};
|
void setCZLanguage() {setLanguage("cs_CZ");};
|
||||||
@@ -270,6 +272,7 @@ private:
|
|||||||
QAction *portugueseLanguageAct;
|
QAction *portugueseLanguageAct;
|
||||||
QAction *swedishLanguageAct;
|
QAction *swedishLanguageAct;
|
||||||
QAction *russianLanguageAct;
|
QAction *russianLanguageAct;
|
||||||
|
QAction *openDocumentURLAct;
|
||||||
QString fwToUpdate;
|
QString fwToUpdate;
|
||||||
QToolButton * profileButton;
|
QToolButton * profileButton;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user