moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kbruch / src / rationalwidget.h
blobbb668bcd25a6741682ff2c05e078b71094d019f7
1 /***************************************************************************
2 rationalwidget.h - paint a rational number
3 -------------------
4 begin : 2004/06/04
5 copyright : (C) 2004 by Sebastian Stein
6 email : seb.kde@hpfsc.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef RATIONALWIDGET_H
19 #define RATIONALWIDGET_H
21 #define DEBUG
23 #ifdef DEBUG
24 #include <kdebug.h>
25 #endif
27 #include "fractionbasewidget.h"
29 class QString;
31 /*! class to paint a rational number
33 * \author Sebastian Stein */
34 class RationalWidget : public FractionBaseWidget
36 Q_OBJECT
38 public:
39 /** constructor */
40 RationalWidget(QWidget * parent, const char * name, const QString pnumber, const uint pperiodStart = 1, const uint pperiodLength = 0);
42 /** destructor */
43 ~RationalWidget();
45 /** set the task to be displayed */
46 void setRational(const QString pnumber, const uint pperiodStart = 1, const uint pperiodLength = 0);
48 private:
50 /** the rational number to be displayed */
51 QString m_number;
53 /** starting of the period */
54 uint m_periodStart;
56 /** length of the period */
57 uint m_periodLength;
59 /** overrideing the paint event of FractionBaseWidget */
60 void paintEvent(QPaintEvent*);
63 #endif