Skip to content

Commit 4086aa4

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

6 files changed

Lines changed: 20 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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,17 @@ Should be a component label</string>
439439
<addaction name="a_topology_mtee"/>
440440
<addaction name="a_topology_mvia"/>
441441
</widget>
442+
<widget class="QMenu" name="m_tutorials">
443+
<property name="title">
444+
<string>Tutorials</string>
445+
</property>
446+
<addaction name="a_tutorial_oems"/>
447+
</widget>
442448
<addaction name="m_topology"/>
443449
<addaction name="m_detail"/>
444450
<addaction name="m_oems_mesh"/>
445451
<addaction name="a_table_orientation"/>
452+
<addaction name="m_tutorials"/>
446453
</widget>
447454
<widget class="QMenu" name="m_view">
448455
<property name="title">
@@ -741,6 +748,11 @@ Should be a component label</string>
741748
<normaloff>:/mvia.png</normaloff>:/mvia.png</iconset>
742749
</property>
743750
</action>
751+
<action name="a_tutorial_oems">
752+
<property name="text">
753+
<string>OpenEMS exporter</string>
754+
</property>
755+
</action>
744756
</widget>
745757
<layoutdefault spacing="6" margin="11"/>
746758
<customwidgets>

0 commit comments

Comments
 (0)