Browse Source

Add preview image to lilypond properties and metadata

master
Nils 4 months ago
parent
commit
ef0f3a4ccd
  1. 3
      engine/items.py
  2. 11343
      qtgui/resources.py
  3. BIN
      qtgui/resources/lilypond-metadata-preview.png
  4. 7
      qtgui/resources/resources.qrc
  5. 12
      qtgui/submenus.py
  6. 1
      template/documentation/readme.template

3
engine/items.py

@ -1674,7 +1674,8 @@ class Chord(Item):
midipitch = pitchmath.toMidi[note.pitch]
onOffset, offOffset = note.duration.noteOnAndOff(trackState, note.duration.completeDuration())
if note.pitch in trackState.EXPORTtiedNoteExportObjectsWaitingForClosing: #this is the last or the middle in a tied note sequence (but not the first).
if note.pitch in trackState.EXPORTtiedNoteExportObjectsWaitingForClosing:
#this is the last or the middle in a tied note sequence (but not the first).
exportNoteList.append(note.exportObject(trackState))
if not note.pitch in trackState.EXPORTtiedNoteExportObjectsWaitingForClosing: #AGAIN! if this changed after exportObject it means this was the last note in a tied sequence
#Export the missing note off (see below in this loop)

11343
qtgui/resources.py

File diff suppressed because it is too large

BIN
qtgui/resources/lilypond-metadata-preview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

7
qtgui/resources/resources.qrc

@ -1,8 +1,9 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<qresource>
<file alias="aboutlogo.png">../../desktop/images/aboutlogo.png</file>
<file alias="favicon.png">../../desktop/images/favicon.png</file>
<file>translations/de.qm</file>
<file>lilypond-metadata-preview.png</file>
<file>translations/de.qm</file>
<file>svg/accidentalsDoublesharp.svg</file>
<file>svg/accidentalsFlatFlat.svg</file>
<file>svg/accidentalsFlat.svg</file>
@ -48,5 +49,3 @@
<file>svg/scriptsStaccato.svg</file>
</qresource>
</RCC>

12
qtgui/submenus.py

@ -83,13 +83,13 @@ class CombinedTickWidget(QtWidgets.QFrame):
self.valueChanged = self.upbeatSpinBox.valueChanged
def setMinimum(self, value):
self.upbeatSpinBox.setMinimum(value)
self.upbeatSpinBox.setMinimum(int(value))
def setMaximum(self, value):
self.upbeatSpinBox.setMaximum(value)
self.upbeatSpinBox.setMaximum(int(value))
def setValue(self, value):
self.upbeatSpinBox.setValue(value)
self.upbeatSpinBox.setValue(int(value))
def value(self):
"""Make this widget behave like a spinbox signal"""
@ -97,7 +97,7 @@ class CombinedTickWidget(QtWidgets.QFrame):
def callClickWidgetForUpbeat(self):
dialog = TickWidget(self, initValue = self.upbeatSpinBox.value())
self.upbeatSpinBox.setValue(dialog.ui.ticks.value())
self.upbeatSpinBox.setValue(int(dialog.ui.ticks.value()))
class TickWidget(QtWidgets.QDialog):
def __init__(self, mainWindow, initValue = 0):
@ -420,7 +420,7 @@ class TransposeMenu(Submenu):
class SecondaryProperties(Submenu):
def __init__(self, mainWindow):
"""Directly edits the backend score meta data. There is no api and no callbacks"""
super().__init__(mainWindow, translate("submenus", "Meta Data"), hasOkCancelButtons=True)
super().__init__(mainWindow, translate("submenus", "Lilypond Properties and Metada"), hasOkCancelButtons=True)
dictionary = api.getMetadata() #Do not confuse with template/config METADATA. This is Lilypond title, composer etc.
@ -442,6 +442,8 @@ class SecondaryProperties(Submenu):
if not key in importantKeys:
self.layout.addRow(key.title(), widget)
self.dynamicLabel.setText("<img src=':lilypond-metadata-preview.png'>")
self.__call__()
def process(self):

1
template/documentation/readme.template

@ -36,6 +36,7 @@ It is possible to clone a git repository.
## Dependencies
* Python 3.6 (maybe earlier)
* PyQt5 for Python 3
* PyQt OpenGL and SVG modules, if they are separated in your distribution
* DejaVu Sans Sarif TTF (Font) (recommended, but not technically necessary)
* libcalfbox-lss https://git.laborejo.org/lss/libcalfbox-lss

Loading…
Cancel
Save