~ubuntu-branches/ubuntu/saucy/goldencheetah/saucy

« back to all changes in this revision

Viewing changes to src/SmallPlot.h

  • Committer: Package Import Robot
  • Author(s): KURASHIKI Satoru
  • Date: 2013-08-18 07:02:45 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130818070245-zgdvb47e1k3mtgil
Tags: 3.0-3
debian/control: remove needless dependency. (Closes: #719571)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2011 Damien Grauser
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License as published by the Free
 
6
 * Software Foundation; either version 2 of the License, or (at your option)
 
7
 * any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful, but WITHOUT
 
10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
12
 * more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License along
 
15
 * with this program; if not, write to the Free Software Foundation, Inc., 51
 
16
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
17
 */
 
18
 
 
19
#ifndef _GC_SmallPlot_h
 
20
#define _GC_SmallPlot_h 1
 
21
 
 
22
#include <qwt_plot.h>
 
23
#include <QtGui>
 
24
 
 
25
class QwtPlotCurve;
 
26
class QwtPlotGrid;
 
27
class QwtPlotMarker;
 
28
class RideItem;
 
29
 
 
30
class SmallPlot : public QwtPlot
 
31
{
 
32
    Q_OBJECT
 
33
 
 
34
    public:
 
35
 
 
36
        SmallPlot(QWidget *parent=0);
 
37
 
 
38
 
 
39
        int smoothing() const { return smooth; }
 
40
        void setData(RideItem *ride);
 
41
        void setAxisTitle(int axis, QString label);
 
42
        void recalc();
 
43
        void setYMax();
 
44
        void setXTitle();
 
45
 
 
46
    public slots:
 
47
 
 
48
        void showPower(int state);
 
49
        void showHr(int state);
 
50
        void setSmoothing(int value);
 
51
 
 
52
    protected:
 
53
 
 
54
        QwtPlotGrid *grid;
 
55
        QwtPlotCurve *wattsCurve;
 
56
        QwtPlotCurve *hrCurve;
 
57
 
 
58
        QwtPlotMarker* d_mrk;
 
59
        QVector<double> hrArray;
 
60
        QVector<double> wattsArray;
 
61
        QVector<double> timeArray;
 
62
        QVector<QwtPlotCurve*> timeCurves;
 
63
        int arrayLength;
 
64
 
 
65
        QVector<int> interArray;
 
66
 
 
67
        int smooth;
 
68
};
 
69
 
 
70
#endif // _GC_SmallPlot_h