moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kbruch / src / taskwidget.h
blobe25ef3d3c62830a22051f6ea29fc95a772f6fb46
1 /***************************************************************************
2 taskwidget.h - paint a task
3 -------------------
4 begin : 2004/05/30
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 TASKWIDGET_H
19 #define TASKWIDGET_H
21 #ifdef DEBUG
22 #include <kdebug.h>
23 #endif
25 #include "fractionbasewidget.h"
26 #include "task.h"
28 #include <qwidget.h>
30 /** important for add_sub and mul_div */
31 #define YES 1
32 #define NO 0
34 /** important for op_vector */
35 #define ADD 0
36 #define SUB 1
37 #define MUL 2
38 #define DIV 3
40 /*! class to paint task with fractions
42 * \author Sebastian Stein */
43 class TaskWidget : public FractionBaseWidget
45 Q_OBJECT
47 public:
48 /** constructor */
49 TaskWidget(QWidget * parent, const char * name, const task para_task);
51 /** destructor */
52 ~TaskWidget();
54 /** set the task to be displayed */
55 void setTask(const task para_task);
57 private:
59 /** the task to be displayed */
60 task m_task;
62 /** overrideing the paint event of FractionBaseWidget */
63 void paintEvent(QPaintEvent*);
66 #endif