Changeset 43 for gui/main_window.cpp
- Timestamp:
- 01/07/08 17:44:35 (4 years ago)
- File:
-
- 1 edited
-
gui/main_window.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gui/main_window.cpp
r42 r43 1 #include <cmath>2 1 #include <QtGui> 3 2 #include <QIcon> … … 123 122 trayIcon->setIcon(icon); 124 123 trayIcon->setToolTip("QtMPC"); 125 124 126 125 return true; 127 126 } … … 213 212 if (!song->title.isEmpty() && !song->artist.isEmpty() && !song->album.isEmpty()) { 214 213 trayIcon->showMessage(song->artist + " - " + song->title, 215 "album: " + song->album + "\n" +216 "track: " + QString::number(song->track) + "\n" +217 " time:" + QString::number(song->time) + "\n",214 "album: " + song->album + "\n" + 215 "track: " + QString::number(song->track) + "\n" + 216 "length: " + Song::formattedTime(song->time), 218 217 QSystemTrayIcon::Information, 5000); 219 218 } … … 248 247 timeElapsedFormattedString = "00:00 / 00:00"; 249 248 } else { 250 // Time elapsed 251 timeElapsedFormattedString += QString::number(floor(status.time_elapsed / 60.0)); 252 timeElapsedFormattedString += ":"; 253 if(status.time_elapsed % 60 < 10) { 254 timeElapsedFormattedString += "0"; 255 } 256 timeElapsedFormattedString += QString::number(status.time_elapsed % 60); 257 249 timeElapsedFormattedString += Song::formattedTime(status.time_elapsed); 258 250 timeElapsedFormattedString += " / "; 259 260 // Time total 261 timeElapsedFormattedString += QString::number(floor(status.time_total / 60.0)); 262 timeElapsedFormattedString += ":"; 263 if(status.time_total % 60 < 10) { 264 timeElapsedFormattedString += "0"; 265 } 266 timeElapsedFormattedString += QString::number(status.time_total % 60); 251 timeElapsedFormattedString += Song::formattedTime(status.time_total); 267 252 } 268 253
Note: See TracChangeset
for help on using the changeset viewer.
