moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / ktouch / src / ktouchstatus.cpp
blob08f01accf1449c42351163411f5527457f85edc8
1 /***************************************************************************
2 * ktouchstatus.cpp *
3 * ---------------- *
4 * Copyright (C) 2000 by Håvard Frøiland, 2004 by Andreas Nicolai *
5 * ghorwin@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 #include "ktouchstatus.h"
14 #include "ktouchstatus.moc"
16 #include <qlcdnumber.h>
17 #include <qlabel.h>
18 #include <qprogressbar.h>
19 #include <kdebug.h>
21 KTouchStatus::KTouchStatus(QWidget *parent)
22 : KTouchStatusLayout(parent)
26 void KTouchStatus::setNewChars(const QString& newChars) {
27 newCharsLabel->setText(newChars);
30 void KTouchStatus::updateStatus(unsigned int level, double correctness) {
31 levelLCD->display(static_cast<int>(level)+1); // +1 because our level variable ranges from 0...n-1
32 correctnessBar->setProgress(static_cast<int>(correctness*100) );