Acceleration dialogs added.
[speedfreak] / Client / movingaverage.h
1 /*
2  *  Class for moving average of acceleration data.
3  *
4  * @author      Kai Rasilainen
5  * @copyright   (c) 2010 Speed Freak team
6  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
7  */
8
9 #ifndef MOVINGAVERAGE_H
10 #define MOVINGAVERAGE_H
11
12 #include <QQueue>
13
14 class MovingAverage
15 {
16
17 public:
18     MovingAverage(int sizeLimit);
19
20     double Average();
21     void Resize(int sizeLimit);
22     void Enqueue(double item);
23
24 private:
25     int SizeLimit;
26     QQueue<double> queue;
27 };
28
29 #endif // MOVINGAVERAGE_H