mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 08:59:55 +00:00
Workout Library Part 1 of 3
Implementing a workout library that keeps track of media and workouts that can be used in train view. This first part implements; - library.xml to record search paths - search dialog to find media/workouts Part 2 and 3 will bring: - Sqllite libraryDB to store found details - Update traintool to use libraryDB and display icons, duration/distance, IF and TSS in list - import and drag-n-drop of new media/workouts
This commit is contained in:
@@ -21,6 +21,25 @@
|
||||
#include <stdint.h>
|
||||
#include "Units.h"
|
||||
|
||||
// Supported file types
|
||||
static QStringList supported;
|
||||
static bool setSupported()
|
||||
{
|
||||
::supported << ".erg";
|
||||
::supported << ".mrc";
|
||||
::supported << ".crs";
|
||||
::supported << ".pgmf";
|
||||
return true;
|
||||
}
|
||||
static bool isinit = setSupported();
|
||||
bool ErgFile::isWorkout(QString name)
|
||||
{
|
||||
foreach(QString extension, supported) {
|
||||
if (name.endsWith(extension, Qt::CaseInsensitive))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
ErgFile::ErgFile(QString filename, int &mode, double Cp, MainWindow *main) :
|
||||
Cp(Cp), filename(filename), main(main), mode(mode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user