mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
misc cleanup
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_plot_grid.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
#include "RideItem.h"
|
||||
#include "LogTimeScaleDraw.h"
|
||||
#include "LogTimeScaleEngine.h"
|
||||
@@ -32,12 +33,13 @@
|
||||
#include "Season.h"
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#define USE_T0_IN_CP_MODEL 0 // added djconnel 08Apr2009: allow 3-parameter CP model
|
||||
|
||||
CpintPlot::CpintPlot(QString p) :
|
||||
needToScanRides(true),
|
||||
path(p),
|
||||
thisCurve(NULL),
|
||||
CPCurve(NULL),
|
||||
grid(NULL),
|
||||
zones(NULL)
|
||||
{
|
||||
insertLegend(new QwtLegend(), QwtPlot::BottomLegend);
|
||||
@@ -54,9 +56,6 @@ CpintPlot::CpintPlot(QString p) :
|
||||
gridPen.setStyle(Qt::DotLine);
|
||||
grid->setPen(gridPen);
|
||||
grid->attach(this);
|
||||
|
||||
allCurves= QList <QwtPlotCurve *>::QList();
|
||||
allZoneLabels= QList <QwtPlotMarker *>::QList();
|
||||
}
|
||||
|
||||
struct cpi_file_info {
|
||||
@@ -193,14 +192,12 @@ done:
|
||||
progress_sum += progress_count;
|
||||
}
|
||||
|
||||
QDate
|
||||
static QDate
|
||||
cpi_filename_to_date(const QString filename) {
|
||||
QRegExp rx("^(\\d\\d\\d\\d)_(\\d\\d)_(\\d\\d)_\\d\\d_\\d\\d_\\d\\d\\.cpi$");
|
||||
if (rx.exactMatch(filename)) {
|
||||
assert(rx.numCaptures() == 3);
|
||||
QDate date = QDate(rx.cap(1).toInt(),
|
||||
rx.cap(2).toInt(),
|
||||
rx.cap(3).toInt());
|
||||
QDate date(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt());
|
||||
if (date.isValid())
|
||||
return date;
|
||||
}
|
||||
@@ -702,14 +699,3 @@ CpintPlot::filterForSeason(QStringList cpints, QDate startDate, QDate endDate)
|
||||
return returnList;
|
||||
}
|
||||
|
||||
void
|
||||
CpintPlot::setStartDate(QDate _startDate)
|
||||
{
|
||||
startDate = _startDate;
|
||||
}
|
||||
|
||||
void
|
||||
CpintPlot::setEndDate(QDate _endDate)
|
||||
{
|
||||
endDate = _endDate;
|
||||
}
|
||||
|
||||
@@ -19,21 +19,16 @@
|
||||
#ifndef _GC_CpintPlot_h
|
||||
#define _GC_CpintPlot_h 1
|
||||
|
||||
#include "Zones.h"
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_plot_marker.h> // added djconnel 06Apr2009
|
||||
#include <QtGui>
|
||||
#include <QHash>
|
||||
|
||||
class QwtPlotCurve;
|
||||
class QwtPlotGrid;
|
||||
class QwtPlotMarker;
|
||||
class RideItem;
|
||||
class Zones;
|
||||
|
||||
#define USE_T0_IN_CP_MODEL 0 // added djconnel 08Apr2009: allow 3-parameter CP model
|
||||
|
||||
bool is_ride_filename(const QString filename);
|
||||
QString ride_filename_to_cpi_filename(const QString filename);
|
||||
QDate cpi_filename_to_date(const QString filename);
|
||||
|
||||
class CpintPlot : public QwtPlot
|
||||
{
|
||||
@@ -52,8 +47,8 @@ class CpintPlot : public QwtPlot
|
||||
double cp, tau, t0; // CP model parameters
|
||||
void deriveCPParameters(); // derive the CP model parameters
|
||||
bool deleteCpiFile(QString filename); // delete a CPI file and clean up
|
||||
void setStartDate(QDate);
|
||||
void setEndDate(QDate);
|
||||
void setStartDate(QDate date) { startDate = date; }
|
||||
void setEndDate(QDate date) { endDate = date; }
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user