|
|
@ -323,6 +323,10 @@ class TrackEditor(QtWidgets.QWidget): |
|
|
|
self.addTrackButton.clicked.connect(api.newEmptyTrack) |
|
|
|
self.layout.addWidget(self.addTrackButton) |
|
|
|
|
|
|
|
self.addTenTracksButton = QtWidgets.QPushButton("add ten tracks placeholder text") |
|
|
|
self.addTenTracksButton.clicked.connect(self.addTenTracks) |
|
|
|
self.layout.addWidget(self.addTenTracksButton) |
|
|
|
|
|
|
|
#Upbeat Tick Widget and Action-Button |
|
|
|
allUpbeats = QtWidgets.QWidget() |
|
|
|
allUpbeatsLayout = QtWidgets.QHBoxLayout() |
|
|
@ -347,6 +351,10 @@ class TrackEditor(QtWidgets.QWidget): |
|
|
|
unfoldAllAdvanvced.clicked.connect(self.unfoldAllAdvanced) |
|
|
|
allUpbeatsLayout.addWidget(unfoldAllAdvanvced) |
|
|
|
|
|
|
|
def addTenTracks(self): |
|
|
|
for i in range(10): |
|
|
|
api.newEmptyTrack() |
|
|
|
|
|
|
|
def updateTrackWidgets(self, listOfStaticTrackRepresentations): |
|
|
|
"""React to the backend adding, deleting, hiding or moving tracks. |
|
|
|
A track widget persists until the track gets deleted. No re-creation on every change. """ |
|
|
@ -378,6 +386,7 @@ class TrackEditor(QtWidgets.QWidget): |
|
|
|
|
|
|
|
numberOfTracks = trackExportObject["index"]+1 |
|
|
|
self.addTrackButton.setText(translate("trackEditorPythonFile", "Add new Track (currently: ") + str(numberOfTracks) + ")") |
|
|
|
self.addTenTracksButton.setText(translate("trackEditorPythonFile", "Add 10 new Tracks (currently: ") + str(numberOfTracks) + ")") |
|
|
|
|
|
|
|
for trId in leftOver: #track still exist here but not in the backend. Delete. |
|
|
|
w = self.tracks[trId] |
|
|
|