diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-01-02 16:06:31 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-01-02 16:06:31 +0100 |
commit | e2d0e84992c539d0aa249483cad3ceca96bb03d9 (patch) | |
tree | 02d58f019fce13a9bfa7a652d5facf673b65660d /solo_tool_qt.py | |
parent | 430466b0e3a4dd762d8c4a44403437691d9d6118 (diff) |
Improved Qt GUI layout, added set A and set B buttons
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) |