Add Athlete > Settings to main menu

For completeness and to allow access to Athlete Settings
from other views.
Fixes #3723
This commit is contained in:
Alejandro Martinez
2021-10-10 18:45:59 -03:00
parent 94ccac5e0f
commit d2a7f5797a
2 changed files with 12 additions and 0 deletions

View File

@@ -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()
{

View File

@@ -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();