From: Flavio Tordini Date: Mon, 31 Aug 2009 08:58:03 +0000 (+0200) Subject: Remaining time tooltip X-Git-Tag: 0.6~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b18a8f177eea596854c86855dd58d38736e2a037;p=minitube Remaining time tooltip --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index a7621f1..ac10087 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -601,6 +601,12 @@ void MainWindow::tick(qint64 time) { } QTime displayTime(0, (time / 60000) % 60, (time / 1000) % 60); currentTime->setText(displayTime.toString("mm:ss")); + + // remaining time tooltip + int remainingTimeInt = mediaObject->remainingTime(); + QTime remainingTime(0, (remainingTimeInt / 60000) % 60, (remainingTimeInt / 1000) % 60); + currentTime->setToolTip(tr("Remaining time: %1").arg(remainingTime.toString("mm:ss"))); + // qDebug() << "currentTime" << time << displayTime.toString("mm:ss"); }