|
|
@ -133,16 +133,18 @@ class MainWindow(TemplateMainWindow): |
|
|
|
self.ui.playPauseButton.setIcon(QtGui.QIcon(':playpause.png')) |
|
|
|
self.ui.playPauseButton.clicked.connect(api.playPause) |
|
|
|
self.ui.playPauseButton.setToolTip(QtCore.QCoreApplication.translate("PlaybackControls", "[Space] Play / Pause")) |
|
|
|
self.ui.centralwidget.addAction(self.ui.actionPlayPause) #no action without connection to a widget. |
|
|
|
self.ui.actionPlayPause.triggered.connect(self.ui.playPauseButton.click) |
|
|
|
self.ui.playPauseButton.setShortcut("Space") |
|
|
|
#self.ui.centralwidget.addAction(self.ui.actionPlayPause) #no action without connection to a widget. |
|
|
|
#self.ui.actionPlayPause.triggered.connect(self.ui.playPauseButton.click) |
|
|
|
|
|
|
|
self.ui.loopButton.setFixedWidth(width) |
|
|
|
self.ui.loopButton.setText("") |
|
|
|
self.ui.loopButton.setIcon(QtGui.QIcon(':loop.png')) |
|
|
|
self.ui.loopButton.setToolTip(QtCore.QCoreApplication.translate("PlaybackControls", "[L] Loop current Measure")) |
|
|
|
self.ui.loopButton.clicked.connect(api.toggleLoop) |
|
|
|
self.ui.centralwidget.addAction(self.ui.actionLoop) #no action without connection to a widget. |
|
|
|
self.ui.actionLoop.triggered.connect(self.ui.loopButton.click) |
|
|
|
self.ui.loopButton.setShortcut("l") |
|
|
|
#self.ui.centralwidget.addAction(self.ui.actionLoop) #no action without connection to a widget. |
|
|
|
#self.ui.actionLoop.triggered.connect(self.ui.loopButton.click) |
|
|
|
|
|
|
|
def callback_loopButtonText(measureNumber): |
|
|
|
if not measureNumber is None: |
|
|
@ -150,6 +152,7 @@ class MainWindow(TemplateMainWindow): |
|
|
|
self.ui.loopButton.setText(nrstr) |
|
|
|
else: |
|
|
|
self.ui.loopButton.setText("") |
|
|
|
self.ui.loopButton.setShortcut("l") #Qt buttons lose their shortcut after setText |
|
|
|
api.callbacks.loopChanged.append(callback_loopButtonText) |
|
|
|
|
|
|
|
self.ui.loopMeasureFactorSpinBox.setFixedWidth(width) |
|
|
@ -163,8 +166,8 @@ class MainWindow(TemplateMainWindow): |
|
|
|
self.ui.toStartButton.setToolTip(QtCore.QCoreApplication.translate("PlaybackControls", "[Home] Jump to Start")) |
|
|
|
self.ui.toStartButton.setShortcut("Home") |
|
|
|
self.ui.toStartButton.clicked.connect(api.rewind) |
|
|
|
self.ui.centralwidget.addAction(self.ui.actionToStart) #no action without connection to a widget. |
|
|
|
self.ui.actionToStart.triggered.connect(self.ui.toStartButton.click) |
|
|
|
#self.ui.centralwidget.addAction(self.ui.actionToStart) #no action without connection to a widget. |
|
|
|
#self.ui.actionToStart.triggered.connect(self.ui.toStartButton.click) |
|
|
|
|
|
|
|
self.currentTrackId = None #this is purely a GUI construct. the engine does not know a current track. On startup there is no active track |
|
|
|
|
|
|
|