diff --git a/engine/api.py b/engine/api.py
index 409dff1..5ecba50 100644
--- a/engine/api.py
+++ b/engine/api.py
@@ -1,12 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2018, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
-The Template Base Application is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -122,7 +122,7 @@ class ClientCallbacks(Callbacks): #inherits from the templates api callbacks
can be used by a GUI to draw notes.
track.staticRepresentation also creates the internal midi representation for cbox. """
if self.updateTrack:
- ex = session.data.trackById(trId).staticRepresentation()
+ ex = session.data.trackById(trId).staticRepresentation() #Includes cbox.updatePlayback
for func in self.updateTrack:
func(trId, ex)
self._updateBlockTrack(trId)
@@ -193,6 +193,8 @@ class ClientCallbacks(Callbacks): #inherits from the templates api callbacks
for func in reversed(self.tracksChangedIncludingHidden):
func(ex + exHidden)
self._dataChanged()
+
+ session.data.metronome.label = session.data.currentMetronomeTrack.name #not the expensive redundant data generation
self._metronomeChanged() #because the track name is sent here.
def _updateTempoTrack(self):
@@ -292,9 +294,8 @@ def startEngine(nsmClient):
for track in session.data.hiddenTracks: #After loading a file some tracks could be hidden. We want midi for them as well.
track.staticRepresentation() #that generates the calfbox data as a side effect. discard the other data.
-
- useCurrentTrackAsMetronome()
+ setMetronome(session.data.currentMetronomeTrack.asMetronomeData, label=session.data.currentMetronomeTrack.name) #track.asMetronomeData is generated in staticRepresentation #template api. has callbacks
callbacks._setCursor()
global laborejoEngineStarted #makes for a convenient check. stepMidiInput uses it, which needs to know that the gui already started the api.
@@ -666,6 +667,7 @@ def resetDynamicSettingsSignature(trId):
session.history.register(lambda trId=trId, previousSettings=previousSettings: setTrackSettings(trId, previousSettings), descriptionString = "reset track dynamic settings")
callbacks._tracksChanged()
#We only need this for midi changes. callbacks._updateSingleTrackAllCC(trId)
+
callbacks._updateTrack(trId)
def resetDuationSettingsSignature(trId):
@@ -2068,8 +2070,8 @@ def _setTempoBlockData(tempoBlock, newData, newDuration):
#no callbacks needed.
-def splitTempoBlock(tempoBlockId, positionInTicksRelativeToBlock):
- """tick position is relative to block start"""
+def splitTempoBlock(tempoBlockId, positionInTicksRelativeToBlock:int):
+ """tick position is relative to block start"""
success = session.data.tempoTrack.splitTempoBlock(tempoBlockId, positionInTicksRelativeToBlock)
if success:
session.history.clear()
@@ -2093,6 +2095,10 @@ def insertTempoItemAtAbsolutePosition(tickPositionAbsolute, unitsPerMinute, refe
positionInTicksRelativeToBlock = tickPositionAbsolute - blockPosition
addTempoItem(blockId, positionInTicksRelativeToBlock, unitsPerMinute, referenceTicks, graphType)
+def tempoAtTickPosition(tick):
+ tempoItem = session.data.tempoTrack.tempoAtTickPosition(tick)
+ return tempoItem.unitsPerMinute, tempoItem.referenceTicks
+
def insertTempoChangeDuringDuration(percentageUnitsPerMinuteAsFloat):
"""Instead of a fermata this sets a tempo change which start- and end-point are derived
from the current items duration
diff --git a/engine/cursor.py b/engine/cursor.py
index e3fb00c..4a474a0 100644
--- a/engine/cursor.py
+++ b/engine/cursor.py
@@ -6,7 +6,7 @@ Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
-The Template Base Application is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/engine/graphtracks.py b/engine/graphtracks.py
index 71676b5..9911ac6 100644
--- a/engine/graphtracks.py
+++ b/engine/graphtracks.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -141,7 +142,7 @@ class GraphBlock(object):
self.data = {0:GraphItem(0)} #content linked, mutable.
self.name = str(id(self))
- self._duration = [D1*4] #len is always 1. Value is always >= D1*4. Duration is content linked, thats why it is a mutable list of len==1.
+ self._duration = [D1*4] #len is always 1. Duration is content linked, thats why it is a mutable list of len==1.
#self.duration = 0 #triggers the setter. in reality this is set to a standard minimum value in def duration
self.linkedContentBlocks = WeakSet() #only new standalone blocks use this empty WeakSet. once you contentLink a block it will be overwritten.
self._secondInit(parentGraphTrack)
@@ -159,8 +160,9 @@ class GraphBlock(object):
@duration.setter
def duration(self, newValue):
"""Keep the mutable list at all cost"""
- if newValue > 0 and newValue < D1*4:
- newValue = D1*4
+
+ if newValue <= 0:
+ raise ValueError("duration must be > 1")
listId = id(self._duration)
self._duration.pop()
self._duration.append(newValue)
@@ -833,10 +835,10 @@ class TempoBlock(GraphBlock):
firstBlockWithNewContentDuringDeserializeToObject = dict() #this is not resetted anywhere since each load is a program start.
#tempoTrack = the only tempo track. set by tempo track init, which happens only once in the program.
- def __init__(self, parentGraphTrack):
+ def __init__(self, parentGraphTrack, defaultQuarterTempo:int= 120):
super().__init__(self)
#self.parentGraphTrack = parentGraphTrack
- self.data = {0:TempoItem(120, D4)} #default is quarter = 120 bmp.
+ self.data = {0:TempoItem(defaultQuarterTempo, D4)} #default is quarter = 120 bmp.
self.name = str(id(self))
self._secondInit(parentGraphTrack)
@@ -956,7 +958,7 @@ class TempoTrack(GraphTrackCC):
def splitTempoBlock(self, tempoBlockId, positionInTicksRelativeToBlock):
"""The new block will be right of the original content. If the new block will be empty
or has no real start value the last prevailing tempo will be used
- as the blocks start-point"""
+ as the blocks start-point"""
block = self.tempoBlockById(tempoBlockId)
if not block.duration > positionInTicksRelativeToBlock:
return False
diff --git a/engine/main.py b/engine/main.py
index 6042b14..a1fb9bf 100644
--- a/engine/main.py
+++ b/engine/main.py
@@ -1,12 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2018, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
-The Template Base Application is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -47,7 +47,7 @@ class Data(template.engine.sequencer.Score):
#Metadata has only strings as keys, even the numbers.
self.metaData = {key:"" for key in ("title", "subtitle", "dedication","composer","subsubtitle","instrument","meter","arranger", "poet","piece","opus","copyright","tagline", "subtext")}
-
+ self.currentMetronomeTrack = self.tracks[0] #A Laborejo Track, indepedent of currentTrack. The metronome is in self.metronome, set by the template Score.
self._processAfterInit()
def _processAfterInit(self):
@@ -56,7 +56,8 @@ class Data(template.engine.sequencer.Score):
self.cursorWhenSelectionStarted = None #A cursor dict, from self.cursorExport(). Is None when there is no selection. Can be used for "if selection:" questions. Gets changed quite often.
self.copyObjectsBuffer = [] #for copy and paste. obviously empty after load file. Also not saved.
self.cachedTrackDurations = {} #updated after every track export
- self.currentMetronomeTrack = None #A Laborejo Track, indepedent of currentTrack. The metronome is in self.metronome, set by the template Score.
+ #track.asMetronomeData is a generated value from staticExport. Not available yet. needs to be done in api.startEngine #self.metronome.generate(data=self.currentMetronomeTrack.asMetronomeData, label=self.currentMetronomeTrack.name)
+
def duration(self):
"""Return the duration of the whole score, in ticks"""
@@ -1029,17 +1030,6 @@ class Data(template.engine.sequencer.Score):
#Save / Load / Export
- @classmethod
- def instanceFromSerializedData(cls, serializedObject, parentObject):
- """This does not call init. We need to construct it
- from a blank slate."""
- assert cls.__name__ == serializedObject["class"]
- self = cls.__new__(cls)
-
- self._secondInit()
- return self
-
-
def serialize(self)->dict:
dictionary = super().serialize()
dictionary["class"] = self.__class__.__name__
@@ -1048,6 +1038,7 @@ class Data(template.engine.sequencer.Score):
dictionary["hiddenTracks"] = [[track.serialize(), originalIndex] for track, originalIndex in self.hiddenTracks.items()]
dictionary["tempoTrack"] = self.tempoTrack.serialize()
dictionary["metaData"] = self.metaData
+ dictionary["currentMetronomeTrackIndex"] = self.tracks.index(self.currentMetronomeTrack)
return dictionary
@classmethod
@@ -1059,6 +1050,7 @@ class Data(template.engine.sequencer.Score):
self.hiddenTracks = {Track.instanceFromSerializedData(track, parentData = self):originalIndex for track, originalIndex in serializedData["hiddenTracks"]}
self.tempoTrack = TempoTrack.instanceFromSerializedData(serializedData["tempoTrack"], parentData = self)
self.metaData = serializedData["metaData"]
+ self.currentMetronomeTrack = self.tracks[serializedData["currentMetronomeTrackIndex"]]
self._processAfterInit()
return self
diff --git a/engine/track.py b/engine/track.py
index cbb0e40..20c3fc0 100644
--- a/engine/track.py
+++ b/engine/track.py
@@ -6,7 +6,7 @@ Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
-The Template Base Application is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/qtgui/conductor.py b/qtgui/conductor.py
index 43f1776..d1ec983 100644
--- a/qtgui/conductor.py
+++ b/qtgui/conductor.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -55,9 +56,6 @@ class Conductor(QtWidgets.QGraphicsItem):
self.staffLine.setParentItem(self)
self.staffLine.setPos(0,0)
- self.timeLine = TimeLine(self) #registers its own callbacks
- self.timeLine.setParentItem(self)
-
api.callbacks.updateTempoTrackBlocks.append(self.updateBlocks)
api.callbacks.updateTempoTrack.append(self.createGraphicItemsFromData)
api.callbacks.updateTempoTrackMeta.append(self.updateMetaData)
@@ -160,14 +158,16 @@ class Conductor(QtWidgets.QGraphicsItem):
def add(self, scenePos):
"""Use a scenePos (from self.mousePressEvent) to instruct the backend
- to create a new tempo point."""
- unitsPerMinute = 120
- referenceTicks = api.D4
+ to create a new tempo point.
+
+ Uses the values from the item left of it
+ """
sp = scenePos.x() * constantsAndConfigs.ticksToPixelRatio
if constantsAndConfigs.snapToGrid:
sp = round(sp / constantsAndConfigs.gridRhythm) * constantsAndConfigs.gridRhythm
-
+
+ unitsPerMinute, referenceTicks = api.tempoAtTickPosition(sp)
api.insertTempoItemAtAbsolutePosition(sp, unitsPerMinute, referenceTicks, graphType = "standalone")
class ConductorTransparentBlock(QtWidgets.QGraphicsRectItem):
@@ -306,6 +306,7 @@ class ConductorTransparentBlock(QtWidgets.QGraphicsRectItem):
posRelativeToBlockStart = round(posRelativeToBlockStart / constantsAndConfigs.gridRhythm) * constantsAndConfigs.gridRhythm
if posRelativeToBlockStart > 0:
+ print (self.staticExportItem["id"], posRelativeToBlockStart, posRelativeToBlockStart/api.D1)
api.splitTempoBlock(self.staticExportItem["id"], int(posRelativeToBlockStart))
def contextMenuEvent(self, event):
diff --git a/qtgui/constantsAndConfigs.py b/qtgui/constantsAndConfigs.py
index 5db06bc..c126384 100644
--- a/qtgui/constantsAndConfigs.py
+++ b/qtgui/constantsAndConfigs.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/qtgui/cursor.py b/qtgui/cursor.py
index a116d1e..d5ed86d 100644
--- a/qtgui/cursor.py
+++ b/qtgui/cursor.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
+
from PyQt5 import QtCore, QtGui, QtWidgets, QtWidgets
from .constantsAndConfigs import constantsAndConfigs
import engine.api as api
diff --git a/qtgui/graphs.py b/qtgui/graphs.py
index b335fb4..5632bc6 100644
--- a/qtgui/graphs.py
+++ b/qtgui/graphs.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
from PyQt5 import QtCore, QtGui, QtSvg, QtWidgets
from .constantsAndConfigs import constantsAndConfigs
from template.qtgui.helper import stringToColor, removeInstancesFromScene, callContextMenu, stretchLine, stretchRect
diff --git a/qtgui/items.py b/qtgui/items.py
index 870f8ad..d67f028 100644
--- a/qtgui/items.py
+++ b/qtgui/items.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
from PyQt5 import QtCore, QtGui, QtSvg, QtWidgets
from itertools import groupby
from engine.items import Chord, KeySignature
diff --git a/qtgui/mainwindow.py b/qtgui/mainwindow.py
index 62e6459..b250a8d 100644
--- a/qtgui/mainwindow.py
+++ b/qtgui/mainwindow.py
@@ -1,12 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2018, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
-The Template Base Application is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+
import logging; logging.info("import {}".format(__file__))
#Standard Library Modules
diff --git a/qtgui/menu.py b/qtgui/menu.py
index ba26262..673db2f 100644
--- a/qtgui/menu.py
+++ b/qtgui/menu.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -559,12 +560,30 @@ class ToolBarPlaybackSpeed(QtWidgets.QDoubleSpinBox):
self.setSingleStep(0.1)
self.setPrefix("Tempo ×") #yes, this is the unicode multiplication sign × and not an x
api.callbacks.tempoScalingChanged.append(self.updateFromCallback)
- self.valueChanged.connect(self.changed)
+ self.valueChanged.connect(self.changed)
+ self.setLineEdit(ToolBarPlaybackSpeed.CustomLineEdit())
+
+ class CustomLineEdit(QtWidgets.QLineEdit):
+ def mousePressEvent(self, event):
+ if event.button() == 4:
+ self.parentWidget().setValue(1.0)
+ self.parentWidget().changed()
+ else:
+ event.ignore()
+ super().mousePressEvent(event)
+
+ def mousePressEvent(self, event):
+ if event.button() == 4:
+ self.setValue(1.0)
+ self.changed()
+ else:
+ event.ignore()
+ super().mousePressEvent(event)
def updateFromCallback(self, newValue):
self.blockSignals(True)
self.setValue(newValue)
self.blockSignals(False)
- def changed(self):
+ def changed(self):
api.changeTempoScaling(self.value())
diff --git a/qtgui/scoreview.py b/qtgui/scoreview.py
index b2972c7..c6c2e30 100644
--- a/qtgui/scoreview.py
+++ b/qtgui/scoreview.py
@@ -1,12 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2018, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
more specifically its template base application.
-The Template Base Application is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
#Third Party
diff --git a/qtgui/structures.py b/qtgui/structures.py
index 9a47bd7..4fd298d 100644
--- a/qtgui/structures.py
+++ b/qtgui/structures.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
+
from math import log
from PyQt5 import QtCore, QtGui, QtWidgets
diff --git a/qtgui/submenus.py b/qtgui/submenus.py
index ce5f88f..94270b0 100644
--- a/qtgui/submenus.py
+++ b/qtgui/submenus.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/qtgui/timeline.py b/qtgui/timeline.py.delete
similarity index 98%
rename from qtgui/timeline.py
rename to qtgui/timeline.py.delete
index 25d5e3d..46def60 100644
--- a/qtgui/timeline.py
+++ b/qtgui/timeline.py.delete
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +20,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
+
+
from PyQt5 import QtCore, QtGui, QtSvg, QtWidgets
from .constantsAndConfigs import constantsAndConfigs
from template.qtgui.helper import stringToColor
@@ -125,6 +129,7 @@ class TimeLine(QtWidgets.QGraphicsRectItem):
backend.
The tempo value, has its default 0-line on the middle line, which is the track root.
"""
+ print ("call")
for item in self.items:
item.setParentItem(None)
self.scene().removeWhenIdle(item)
@@ -181,6 +186,8 @@ class TimeLine(QtWidgets.QGraphicsRectItem):
#unitsPerMinute, referenceTicks = self.getYAsBackendValue(y)
unitsPerMinute = 120
referenceTicks = api.D4
+
+ print ("timeline")
#x
sp = scenePos.x() * constantsAndConfigs.ticksToPixelRatio
diff --git a/qtgui/trackEditor.py b/qtgui/trackEditor.py
index 30ae541..2e3d19b 100644
--- a/qtgui/trackEditor.py
+++ b/qtgui/trackEditor.py
@@ -1,11 +1,12 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
-Copyright 2017, Nils Hilbricht, Germany ( https://www.hilbricht.net )
+Copyright 2019, Nils Hilbricht, Germany ( https://www.hilbricht.net )
-This file is part of Laborejo ( https://www.laborejo.org )
+This file is part of the Laborejo Software Suite ( https://www.laborejo.org ),
+more specifically its template base application.
-Laborejo is free software: you can redistribute it and/or modify
+Laborejo2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@@ -19,6 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
+import logging; logging.info("import {}".format(__file__))
+
from PyQt5 import QtWidgets, QtCore, QtGui
from .designer.trackWidget import Ui_trackGroupWidget
from .constantsAndConfigs import constantsAndConfigs