From d2a7f5797a66ddd354f79508f343c6daa8ccdd50 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Sun, 10 Oct 2021 18:45:59 -0300 Subject: [PATCH] Add Athlete > Settings to main menu For completeness and to allow access to Athlete Settings from other views. Fixes #3723 --- src/Gui/MainWindow.cpp | 9 +++++++++ src/Gui/MainWindow.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index ef2bcb1d0..fb89a0caa 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -55,6 +55,7 @@ #include "AboutDialog.h" #include "ChooseCyclistDialog.h" #include "ConfigDialog.h" +#include "AthleteConfigDialog.h" #include "DownloadRideDialog.h" #include "ManualRideDialog.h" #include "RideImportWizard.h" @@ -482,6 +483,7 @@ MainWindow::MainWindow(const QDir &home) fileMenu->addSeparator(); fileMenu->addAction(tr("Save all modified activities"), this, SLOT(saveAllUnsavedRides())); + fileMenu->addAction(tr("Settings"), this, SLOT(athleteSettings())); fileMenu->addSeparator(); fileMenu->addAction(tr("Close Window"), this, SLOT(closeWindow())); //fileMenu->addAction(tr("&Close Tab"), this, SLOT(closeTab())); use athlete view @@ -1827,6 +1829,13 @@ MainWindow::saveRide() } } +void +MainWindow::athleteSettings() +{ + AthleteConfigDialog *dialog = new AthleteConfigDialog(currentAthleteTab->context->athlete->home->root(), currentAthleteTab->context); + dialog->exec(); +} + void MainWindow::saveAllUnsavedRides() { diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 68e275228..e6abad337 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -182,6 +182,9 @@ class MainWindow : public QMainWindow void setDeleteAthleteMenu(); void deleteAthlete(QString name); + // Athlete Settings + void athleteSettings(); + // Search / Filter void setFilter(QStringList); void clearFilter();