moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / keduca / keduca / kquestion.h
blob1753375e30b08e35871708a3bcebe4bd70fedfbb
1 /***************************************************************************
2 kquestion.h - description
3 -------------------
4 begin : Tue May 22 2001
5 copyright : (C) 2001 by Javier Campos Morales
6 email : javi@asyris.org
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 ***************************************************************************/
19 #ifndef KQUESTION_H
20 #define KQUESTION_H
22 #include <qhbox.h>
23 #include <qtextedit.h>
24 #include <qlabel.h>
26 class QTimer;
27 class KProgress;
29 /**Question view
30 * The Widget that is used to display the Question.
31 *@author Javier Campos Morales
33 class KQuestion : public QHBox
35 Q_OBJECT
37 public:
38 KQuestion(QWidget *parent=0, const char *name=0);
39 ~KQuestion();
40 /** Set pixmap */
41 void setPixmap( const QPixmap pixmap);
42 /** Set text */
43 void setText( const QString &text);
45 /** show a countdown, starting at "starttime" and counting
46 down to 0, each second one count.
48 0 disables the countdown.
50 void countdown(int starttime);
52 void countdownVisible(bool visible);
54 /** Get current time */
55 int getCurrentTime();
57 private slots:
58 void countDownOne();
60 private:
62 // Private methods
64 /** Init graphical interface */
65 void initGUI();
67 // Private attributes
69 /** Main View */
70 QTextEdit *_view;
71 /** Main Picture */
72 QLabel *_picture;
73 QTimer *_countdownTimer;
74 KProgress *_countdownWidget;
75 int _currentCount;
76 int _totalCount;
79 #endif