|
|
@ -39,7 +39,7 @@ import engine.api as api |
|
|
|
|
|
|
|
|
|
|
|
class TrackWidget(QtWidgets.QGroupBox): |
|
|
|
#TODO: ideas: number of blocks, which CCs are set, review/change durationSettingsSignature, dynamicSettingsSignature |
|
|
|
#TODO: ideas: number of blocks, list of block names which CCs are set, review/change durationSettingsSignature, dynamicSettingsSignature |
|
|
|
def __init__(self, parentDataEditor, trackExportObject): |
|
|
|
super().__init__() |
|
|
|
self.parentDataEditor = parentDataEditor |
|
|
@ -318,6 +318,11 @@ class TrackEditor(QtWidgets.QWidget): |
|
|
|
api.callbacks.tracksChangedIncludingHidden.append(self.updateTrackWidgets) |
|
|
|
self.tracks = {} #id:trackWidget. As any dict, not in order |
|
|
|
|
|
|
|
#Add Track Button |
|
|
|
self.addTrackButton = QtWidgets.QPushButton("add track placeholder text") |
|
|
|
self.addTrackButton.clicked.connect(api.newEmptyTrack) |
|
|
|
self.layout.addWidget(self.addTrackButton) |
|
|
|
|
|
|
|
#Upbeat Tick Widget and Action-Button |
|
|
|
allUpbeats = QtWidgets.QWidget() |
|
|
|
allUpbeatsLayout = QtWidgets.QHBoxLayout() |
|
|
@ -327,18 +332,18 @@ class TrackEditor(QtWidgets.QWidget): |
|
|
|
|
|
|
|
self.allUpbeatsCombinedTickWidget = CombinedTickWidget(mainWindow) |
|
|
|
|
|
|
|
allUpbeatsPushButton = QtWidgets.QPushButton(translate("trackEditorPythonFile", "set all upbeats")) |
|
|
|
allUpbeatsPushButton = QtWidgets.QPushButton(translate("trackEditorPythonFile", "Set all Upbeats")) |
|
|
|
allUpbeatsPushButton.clicked.connect(self.setAllUpbeats) #gets the value itself |
|
|
|
|
|
|
|
allUpbeatsLayout.addWidget(self.allUpbeatsCombinedTickWidget) |
|
|
|
allUpbeatsLayout.addWidget(allUpbeatsPushButton) |
|
|
|
|
|
|
|
#Reset all Advanced Views |
|
|
|
foldAllAdvanvced = QtWidgets.QPushButton(translate("trackEditorPythonFile", "fold all advanced")) |
|
|
|
foldAllAdvanvced = QtWidgets.QPushButton(translate("trackEditorPythonFile", "Fold all Advanced")) |
|
|
|
foldAllAdvanvced.clicked.connect(self.foldAllAdvanvced) |
|
|
|
allUpbeatsLayout.addWidget(foldAllAdvanvced) |
|
|
|
|
|
|
|
unfoldAllAdvanvced = QtWidgets.QPushButton(translate("trackEditorPythonFile", "unfold all advanced")) |
|
|
|
unfoldAllAdvanvced = QtWidgets.QPushButton(translate("trackEditorPythonFile", "Unfold all Advanced")) |
|
|
|
unfoldAllAdvanvced.clicked.connect(self.unfoldAllAdvanced) |
|
|
|
allUpbeatsLayout.addWidget(unfoldAllAdvanvced) |
|
|
|
|
|
|
@ -371,6 +376,9 @@ class TrackEditor(QtWidgets.QWidget): |
|
|
|
if trackExportObject["hiddenPosition"] is None: |
|
|
|
visibleTracks.append(trackExportObject) |
|
|
|
|
|
|
|
numberOfTracks = trackExportObject["index"]+1 |
|
|
|
self.addTrackButton.setText(translate("trackEditorPythonFile", "Add new Track (currently: ") + str(numberOfTracks) + ")") |
|
|
|
|
|
|
|
for trId in leftOver: #track still exist here but not in the backend. Delete. |
|
|
|
w = self.tracks[trId] |
|
|
|
del self.tracks[trId] |
|
|
|