moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / ktouch / src / ktouchutils.cpp
blob32fc33f1c3c3a28f163b596bad3c49d7d2f7af60
1 /***************************************************************************
2 * ktouchutils.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 <qtextstream.h>
15 #include "ktouchutils.h"
17 QString format_speed(double speed) {
18 unsigned int mins = static_cast<unsigned int>(speed);
19 unsigned int secs = static_cast<unsigned int>(speed*60) - mins*60;
20 return QString("%1' %2''").arg(mins).arg(secs);