Changeset 28 for gui/main_window.cpp
- Timestamp:
- 01/05/08 16:32:32 (4 years ago)
- File:
-
- 1 edited
-
gui/main_window.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gui/main_window.cpp
r26 r28 50 50 connect(playPauseTrackButton, SIGNAL(clicked(bool)), this, SLOT(playPauseTrack())); 51 51 connect(nextTrackButton, SIGNAL(clicked(bool)), this, SLOT(nextTrack())); 52 connect(randomCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setRandom(int))); 53 connect(repeatCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setRepeat(int))); 52 54 connect(playlistTableView, SIGNAL(activated(const QModelIndex &)), this, SLOT(playlistItemActivated(const QModelIndex &))); 53 55 connect(removeFromPlaylistPushButton, SIGNAL(clicked(bool)), this, SLOT(removeFromPlaylist())); … … 116 118 } 117 119 120 void MainWindow::setRandom(int state) 121 { 122 if(state == Qt::Checked) 123 mpd.setRandom(true); 124 else 125 mpd.setRandom(false); 126 } 127 128 void MainWindow::setRepeat(int state) 129 { 130 if(state == Qt::Checked) 131 mpd.setRepeat(true); 132 else 133 mpd.setRepeat(false); 134 } 135 118 136 void MainWindow::updateCurrentSong(Song *song) 119 137 { … … 136 154 if(!slidingVolume) 137 155 volumeSlider->setValue(status.volume); 156 157 if(status.random) { 158 randomCheckBox->setCheckState(Qt::Checked); 159 } else { 160 randomCheckBox->setCheckState(Qt::Unchecked); 161 } 162 163 if(status.repeat) { 164 repeatCheckBox->setCheckState(Qt::Checked); 165 } else { 166 repeatCheckBox->setCheckState(Qt::Unchecked); 167 } 138 168 139 169 if(status.time_total == -1) {
Note: See TracChangeset
for help on using the changeset viewer.
