2 This program is free software; you can redistribute it and/or modify
3 it under the terms of the GNU General Public License as published by
4 the Free Software Foundation; either version 2 of the License, or
5 (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License along
13 with this program; if not, write to the Free Software Foundation, Inc.,
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 #define GRAPHWIDGET_H 1
22 struct DataSetDetails
{
27 class GraphWidget
: public QWidget
{
31 std::map
<unsigned int, DataSetDetails
> datasets
;
32 std::map
<unsigned int, std::vector
<float> > datapoints
;
34 float minvertical
, maxvertical
;
35 unsigned int sizehorizontal
;
37 void paintEvent(QPaintEvent
*);
40 GraphWidget(QWidget
*parent
);
46 void setVerticalScale(float min
, float max
);
47 void setHorizontalSize(unsigned int size
);
49 void addDataSet(unsigned int dataset
);
50 void removeDataSet(unsigned int dataset
);
51 void setDataSetColour(unsigned int dataset
, QColor colour
);
52 void setDataSetName(unsigned int dataset
, QString name
);
54 void addDataPoint(unsigned int dataset
, float data
);
57 #endif /* GRAPHWIDGET_H */