moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / ktouch / src / ktouchchartwidget.h
blobc81b23d8cf182bb2c1f8724acee998593dc891ae
1 /***************************************************************************
2 * ktouchstatistics.cpp *
3 * -------------------- *
4 * Copyright (C) 2000 by Håvard Frøiland, 2003 by Andreas Nicolai *
5 * haavard@users.sourceforge.net *
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 ***************************************************************************/
13 #ifndef KTOUCHCHARTWIDGET
14 #define KTOUCHCHARTWIDGET
16 #include <qframe.h>
18 class QResizeEvent;
19 class QPaintEvent;
21 class KTouchTrainer;
23 /// This is the chart widget and contains all chart drawing code.
24 class KTouchChartWidget : public QFrame {
25 Q_OBJECT
26 public:
27 enum chart_t {
28 CharsPerMinute,
29 WordsPerMinute,
30 Accuracy,
31 ElapsedTime
33 /// Constructor.
34 KTouchChartWidget(QWidget* parent, const char *name=0);
35 /// Destructor.
36 ~KTouchChartWidget();
37 /// Sets the chart type and triggers an update.
38 void setChartType(chart_t type);
40 KTouchTrainer *m_trainer; ///< Pointer to the trainer object
42 protected:
43 void paintEvent(QPaintEvent *pe);
45 private:
46 chart_t m_chartType; ///< Type of chart to draw
49 #endif // KTOUCHCHARTWIDGET