From dac101f3bc6b3834ba8ae20541a8a9b667a5c9df Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 8 Apr 2021 21:22:14 +0100 Subject: [PATCH] Added action handler for Help->Getting Started option in Insight window help menu --- src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp | 7 ++++++- src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 6fed7fb9..4de585c8 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -15,7 +15,6 @@ using Targets::TargetDescriptor; using Targets::TargetVariant; using Targets::TargetPackage; - void InsightWindow::init( QApplication& application, TargetDescriptor targetDescriptor, @@ -48,10 +47,12 @@ void InsightWindow::init( auto helpMenu = this->mainMenuBar->findChild("help-menu"); auto quitAction = fileMenu->findChild("close-insight"); auto openReportIssuesUrlAction = helpMenu->findChild("open-report-issues-url"); + auto openGettingStartedUrlAction = helpMenu->findChild("open-getting-started-url"); auto openAboutWindowAction = helpMenu->findChild("open-about-dialogue"); connect(quitAction, &QAction::triggered, this, &InsightWindow::close); connect(openReportIssuesUrlAction, &QAction::triggered, this, &InsightWindow::openReportIssuesUrl); + connect(openGettingStartedUrlAction, &QAction::triggered, this, &InsightWindow::openGettingStartedUrl); connect(openAboutWindowAction, &QAction::triggered, this, &InsightWindow::openAboutWindow); this->header = this->mainWindowWidget->findChild("header"); @@ -233,6 +234,10 @@ void InsightWindow::openReportIssuesUrl() { QDesktopServices::openUrl(url); } +void InsightWindow::openGettingStartedUrl() { + QDesktopServices::openUrl(QUrl("https://bloom.oscillate.io/docs/getting-started")); +} + void InsightWindow::openAboutWindow() { if (this->aboutWindowWidget == nullptr) { this->aboutWindowWidget = new AboutWindow(this->mainWindowWidget); diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp index 6831c0f0..2fc7ee00 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.hpp @@ -88,6 +88,7 @@ namespace Bloom void onTargetIoPortsUpdate(); void close(); void openReportIssuesUrl(); + void openGettingStartedUrl(); void openAboutWindow(); void togglePinIoState(TargetPinWidget* pinWidget);