From 44200fe13eb353851916adbf22126373c4fd05c3 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 26 Jan 2017 00:49:54 +0100 Subject: [PATCH] Add a menu entry to go to the online manual. --- mainwindow.cpp | 11 +++++++++++ mainwindow.h | 1 + ui_mainwindow.ui | 16 +++++++++++----- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index a99d2ae..fc7b6ea 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -196,6 +197,7 @@ MainWindow::MainWindow() // The menus. connect(ui->cut_action, &QAction::triggered, this, &MainWindow::cut_triggered); connect(ui->exit_action, &QAction::triggered, this, &MainWindow::exit_triggered); + connect(ui->manual_action, &QAction::triggered, this, &MainWindow::manual_triggered); connect(ui->about_action, &QAction::triggered, this, &MainWindow::about_triggered); connect(ui->simple_audio_mode, &QAction::triggered, this, &MainWindow::simple_audio_mode_triggered); connect(ui->multichannel_audio_mode, &QAction::triggered, this, &MainWindow::multichannel_audio_mode_triggered); @@ -563,6 +565,15 @@ void MainWindow::exit_triggered() close(); } +void MainWindow::manual_triggered() +{ + if (!QDesktopServices::openUrl(QUrl("https://nageru.sesse.net/doc/"))) { + QMessageBox msgbox; + msgbox.setText("Could not launch manual in web browser.\nPlease see https://nageru.sesse.net/doc/ manually."); + msgbox.exec(); + } +} + void MainWindow::about_triggered() { AboutDialog().exec(); diff --git a/mainwindow.h b/mainwindow.h index a9dca41..1c7f0e3 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -45,6 +45,7 @@ public slots: void cut_triggered(); void x264_bitrate_triggered(); void exit_triggered(); + void manual_triggered(); void about_triggered(); void simple_audio_mode_triggered(); void multichannel_audio_mode_triggered(); diff --git a/ui_mainwindow.ui b/ui_mainwindow.ui index e13b507..15e4361 100644 --- a/ui_mainwindow.ui +++ b/ui_mainwindow.ui @@ -640,8 +640,8 @@ 0 0 - 505 - 236 + 514 + 238 @@ -1130,8 +1130,8 @@ 0 0 - 728 - 282 + 100 + 30 @@ -1390,7 +1390,7 @@ 0 0 1089 - 23 + 19 @@ -1405,6 +1405,7 @@ &Help + @@ -1470,6 +1471,11 @@ Setup MIDI controller… + + + Online &manual… + + -- 2.39.2