mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Add new RConsole Chart
.. to trend and analysis view .. its a blank chart for now, building begins now we are ready to support this across all platforms.
This commit is contained in:
23
src/Charts/RChart.cpp
Normal file
23
src/Charts/RChart.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Mark Liversedge (liversedge@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "RChart.h"
|
||||
|
||||
RChart::RChart(Context *context) : GcChartWindow(context)
|
||||
{
|
||||
}
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <QDebug>
|
||||
#include <string.h>
|
||||
|
||||
#include "GoldenCheetah.h"
|
||||
#include "Context.h"
|
||||
#include "Athlete.h"
|
||||
|
||||
class RCallbacks : public Callbacks {
|
||||
public:
|
||||
// see inst/includes/Callbacks.h for a list of all overrideable methods
|
||||
@@ -46,4 +50,15 @@ class RCallbacks : public Callbacks {
|
||||
private:
|
||||
QStringList strings;
|
||||
};
|
||||
|
||||
class RChart : public GcChartWindow {
|
||||
|
||||
public:
|
||||
RChart(Context *context);
|
||||
|
||||
private:
|
||||
Context *context;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
#include "GoogleMapControl.h"
|
||||
#include "BingMap.h"
|
||||
#include "RideMapWindow.h"
|
||||
#ifdef GC_WANT_R
|
||||
#include "RChart.h"
|
||||
#endif
|
||||
// Not until v4.0
|
||||
//#include "RouteWindow.h"
|
||||
|
||||
@@ -90,6 +93,7 @@ GcWindowRegistry::initialize()
|
||||
{ VIEW_ANALYSIS, tr("Pedal Force vs Velocity"),GcWindowTypes::PfPv },
|
||||
{ VIEW_ANALYSIS, tr("Heartrate vs Power"),GcWindowTypes::HrPw },
|
||||
{ VIEW_ANALYSIS|VIEW_INTERVAL, tr("Map"),GcWindowTypes::RideMapWindow },
|
||||
{ VIEW_ANALYSIS|VIEW_HOME, tr("R Console"),GcWindowTypes::RConsole },
|
||||
//{ VIEW_ANALYSIS, tr("Bing Map"),GcWindowTypes::BingMap },
|
||||
{ VIEW_ANALYSIS, tr("2d Plot"),GcWindowTypes::Scatter },
|
||||
{ VIEW_ANALYSIS, tr("3d Plot"),GcWindowTypes::Model },
|
||||
@@ -160,6 +164,11 @@ GcWindowRegistry::newGcWindow(GcWinID id, Context *context)
|
||||
case GcWindowTypes::Diary: returning = new GcWindow(); break;
|
||||
#endif
|
||||
case GcWindowTypes::Histogram: returning = new HistogramWindow(context); break;
|
||||
#ifdef GC_WANT_R
|
||||
case GcWindowTypes::RConsole: returning = new RChart(context); break;
|
||||
#else
|
||||
case GcWindowTypes::RConsole: returning = new GcWindow(); break;
|
||||
#endif
|
||||
case GcWindowTypes::Distribution: returning = new HistogramWindow(context, true); break;
|
||||
case GcWindowTypes::PerformanceManager:
|
||||
{
|
||||
|
||||
@@ -63,7 +63,8 @@ enum gcwinid {
|
||||
Distribution = 34,
|
||||
RouteSegment = 35,
|
||||
WorkoutWindow = 36,
|
||||
RideMapWindow = 37
|
||||
RideMapWindow = 37,
|
||||
RConsole = 38
|
||||
};
|
||||
};
|
||||
typedef enum GcWindowTypes::gcwinid GcWinID;
|
||||
|
||||
@@ -261,6 +261,7 @@ contains(DEFINES, "GC_WANT_R") {
|
||||
LIBS += $$RLDFLAGS $$RBLAS $$RLAPACK $$RCPPLIBS $$RINSIDELIBS
|
||||
|
||||
HEADERS += Charts/RChart.h
|
||||
SOURCES += Charts/RChart.cpp
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user