From bc2c998b7c6db56ba4bdb9eabf9118aee4280708 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Tue, 22 Aug 2017 16:47:48 -0400 Subject: [PATCH] MainWindow: Enabled Help action menu --- guilib/include/rtabmap/gui/MainWindow.h | 1 + guilib/src/ExportCloudsDialog.cpp | 2 +- guilib/src/MainWindow.cpp | 13 +++ guilib/src/ui/mainWindow.ui | 125 +++++++++++++++++++++--- 4 files changed, 127 insertions(+), 14 deletions(-) diff --git a/guilib/include/rtabmap/gui/MainWindow.h b/guilib/include/rtabmap/gui/MainWindow.h index f8a16d0c..be2a78d5 100644 --- a/guilib/include/rtabmap/gui/MainWindow.h +++ b/guilib/include/rtabmap/gui/MainWindow.h @@ -173,6 +173,7 @@ private slots: void downloadPoseGraph(); void anchorCloudsToGroundTruth(); void clearTheCache(); + void openHelp(); void openPreferences(); void openPreferencesSource(); void setDefaultViews(); diff --git a/guilib/src/ExportCloudsDialog.cpp b/guilib/src/ExportCloudsDialog.cpp index 8d8b90a1..e15ee71a 100644 --- a/guilib/src/ExportCloudsDialog.cpp +++ b/guilib/src/ExportCloudsDialog.cpp @@ -2182,7 +2182,7 @@ bool ExportCloudsDialog::getExportedClouds( } } } - if(ignoredCameras > validCameras.size()/2) + if(ignoredCameras > (int)validCameras.size()/2) { std::string msg = uFormat("More than 50%% of the cameras (%d/%d) have been filtered for " "too fast motion and/or blur level. You may adjust the corresponding thresholds.", diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index d204c83a..e80ca600 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -346,6 +346,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) : connect(_ui->actionLabel_current_location, SIGNAL(triggered()), this, SLOT(label())); connect(_ui->actionClear_cache, SIGNAL(triggered()), this, SLOT(clearTheCache())); connect(_ui->actionAbout, SIGNAL(triggered()), _aboutDialog , SLOT(exec())); + connect(_ui->actionHelp, SIGNAL(triggered()), this , SLOT(openHelp())); connect(_ui->actionPrint_loop_closure_IDs_to_console, SIGNAL(triggered()), this, SLOT(printLoopClosureIds())); connect(_ui->actionGenerate_map, SIGNAL(triggered()), this , SLOT(generateGraphDOT())); connect(_ui->actionRaw_format_txt, SIGNAL(triggered()), this , SLOT(exportPosesRaw())); @@ -5904,6 +5905,18 @@ void MainWindow::clearTheCache() _occupancyGrid->clear(); } +void MainWindow::openHelp() +{ + if(_state == kMonitoringPaused || _state == kMonitoring) + { + QDesktopServices::openUrl(QUrl("http://wiki.ros.org/rtabmap_ros")); + } + else + { + QDesktopServices::openUrl(QUrl("https://github.com/introlab/rtabmap/wiki")); + } +} + void MainWindow::updateElapsedTime() { if(_state == kDetecting || _state == kMonitoring) diff --git a/guilib/src/ui/mainWindow.ui b/guilib/src/ui/mainWindow.ui index a628b636..be50189a 100644 --- a/guilib/src/ui/mainWindow.ui +++ b/guilib/src/ui/mainWindow.ui @@ -27,7 +27,7 @@ 0 0 1012 - 22 + 25 @@ -319,7 +319,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -357,7 +366,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -600,7 +618,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -621,7 +648,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -642,7 +678,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -663,7 +708,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -681,7 +735,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -702,7 +765,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -723,7 +795,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -747,7 +828,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -817,7 +907,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -852,7 +951,7 @@ - false + true Help