Changeset 48
- Timestamp:
- 01/09/08 20:20:39 (4 years ago)
- Files:
-
- 3 edited
-
gui/main_window.cpp (modified) (5 diffs)
-
gui/main_window.h (modified) (3 diffs)
-
lib/mpdconnection.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gui/main_window.cpp
r43 r48 14 14 15 15 slidingVolume = false; 16 slidingPosition = false; 16 17 17 18 //Icon … … 58 59 connect(volumeSlider, SIGNAL(sliderReleased()), this, SLOT(setVolume())); 59 60 connect(volumeSlider, SIGNAL(sliderReleased()), this, SLOT(volumeSliderReleased())); 61 connect(positionSlider, SIGNAL(sliderPressed()), this, SLOT(positionSliderPressed())); 62 connect(positionSlider, SIGNAL(sliderReleased()), this, SLOT(setPosition())); 63 connect(positionSlider, SIGNAL(sliderReleased()), this, SLOT(positionSliderReleased())); 60 64 connect(prevTrackButton, SIGNAL(clicked(bool)), this, SLOT(previousTrack())); 61 65 connect(stopTrackButton, SIGNAL(clicked(bool)), this, SLOT(stopTrack())); … … 140 144 } 141 145 146 void MainWindow::positionSliderPressed() 147 { 148 slidingPosition = true; 149 } 150 151 void MainWindow::positionSliderReleased() 152 { 153 slidingPosition = false; 154 } 155 142 156 void MainWindow::volumeSliderPressed() 143 157 { … … 178 192 mpd.goToPrevious(); 179 193 mpd.getStatus(); 194 } 195 196 void MainWindow::setPosition() 197 { 198 mpd.setSeekId(mpd_status.song_id, positionSlider->value()); 180 199 } 181 200 … … 226 245 QString timeElapsedFormattedString; 227 246 228 positionSlider->setMaximum(status.time_total); 229 positionSlider->setValue(status.time_elapsed); 247 if(!slidingPosition) { 248 positionSlider->setMaximum(status.time_total); 249 positionSlider->setValue(status.time_elapsed); 250 } 230 251 231 252 if(!slidingVolume) -
gui/main_window.h
r42 r48 34 34 QSortFilterProxyModel libraryProxyModel; 35 35 bool slidingVolume; 36 bool slidingPosition; 36 37 QIcon icon; 37 38 … … 47 48 void showPreferencesDialog(); 48 49 void showAboutDialog(); 50 void positionSliderPressed(); 51 void positionSliderReleased(); 49 52 void volumeSliderPressed(); 50 53 void volumeSliderReleased(); … … 54 57 void previousTrack(); 55 58 void setVolume(); 59 void setPosition(); 56 60 void setRandom(int); 57 61 void setRepeat(int); -
lib/mpdconnection.cpp
r19 r48 350 350 data += QByteArray::number(time); 351 351 sendCommand(data); 352 353 if(!commandOk()) 354 qDebug("Couldn't seek"); 352 355 } 353 356
Note: See TracChangeset
for help on using the changeset viewer.
