]> git.sur5r.net Git - minitube/commitdiff
Remaining time tooltip
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 31 Aug 2009 08:58:03 +0000 (10:58 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 31 Aug 2009 08:58:03 +0000 (10:58 +0200)
src/MainWindow.cpp

index a7621f19ab5785848048526a2384240cebb9d9bd..ac100872ab62503b6bce039fa324d85b0c903382 100755 (executable)
@@ -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");
 }