Skip to content

Commit 1fdc59f

Browse files
committed
GUI : add tutorials to help menu, opening github link
1 parent 9f98740 commit 1fdc59f

6 files changed

Lines changed: 13 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ message( STATUS "Version: ${PROJECT_VERSION}" )
1919

2020
set( QRFL_BUGREPORT "https://github.com/thomaslepoix/Qucs-RFlayout/issues" )
2121
set( QRFL_FUNDING "https://liberapay.com/thomaslepoix" )
22+
set( QRFL_OEMS_TUTORIAL "https://github.com/thomaslepoix/Qucs-RFlayout/blob/master/doc/tutorials/openems.md" )
2223
file( READ "${CMAKE_SOURCE_DIR}/CHANGELOG" QRFL_CHANGELOG )
2324

2425
set( CMAKE_MODULE_PATH

doc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if( WIN32 )
77
else()
88
set( QRFL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" )
99
endif( WIN32 )
10-
set( QRFL_OEMS_TUTORIAL "https://github.com/thomaslepoix/Qucs-RFlayout/blob/master/doc/tutorials/openems.md" )
1110

1211
configure_file(
1312
"${CMAKE_SOURCE_DIR}/doc/qucsrflayout.1.in"

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ target_compile_definitions( ${PROJECT_NAME}
4747
QRFL_VERSION="${PROJECT_VERSION}"
4848
QRFL_HOMEPAGE="${PROJECT_HOMEPAGE_URL}"
4949
QRFL_FUNDING="${QRFL_FUNDING}"
50+
QRFL_OEMS_TUTORIAL="${QRFL_OEMS_TUTORIAL}"
5051
QRFL_BUGREPORT="${QRFL_BUGREPORT}"
5152
$<$<BOOL:${QRFL_MINIMAL}>:QRFL_MINIMAL>
5253
)

src/mainwindow.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ void MainWindow::on_a_topology_mstep_triggered() { open_doc_file("topology_mstep
247247
void MainWindow::on_a_topology_mtee_triggered() { open_doc_file("topology_mtee"); }
248248
void MainWindow::on_a_topology_mvia_triggered() { open_doc_file("topology_mvia"); }
249249

250+
//******************************************************************************
251+
void MainWindow::on_a_tutorial_oems_triggered() {
252+
QDesktopServices::openUrl(QUrl(QRFL_OEMS_TUTORIAL));
253+
}
254+
250255
//******************************************************************************
251256
void MainWindow::on_ag_themes_triggered(QAction* const action) {
252257
ui->glw_preview->setTheme(action->text().toStdString());

src/mainwindow.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private slots:
7474
void on_a_topology_mstep_triggered();
7575
void on_a_topology_mtee_triggered();
7676
void on_a_topology_mvia_triggered();
77+
void on_a_tutorial_oems_triggered();
7778
void on_ag_themes_triggered(QAction* const action);
7879
void on_cb_format_currentTextChanged(QString const& out_format);
7980
void on_cb_specify_netlist_stateChanged(int const state);

src/mainwindow.ui

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,11 @@ Should be a component label</string>
741741
<normaloff>:/mvia.png</normaloff>:/mvia.png</iconset>
742742
</property>
743743
</action>
744+
<action name="a_tutorial_oems">
745+
<property name="text">
746+
<string>OpenEMS exporter</string>
747+
</property>
748+
</action>
744749
</widget>
745750
<layoutdefault spacing="6" margin="11"/>
746751
<customwidgets>

0 commit comments

Comments
 (0)