Initial release
This commit is contained in:
@@ -0,0 +1,90 @@
|
|||||||
|
#include "cactivity.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
cActivity::cActivity()
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity::cActivity(const cActivity& rhs)
|
||||||
|
{
|
||||||
|
this->m_dwValid = rhs.m_dwValid;
|
||||||
|
this->m_iActivityType = rhs.m_iActivityType;
|
||||||
|
this->m_LapList = rhs.m_LapList;
|
||||||
|
this->m_szName = rhs.m_szName;
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity::cActivity(enum ActivityType iActivityType, const QString& szName)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
setActivityType(iActivityType);
|
||||||
|
setName(szName);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cActivity::setActivityType(enum ActivityType iActivityType)
|
||||||
|
{
|
||||||
|
if(iActivityType < ActivityTypeUnknown || iActivityType > ActivityTypeNone)
|
||||||
|
return(false);
|
||||||
|
m_iActivityType = iActivityType;
|
||||||
|
m_dwValid |= VALID_ACTIVITYTYPE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum cActivity::ActivityType cActivity::getActivityType()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_ACTIVITYTYPE)
|
||||||
|
return(m_iActivityType);
|
||||||
|
else
|
||||||
|
return(ActivityTypeUnknown);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cActivity::setName(const QString& szName)
|
||||||
|
{
|
||||||
|
if(!szName.length())
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
m_szName = szName;
|
||||||
|
m_dwValid |= VALID_NAME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString cActivity::getName()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_NAME)
|
||||||
|
return(m_szName);
|
||||||
|
return("");
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap* cActivity::addLap(const QDateTime& StartTime)
|
||||||
|
{
|
||||||
|
return(m_LapList.add(this, StartTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
cLapList cActivity::getLapList()
|
||||||
|
{
|
||||||
|
return(m_LapList);
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity& cActivity::operator=(const cActivity& rhs)
|
||||||
|
{
|
||||||
|
if(this != &rhs)
|
||||||
|
{
|
||||||
|
this->m_dwValid = rhs.m_dwValid;
|
||||||
|
this->m_iActivityType = rhs.m_iActivityType;
|
||||||
|
this->m_LapList = rhs.m_LapList;
|
||||||
|
this->m_szName = rhs.m_szName;
|
||||||
|
}
|
||||||
|
return(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivityList::cActivityList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity* cActivityList::add(enum cActivity::ActivityType iActivityType, const QString& szName)
|
||||||
|
{
|
||||||
|
cActivity* lpActivity = new cActivity(iActivityType, szName);
|
||||||
|
this->append(lpActivity);
|
||||||
|
return(lpActivity);
|
||||||
|
}
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
#ifndef CACTIVITY_H
|
||||||
|
#define CACTIVITY_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <QMetaType>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "clap.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cActivity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum ActivityType
|
||||||
|
{
|
||||||
|
ActivityTypeUnknown,
|
||||||
|
ActivityTypeRunning,
|
||||||
|
ActivityTypeBiking,
|
||||||
|
ActivityTypeSwimming,
|
||||||
|
ActivityTypeNone,
|
||||||
|
};
|
||||||
|
|
||||||
|
cActivity();
|
||||||
|
cActivity(const cActivity& rhs);
|
||||||
|
cActivity(enum ActivityType iActivityType, const QString& szName);
|
||||||
|
|
||||||
|
bool setActivityType(enum ActivityType iActivityType);
|
||||||
|
enum ActivityType getActivityType();
|
||||||
|
|
||||||
|
bool setName(const QString& szName);
|
||||||
|
QString getName();
|
||||||
|
|
||||||
|
cLap* addLap(const QDateTime& StartTime);
|
||||||
|
cLapList getLapList();
|
||||||
|
|
||||||
|
cActivity& operator=(const cActivity& rhs);
|
||||||
|
protected:
|
||||||
|
uint64_t m_dwValid;
|
||||||
|
enum ActivityType m_iActivityType;
|
||||||
|
QString m_szName;
|
||||||
|
|
||||||
|
cLapList m_LapList;
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(cActivity);
|
||||||
|
|
||||||
|
class cActivityList : public QList<cActivity*>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cActivityList();
|
||||||
|
cActivity* add(enum cActivity::ActivityType iActivityType, const QString& szName);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CACTIVITY_H
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#ifndef CIMPORT_H
|
||||||
|
#define CIMPORT_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QDomDocument>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "cactivity.h"
|
||||||
|
#include "clap.h"
|
||||||
|
#include "ctrackpoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cImport
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum IMPORT_ERROR
|
||||||
|
{
|
||||||
|
NO_ERROR = 0,
|
||||||
|
FILE_NOT_EXIST = 1,
|
||||||
|
FILE_NOT_SUPPORTED = 2,
|
||||||
|
FILE_NOT_READABLE = 3,
|
||||||
|
FILE_WRONG_FORMAT = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
cImport();
|
||||||
|
|
||||||
|
virtual QString getName();
|
||||||
|
virtual QString getVersion();
|
||||||
|
virtual QString getExtension();
|
||||||
|
virtual cActivityList getActivityList();
|
||||||
|
|
||||||
|
virtual int32_t load(const QString& szFileName);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
cActivityList m_ActivityList;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef cImport* create_t();
|
||||||
|
typedef void destroy_t(cImport* lpImport);
|
||||||
|
|
||||||
|
#endif // CIMPORT_H
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
#include "clap.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
cLap::cLap(cActivity* lpParent)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
m_lpParent = lpParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap::cLap(cActivity* lpParent, const QDateTime &StartTime)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
m_lpParent = lpParent;
|
||||||
|
setStartTime(StartTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity* cLap::getParent()
|
||||||
|
{
|
||||||
|
return(m_lpParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setStartTime(const QDateTime &StartTime)
|
||||||
|
{
|
||||||
|
if(!StartTime.isValid())
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
m_StartTime = StartTime;
|
||||||
|
m_dwValid |= VALID_STARTTIME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDateTime cLap::getStartTime()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_STARTTIME)
|
||||||
|
return(m_StartTime);
|
||||||
|
return(QDateTime(QDate(1980, 1, 1), QTime(0, 0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setTotalTime(double dTotalTime)
|
||||||
|
{
|
||||||
|
m_dTotalTime = dTotalTime;
|
||||||
|
m_dwValid |= VALID_TOTALTIME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getTotalTime()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TOTALTIME)
|
||||||
|
return(m_dTotalTime);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setTotalDistance(double dTotalDistance)
|
||||||
|
{
|
||||||
|
m_dTotalDistance = dTotalDistance;
|
||||||
|
m_dwValid |= VALID_TOTALDISTANCE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getTotalDistance()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TOTALDISTANCE)
|
||||||
|
return(m_dTotalDistance);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setMaximumSpeed(double dMaximumSpeed)
|
||||||
|
{
|
||||||
|
m_dMaximumSpeed = dMaximumSpeed;
|
||||||
|
m_dwValid |= VALID_MAXIMUMSPEED;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getMaximumSpeed()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_MAXIMUMSPEED)
|
||||||
|
return(m_dMaximumSpeed);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setCalories(double dCalories)
|
||||||
|
{
|
||||||
|
m_dCalories = dCalories;
|
||||||
|
m_dwValid |= VALID_CALORIES;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getCalories()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_CALORIES)
|
||||||
|
return(m_dCalories);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setAvgHeartrate(double dAvgHeartrate)
|
||||||
|
{
|
||||||
|
m_dAvgHeartrate = dAvgHeartrate;
|
||||||
|
m_dwValid |= VALID_AVGHEARTRATE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getAvgHeartrate()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_AVGHEARTRATE)
|
||||||
|
return(m_dAvgHeartrate);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setMaxHeartrate(double dMaxHeartrate)
|
||||||
|
{
|
||||||
|
m_dMaxHeartrate = dMaxHeartrate;
|
||||||
|
m_dwValid |= VALID_MAXHEARTRATE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getMaxHeartrate()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_MAXHEARTRATE)
|
||||||
|
return(m_dMaxHeartrate);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setIntensity(enum Intensity iIntensity)
|
||||||
|
{
|
||||||
|
if(iIntensity < IntensityUnknown || iIntensity > IntensityNone)
|
||||||
|
return(false);
|
||||||
|
m_iIntensity = iIntensity;
|
||||||
|
m_dwValid |= VALID_INTENSITY;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum cLap::Intensity cLap::getIntensity()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_INTENSITY)
|
||||||
|
return(m_iIntensity);
|
||||||
|
else
|
||||||
|
return(cLap::IntensityNone);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setTriggerMethod(enum TriggerMethod iTriggerMethod)
|
||||||
|
{
|
||||||
|
if(iTriggerMethod < TriggerMethodUnknown || iTriggerMethod > TriggerMethodNone)
|
||||||
|
return(false);
|
||||||
|
m_iTriggerMethod = iTriggerMethod;
|
||||||
|
m_dwValid |= VALID_TRIGGERMETHOD;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum cLap::TriggerMethod cLap::getTriggerMethod()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TRIGGERMETHOD)
|
||||||
|
return(m_iTriggerMethod);
|
||||||
|
else
|
||||||
|
return(cLap::TriggerMethodNone);
|
||||||
|
}
|
||||||
|
|
||||||
|
cTrackpoint* cLap::addTrackpoint(uint32_t dwTime)
|
||||||
|
{
|
||||||
|
return(m_TrackpointList.add(this, dwTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
cLapList::cLapList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap* cLapList::add(cActivity* lpParent, const QDateTime &StartTime)
|
||||||
|
{
|
||||||
|
cLap* lpLap = new cLap(lpParent, StartTime);
|
||||||
|
this->append(lpLap);
|
||||||
|
return(lpLap);
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
#ifndef CLAP_H
|
||||||
|
#define CLAP_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <QMetaType>
|
||||||
|
#include <QString>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "ctrackpoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cActivity;
|
||||||
|
|
||||||
|
class cLap
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum Intensity
|
||||||
|
{
|
||||||
|
IntensityUnknown,
|
||||||
|
IntensityActive,
|
||||||
|
IntensityNone,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TriggerMethod
|
||||||
|
{
|
||||||
|
TriggerMethodUnknown,
|
||||||
|
TriggerMethodManual,
|
||||||
|
TriggerMethodAuto,
|
||||||
|
TriggerMethodNone,
|
||||||
|
};
|
||||||
|
|
||||||
|
cLap(cActivity* lpParent = 0);
|
||||||
|
cLap(cActivity* lpParent, const QDateTime& StartTime);
|
||||||
|
|
||||||
|
cActivity* getParent();
|
||||||
|
|
||||||
|
bool setStartTime(const QDateTime& StartTime);
|
||||||
|
QDateTime getStartTime();
|
||||||
|
|
||||||
|
bool setTotalTime(double dTotalTime);
|
||||||
|
double getTotalTime();
|
||||||
|
|
||||||
|
bool setTotalDistance(double dTotalDistance);
|
||||||
|
double getTotalDistance();
|
||||||
|
|
||||||
|
bool setMaximumSpeed(double dMaximumSpeed);
|
||||||
|
double getMaximumSpeed();
|
||||||
|
|
||||||
|
bool setCalories(double dCalories);
|
||||||
|
double getCalories();
|
||||||
|
|
||||||
|
bool setAvgHeartrate(double dAvgHeartrate);
|
||||||
|
double getAvgHeartrate();
|
||||||
|
|
||||||
|
bool setMaxHeartrate(double dMaxHeartrate);
|
||||||
|
double getMaxHeartrate();
|
||||||
|
|
||||||
|
bool setIntensity(enum Intensity iIntensity);
|
||||||
|
enum Intensity getIntensity();
|
||||||
|
|
||||||
|
bool setTriggerMethod(enum TriggerMethod iTriggerMethod);
|
||||||
|
enum TriggerMethod getTriggerMethod();
|
||||||
|
|
||||||
|
cTrackpoint* addTrackpoint(uint32_t dwTime);
|
||||||
|
protected:
|
||||||
|
uint64_t m_dwValid;
|
||||||
|
cActivity* m_lpParent;
|
||||||
|
QDateTime m_StartTime;
|
||||||
|
double m_dTotalTime;
|
||||||
|
double m_dTotalDistance;
|
||||||
|
double m_dMaximumSpeed;
|
||||||
|
double m_dCalories;
|
||||||
|
double m_dAvgHeartrate;
|
||||||
|
double m_dMaxHeartrate;
|
||||||
|
enum Intensity m_iIntensity;
|
||||||
|
enum TriggerMethod m_iTriggerMethod;
|
||||||
|
cTrackpointList m_TrackpointList;
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(cLap);
|
||||||
|
|
||||||
|
class cLapList : public QList<cLap*>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cLapList();
|
||||||
|
cLap* add(cActivity* lpParent, const QDateTime& StartTime);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CLAP_H
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#include "cmainwindow.h"
|
||||||
|
#include "ui_cmainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
|
cMainWindow::cMainWindow(QWidget *parent) :
|
||||||
|
QMainWindow(parent),
|
||||||
|
ui(new Ui::cMainWindow)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
cMainWindow::~cMainWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef CMAINWINDOW_H
|
||||||
|
#define CMAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class cMainWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class cMainWindow : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit cMainWindow(QWidget *parent = 0);
|
||||||
|
~cMainWindow();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::cMainWindow *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CMAINWINDOW_H
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<ui version="4.0">
|
||||||
|
<class>cMainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="cMainWindow" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>cMainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenuBar" name="menuBar" />
|
||||||
|
<widget class="QToolBar" name="mainToolBar" />
|
||||||
|
<widget class="QWidget" name="centralWidget" />
|
||||||
|
<widget class="QStatusBar" name="statusBar" />
|
||||||
|
</widget>
|
||||||
|
<layoutDefault spacing="6" margin="11" />
|
||||||
|
<pixmapfunction></pixmapfunction>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef COMMON_H
|
||||||
|
#define COMMON_H
|
||||||
|
|
||||||
|
|
||||||
|
#define VALID_NAME 0x00000000000000000000000000000001LL
|
||||||
|
#define VALID_STARTTIME 0x00000000000000000000000000000002LL
|
||||||
|
#define VALID_TOTALTIME 0x00000000000000000000000000000004LL
|
||||||
|
#define VALID_TOTALDISTANCE 0x00000000000000000000000000000008LL
|
||||||
|
#define VALID_MAXIMUMSPEED 0x00000000000000000000000000000010LL
|
||||||
|
#define VALID_CALORIES 0x00000000000000000000000000000020LL
|
||||||
|
#define VALID_AVGHEARTRATE 0x00000000000000000000000000000040LL
|
||||||
|
#define VALID_MAXHEARTRATE 0x00000000000000000000000000000080LL
|
||||||
|
#define VALID_ACTIVITYTYPE 0x00000000000000000000000000000100LL
|
||||||
|
#define VALID_INTENSITY 0x00000000000000000000000000000200LL
|
||||||
|
#define VALID_TRIGGERMETHOD 0x00000000000000000000000000000400LL
|
||||||
|
#define VALID_TIME 0x00000000000000000000000000000800LL
|
||||||
|
#define VALID_POSITION 0x00000000000000000000000000001000LL
|
||||||
|
#define VALID_DISTANCE 0x00000000000000000000000000002000LL
|
||||||
|
#define VALID_HEARTRATE 0x00000000000000000000000000004000LL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // COMMON_H
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#include "cposition.h"
|
||||||
|
|
||||||
|
|
||||||
|
cPosition::cPosition(const cPosition& rhs)
|
||||||
|
{
|
||||||
|
this->m_dLatitude = rhs.m_dLatitude;
|
||||||
|
this->m_dLongitude = rhs.m_dLongitude;
|
||||||
|
this->m_dElevation = rhs.m_dElevation;
|
||||||
|
}
|
||||||
|
|
||||||
|
cPosition::cPosition(double dLatitude, double dLongitude, double dElevation)
|
||||||
|
{
|
||||||
|
m_dLatitude = dLatitude;
|
||||||
|
m_dLongitude = dLongitude;
|
||||||
|
m_dElevation = dElevation;
|
||||||
|
}
|
||||||
|
|
||||||
|
double cPosition::getLatitude()
|
||||||
|
{
|
||||||
|
return(m_dLatitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cPosition::getLongitude()
|
||||||
|
{
|
||||||
|
return(m_dLongitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cPosition::getElevation()
|
||||||
|
{
|
||||||
|
return(m_dElevation);
|
||||||
|
}
|
||||||
|
|
||||||
|
cPosition &cPosition::operator=(const cPosition &rhs)
|
||||||
|
{
|
||||||
|
if(this != &rhs)
|
||||||
|
{
|
||||||
|
this->m_dLatitude = rhs.m_dLatitude;
|
||||||
|
this->m_dLongitude = rhs.m_dLongitude;
|
||||||
|
this->m_dElevation = rhs.m_dElevation;
|
||||||
|
}
|
||||||
|
return(*this);
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef CPOSITION_H
|
||||||
|
#define CPOSITION_H
|
||||||
|
|
||||||
|
|
||||||
|
class cPosition
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cPosition(const cPosition& rhs);
|
||||||
|
cPosition(double dLatitude = 0, double dLongitude = 0, double dElevation = 0);
|
||||||
|
double getLatitude();
|
||||||
|
double getLongitude();
|
||||||
|
double getElevation();
|
||||||
|
cPosition& operator=(const cPosition& rhs);
|
||||||
|
protected:
|
||||||
|
double m_dLatitude;
|
||||||
|
double m_dLongitude;
|
||||||
|
double m_dElevation;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CPOSITION_H
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#include <QtGui/QApplication>
|
||||||
|
#include "cmainwindow.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
cMainWindow w;
|
||||||
|
w.show();
|
||||||
|
|
||||||
|
return a.exec();
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2011-04-21T09:04:50
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
QT += xml xmlpatterns
|
||||||
|
|
||||||
|
QT -= gui
|
||||||
|
|
||||||
|
TARGET = ImportTCX
|
||||||
|
TEMPLATE = lib
|
||||||
|
|
||||||
|
DEFINES += IMPORT_LIBRARY
|
||||||
|
|
||||||
|
SOURCES += cimport.cpp \
|
||||||
|
cactivity.cpp \
|
||||||
|
clap.cpp \
|
||||||
|
ctrackpoint.cpp \
|
||||||
|
cposition.cpp
|
||||||
|
|
||||||
|
HEADERS += cimport.h\
|
||||||
|
cactivity.h \
|
||||||
|
clap.h \
|
||||||
|
common.h \
|
||||||
|
ctrackpoint.h \
|
||||||
|
cposition.h
|
||||||
|
|
||||||
|
symbian {
|
||||||
|
#Symbian specific definitions
|
||||||
|
MMP_RULES += EXPORTUNFROZEN
|
||||||
|
TARGET.UID3 = 0xE4D9395A
|
||||||
|
TARGET.CAPABILITY =
|
||||||
|
TARGET.EPOCALLOWDLLDATA = 1
|
||||||
|
addFiles.sources = Import.dll
|
||||||
|
addFiles.path = !:/sys/bin
|
||||||
|
DEPLOYMENT += addFiles
|
||||||
|
}
|
||||||
|
|
||||||
|
unix:!symbian {
|
||||||
|
maemo5 {
|
||||||
|
target.path = /opt/usr/lib
|
||||||
|
} else {
|
||||||
|
target.path = /usr/local/lib
|
||||||
|
}
|
||||||
|
INSTALLS += target
|
||||||
|
}
|
||||||
|
|
||||||
|
LIBS += -shared -fPIC
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="EditorConfiguration.Codec" type="QByteArray">Default</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
|
||||||
|
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
|
||||||
|
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
|
||||||
|
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
|
||||||
|
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
|
||||||
|
<value type="QString">clean</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
|
||||||
|
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Debug</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/data/Projects/QTCreator/TrainingChart/Import-build-desktop</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
|
||||||
|
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
|
||||||
|
<value type="QString">clean</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
|
||||||
|
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Release</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/data/Projects/QTCreator/TrainingChart/Import-build-desktop</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
|
||||||
|
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
|
||||||
|
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
|
||||||
|
<valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments" type="QVariantList"/>
|
||||||
|
<value key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.CustomExecutableRunConfiguration.Executable" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal" type="bool">false</value>
|
||||||
|
<valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
||||||
|
<value key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory" type="QString">$BUILDDIR</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Custom Executable</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||||
|
<value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
|
||||||
|
<value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
|
||||||
|
<value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||||
|
<value type="QString">{7ffca601-cf8d-4c1d-9b60-0a68859cdd79}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">8</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
@@ -0,0 +1,275 @@
|
|||||||
|
#############################################################################
|
||||||
|
# Makefile for building: libImportTCX.so.1.0.0
|
||||||
|
# Generated by qmake (2.01a) (Qt 4.7.2) on: Wed Apr 27 13:38:05 2011
|
||||||
|
# Project: Import.pro
|
||||||
|
# Template: lib
|
||||||
|
# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ QMLJSDEBUGGER_PATH=/usr/share/qtcreator/qml/qmljsdebugger -o Makefile Import.pro
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
####### Compiler, tools and options
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
DEFINES = -DIMPORT_LIBRARY -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED
|
||||||
|
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
|
||||||
|
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
|
||||||
|
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4 -I.
|
||||||
|
LINK = g++
|
||||||
|
LFLAGS = -Wl,-O1 -shared -Wl,-soname,libImportTCX.so.1
|
||||||
|
LIBS = $(SUBLIBS) -L/usr/lib -shared -fPIC -lQtXmlPatterns -lQtXml -lQtCore -lpthread
|
||||||
|
AR = ar cqs
|
||||||
|
RANLIB =
|
||||||
|
QMAKE = /usr/bin/qmake-qt4
|
||||||
|
TAR = tar -cf
|
||||||
|
COMPRESS = gzip -9f
|
||||||
|
COPY = cp -f
|
||||||
|
SED = sed
|
||||||
|
COPY_FILE = $(COPY)
|
||||||
|
COPY_DIR = $(COPY) -r
|
||||||
|
STRIP = strip
|
||||||
|
INSTALL_FILE = install -m 644 -p
|
||||||
|
INSTALL_DIR = $(COPY_DIR)
|
||||||
|
INSTALL_PROGRAM = install -m 755 -p
|
||||||
|
DEL_FILE = rm -f
|
||||||
|
SYMLINK = ln -f -s
|
||||||
|
DEL_DIR = rmdir
|
||||||
|
MOVE = mv -f
|
||||||
|
CHK_DIR_EXISTS= test -d
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
|
||||||
|
####### Output directory
|
||||||
|
|
||||||
|
OBJECTS_DIR = ./
|
||||||
|
|
||||||
|
####### Files
|
||||||
|
|
||||||
|
SOURCES = cimport.cpp \
|
||||||
|
cactivity.cpp \
|
||||||
|
clap.cpp \
|
||||||
|
ctrackpoint.cpp \
|
||||||
|
cposition.cpp
|
||||||
|
OBJECTS = cimport.o \
|
||||||
|
cactivity.o \
|
||||||
|
clap.o \
|
||||||
|
ctrackpoint.o \
|
||||||
|
cposition.o
|
||||||
|
DIST = /usr/share/qt4/mkspecs/common/g++.conf \
|
||||||
|
/usr/share/qt4/mkspecs/common/unix.conf \
|
||||||
|
/usr/share/qt4/mkspecs/common/linux.conf \
|
||||||
|
/usr/share/qt4/mkspecs/qconfig.pri \
|
||||||
|
/usr/share/qt4/mkspecs/modules/qt_phonon.pri \
|
||||||
|
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
|
||||||
|
/usr/share/qt4/mkspecs/features/qt_functions.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/qt_config.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/default_pre.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/release.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/warn_on.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/qt.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/unix/thread.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/moc.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/resources.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/uic.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/yacc.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/lex.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
|
||||||
|
Import.pro
|
||||||
|
QMAKE_TARGET = ImportTCX
|
||||||
|
DESTDIR =
|
||||||
|
TARGET = libImportTCX.so.1.0.0
|
||||||
|
TARGETA = libImportTCX.a
|
||||||
|
TARGETD = libImportTCX.so.1.0.0
|
||||||
|
TARGET0 = libImportTCX.so
|
||||||
|
TARGET1 = libImportTCX.so.1
|
||||||
|
TARGET2 = libImportTCX.so.1.0
|
||||||
|
|
||||||
|
first: all
|
||||||
|
####### Implicit rules
|
||||||
|
|
||||||
|
.SUFFIXES: .o .c .cpp .cc .cxx .C
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||||
|
|
||||||
|
.cc.o:
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||||
|
|
||||||
|
.cxx.o:
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||||
|
|
||||||
|
.C.o:
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
|
||||||
|
|
||||||
|
####### Build rules
|
||||||
|
|
||||||
|
all: Makefile $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP)
|
||||||
|
-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
|
||||||
|
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)
|
||||||
|
-ln -s $(TARGET) $(TARGET0)
|
||||||
|
-ln -s $(TARGET) $(TARGET1)
|
||||||
|
-ln -s $(TARGET) $(TARGET2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
staticlib: $(TARGETA)
|
||||||
|
|
||||||
|
$(TARGETA): $(OBJECTS) $(OBJCOMP)
|
||||||
|
-$(DEL_FILE) $(TARGETA)
|
||||||
|
$(AR) $(TARGETA) $(OBJECTS)
|
||||||
|
|
||||||
|
Makefile: Import.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
|
||||||
|
/usr/share/qt4/mkspecs/common/unix.conf \
|
||||||
|
/usr/share/qt4/mkspecs/common/linux.conf \
|
||||||
|
/usr/share/qt4/mkspecs/qconfig.pri \
|
||||||
|
/usr/share/qt4/mkspecs/modules/qt_phonon.pri \
|
||||||
|
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
|
||||||
|
/usr/share/qt4/mkspecs/features/qt_functions.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/qt_config.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/default_pre.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/release.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/default_post.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/warn_on.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/qt.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/unix/thread.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/moc.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/resources.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/uic.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/yacc.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/lex.prf \
|
||||||
|
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
|
||||||
|
/usr/lib/libQtXmlPatterns.prl \
|
||||||
|
/usr/lib/libQtXml.prl \
|
||||||
|
/usr/lib/libQtCore.prl
|
||||||
|
$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ QMLJSDEBUGGER_PATH=/usr/share/qtcreator/qml/qmljsdebugger -o Makefile Import.pro
|
||||||
|
/usr/share/qt4/mkspecs/common/g++.conf:
|
||||||
|
/usr/share/qt4/mkspecs/common/unix.conf:
|
||||||
|
/usr/share/qt4/mkspecs/common/linux.conf:
|
||||||
|
/usr/share/qt4/mkspecs/qconfig.pri:
|
||||||
|
/usr/share/qt4/mkspecs/modules/qt_phonon.pri:
|
||||||
|
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
|
||||||
|
/usr/share/qt4/mkspecs/features/qt_functions.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/qt_config.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/default_pre.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/release.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/default_post.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/warn_on.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/qt.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/unix/thread.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/moc.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/resources.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/uic.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/yacc.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/lex.prf:
|
||||||
|
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
|
||||||
|
/usr/lib/libQtXmlPatterns.prl:
|
||||||
|
/usr/lib/libQtXml.prl:
|
||||||
|
/usr/lib/libQtCore.prl:
|
||||||
|
qmake: FORCE
|
||||||
|
@$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ QMLJSDEBUGGER_PATH=/usr/share/qtcreator/qml/qmljsdebugger -o Makefile Import.pro
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@$(CHK_DIR_EXISTS) .tmp/ImportTCX1.0.0 || $(MKDIR) .tmp/ImportTCX1.0.0
|
||||||
|
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/ImportTCX1.0.0/ && $(COPY_FILE) --parents cimport.h Import_global.h cactivity.h clap.h common.h ctrackpoint.h cposition.h .tmp/ImportTCX1.0.0/ && $(COPY_FILE) --parents cimport.cpp cactivity.cpp clap.cpp ctrackpoint.cpp cposition.cpp .tmp/ImportTCX1.0.0/ && (cd `dirname .tmp/ImportTCX1.0.0` && $(TAR) ImportTCX1.0.0.tar ImportTCX1.0.0 && $(COMPRESS) ImportTCX1.0.0.tar) && $(MOVE) `dirname .tmp/ImportTCX1.0.0`/ImportTCX1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/ImportTCX1.0.0
|
||||||
|
|
||||||
|
|
||||||
|
clean:compiler_clean
|
||||||
|
-$(DEL_FILE) $(OBJECTS)
|
||||||
|
-$(DEL_FILE) *~ core *.core
|
||||||
|
|
||||||
|
|
||||||
|
####### Sub-libraries
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
-$(DEL_FILE) $(TARGET)
|
||||||
|
-$(DEL_FILE) $(TARGET0) $(TARGET1) $(TARGET2) $(TARGETA)
|
||||||
|
-$(DEL_FILE) Makefile
|
||||||
|
|
||||||
|
|
||||||
|
check: first
|
||||||
|
|
||||||
|
mocclean: compiler_moc_header_clean compiler_moc_source_clean
|
||||||
|
|
||||||
|
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
|
||||||
|
|
||||||
|
compiler_moc_header_make_all:
|
||||||
|
compiler_moc_header_clean:
|
||||||
|
compiler_rcc_make_all:
|
||||||
|
compiler_rcc_clean:
|
||||||
|
compiler_image_collection_make_all: qmake_image_collection.cpp
|
||||||
|
compiler_image_collection_clean:
|
||||||
|
-$(DEL_FILE) qmake_image_collection.cpp
|
||||||
|
compiler_moc_source_make_all:
|
||||||
|
compiler_moc_source_clean:
|
||||||
|
compiler_uic_make_all:
|
||||||
|
compiler_uic_clean:
|
||||||
|
compiler_yacc_decl_make_all:
|
||||||
|
compiler_yacc_decl_clean:
|
||||||
|
compiler_yacc_impl_make_all:
|
||||||
|
compiler_yacc_impl_clean:
|
||||||
|
compiler_lex_make_all:
|
||||||
|
compiler_lex_clean:
|
||||||
|
compiler_clean:
|
||||||
|
|
||||||
|
####### Compile
|
||||||
|
|
||||||
|
cimport.o: cimport.cpp cimport.h \
|
||||||
|
cactivity.h \
|
||||||
|
common.h \
|
||||||
|
clap.h \
|
||||||
|
ctrackpoint.h \
|
||||||
|
cposition.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cimport.o cimport.cpp
|
||||||
|
|
||||||
|
cactivity.o: cactivity.cpp cactivity.h \
|
||||||
|
common.h \
|
||||||
|
clap.h \
|
||||||
|
ctrackpoint.h \
|
||||||
|
cposition.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cactivity.o cactivity.cpp
|
||||||
|
|
||||||
|
clap.o: clap.cpp clap.h \
|
||||||
|
common.h \
|
||||||
|
ctrackpoint.h \
|
||||||
|
cposition.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o clap.o clap.cpp
|
||||||
|
|
||||||
|
ctrackpoint.o: ctrackpoint.cpp ctrackpoint.h \
|
||||||
|
common.h \
|
||||||
|
cposition.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ctrackpoint.o ctrackpoint.cpp
|
||||||
|
|
||||||
|
cposition.o: cposition.cpp cposition.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o cposition.o cposition.cpp
|
||||||
|
|
||||||
|
####### Install
|
||||||
|
|
||||||
|
install_target: first FORCE
|
||||||
|
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/lib/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/lib/
|
||||||
|
-$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET)"
|
||||||
|
-$(STRIP) --strip-unneeded "$(INSTALL_ROOT)/usr/local/lib/$(TARGET)"
|
||||||
|
-$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET0)"
|
||||||
|
-$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET1)"
|
||||||
|
-$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)/usr/local/lib/$(TARGET2)"
|
||||||
|
|
||||||
|
uninstall_target: FORCE
|
||||||
|
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET)"
|
||||||
|
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET0)"
|
||||||
|
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET1)"
|
||||||
|
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/lib/$(TARGET2)"
|
||||||
|
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/lib/
|
||||||
|
|
||||||
|
|
||||||
|
install: install_target FORCE
|
||||||
|
|
||||||
|
uninstall: uninstall_target FORCE
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
#include "cactivity.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
cActivity::cActivity()
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity::cActivity(const cActivity& rhs)
|
||||||
|
{
|
||||||
|
this->m_dwValid = rhs.m_dwValid;
|
||||||
|
this->m_iActivityType = rhs.m_iActivityType;
|
||||||
|
this->m_LapList = rhs.m_LapList;
|
||||||
|
this->m_szName = rhs.m_szName;
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity::cActivity(enum ActivityType iActivityType, const QString& szName)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
setActivityType(iActivityType);
|
||||||
|
setName(szName);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cActivity::setActivityType(enum ActivityType iActivityType)
|
||||||
|
{
|
||||||
|
if(iActivityType < ActivityTypeUnknown || iActivityType > ActivityTypeNone)
|
||||||
|
return(false);
|
||||||
|
m_iActivityType = iActivityType;
|
||||||
|
m_dwValid |= VALID_ACTIVITYTYPE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum cActivity::ActivityType cActivity::getActivityType()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_ACTIVITYTYPE)
|
||||||
|
return(m_iActivityType);
|
||||||
|
else
|
||||||
|
return(ActivityTypeUnknown);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cActivity::setName(const QString& szName)
|
||||||
|
{
|
||||||
|
if(!szName.length())
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
m_szName = szName;
|
||||||
|
m_dwValid |= VALID_NAME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString cActivity::getName()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_NAME)
|
||||||
|
return(m_szName);
|
||||||
|
return("");
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap* cActivity::addLap(const QDateTime& StartTime)
|
||||||
|
{
|
||||||
|
return(m_LapList.add(this, StartTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
cLapList cActivity::getLapList()
|
||||||
|
{
|
||||||
|
return(m_LapList);
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity& cActivity::operator=(const cActivity& rhs)
|
||||||
|
{
|
||||||
|
if(this != &rhs)
|
||||||
|
{
|
||||||
|
this->m_dwValid = rhs.m_dwValid;
|
||||||
|
this->m_iActivityType = rhs.m_iActivityType;
|
||||||
|
this->m_LapList = rhs.m_LapList;
|
||||||
|
this->m_szName = rhs.m_szName;
|
||||||
|
}
|
||||||
|
return(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivityList::cActivityList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity* cActivityList::add(enum cActivity::ActivityType iActivityType, const QString& szName)
|
||||||
|
{
|
||||||
|
cActivity* lpActivity = new cActivity(iActivityType, szName);
|
||||||
|
this->append(lpActivity);
|
||||||
|
return(lpActivity);
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#ifndef CACTIVITY_H
|
||||||
|
#define CACTIVITY_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <QMetaType>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "clap.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cActivity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum ActivityType
|
||||||
|
{
|
||||||
|
ActivityTypeUnknown,
|
||||||
|
ActivityTypeRunning,
|
||||||
|
ActivityTypeBiking,
|
||||||
|
ActivityTypeSwimming,
|
||||||
|
ActivityTypeNone,
|
||||||
|
};
|
||||||
|
|
||||||
|
cActivity();
|
||||||
|
cActivity(const cActivity& rhs);
|
||||||
|
cActivity(enum ActivityType iActivityType, const QString& szName);
|
||||||
|
|
||||||
|
bool setActivityType(enum ActivityType iActivityType);
|
||||||
|
enum ActivityType getActivityType();
|
||||||
|
|
||||||
|
bool setName(const QString& szName);
|
||||||
|
QString getName();
|
||||||
|
|
||||||
|
cLap* addLap(const QDateTime& StartTime);
|
||||||
|
cLapList getLapList();
|
||||||
|
|
||||||
|
cActivity& operator=(const cActivity& rhs);
|
||||||
|
protected:
|
||||||
|
uint64_t m_dwValid;
|
||||||
|
enum ActivityType m_iActivityType;
|
||||||
|
QString m_szName;
|
||||||
|
|
||||||
|
cLapList m_LapList;
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(cActivity);
|
||||||
|
|
||||||
|
class cActivityList : public QList<cActivity*>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cActivityList();
|
||||||
|
cActivity* add(enum cActivity::ActivityType iActivityType, const QString& szName);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CACTIVITY_H
|
||||||
@@ -0,0 +1,289 @@
|
|||||||
|
#include "cimport.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
bool attributeString(const QDomElement& Element, const QString& szName, QString& szValue)
|
||||||
|
{
|
||||||
|
QDomNamedNodeMap Attributes = Element.attributes();
|
||||||
|
|
||||||
|
for(int z = 0;z < Attributes.count();z++)
|
||||||
|
{
|
||||||
|
QDomNode Node = Attributes.item(z);
|
||||||
|
if(!Node.toAttr().name().compare(szName, Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
szValue = Node.toAttr().nodeValue();
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDateTime toDateTime(const QString& szDateTime)
|
||||||
|
{
|
||||||
|
QDateTime DateTime = QDateTime::fromString(szDateTime, "yyyy-MM-ddTHH:mm:ss.000Z"); // 2011-04-17T07:04:35.000Z
|
||||||
|
return(DateTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
double toDouble(const QString& szDouble)
|
||||||
|
{
|
||||||
|
QString sz = szDouble;
|
||||||
|
bool bOk;
|
||||||
|
double x;
|
||||||
|
|
||||||
|
sz.replace(",", ".");
|
||||||
|
x = sz.toDouble(&bOk);
|
||||||
|
if(!bOk)
|
||||||
|
{
|
||||||
|
sz.replace(".", ",");
|
||||||
|
x = sz.toDouble(&bOk);
|
||||||
|
}
|
||||||
|
return(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
cImport::cImport()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QString cImport::getName()
|
||||||
|
{
|
||||||
|
return("ImportTCX");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString cImport::getVersion()
|
||||||
|
{
|
||||||
|
return("1.0");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString cImport::getExtension()
|
||||||
|
{
|
||||||
|
return("Garmin Workouts (*.tcx)");
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivityList cImport::getActivityList()
|
||||||
|
{
|
||||||
|
return(m_ActivityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t cImport::load(const QString &szFileName)
|
||||||
|
{
|
||||||
|
if(!szFileName.contains(".tcx", Qt::CaseInsensitive))
|
||||||
|
return(FILE_NOT_SUPPORTED);
|
||||||
|
|
||||||
|
QFile File(szFileName);
|
||||||
|
if(!File.exists())
|
||||||
|
return(FILE_NOT_EXIST);
|
||||||
|
|
||||||
|
if(!szFileName.toLower().contains(".tcx"))
|
||||||
|
return(FILE_WRONG_FORMAT);
|
||||||
|
|
||||||
|
if(!File.open(QFile::ReadOnly | QFile::Text))
|
||||||
|
return(FILE_NOT_READABLE);
|
||||||
|
|
||||||
|
QDomDocument Doc;
|
||||||
|
QString errorStr;
|
||||||
|
int errorLine;
|
||||||
|
int errorColumn;
|
||||||
|
if(!Doc.setContent(&File, false, &errorStr, &errorLine, &errorColumn))
|
||||||
|
{
|
||||||
|
File.close();
|
||||||
|
return(FILE_WRONG_FORMAT);
|
||||||
|
}
|
||||||
|
File.close();
|
||||||
|
|
||||||
|
QDomElement Root = Doc.documentElement();
|
||||||
|
|
||||||
|
if(Root.tagName().toLower() != "trainingcenterdatabase")
|
||||||
|
return(FILE_WRONG_FORMAT);
|
||||||
|
|
||||||
|
QDomNode Child = Root.firstChild();
|
||||||
|
|
||||||
|
while(!Child.isNull())
|
||||||
|
{
|
||||||
|
if(!Child.toElement().tagName().compare("activities", Qt::CaseInsensitive))
|
||||||
|
parseActivities(Child.toElement());
|
||||||
|
else if(!Child.toElement().tagName().compare("author", Qt::CaseInsensitive))
|
||||||
|
parseAuthor(Child.toElement());
|
||||||
|
|
||||||
|
Child = Child.nextSibling();
|
||||||
|
}
|
||||||
|
|
||||||
|
return(NO_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cImport::parseActivities(const QDomElement& Element)
|
||||||
|
{
|
||||||
|
QDomNode Child = Element.firstChild();
|
||||||
|
|
||||||
|
while(!Child.isNull())
|
||||||
|
{
|
||||||
|
if(!Child.toElement().tagName().compare("activity", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QString szSport;
|
||||||
|
if(attributeString(Child.toElement(), "sport", szSport))
|
||||||
|
parseActivity(Child.toElement(), szSport);
|
||||||
|
}
|
||||||
|
|
||||||
|
Child = Child.nextSibling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cImport::parseActivity(const QDomElement& Element, const QString& szSport)
|
||||||
|
{
|
||||||
|
QDomNode Child = Element.firstChild();
|
||||||
|
cActivity* lpActivity = 0;
|
||||||
|
cActivity::ActivityType iActivityType = cActivity::ActivityTypeUnknown;
|
||||||
|
|
||||||
|
if(!szSport.compare("running", Qt::CaseInsensitive))
|
||||||
|
iActivityType = cActivity::ActivityTypeRunning;
|
||||||
|
else if(!szSport.compare("biking", Qt::CaseInsensitive))
|
||||||
|
iActivityType = cActivity::ActivityTypeBiking;
|
||||||
|
|
||||||
|
while(!Child.isNull())
|
||||||
|
{
|
||||||
|
if(!Child.toElement().tagName().compare("id", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
if(lpActivity)
|
||||||
|
lpActivity->setName(Child.toElement().text());
|
||||||
|
else
|
||||||
|
lpActivity = m_ActivityList.add(iActivityType, Child.toElement().text());
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("lap", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QString szStartTime;
|
||||||
|
if(attributeString(Child.toElement(), "starttime", szStartTime))
|
||||||
|
{
|
||||||
|
if(!lpActivity)
|
||||||
|
lpActivity = m_ActivityList.add(iActivityType, "EMPTY");
|
||||||
|
cLap* lpLap = lpActivity->addLap(toDateTime(szStartTime));
|
||||||
|
|
||||||
|
parseLap(Child.toElement(), lpLap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Child = Child.nextSibling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cImport::parseLap(const QDomElement& Element, cLap* lpLap)
|
||||||
|
{
|
||||||
|
QDomNode Child = Element.firstChild();
|
||||||
|
|
||||||
|
while(!Child.isNull())
|
||||||
|
{
|
||||||
|
if(!Child.toElement().tagName().compare("totaltimeseconds",Qt::CaseInsensitive))
|
||||||
|
lpLap->setTotalTime(toDouble(Child.toElement().text()));
|
||||||
|
else if(!Child.toElement().tagName().compare("distancemeters",Qt::CaseInsensitive))
|
||||||
|
lpLap->setTotalDistance(toDouble(Child.toElement().text()));
|
||||||
|
else if(!Child.toElement().tagName().compare("maximumspeed",Qt::CaseInsensitive))
|
||||||
|
lpLap->setMaximumSpeed(toDouble(Child.toElement().text()));
|
||||||
|
else if(!Child.toElement().tagName().compare("calories",Qt::CaseInsensitive))
|
||||||
|
lpLap->setCalories(toDouble(Child.toElement().text()));
|
||||||
|
else if(!Child.toElement().tagName().compare("averageheartratebpm",Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QDomNode SubChild = Child.toElement().firstChild();
|
||||||
|
if(!SubChild.isNull())
|
||||||
|
lpLap->setAvgHeartrate(toDouble(SubChild.toElement().text()));
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("maximumheartratebpm",Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QDomNode SubChild = Child.toElement().firstChild();
|
||||||
|
if(!SubChild.isNull())
|
||||||
|
lpLap->setMaxHeartrate(toDouble(SubChild.toElement().text()));
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("intensity",Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QString sz = Child.toElement().text();
|
||||||
|
if(!sz.compare("active", Qt::CaseInsensitive))
|
||||||
|
lpLap->setIntensity(cLap::IntensityActive);
|
||||||
|
else
|
||||||
|
lpLap->setIntensity(cLap::IntensityNone);
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("triggermethod",Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QString sz = Child.toElement().text();
|
||||||
|
if(!sz.compare("manual", Qt::CaseInsensitive))
|
||||||
|
lpLap->setTriggerMethod(cLap::TriggerMethodManual);
|
||||||
|
else
|
||||||
|
lpLap->setTriggerMethod(cLap::TriggerMethodNone);
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("track",Qt::CaseInsensitive))
|
||||||
|
parseTrack(Child.toElement(), lpLap);
|
||||||
|
|
||||||
|
Child = Child.nextSibling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cImport::parseTrack(const QDomElement& Element, cLap* lpLap)
|
||||||
|
{
|
||||||
|
QDomNode Child = Element.firstChild();
|
||||||
|
|
||||||
|
while(!Child.isNull())
|
||||||
|
{
|
||||||
|
if(!Child.toElement().tagName().compare("trackpoint", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
cTrackpoint* lpTrackpoint = lpLap->addTrackpoint(0);
|
||||||
|
parseTrackpoint(Child.toElement(), lpTrackpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
Child = Child.nextSibling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cImport::parseTrackpoint(const QDomElement& Element, cTrackpoint* lpTrackpoint)
|
||||||
|
{
|
||||||
|
QDomNode Child = Element.firstChild();
|
||||||
|
double dLatitude = 0;
|
||||||
|
double dLongitude = 0;
|
||||||
|
double dElevation = 0;
|
||||||
|
|
||||||
|
while(!Child.isNull())
|
||||||
|
{
|
||||||
|
if(!Child.toElement().tagName().compare("time", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
cLap* lpLap = lpTrackpoint->getParent();
|
||||||
|
if(lpLap)
|
||||||
|
lpTrackpoint->setTime(toDateTime(Child.toElement().text()).toTime_t()-lpLap->getStartTime().toTime_t());
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("position", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QDomNode subChild = Child.toElement().firstChild();
|
||||||
|
while(!subChild.isNull())
|
||||||
|
{
|
||||||
|
if(!subChild.toElement().tagName().compare("latitudedegrees", Qt::CaseInsensitive))
|
||||||
|
dLatitude = toDouble(subChild.toElement().text());
|
||||||
|
else if(!subChild.toElement().tagName().compare("longitudedegrees", Qt::CaseInsensitive))
|
||||||
|
dLongitude = toDouble(subChild.toElement().text());
|
||||||
|
subChild = subChild.nextSibling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(!Child.toElement().tagName().compare("altitudemeters", Qt::CaseInsensitive))
|
||||||
|
dElevation = toDouble(Child.toElement().text());
|
||||||
|
else if(!Child.toElement().tagName().compare("distancemeters", Qt::CaseInsensitive))
|
||||||
|
lpTrackpoint->setDistance(toDouble(Child.toElement().text()));
|
||||||
|
else if(!Child.toElement().tagName().compare("heartratebpm", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
QDomNode SubChild = Child.toElement().firstChild();
|
||||||
|
if(!SubChild.isNull())
|
||||||
|
lpTrackpoint->setHeartRate(toDouble(SubChild.toElement().text()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Child = Child.nextSibling();
|
||||||
|
}
|
||||||
|
lpTrackpoint->setPosition(cPosition(dLatitude, dLongitude, dElevation));
|
||||||
|
}
|
||||||
|
|
||||||
|
void cImport::parseAuthor(const QDomElement& Element)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
cImport* create()
|
||||||
|
{
|
||||||
|
return(new cImport);
|
||||||
|
}
|
||||||
|
|
||||||
|
void destroy(cImport* p)
|
||||||
|
{
|
||||||
|
delete p;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#ifndef CIMPORT_H
|
||||||
|
#define CIMPORT_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QDomDocument>
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "cactivity.h"
|
||||||
|
#include "clap.h"
|
||||||
|
#include "ctrackpoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cImport
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum IMPORT_ERROR
|
||||||
|
{
|
||||||
|
NO_ERROR = 0,
|
||||||
|
FILE_NOT_EXIST = 1,
|
||||||
|
FILE_NOT_SUPPORTED = 2,
|
||||||
|
FILE_NOT_READABLE = 3,
|
||||||
|
FILE_WRONG_FORMAT = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
cImport();
|
||||||
|
|
||||||
|
virtual QString getName();
|
||||||
|
virtual QString getVersion();
|
||||||
|
virtual QString getExtension();
|
||||||
|
virtual cActivityList getActivityList();
|
||||||
|
|
||||||
|
virtual int32_t load(const QString& szFileName);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parseActivities(const QDomElement& Element);
|
||||||
|
void parseActivity(const QDomElement& Element, const QString& szSport);
|
||||||
|
void parseLap(const QDomElement& Element, cLap* lpLap);
|
||||||
|
void parseTrack(const QDomElement& Element, cLap* lpLap);
|
||||||
|
void parseTrackpoint(const QDomElement& Element, cTrackpoint* lpTrackpoint);
|
||||||
|
void parseAuthor(const QDomElement& Element);
|
||||||
|
|
||||||
|
cActivityList m_ActivityList;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef cImport* create_t();
|
||||||
|
typedef void destroy_t(cImport* lpImport);
|
||||||
|
|
||||||
|
#endif // CIMPORT_H
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
#include "clap.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
cLap::cLap(cActivity* lpParent)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
m_lpParent = lpParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap::cLap(cActivity* lpParent, const QDateTime &StartTime)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
m_lpParent = lpParent;
|
||||||
|
setStartTime(StartTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
cActivity* cLap::getParent()
|
||||||
|
{
|
||||||
|
return(m_lpParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setStartTime(const QDateTime &StartTime)
|
||||||
|
{
|
||||||
|
if(!StartTime.isValid())
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
m_StartTime = StartTime;
|
||||||
|
m_dwValid |= VALID_STARTTIME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDateTime cLap::getStartTime()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_STARTTIME)
|
||||||
|
return(m_StartTime);
|
||||||
|
return(QDateTime(QDate(1980, 1, 1), QTime(0, 0)));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setTotalTime(double dTotalTime)
|
||||||
|
{
|
||||||
|
m_dTotalTime = dTotalTime;
|
||||||
|
m_dwValid |= VALID_TOTALTIME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getTotalTime()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TOTALTIME)
|
||||||
|
return(m_dTotalTime);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setTotalDistance(double dTotalDistance)
|
||||||
|
{
|
||||||
|
m_dTotalDistance = dTotalDistance;
|
||||||
|
m_dwValid |= VALID_TOTALDISTANCE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getTotalDistance()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TOTALDISTANCE)
|
||||||
|
return(m_dTotalDistance);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setMaximumSpeed(double dMaximumSpeed)
|
||||||
|
{
|
||||||
|
m_dMaximumSpeed = dMaximumSpeed;
|
||||||
|
m_dwValid |= VALID_MAXIMUMSPEED;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getMaximumSpeed()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_MAXIMUMSPEED)
|
||||||
|
return(m_dMaximumSpeed);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setCalories(double dCalories)
|
||||||
|
{
|
||||||
|
m_dCalories = dCalories;
|
||||||
|
m_dwValid |= VALID_CALORIES;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getCalories()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_CALORIES)
|
||||||
|
return(m_dCalories);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setAvgHeartrate(double dAvgHeartrate)
|
||||||
|
{
|
||||||
|
m_dAvgHeartrate = dAvgHeartrate;
|
||||||
|
m_dwValid |= VALID_AVGHEARTRATE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getAvgHeartrate()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_AVGHEARTRATE)
|
||||||
|
return(m_dAvgHeartrate);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setMaxHeartrate(double dMaxHeartrate)
|
||||||
|
{
|
||||||
|
m_dMaxHeartrate = dMaxHeartrate;
|
||||||
|
m_dwValid |= VALID_MAXHEARTRATE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cLap::getMaxHeartrate()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_MAXHEARTRATE)
|
||||||
|
return(m_dMaxHeartrate);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setIntensity(enum Intensity iIntensity)
|
||||||
|
{
|
||||||
|
if(iIntensity < IntensityUnknown || iIntensity > IntensityNone)
|
||||||
|
return(false);
|
||||||
|
m_iIntensity = iIntensity;
|
||||||
|
m_dwValid |= VALID_INTENSITY;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum cLap::Intensity cLap::getIntensity()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_INTENSITY)
|
||||||
|
return(m_iIntensity);
|
||||||
|
else
|
||||||
|
return(cLap::IntensityNone);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cLap::setTriggerMethod(enum TriggerMethod iTriggerMethod)
|
||||||
|
{
|
||||||
|
if(iTriggerMethod < TriggerMethodUnknown || iTriggerMethod > TriggerMethodNone)
|
||||||
|
return(false);
|
||||||
|
m_iTriggerMethod = iTriggerMethod;
|
||||||
|
m_dwValid |= VALID_TRIGGERMETHOD;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum cLap::TriggerMethod cLap::getTriggerMethod()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TRIGGERMETHOD)
|
||||||
|
return(m_iTriggerMethod);
|
||||||
|
else
|
||||||
|
return(cLap::TriggerMethodNone);
|
||||||
|
}
|
||||||
|
|
||||||
|
cTrackpoint* cLap::addTrackpoint(uint32_t dwTime)
|
||||||
|
{
|
||||||
|
return(m_TrackpointList.add(this, dwTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
cLapList::cLapList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap* cLapList::add(cActivity* lpParent, const QDateTime &StartTime)
|
||||||
|
{
|
||||||
|
cLap* lpLap = new cLap(lpParent, StartTime);
|
||||||
|
this->append(lpLap);
|
||||||
|
return(lpLap);
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
#ifndef CLAP_H
|
||||||
|
#define CLAP_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <QMetaType>
|
||||||
|
#include <QString>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "ctrackpoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cActivity;
|
||||||
|
|
||||||
|
class cLap
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum Intensity
|
||||||
|
{
|
||||||
|
IntensityUnknown,
|
||||||
|
IntensityActive,
|
||||||
|
IntensityNone,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TriggerMethod
|
||||||
|
{
|
||||||
|
TriggerMethodUnknown,
|
||||||
|
TriggerMethodManual,
|
||||||
|
TriggerMethodAuto,
|
||||||
|
TriggerMethodNone,
|
||||||
|
};
|
||||||
|
|
||||||
|
cLap(cActivity* lpParent = 0);
|
||||||
|
cLap(cActivity* lpParent, const QDateTime& StartTime);
|
||||||
|
|
||||||
|
cActivity* getParent();
|
||||||
|
|
||||||
|
bool setStartTime(const QDateTime& StartTime);
|
||||||
|
QDateTime getStartTime();
|
||||||
|
|
||||||
|
bool setTotalTime(double dTotalTime);
|
||||||
|
double getTotalTime();
|
||||||
|
|
||||||
|
bool setTotalDistance(double dTotalDistance);
|
||||||
|
double getTotalDistance();
|
||||||
|
|
||||||
|
bool setMaximumSpeed(double dMaximumSpeed);
|
||||||
|
double getMaximumSpeed();
|
||||||
|
|
||||||
|
bool setCalories(double dCalories);
|
||||||
|
double getCalories();
|
||||||
|
|
||||||
|
bool setAvgHeartrate(double dAvgHeartrate);
|
||||||
|
double getAvgHeartrate();
|
||||||
|
|
||||||
|
bool setMaxHeartrate(double dMaxHeartrate);
|
||||||
|
double getMaxHeartrate();
|
||||||
|
|
||||||
|
bool setIntensity(enum Intensity iIntensity);
|
||||||
|
enum Intensity getIntensity();
|
||||||
|
|
||||||
|
bool setTriggerMethod(enum TriggerMethod iTriggerMethod);
|
||||||
|
enum TriggerMethod getTriggerMethod();
|
||||||
|
|
||||||
|
cTrackpoint* addTrackpoint(uint32_t dwTime);
|
||||||
|
protected:
|
||||||
|
uint64_t m_dwValid;
|
||||||
|
cActivity* m_lpParent;
|
||||||
|
QDateTime m_StartTime;
|
||||||
|
double m_dTotalTime;
|
||||||
|
double m_dTotalDistance;
|
||||||
|
double m_dMaximumSpeed;
|
||||||
|
double m_dCalories;
|
||||||
|
double m_dAvgHeartrate;
|
||||||
|
double m_dMaxHeartrate;
|
||||||
|
enum Intensity m_iIntensity;
|
||||||
|
enum TriggerMethod m_iTriggerMethod;
|
||||||
|
cTrackpointList m_TrackpointList;
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(cLap);
|
||||||
|
|
||||||
|
class cLapList : public QList<cLap*>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cLapList();
|
||||||
|
cLap* add(cActivity* lpParent, const QDateTime& StartTime);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CLAP_H
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef COMMON_H
|
||||||
|
#define COMMON_H
|
||||||
|
|
||||||
|
|
||||||
|
#define VALID_NAME 0x00000000000000000000000000000001LL
|
||||||
|
#define VALID_STARTTIME 0x00000000000000000000000000000002LL
|
||||||
|
#define VALID_TOTALTIME 0x00000000000000000000000000000004LL
|
||||||
|
#define VALID_TOTALDISTANCE 0x00000000000000000000000000000008LL
|
||||||
|
#define VALID_MAXIMUMSPEED 0x00000000000000000000000000000010LL
|
||||||
|
#define VALID_CALORIES 0x00000000000000000000000000000020LL
|
||||||
|
#define VALID_AVGHEARTRATE 0x00000000000000000000000000000040LL
|
||||||
|
#define VALID_MAXHEARTRATE 0x00000000000000000000000000000080LL
|
||||||
|
#define VALID_ACTIVITYTYPE 0x00000000000000000000000000000100LL
|
||||||
|
#define VALID_INTENSITY 0x00000000000000000000000000000200LL
|
||||||
|
#define VALID_TRIGGERMETHOD 0x00000000000000000000000000000400LL
|
||||||
|
#define VALID_TIME 0x00000000000000000000000000000800LL
|
||||||
|
#define VALID_POSITION 0x00000000000000000000000000001000LL
|
||||||
|
#define VALID_DISTANCE 0x00000000000000000000000000002000LL
|
||||||
|
#define VALID_HEARTRATE 0x00000000000000000000000000004000LL
|
||||||
|
|
||||||
|
|
||||||
|
#endif // COMMON_H
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#include "cposition.h"
|
||||||
|
|
||||||
|
|
||||||
|
cPosition::cPosition(const cPosition& rhs)
|
||||||
|
{
|
||||||
|
this->m_dLatitude = rhs.m_dLatitude;
|
||||||
|
this->m_dLongitude = rhs.m_dLongitude;
|
||||||
|
this->m_dElevation = rhs.m_dElevation;
|
||||||
|
}
|
||||||
|
|
||||||
|
cPosition::cPosition(double dLatitude, double dLongitude, double dElevation)
|
||||||
|
{
|
||||||
|
m_dLatitude = dLatitude;
|
||||||
|
m_dLongitude = dLongitude;
|
||||||
|
m_dElevation = dElevation;
|
||||||
|
}
|
||||||
|
|
||||||
|
double cPosition::getLatitude()
|
||||||
|
{
|
||||||
|
return(m_dLatitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cPosition::getLongitude()
|
||||||
|
{
|
||||||
|
return(m_dLongitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cPosition::getElevation()
|
||||||
|
{
|
||||||
|
return(m_dElevation);
|
||||||
|
}
|
||||||
|
|
||||||
|
cPosition &cPosition::operator=(const cPosition &rhs)
|
||||||
|
{
|
||||||
|
if(this != &rhs)
|
||||||
|
{
|
||||||
|
this->m_dLatitude = rhs.m_dLatitude;
|
||||||
|
this->m_dLongitude = rhs.m_dLongitude;
|
||||||
|
this->m_dElevation = rhs.m_dElevation;
|
||||||
|
}
|
||||||
|
return(*this);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#ifndef CPOSITION_H
|
||||||
|
#define CPOSITION_H
|
||||||
|
|
||||||
|
|
||||||
|
class cPosition
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cPosition(const cPosition& rhs);
|
||||||
|
cPosition(double dLatitude = 0, double dLongitude = 0, double dElevation = 0);
|
||||||
|
double getLatitude();
|
||||||
|
double getLongitude();
|
||||||
|
double getElevation();
|
||||||
|
cPosition& operator=(const cPosition& rhs);
|
||||||
|
protected:
|
||||||
|
double m_dLatitude;
|
||||||
|
double m_dLongitude;
|
||||||
|
double m_dElevation;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CPOSITION_H
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
#include "ctrackpoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
cTrackpoint::cTrackpoint(cLap* lpParent)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
m_lpParent = lpParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
cTrackpoint::cTrackpoint(cLap* lpParent, uint32_t dwTime)
|
||||||
|
{
|
||||||
|
m_dwValid = 0;
|
||||||
|
m_lpParent = lpParent;
|
||||||
|
setTime(dwTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
cLap* cTrackpoint::getParent()
|
||||||
|
{
|
||||||
|
return(m_lpParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cTrackpoint::setTime(uint32_t dwTime)
|
||||||
|
{
|
||||||
|
m_dwTime = dwTime;
|
||||||
|
m_dwValid |= VALID_TIME;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t cTrackpoint::getTime()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_TIME)
|
||||||
|
return(m_dwTime);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cTrackpoint::setPosition(const cPosition& Position)
|
||||||
|
{
|
||||||
|
m_Position = Position;
|
||||||
|
m_dwValid |= VALID_POSITION;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
cPosition cTrackpoint::getPosition()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_POSITION)
|
||||||
|
return(m_Position);
|
||||||
|
return(cPosition(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cTrackpoint::setDistance(double dDistance)
|
||||||
|
{
|
||||||
|
m_dDistance = dDistance;
|
||||||
|
m_dwValid |= VALID_DISTANCE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
double cTrackpoint::getDistance()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_DISTANCE)
|
||||||
|
return(m_dDistance);
|
||||||
|
else
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cTrackpoint::setHeartRate(uint16_t dwHeartRate)
|
||||||
|
{
|
||||||
|
if(!dwHeartRate)
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
m_dwHeartRate = dwHeartRate;
|
||||||
|
m_dwValid |= VALID_HEARTRATE;
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t cTrackpoint::getHeartRate()
|
||||||
|
{
|
||||||
|
if(m_dwValid & VALID_HEARTRATE)
|
||||||
|
return(m_dwHeartRate);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
cTrackpointList::cTrackpointList()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
cTrackpoint* cTrackpointList::add(cLap* lpParent, uint32_t dwTime)
|
||||||
|
{
|
||||||
|
cTrackpoint* lpTrackpoint = new cTrackpoint(lpParent, dwTime);
|
||||||
|
this->append(lpTrackpoint);
|
||||||
|
return(lpTrackpoint);
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
#ifndef CTRACKPOINT_H
|
||||||
|
#define CTRACKPOINT_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <QMetaType>
|
||||||
|
#include <QString>
|
||||||
|
#include <QDateTime>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include "cposition.h"
|
||||||
|
|
||||||
|
|
||||||
|
class cLap;
|
||||||
|
|
||||||
|
class cTrackpoint
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cTrackpoint(cLap* lpParent = 0);
|
||||||
|
cTrackpoint(cLap* lpParent, uint32_t dwTime);
|
||||||
|
|
||||||
|
cLap* getParent();
|
||||||
|
|
||||||
|
bool setTime(uint32_t dwTime);
|
||||||
|
uint32_t getTime();
|
||||||
|
|
||||||
|
bool setPosition(const cPosition& Position);
|
||||||
|
cPosition getPosition();
|
||||||
|
|
||||||
|
bool setDistance(double dDistance);
|
||||||
|
double getDistance();
|
||||||
|
|
||||||
|
bool setHeartRate(uint16_t dwHeartRate);
|
||||||
|
uint16_t getHeartRate();
|
||||||
|
protected:
|
||||||
|
uint64_t m_dwValid;
|
||||||
|
cLap* m_lpParent;
|
||||||
|
uint32_t m_dwTime;
|
||||||
|
cPosition m_Position;
|
||||||
|
double m_dDistance;
|
||||||
|
uint16_t m_dwHeartRate;
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(cTrackpoint);
|
||||||
|
|
||||||
|
class cTrackpointList : public QList<cTrackpoint*>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cTrackpointList();
|
||||||
|
cTrackpoint* add(cLap* lpParent, uint32_t dwTime);
|
||||||
|
};
|
||||||
|
#endif // CTRACKPOINT_H
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2011-04-28T09:26:30
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
QT += core gui
|
||||||
|
|
||||||
|
TARGET = qtTrainingChart
|
||||||
|
TEMPLATE = app
|
||||||
|
|
||||||
|
|
||||||
|
SOURCES += main.cpp\
|
||||||
|
cmainwindow.cpp
|
||||||
|
|
||||||
|
HEADERS += cmainwindow.h
|
||||||
|
|
||||||
|
FORMS += cmainwindow.ui
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="EditorConfiguration.Codec" type="QByteArray">Default</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
|
||||||
|
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
|
||||||
|
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
|
||||||
|
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
|
||||||
|
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
|
||||||
|
<value type="QString">clean</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
|
||||||
|
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Debug</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/data/Projects/QTCreator/TrainingChart/qtTrainingChart-build-desktop</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
|
||||||
|
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Make</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
|
||||||
|
<value type="QString">clean</value>
|
||||||
|
</valuelist>
|
||||||
|
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
|
||||||
|
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Release</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/data/Projects/QTCreator/TrainingChart/qtTrainingChart-build-desktop</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
|
||||||
|
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
|
||||||
|
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Deploy</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">No deployment</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
|
||||||
|
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qtTrainingChart</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
|
||||||
|
<value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">qtTrainingChart.pro</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
|
||||||
|
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
||||||
|
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
|
||||||
|
<value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
|
||||||
|
<value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
|
||||||
|
<value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||||
|
<value type="QString">{7ffca601-cf8d-4c1d-9b60-0a68859cdd79}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">8</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
Reference in New Issue
Block a user