diff options
Diffstat (limited to 'solo_tool_qt.py')
-rw-r--r-- | solo_tool_qt.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/solo_tool_qt.py b/solo_tool_qt.py index 7bb3821..44f2ee4 100644 --- a/solo_tool_qt.py +++ b/solo_tool_qt.py @@ -73,7 +73,9 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.playButton.pressed.connect(self.soloTool.play) self.pauseButton.pressed.connect(self.soloTool.pause) - self.saveAbButton.pressed.connect(self.saveAbLimits) + self.storeAbButton.pressed.connect(self.storeAbLimits) + self.setAButton.pressed.connect(self.setA) + self.setBButton.pressed.connect(self.setB) self.saveSessionButton.pressed.connect(self.saveSession) self.loadSessionButton.pressed.connect(self.loadSession) self.addSongButton.pressed.connect(self.addSong) @@ -94,12 +96,22 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.soloTool.addSong(path) self.playlistModel.layoutChanged.emit() - def saveAbLimits(self): + def storeAbLimits(self): a = self.aSlider.value() / float(POSITION_FACTOR) b = self.bSlider.value() / float(POSITION_FACTOR) self.soloTool.storeAbLimits(a, b) self.abListModel.layoutChanged.emit() + def setA(self): + position = self.songSlider.value() + self.aSlider.setValue(position) + self.abSliderReleased() + + def setB(self): + position = self.songSlider.value() + self.bSlider.setValue(position) + self.abSliderReleased() + def toggleAbRepeat(self): enable = self.abRepeatCheckBox.isChecked() self.soloTool.setAbLimitEnable(enable) |