Changeset 48 for gui/main_window.cpp
- Timestamp:
- 01/09/08 20:20:39 (4 years ago)
- File:
-
- 1 edited
-
gui/main_window.cpp (modified) (5 diffs)
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)
Note: See TracChangeset
for help on using the changeset viewer.
