Skip to content

Commit

Permalink
Add PropBASIC into help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bweir committed Jul 26, 2016
1 parent 6699865 commit 1130ba6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/propelleride/forms/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
<addaction name="actionPropeller_Datasheet"/>
<addaction name="actionPropeller_Quick_Reference"/>
<addaction name="separator"/>
<addaction name="actionPropBASIC_Manual"/>
<addaction name="separator"/>
<addaction name="action_About"/>
</widget>
<widget class="QMenu" name="menuFile">
Expand Down Expand Up @@ -860,6 +862,15 @@
<string>Ctrl+P</string>
</property>
</action>
<action name="actionPropBASIC_Manual">
<property name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/help-manual.png</normaloff>:/icons/help-manual.png</iconset>
</property>
<property name="text">
<string>Prop&amp;BASIC Manual</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
Expand Down
8 changes: 7 additions & 1 deletion src/propelleride/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ MainWindow::MainWindow(QWidget *parent)
connect(ui.actionPropeller_Quick_Reference, SIGNAL(triggered()), this, SLOT(propellerQuickReference()));
connect(ui.actionPropeller_Datasheet, SIGNAL(triggered()), this, SLOT(propellerDatasheet()));
connect(ui.actionPropeller_Manual, SIGNAL(triggered()), this, SLOT(propellerManual()));
connect(ui.actionPropBASIC_Manual, SIGNAL(triggered()), this, SLOT(propBasicManual()));
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));

// Toolbar Extras
Expand Down Expand Up @@ -804,7 +805,7 @@ void MainWindow::openFileResource(QString const & resource)
if (QFileInfo(path).exists() && QFileInfo(path).isFile())
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
else
qDebug() << "File not found:" << path;
qCritical() << "File not found:" << path;
}

void MainWindow::propellerManual()
Expand All @@ -822,6 +823,11 @@ void MainWindow::propellerQuickReference()
openFileResource("/doc/pdf/QuickReference-v15.pdf");
}

void MainWindow::propBasicManual()
{
openFileResource("/doc/pdf/PropBASIC.pdf");
}

void MainWindow::about()
{
QDialog * about = new QDialog();
Expand Down
1 change: 1 addition & 0 deletions src/propelleride/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public slots:
void propellerManual();
void propellerDatasheet();
void propellerQuickReference();
void propBasicManual();
void about();
void newFromTemplate();

Expand Down

0 comments on commit 1130ba6

Please sign in to comment.