Added action handler for Help->Getting Started option in Insight window help menu

This commit is contained in:
Nav
2021-04-08 21:22:14 +01:00
parent 3b12af22cc
commit dac101f3bc
2 changed files with 7 additions and 1 deletions

View File

@@ -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<QMenu*>("help-menu");
auto quitAction = fileMenu->findChild<QAction*>("close-insight");
auto openReportIssuesUrlAction = helpMenu->findChild<QAction*>("open-report-issues-url");
auto openGettingStartedUrlAction = helpMenu->findChild<QAction*>("open-getting-started-url");
auto openAboutWindowAction = helpMenu->findChild<QAction*>("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<QWidget*>("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);

View File

@@ -88,6 +88,7 @@ namespace Bloom
void onTargetIoPortsUpdate();
void close();
void openReportIssuesUrl();
void openGettingStartedUrl();
void openAboutWindow();
void togglePinIoState(TargetPinWidget* pinWidget);