2 // C++ Implementation: common
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
6 // Copyright: See COPYING file that comes with this distribution
11 QString
toStringFormated(xmms_playback_status_t state
) {
13 case XMMS_PLAYBACK_STATUS_PLAY
:
14 return "[PLAYING] %1";
15 case XMMS_PLAYBACK_STATUS_STOP
:
16 return "[STOPPED] %1";
17 case XMMS_PLAYBACK_STATUS_PAUSE
:
24 QString
formatedTime(quint32 milliseconds
) {
25 quint16 seconds
= milliseconds
/ 1000 + (milliseconds
% 1000 > 500 ? 1 : 0);
26 quint8 minutes
= seconds
/ 60;
27 quint8 hours
= minutes
/ 60;
34 result
+= QString::number(hours
);
42 result
+= QString::number(minutes
);
49 result
+= QString::number(seconds
);