.
-=- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
-=- MIT License
Below is the original License And Copyright Information. This lib is a
derived version by Nils Gey for http://www.laborejo.org 2011 and
re-released under the same license as below.
I chose a different name to avoid conflicts with an installed formlayout
version: dynformcreator
Original Code: http://code.google.com/p/formlayout/
formlayout
==========
Module creating Qt form dialogs/layouts
to edit various type of parameters
formlayout License Agreement (MIT License)
------------------------------------------
Copyright (c) 2009 Pierre Raybaut
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
laborejo-0.8~ds0.orig/lbj2pdf 0000775 0001750 0001750 00000002520 12154405225 016510 0 ustar glowworm glowworm #! /usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == "__main__":
import argparse, sys, os
parser = argparse.ArgumentParser(description="Convert Laborejo Collections(.lbj) and Score (.lbjs) files to PDF through Lilypond.")
parser.add_argument('infiles', help="One or more lbj or lbjs files to convert to PDF.", nargs="*")
parser.add_argument("-o", "--out", help="Directory for PDF files. Default is the working directory", type=str)
parser.add_argument("-p", "--parts", help="Export multiple files, splitted by a track property. Most likely 'exportExtractPart'. Other reasonable choices: 'group', 'uniqueContainerName' (by track), 'shortInstrumentName'", default=None, type=str)
args = parser.parse_args()
import laborejocore as api #This starts the backend and automatically creates a session. But not score/tracks.
if args.out:
outdir = os.path.join(os.path.abspath(args.out), "")
else:
outdir = os.path.join(os.path.abspath(os.curdir), "")
if not os.path.isdir(outdir):
os.makedirs(outdir)
for filename in args.infiles:
filename = os.path.abspath(filename)
if filename.endswith("lbjs") or filename.endswith("lbj"):
api.load(filename)
api.exportPDF(os.path.join(outdir, os.path.basename(filename)), parts = args.parts)
sys.exit()
laborejo-0.8~ds0.orig/wip/ 0000775 0001750 0001750 00000000000 12154405225 016037 5 ustar glowworm glowworm laborejo-0.8~ds0.orig/wip/book-basic.lbj 0000664 0001750 0001750 00000002142 12154405225 020540 0 ustar glowworm glowworm #Example file for lbj
#A comment can only start at the beginning of a line because the # can be part of a filename or name.
#Anything before the first leading ! is metadata. Simple ini format. key=value. Spaces are stripped out, except in the strings.
#You can use .lbjs and .txt files. lbjs are music scores, txt are text which become \markup {text}
#Metadata which will be used by Lilypond directly
title = "Lbj container Example"
composer = "Nils Gey"
#Override the template saved in the .lbjs. If you leave this out the individual templates will be used.
template = ForcedTemplate.ly
##############################
#Minimal Example to create a ly with three movements
one.lbjs
two.lbjs
three.lbjs
##############################
#With bookparts
#Seperate filenames with / in one line to combine them as parts.
*Bookpart 1
Part1.lbjs/Part2.lbjs/Part3.lbjs
SinglePart.lbjs
*Bookpart 2
foo.lbjs
markup.txt
bar.lbjs
##############################
#Several PDFs at once
=Book One
*Bookpart
.
.
.
=Book Two
.
.
.
##############################
#Error? Book without Bookpart. Should work as well
=Book
movement.lbjs
laborejo-0.8~ds0.orig/laborejo-collection-editor 0000775 0001750 0001750 00000003324 12154405225 022402 0 ustar glowworm glowworm #! /usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == "__main__":
import argparse, sys, os
parser = argparse.ArgumentParser(description="Laborejo Collection Editor Qt")
parser.add_argument('infiles', help="One or more lbj files to load.", nargs="*")
parser.add_argument("-n", "--new", help="Start with an empty file (additionally to loaded files)", action="store_true")
parser.add_argument("-c", "--config", help="The configuration dir for user scripts, templates and configs etc. Default=~/.laborejo/", type=str)
args = parser.parse_args()
import laborejocollection #initialize the GUI. We do this after parse init because if it were just --help we don't need to start the whole Qt chain.
if args.config:
p = os.path.realpath(args.config) + "/"
print ("Starting Laborejo Collection Editor Qt with config directory", p)
laborejocollection.api._getSession().configdir = p
laborejocollection.main = laborejocollection.StartQT4()
laborejocollection.listener.main = laborejocollection.main
#Switch backend into slave mode.
#We only override one listener here. If someone actually achieves to use a notation command in the collection editor it will just result in "pass".
laborejocollection.api.STANDALONE = False
laborejocollection.api.l_collections = laborejocollection.listener.ListenerCollections()
#load command line files. A new empty file can also be opened, does not conflict with loading files.
if args.infiles:
laborejocollection.main.loadGuiDialog(directFileList = args.infiles)
if args.new:
laborejocollection.api.newCollection()
#else it is just an empty program start
sys.exit(laborejocollection.app.exec_())
laborejo-0.8~ds0.orig/laborejo-qt 0000775 0001750 0001750 00000020615 12154405225 017411 0 ustar glowworm glowworm #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from time import sleep
from signal import SIGKILL
from os import getpid, kill
if __name__ == "__main__":
import argparse, os
parser = argparse.ArgumentParser(description="Laborejo Qt")
parser.add_argument('infiles', help="One or more lbjs or lbj files to load.", nargs="*")
parser.add_argument("-n", "--new", help="Start with an empty file (additionally to loaded files)", action="store_true")
parser.add_argument("-c", "--config", help="The configuration dir for user scripts, templates and configs etc. Default=~/.laborejo/", type=str)
parser.add_argument("-g", "--geometry", help="Start with a window geometry 'width x height' or 'width x height + leftCorner + rightCorner'. Example A: 1024x768 Example B: 1920x1080+0+0", type=str, default=None)
parser.add_argument("-m", "--mute", help ="Don't start the audio/midi engine. You need this for playback but it can be turned off if you don't want JACK or for performance reasons", action="store_true")
parser.add_argument("-j", "--jack", help ="Start with active JACK Mode instead of internal sampler mode. Can be toggled at any time in the program again.", action="store_true")
parser.add_argument("-i", "--midiin", help="Jack Midi input port for note insert. No ALSA. Example: jack-keyboad:midi_out . Default: as sepcified in config file.", type=str, default=None)
parser.add_argument("-l", "--lonely", help ="Don't connect any jack ports, not even a given jack midi port --midiin. Use this if you restore your jack connections with an external tool. This is not needed for Non-Session-Manager support.", action="store_true")
parser.add_argument("-s", "--soundfont", help="A path to an alternative .sf2 soundfont to be used by the internal midi sampler. Example /usr/share/soundfonts/fluidr3/FluidR3GM.SF2", type=str, default=None)
args = parser.parse_args()
#initialize the GUI. We do this after parse init
#because if it were just --help we don't need to start the whole Qt chain.
import laborejoqt
from laborejoqt import laborejoqtnsmclient as nsmclient #laborejoqtnsmclient.py is a local file.
"""
If Laborejo was started through the non-session manager this means
nsmclient.states.nsmUrl is True.
We use this information to change some functions in the program.
Many parser arguments will be ignored. We automatically assume
NSM means Jack is working as well.
"""
if args.config:
p = os.path.realpath(args.config) + "/"
print ("Starting Laborejo-Qt with config directory", p)
laborejoqt.api._getSession().configdir = p
laborejoqt.config.JACKMODE = bool(nsmclient.states.nsmUrl) or args.jack
laborejoqt.main = laborejoqt.StartQT4(geometry = args.geometry, nonSessionManager = nsmclient.states.nsmUrl)
if (laborejoqt.config.JACK and not args.mute) or nsmclient.states.nsmUrl:
midiInTimer = laborejoqt.QtCore.QTimer()
midiInTimer.start(laborejoqt.config.MIDI_TIMER) #50ms default
if nsmclient.states.nsmUrl:
#Initialize the session handler:
##after we have the functions from laborejoqt.main
##but before init calfbox since we need the unique session id to load/save files and create jack ports
capabilities = {
"switch" : False, #client is capable of responding to multiple `open` messages without restarting
"dirty" : True, #client knows when it has unsaved changes
"progress" : False, #client can send progress updates during time-consuming operations
"message" : False, #client can send textual status updates
"optional-gui" : True, #client has an optional GUI
}
requiredFunctions = {
"function_open" : laborejoqt.main.nsmLoad, #Accept two parameters. Return two values. A bool and a status string. Otherwise you'll get a message that does not help at all: "Exception TypeError: "'NoneType' object is not iterable" in 'liblo._callback' ignored"
"function_save" : laborejoqt.main.nsmSave, #Accept one parameter. Return two values. A bool and a status string. Otherwise you'll get a message that does not help at all: "Exception TypeError: "'NoneType' object is not iterable" in 'liblo._callback' ignored"
}
def quitty():
try:
laborejoqt.api.calfboxShutdown()
except:
pass
try:
midiInTimer.stop()
except:
pass
kill(getpid(), SIGKILL) #Killing Blow, if those above fail.
optionalFunctions = {
"function_quit" : quitty, #Accept zero parameters. Return True or False
"function_showGui" : laborejoqt.main.show, #Accept zero parameters. Return True or False
"function_hideGui" : laborejoqt.main.hide, #Accept zero parameters. Return True or False
}
laborejoqt.main.session.ourNsmClient, nsmReturnedTimerFunction = nsmclient.init(
prettyName = "LaborejoQt",
capabilities = capabilities,
requiredFunctions = requiredFunctions,
optionalFunctions = optionalFunctions,
sleepValueMs = 0) #no additional sleeps. The qt timer takes care of that
#Now start the timer. Hopefully that gives us nsmClientId from nsmLoad() before we init cbox
laborejoqt.QtCore.QObject.connect(midiInTimer, laborejoqt.QtCore.SIGNAL("timeout()"), nsmReturnedTimerFunction)
if nsmclient.states.nsmUrl:
#The qt timer starts only when we call laborejoqt.app.exec_(), which starts the event loop.
#We need the nsmLoad() function for nsmClientId. Call the osc query manually until we get something.
while not laborejoqt.main.session.nsmClientId:
nsmReturnedTimerFunction()
sleep(0.3)
laborejoqt.api.calfboxInit(None, autoconnect = False, clientName = laborejoqt.main.session.nsmClientId) #If soundfont is none it falls back to a small default GM provided within the Laborejo source tree
elif laborejoqt.config.JACK and not args.mute:
midiInPort = args.midiin if args.midiin else laborejoqt.config.midiinport
laborejoqt.api.calfboxInit(
args.soundfont, #If soundfont is none it falls back to a small default GM provided within the Laborejo source tree
autoconnect=not args.lonely,
midiInPort = midiInPort)
if laborejoqt.api.cboxSmfCompatibleModule: #started succesfully?
laborejoqt.main.session.playbackEngine = True
laborejoqt.QtCore.QObject.connect(midiInTimer, laborejoqt.QtCore.SIGNAL("timeout()"), laborejoqt.api.calfboxProcessor)
laborejoqt.main.createMidiShortcuts()
laborejoqt.api.calfboxSetTransportKeepRolling(laborejoqt.config.TRANSPORT_KEEP_ROLLING) #live update.
else:
laborejoqt.main.session.playbackEngine = False
if nsmclient.states.nsmUrl:
raise RuntimeError("You tried to run Laborejo-Qt in NSM mode but the playback engine could not be started. You need JACK started and calfbox/calfbox python module installed for session management")
laborejoqt.listener.main = laborejoqt.main #We need this before initializing the listeners below. This is also the reason why we can't move this code into the listener module.
laborejoqt.listener.init() #Connect the listeners with the backend.
#load command line files. A new empty file can also be opened, does not conflict with loading files.
if args.infiles and not nsmclient.states.nsmUrl:
lbjsScoreFiles = [x for x in args.infiles if x.endswith(".lbjs")]
lbjCollectionFiles = [x for x in args.infiles if x.endswith(".lbj")]
if lbjsScoreFiles:
laborejoqt.main.load(lbjsScoreFiles)
if lbjCollectionFiles:
laborejoqt.main.loadCollection(lbjCollectionFiles)
if args.new and not nsmclient.states.nsmUrl:
laborejoqt.api.new()
#else it is just an empty program start
if not nsmclient.states.nsmUrl:
from atexit import register
register(laborejoqt.api.calfboxShutdown) #On Exit shut down the jack client properly. Even if started with -m this will not fail. There is a "try" inside.
#else:
#NSM has its own exit signal. We will use that instead.
laborejoqt.api.jackMidiInToggleMute(boolean = False)
if nsmclient.states.nsmUrl:
laborejoqt.QtCore.QTimer.singleShot(0, laborejoqt.main.nsmActuallyLoadFirstFiles)
laborejoqt.app.exec_()
laborejo-0.8~ds0.orig/lbj2mid 0000775 0001750 0001750 00000004003 12154405225 016506 0 ustar glowworm glowworm #! /usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == "__main__":
import argparse, sys, os
parser = argparse.ArgumentParser(description="Convert Laborejo Collections(.lbj) and Score (.lbjs) files to Midi/SMF.")
parser.add_argument('infiles', help="One or more lbj or lbjs files to convert to Midi/SMF.", nargs="*")
parser.add_argument("-o", "--out", help="Directory for Midi/SFM files. Default is the working directory", type=str)
parser.add_argument("-j", "--jack", help="Export Midis with Jack Settings instead Simple midi settings.", action="store_true")
parser.add_argument("-t", "--type", help="Export as type: 'file': Each Laborejo Track as midi file. 'port': All matching jack ports in one file. Default: All tracks in one file.", type=str)
parser.add_argument("-p", "--parts", help="Export multiple files, splitted by a track property. Most likely 'exportExtractPart'. Other reasonable choices: 'group', 'uniqueContainerName' (by track), 'shortInstrumentName'", default=None, type=str)
args = parser.parse_args()
import laborejocore as api #This starts the backend and automatically creates a session. But not score/tracks.
if args.out:
outdir = os.path.join(os.path.abspath(args.out), "")
else:
outdir = os.path.join(os.path.abspath(os.curdir), "")
if not os.path.isdir(outdir):
os.makedirs(outdir)
for filename in args.infiles:
filename = os.path.abspath(filename)
if filename.endswith("lbjs"):
api.load(filename)
basename = os.path.basename(filename) #Collections must have a filename. So we can depend on that
onlyfile = os.path.splitext(basename)[0]
midiname = onlyfile + ".mid"
api.exportMidi(os.path.join(outdir, midiname), jackMode = args.jack, parts = args.parts)
elif filename.endswith("lbj"):
api.load(filename)
api.exportMidi(os.path.join(outdir, os.path.basename(filename)), jackMode = args.jack, parts = args.parts)
sys.exit()
laborejo-0.8~ds0.orig/convertoldfiles.py 0000775 0001750 0001750 00000002514 12154405225 021021 0 ustar glowworm glowworm #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import sys, argparse
import laborejocore as api
parser = argparse.ArgumentParser(description="Updates the savefile version. Open an old lbjs file, force it to load, save and quit.")
parser.add_argument('infiles', help="One or more lbjs or lbj files to load.", nargs="*")
args = parser.parse_args()
#load command line files. A new empty file can also be opened, does not conflict with loading files.
if not args.infiles:
print ("Give at least one .lbjs file")
sys.exit(0)
for fileName in sorted(args.infiles):
print ("Convert:" + fileName)
ret = api.load(fileName, force = True)
if ret:
if not "tacet" in api._getMovement().defaultPerformanceSignature.dynamics:
api._getMovement().defaultPerformanceSignature.dynamics["tacet"] = 0
for track in api._getMovement():
if type(track.smfChannel) is int:
track.smfChannel = [track.smfChannel,track.smfChannel]
for cursor in api._getMovement().cursors:
#Old Performance Signatures had no "tacet". Add here:
for obj in cursor.gen_right():
if type(obj) is api.items.PerformanceSignature:
if not "tacet" in obj.dynamics:
obj.dynamics["tacet"] = 0
api.save(fileName)
api.close()
laborejo-0.8~ds0.orig/lbjsplay 0000775 0001750 0001750 00000003336 12154405225 017013 0 ustar glowworm glowworm #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
parser = argparse.ArgumentParser(description="Laborejo Command Line Player.")
parser.add_argument("path", help="A Laborejo Score (*.lbjs) file")
parser.add_argument("-j", "--jack", help="Instead of the internal General Midi sample use the jack midi data set and auto-connect all lbjs-saved ports.", action="store_true")
parser.add_argument("-s", "--soundfont", help="Optional Soundfont (*.sf2). Has no effect when used with --jack")
parser.add_argument("-w", "--wait", help="Don't start playback and transport but wait for an external transport signal. Do not reset transport to 0. Default: Start transport from 0.", action="store_true")
parser.add_argument("-k", "--keeprolling", help="At the end of the song keep transporting rolling. Default: Stop transport.", action="store_true")
parser.add_argument("-i", "--introverted", help="Don't auto-connect the saved jack connections. Default: Auto-Connect.", action="store_true")
args = parser.parse_args()
import signal
import laborejocore as api #start the laborejo modile
api.calfboxInit(soundfont = args.soundfont, autoconnect = not args.introverted)
#User can quit the program before it runs out.
def signal_handler(signal, frame):
"""Abort does not listen for transport or command line options.
It justs stops and quit"""
api.stop()
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGQUIT, signal_handler)
api.load(args.path)
api.playOnce(jackMode = args.jack, waitForStart = args.wait, keepRolling = args.keeprolling)
print() #new line for the prompt
if args.keeprolling:
print ("Playback finished. Jack Transport still rolling")
api.calfboxShutdown()
laborejo-0.8~ds0.orig/laborejoqt/ 0000775 0001750 0001750 00000000000 12154405225 017402 5 ustar glowworm glowworm laborejo-0.8~ds0.orig/laborejoqt/__init__.py 0000664 0001750 0001750 00000461040 12154405225 021520 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
import sys
import subprocess, operator, os, warnings, inspect, math
from random import random, randint, shuffle
from collections import defaultdict
from re import match
from shutil import copyfile, move
from datetime import datetime
from random import choice
localepath = os.path.join(os.path.dirname(__file__), 'locale')
from PyQt4 import QtCore, QtGui
def customTranslate(one, theString, three, four):
#self.actionForte.setText(QtGui.QApplication.translate("MainWindow", "𝆑 forte", None, QtGui.QApplication.UnicodeUTF8))
x = __translateOrg(one, theString, three, four)
return x.strip("\x00") #there are \x00 in the strings which need to removed before display. This is most likely a pyqt/Python3 bug
__translateOrg = QtGui.QApplication.translate
QtGui.QApplication.translate = customTranslate #replace Qt function with our own "translate".
import laborejocore as api #This starts the backend and automatically creates a session. But not a score/score/tracks.
#Start the Gui
from laborejoqt.designer.gui_main import Ui_MainWindow
from laborejoqt.designer.gui_stacked_musictab import Ui_stackedMusicTab
from laborejoqt.designer.gui_export import Ui_ExportDialog
from laborejoqt.designer.gui_didyouknow import Ui_DidYouKnow
#from designer.gui_megaman import Ui_Form
app = QtGui.QApplication(sys.argv) #Start qt as early as possible so that item creation on program startup works. Otherwise the instances create segfaults because qt is not ready to create QGraphicsTextItem (in items.py)
if QtCore.QLocale().languageToString(QtCore.QLocale().language()) == "German":
translator = QtCore.QTranslator()
translator.load("trans_de.qm", "laborejoqt/designer") #German
app.installTranslator(translator)
from laborejoqt import config, dictionaries, modalcommands, listener
from laborejoqt import items as guiitems
from laborejoqt.constants import *
from laborejoqt.container import GuiTrack, PSEUDO
from laborejoqt.dynformcreator import fedit #Generate dialogs/formulars with a simple syntax.
#QtGui.QApplication.setFont(fontDB.font(TEXT_FONT_STRING, "", 10)) this is only for unicode symbols, the fake menu icons. Better replace them with vector images
class GuiStatusBar(QtGui.QStatusBar):
def __init__(self, parent):
super(GuiStatusBar, self).__init__(parent)
self.permanent = QtGui.QLabel("Hallo Welt")
self.addPermanentWidget(self.permanent)
def showMessage(self, message):
super(GuiStatusBar, self).showMessage(message)
class StartQT4(QtGui.QMainWindow):
def __init__(self, parent=None, geometry=None, nonSessionManager = False):
QtGui.QWidget.__init__(self, parent)
self.nonSessionManager = nonSessionManager #Are we under control of non session manager or not?
config.reloadPersonalConfig() #override global qt-config data with user data.
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
#Session Management menu dependent action hiding or not
self.notSessionActions = [self.ui.actionNew, self.ui.actionOpen, self.ui.actionOpen_Collection, self.ui.actionOpen_as_Template, self.ui.menuRecent_2, self.ui.actionClose, self.ui.actionQuit, self.ui.actionSave_As]
self.sessionActions = [self.ui.actionNew_to_Session_2, self.ui.actionImport_to_Session , self.ui.actionImport_to_Session_as_Template , self.ui.actionExport_from_Session , self.ui.actionRemove_from_Session, ]
if self.nonSessionManager:
self.ui.menuFile.removeAction(self.ui.menuRecent_2.menuAction())
self.ui.Tab.setTabsClosable (False)
for a in self.notSessionActions:
a.setVisible(False)
else:
for a in self.sessionActions:
a.setVisible(False)
#Now customize the window
self.settings = QtCore.QSettings("laborejo", "laborejo")
if geometry and match("\d+x\d+\+\d+\+\d+\Z", geometry): #geometry is 1920x1080+0+0
w, (h, x, y) = geometry.split("x")[0], geometry.split("x")[1].split("+") #all strings
self.setGeometry(int(x), int(y), int(w), int(h), )
elif geometry and match("\d+x\d+\Z", geometry): #or geometry is 1024x768
w,h = geometry.split("x")[0], geometry.split("x")[1]
self.setGeometry(0, 0, int(w), int(h))
elif self.settings.contains("geometry"): #or we have a stored one
self.restoreGeometry(self.settings.value("geometry"))
self.ui.actionToolbarJackModeToggle.setChecked(config.JACKMODE)
self.ui.actionToolbarJackTransportKeepRolling.setChecked(not config.TRANSPORT_KEEP_ROLLING)
self.ui.actionMIDI_Note_Entry.setChecked(True)
#self.statusBar = GuiStatusBar(parent = self)
self.ui.Tab.clear()
self.ui.toolBar.setFont(fontDB.font(MUSIC_FONT_STRING, "", 9)) #Force a music font for the toolbar to get good looking note shapes
self.substitutionsMenu = None
self.session = Session() #This is all the data.
self.more = "" #used in the status bar.
self.mode = "No Mode"
self.genericKeyActions = [] # All actions that have a shortcut like Return or Backspace. It filled automatically during shortcut creation
self.shortcutDict = {} #for all static shortcuts.
self.hoverShortcutDict = {} #for temporary hover shortcuts
self.lastHover = None #the last time the mouse hovered over a menu it was this Qt.Action.
self.recentFilesMenuActions = [] #temp storage. Only menu actions.
self.allActions = [] #A quick access point for all actions.
self.colors = [] #All used TabColors. this is never cleared. Who cares, there are enough colors.
#A lilypond window that can be closed with Escape
self.ui.lilyfloat = QtGui.QTextBrowser() #somehow it must be part of main.ui, no matter the name. Is hidden at first.
lilyEscapeAction = QtGui.QAction(QtGui.QIcon(), '', self)
lilyEscapeAction.setShortcut("Escape")
self.ui.lilyfloat.addAction(lilyEscapeAction)
QtCore.QObject.connect(lilyEscapeAction,QtCore.SIGNAL("triggered()"), self.ui.lilyfloat.hide)
#init small terminal
self.ui.smallTerminal.hide()
self.ui.actionSmall_Terminal.setChecked(False)
if self.settings.contains("smallTerminal"):
self.ui.terminal.setPlainText(self.settings.value("smallTerminal"))
def terminalKeypress(event):
if event.modifiers() == QtCore.Qt.ControlModifier and event.key() == 16777220: #Ctrl Return
self.processSmallTerminalInput()
else:
terminalOriginalKeypress(event)
terminalOriginalKeypress = self.ui.terminal.keyPressEvent
self.ui.terminal.keyPressEvent = terminalKeypress
#Tabs
######
self.ui.Tab.tabCloseRequested.connect(self.closeTabWarning)
self.ui.Tab.currentChanged.connect(self.tabChangeEvent)
#Menus
######
#Remember the last hovered menu action
def temphover(action):
self.lastHover = action
self.ui.menubar.hovered.connect(temphover)
self.ui.menubar.keyPressEvent = self.menuKeyPressInterceptor
qMenumouseReleaseEvent = QtGui.QMenu.mouseReleaseEvent
def menuMiddleMouseButtonInterceptor(menuobject, event):
#main already exists when this is used by the mouse.
if event.button() == QtCore.Qt.MiddleButton:
self.ui.toolBar.addAction(self.lastHover)
else: #not middle button. Execute.
qMenumouseReleaseEvent(menuobject, event)
def toolbarMiddleMouseButtonInterceptor(toolbarAction, event):
if event.button() == QtCore.Qt.MiddleButton:
self.ui.toolBar.removeAction(self.ui.toolBar.actionAt(event.pos()))
QtGui.QMenu.mouseReleaseEvent = menuMiddleMouseButtonInterceptor
QtGui.QToolBar.mousePressEvent = toolbarMiddleMouseButtonInterceptor
#Create Numpad Widget
self.paletteActions = [] #dynamically created menu actions.
#All buttons in all instances (per score) are actually the same buttons.
#Since we save them in a different widget/.ui file we need to sync them on creation in GuiScore().__init__()
self.ui.numpadAction1 = QtGui.QAction("", self)
self.ui.numpadAction2 = QtGui.QAction("", self)
self.ui.numpadAction3 = QtGui.QAction("", self)
self.ui.numpadAction4 = QtGui.QAction("", self)
self.ui.numpadAction5 = QtGui.QAction("", self)
self.ui.numpadAction6 = QtGui.QAction("", self)
self.ui.numpadAction7 = QtGui.QAction("", self)
self.ui.numpadAction8 = QtGui.QAction("", self)
self.ui.numpadAction9 = QtGui.QAction("", self)
self.ui.numpadAction0 = QtGui.QAction("", self)
self.numpadWidgetActions = [self.ui.numpadAction0, self.ui.numpadAction1, self.ui.numpadAction2, self.ui.numpadAction3, self.ui.numpadAction4, self.ui.numpadAction5, self.ui.numpadAction6, self.ui.numpadAction7, self.ui.numpadAction8, self.ui.numpadAction9,]
for numpadAction in self.numpadWidgetActions:
#init the actions so we have them in self.allActions and they do proper display updates
self.connectMenuAction(numpadAction, self.nothing)
#Create Numpad Palette commands and menus
self.numpadCreateMenu()
self.numpadChoosePalette(keypadItems = config.palettes['dynamics']) #Set default#
#Create User commands and menus
self.generateUserCommands()
self.generateRecentFilesMenu()
#Create Extra Toolbar Buttons
self.generateToolbar()
#Connect all preconfigured menu actions (not generated, not user) with backend functions
for qtAction, function in dictionaries.menus.items():
self.connectMenuAction(eval("self.ui." + qtAction) , eval(function))
#Create All Shortcuts
#ACHTUNG! All keys except the numpad are lowercase. If you test for them, test for lowercase.
#If you need an exception from this lowercase mechanism: The lowercase is produced in config.reloadPersonalConfig()
for key, value in config.shortcuts.items(): #key is really the keyboard key. value is the action name.
if not "lambda" in value: #this should eleminate anything with real paths, like midi export.
value = value.replace("/", "µ") #The user is allowed to give / as action names because it fits the user dir for user scripts in ~/.laborejo/scripts. But we can't use those as variable names, we use µ instead.
if "QtCore.Qt.KeypadModifier" in key:
#for config: "QtCore.Qt.KeypadModifier + QtCore.Qt.Key_5" : "api.tail",
key2 = QtGui.QKeySequence(eval(key))
keypad = True
else:
key2 = key.title()
keypad = False
#Try to get the functiond/object. This is not an execution, just checking if it is there.
try:
#Non-menu actions.
#These are mostly navigational keys like cursor,
#home/end as well as some duplicate shortcuts like AddDot
#which exists twice, once as menu and once on the Tab
#key because it is near the note entry numbers
#We need to create an action for these. Only actions can have shortcuts.
eval(value) #The action exists without the "self.ui." prefix.
action = QtGui.QAction(QtGui.QIcon(), '', self)
action.setShortcut(key2)
self.addAction(action)
if not keypad:
self.shortcutDict[key2] = action
self.connectMenuAction(action, eval(value)) #despite the name this is not only for menu functons
except NameError:
#Menu Actions
#The action already exists, we don't need to create a new one.
action = eval("self.ui." + value)
action.setParent(self.ui.Tab)
action.setShortcut(key2)
if not keypad:
self.shortcutDict[key2] = action
if key in ["Return", "Tab", "Backspace", "Shift+Tab", "Enter", "Left", "Right", "Up", "Down", "Escape"]:
self.genericKeyActions.append(action)
#Score Substitutions Empty Menu
self.placeholderScoreSubstitutions = QtGui.QMenu()
tmp = self.ui.menuAdvanced.addMenu(self.placeholderScoreSubstitutions)
tmp = self.ui.menuAdvanced.insertMenu(self.ui.actionRemove_Substitution, self.placeholderScoreSubstitutions )
tmp.setText('Score Substitutions')
#Score Container Empty Menu
self.placeholderScoreContainers = QtGui.QMenu()
tmp2 = self.ui.menuContainer.insertMenu(self.ui.actionInsert_Empty_Container, self.placeholderScoreContainers )
tmp2.setText('Score Container')
#Make Escape a global key
QtGui.QShortcut(QtGui.QKeySequence("Escape"), self, self.focusOnActiveScore)
self.prevailingActions = {
1536:self.ui.actionToolbarWhole,
768:self.ui.actionToolbarHalf,
384:self.ui.actionToolbarQuarter,
192:self.ui.actionToolbarEighth,
96:self.ui.actionToolbarSixteenth,
}
#Virtual Piano
self.ui.virtualPiano.orgFocusIn = self.ui.virtualPiano.focusInEvent
self.ui.virtualPiano.orgFocusOut = self.ui.virtualPiano.focusOutEvent
self.ui.virtualPiano.focusInEvent = self.customVirtualPianoFocusIn
self.ui.virtualPiano.focusOutEvent = self.customVirtualPianoFocusOut
#Shift interceptor
self.virtualPianoShiftDown = False
self.virtualPianoDuringChordEntry = False
self.virtualPianoOriginalKeyPressEvent = self.ui.virtualPiano.keyPressEvent
self.ui.virtualPiano.keyPressEvent = self.virtualPianoInterceptor
self.virtualPianoOriginalKeyReleaseEvent = self.ui.virtualPiano.keyReleaseEvent
self.ui.virtualPiano.keyReleaseEvent = self.virtualPianoReleaseInterceptor
#Build the Qt Actions and Shortcuts.
for key, value in config.virtualPiano.items():
virtAction = QtGui.QAction(QtGui.QIcon(), '', self.ui.virtualPiano)
virtAction.setShortcut(key)
virtAction.setShortcutContext(QtCore.Qt.WidgetShortcut)
virtAction.triggered.connect(eval(value))
self.ui.virtualPiano.addAction(virtAction)
#self.allActions.append(virtAction)
#Hide the piano initially. Not only does it distract but it also acts the wrong way. The piano must get focus on activation. But if we just let it appear on startup it doesn't.
self.ui.virtualPianoGroup.hide()
#Create midi CC shortcut functions
self.numpadNextPreviousMidiController = self.upDownCCFactory(ccGotHigherFunction = self.numpadNext, ccGotLowerFunction = self.numpadPrevious)
#Show the welcome tab with a splash screen for recent files and new/load
#TODO
#self.welcomeTab = WelcomeTab()
#self.ui.Tab.addTab(self.welcomeTab, "Welcome")
#Finally disable all actions for an empty program state and show the Qt Window
self.switchActionsOff()
if self.settings.contains("geometry"):
self.show()
else:
self.showMaximized()
if (not self.settings.contains("DidYouKnow")) or self.settings.value("DidYouKnow") == "2":
self.ui.DidYouKnow = DidYouKnow(parent = self, parentPyClass = self)
def nothing(self, *args):
pass
def showDidYouKnow(self):
self.ui.DidYouKnow = DidYouKnow(parent = self, parentPyClass = self)
def numpadCreateMenu(self):
"""Generate the palettes menu.
Normally this function is only executed on program start."""
#First remove the old menu actions
for menuAction in self.paletteActions:
self.ui.menuPalette.removeAction(menuAction)
self.paletteActions = []
#Create a new palette menu from the config dict
for identString, paletteDict in sorted(config.palettes.items()):
prettyName = paletteDict["title"]
menuAction = self.ui.menuPalette.addAction(prettyName)
if "shortcut" in paletteDict:
menuAction.setShortcut(paletteDict["shortcut"])
paletteDict["action"] = menuAction #save for later
self.paletteActions.append(menuAction)
self.connectMenuAction(menuAction, lambda identString=identString: self.numpadChoosePalette(keypadItems = config.palettes[identString]))
def numpadNext(self):
reverseDict = dict((v["action"], v) for k,v in config.palettes.items())
if self.numpadCurrentAction is self.paletteActions[-1]: #we are already at the last position
newAction = self.paletteActions[0]
else:
idx = self.paletteActions.index(self.numpadCurrentAction)
newAction = self.paletteActions[idx+1]
self.numpadChoosePalette(reverseDict[newAction])
def numpadPrevious(self):
idx = self.paletteActions.index(self.numpadCurrentAction)
reverseDict = dict((v["action"], v) for k,v in config.palettes.items())
if idx <= 0: #we are already at the first position.
newAction = self.paletteActions[-1]
else:
newAction = self.paletteActions[idx-1]
self.numpadChoosePalette(reverseDict[newAction])
def clearNumpadWidget(self):
for action in self.numpadWidgetActions:
action.setText("")
try:
action.triggered.disconnect()
except TypeError: #qt stuff. can't disconnect if there is no connection and no way to test if there is a connection
pass
action.setToolTip("")
action.setWhatsThis("")
def numpadChoosePalette(self, keypadItems):
"""Sets a complete new keypad-palette. Unspecified values
default to no command.
the parameters are dicts with an int as key (literally)
and a tuple of 5 as value:
(function,
QIcon-name or a very very short text,
tooltip, #use _("translated")!
whatsThis,
)
Complete dict parameter Example for one key:
keypadItems = {1:(api.insertClefTreble, "\U0001D11E", _("Insert Treble-Clef"), "")}
You can use unicode directly as second parameter, if your
texteditor supports it. This is a treble clef: 𝄞
"""
self.clearNumpadWidget()
for numberKey, (functionString, icon, tooltip, whatsThis) in ((k,v) for k,v in keypadItems.items() if type(k) is int):
try: #not a menu action
eval(functionString)
function = eval(functionString)
except: #a menu action
function = eval("self.ui." + functionString).trigger
action = self.numpadWidgetActions[numberKey]
action.setText(icon)
action.triggered.connect(function)
action.setToolTip(tooltip)
action.setWhatsThis(whatsThis)
#action is still the last action now.
#That is enough to get all parent widgets, which are eachs tabs numpad widget
for toolButton in action.associatedWidgets():
toolButton.parent().setTitle(" ".join(["Numpad:", keypadItems["title"]]))
self.numpadCurrentAction = keypadItems["action"]
def createMidiShortcuts(self):
assert self.session.playbackEngine == True # Only call this when we have a playback engine
#GUI-exclusive midi bindings which have no binding to the backend and signals.
for midiCC, functionString in config.midiCCShortcuts.items():
try: #not a function here in self.
eval(functionString)
function = eval(functionString)
except: #a function here in self.
function = eval(".".join(["self",functionString]))
api.cboxSmfCompatibleModule.executeCC[midiCC] = function
def upDownCCFactory(self, ccGotHigherFunction = api.nothing, ccGotLowerFunction = api.nothing, ccStayedTheSameFunction = api.nothing):
def f(midiVelocity, previousMidiVelocity):
if midiVelocity > previousMidiVelocity:
ccGotHigherFunction()
elif midiVelocity < previousMidiVelocity:
ccGotLowerFunction()
else: #the same. Does happen when the value is already 0 or 127 and goes in the same direction again.
ccStayedTheSameFunction()
return f
def virtualPianoInterceptor(self, qKeyEvent):
if qKeyEvent.modifiers() == QtCore.Qt.ShiftModifier:
self.virtualPianoShiftDown = True
self.virtualPianoOriginalKeyPressEvent(qKeyEvent)
def virtualPianoReleaseInterceptor(self, qKeyEvent):
if self.virtualPianoShiftDown and qKeyEvent.modifiers() == QtCore.Qt.NoModifier: #a modifier was released?
self.virtualPianoShiftDown = False
if self.virtualPianoDuringChordEntry:
self.virtualPianoDuringChordEntry = False
api.right()
self.virtualPianoOriginalKeyReleaseEvent(qKeyEvent)
def virtualPianoInsertNote(self, pitch):
absolutePitch = api.insertNearestPrevailingNote(pitch, toScale = True)
api.l_playback.playNote(absolutePitch, jackMode = config.JACKMODE) #always 0.5 seconds long
def virtualPianoInsertChord(self, pitch):
if self.virtualPianoDuringChordEntry: #there was a note before the current one with a shift down. We are in a chord adding process
absolutePitch = api.addNearestNoteToChord(pitch, toScale = True)
else:
#First note of a chord
self.virtualPianoDuringChordEntry = True
absolutePitch = api.insertNearestPrevailingNote(pitch, toScale = True) #goes right! so we need to go left to get to the current chord
api.left() #virtualPianoReleaseInterceptor for shift up does the right() function in the end
api.l_playback.playNote(absolutePitch, jackMode = config.JACKMODE) #always 0.5 seconds long
def customVirtualPianoFocusIn(self, event):
"""Is called automatically if the focus is gained by the virtual
keyboard
Enabling and disabling actions only works because the moment you
click on a menu entry VirtualPiano looses the focus and all
actions get activated again.
"""
self.switchActionsOff()
self.switchActionsOn(virtualPianoMode = True)
self.originalMode = self.mode
self.prevailingMode() #does not change self.mode
self.ui.virtualPiano.orgFocusIn(event)
def customVirtualPianoFocusOut(self, event):
"""Is called automatically if the focus exits from the virtual
keyboard
Enabling and disabling actions only works because the moment you
click on a menu entry VirtualPiano looses the focus and all
actions get activated again."""
self.switchActionsOff()
self.switchActionsOn(virtualPianoMode = False)
self.setMode(self.originalMode)
self.ui.virtualPiano.orgFocusOut(event)
def processSmallTerminalInput(self):
"""A user triggered action to execute what is written in the
small terminal text field"""
text = self.ui.terminal.toPlainText()
self.settings.setValue("smallTerminal", text)
if text:
exec(text)
self.session.currentGuiWorkspace.workingAreaWidget.viewport().update() #Update the grahipcsview manually
def switchActionsOff(self):
"""Deactivate nearly all Menu Actions and Shortcuts
as long as no file is open.
(Except recent files which are not in this list on purpose)"""
for a in self.allActions:
a.setEnabled(False)
allowed = [self.ui.actionNew, self.ui.actionOpen, self.ui.actionOpen_Collection, self.ui.actionOpen_as_Template, self.ui.actionQuit, self.ui.actionChat, self.ui.actionManual, self.ui.actionAbout, self.ui.actionImportLisalo, self.ui.actionImportLisaloBus, self.ui.actionSmall_Terminal, self.ui.actionFocusOnActiveScore, self.ui.actionDid_you_know]
for a in allowed:
a.setEnabled(True)
def switchActionsOn(self, virtualPianoMode = False):
def allValidActions():
#If playback is not running we do not need the playback related buttons:
if not self.session.playbackEngine:
playbackActions = set([self.ui.actionPlayGroup, self.ui.actionToolbarJackTransportKeepRolling, self.ui.actionMIDI_Note_Entry, self.ui.actionToolbarJackModeToggle, self.ui.actionToolbarPlayStop, self.ui.actionPlaySolo, self.ui.actionToolbarPlayFromStart, self.ui.actionToolbarEmergencyPlaybackStop, self.ui.actionRebind_external_Jack_Midi_connections])
else:
playbackActions = ()
if virtualPianoMode:
return (a for a in self.allActions if not (a.shortcut().toString().lower() in config.virtualPiano or a in playbackActions))
else:
return (a for a in self.allActions if not a in playbackActions)
for a in allValidActions():
a.setEnabled(True)
def toggleBarlines(self):
"""Switch GUI barlines on or off.
This alone is only a relay station and is not a switch in itself
toggleBarlines in main decides what to do"""
config.BARLINES = not config.BARLINES
for backendWs, guiWs in self.session.scenes.items():
guiWs.toggleBarlines(onOff = config.BARLINES)
self.ui.actionBarlines.setChecked(config.BARLINES)
def toggleVisible(self, qwidgetString, menu):
qwidget = eval("self.session.currentGuiWorkspace.ui." + qwidgetString)
#Toggle Off
if qwidget.isVisible():
if qwidgetString is "lyrics": #delete all lyric items for the whole musicTab
config.LYRICS = False
for tr in self.session.currentGuiWorkspace.tracks:
tr._removeLyrics()
self.session.currentGuiWorkspace.repositionTracks()
qwidget.hide()
menu.setChecked(False)
self.session.currentGuiWorkspace.workingAreaWidget.setFocus(True)
return False
#Toggle On
else:
if qwidgetString is "lyrics": #recreate all lyric items for the whole musicTab
config.LYRICS = True
for tr in self.session.currentGuiWorkspace.tracks:
tr.drawLyrics()
self.session.currentGuiWorkspace.repositionTracks()
qwidget.show()
menu.setChecked(True)
qwidget.setFocus(True)
return True
def toggleSmallTerminal(self):
qwidget = self.ui.smallTerminal
menu = self.ui.actionSmall_Terminal
if qwidget.isVisible():
qwidget.hide()
menu.setChecked(False)
self.focusOnActiveScore()
return False
else:
qwidget.show()
menu.setChecked(True)
self.ui.terminal.setFocus(True)
return True
"""
def toggleVirtualPiano(self):
qwidget = self.ui.virtualPianoGroup
menu = self.ui.actionVirtual_Piano
if qwidget.isVisible():
qwidget.hide()
menu.setChecked(False)
self.focusOnActiveScore()
return False
else:
qwidget.show()
menu.setChecked(True)
self.ui.virtualPiano.setFocus(True) #not the group. The piano itself gets focus.
return True
"""
def toggleJackMode(self):
"""Toggle the global jack playback mode"""
config.JACKMODE = not config.JACKMODE
self.ui.actionToolbarJackModeToggle.setChecked(config.JACKMODE)
def toggleJackTransportKeepRolling(self):
config.TRANSPORT_KEEP_ROLLING = not config.TRANSPORT_KEEP_ROLLING
self.ui.actionToolbarJackTransportKeepRolling.setChecked(not config.TRANSPORT_KEEP_ROLLING)
api.calfboxSetTransportKeepRolling(config.TRANSPORT_KEEP_ROLLING) #live update.
def focusOnActiveScore(self):
"""A function called by several others that focusses on the main
working widget, the score, of the current opened file"""
self.session.currentGuiWorkspace.workingAreaWidget.setFocus(True)
self.session.currentGuiWorkspace.centerOnCursor()
def tabChangeEvent(self):
"""Is called when a tab is changed by the user or by load/new"""
if api.core.session.workspace and isinstance(self.ui.Tab.currentWidget(), MusicTab):
api.core.session.workspace = self.ui.Tab.currentWidget().data
guiWs = main.session.scenes[api.core.session.workspace]
self.ui.actionSidebar.setChecked(guiWs.ui.sidebar.isVisible())
self.ui.actionMinimap.setChecked(guiWs.ui.minimap.isVisible())
self.ui.actionLyrics.setChecked(guiWs.ui.lyrics.isVisible())
guiWs.generateScoreSubstitutionsMenu()
guiWs.generateScoreContainerMenu()
guiWs.cursorPitch.pitch = api._getCursorPitch()
guiWs.cursorPitch.update()
if self.ui.lilyfloat.isVisible():
self.ui.lilyfloat.clear()
self.ui.lilyfloat.setText(api.generateLilypond())
def menuKeyPressInterceptor(self, qKeyEvent):
"""If you press a key while hovering with your mouse
over the entry it sets a new shortcut for this item.
No modifiers allowed
"""
if not QtGui.QApplication.keyboardModifiers() == QtCore.Qt.NoModifier:
#Combinations of modifiers are not allowed. Also only ctrl, shift and alt.
return None
key = qKeyEvent.key()
print (key)
if (not qKeyEvent.text().title() in self.shortcutDict) and (not key in [16777236, 16777235, 16777234, 16777237, 16777222, 16777223,16777253, 16777219, 16777264, 16777265, 16777266, 16777267, 16777268, 16777269, 167772610, 167772611]): #left and right exta. #Only if the hover key is not in the standard shortcuts
if key in self.hoverShortcutDict: #clear the old shortcut first
self.hoverShortcutDict[key].setShortcut(QtGui.QKeySequence())
self.hoverShortcutDict[key] = self.lastHover
self.lastHover.setShortcut(key)
else:
return None
def connectMenuAction(self, action, function, append = True):
"""Connect the menu action with the backend function,
or qt function in a few cases like Save and Open.
The actions already exist in their places and
no shortcuts are getting set here.
Also update the GraphicsView/Viewport because we deactivated
auto update. This prevents in-between score of cursors,
screenjumping and an over-all feeling of sickness :) """
#self.session.currentGuiWorkspace.workingAreaWidget.setViewportUpdateMode(QtGui.QGraphicsView.MinimalViewportUpdate)
#self.session.currentGuiWorkspace.workingAreaWidget.setViewportUpdateMode(QtGui.QGraphicsView.SmartViewportUpdate)
#self.session.currentGuiWorkspace.workingAreaWidget.setViewportUpdateMode(QtGui.QGraphicsView.NoViewportUpdate)
#self.session.currentGuiWorkspace.workingAreaWidget.setViewportUpdateMode(QtGui.QGraphicsView.FullViewportUpdate)
if append:
self.allActions.append(action)
def funcWrap():
function()
try:
self.session.currentGuiWorkspace.workingAreaWidget.viewport().update() #Update the grahipcsview manually
self.session.currentGuiWorkspace.updateStatusBar()
except:
pass
action.triggered.connect(funcWrap)
#QtCore.QObject.connect(action, QtCore.SIGNAL("triggered()"), funcWrap)
def defaultModalCommands(self):
"""The opposite of prevailingMode"""
for dur, act in self.prevailingActions.items():
act.setChecked(False)
act.setCheckable(False)
self.mode = "Insert"
modalcommands.commands.defaults()
def prevailingMode(self):
"""Number keys choose prevailing duration, alt mod inserts.
The opposite of defaultModalCommands"""
self.mode = "Prevailing"
for dur, act in self.prevailingActions.items():
act.setCheckable(True)
act.setChecked(False)
self.prevailingActions[api._getActiveCursor().prevailingDuration].setChecked(True)
modalcommands.commands.prevailing()
def setMode(self, modeString):
if modeString == "Prevailing":
self.prevailingMode()
else:
self.defaultModalCommands() #Default number keys
def toggleMode(self):
if self.mode == "Prevailing":
self.defaultModalCommands() #Default number keys
else:
self.prevailingMode()
def generateToolbar(self):
"""Read the toolbar dict from the config and user config file
and convert it to toolbar buttons"""
for key, value in config.toolbar.items():
value = value.replace("/", "µ") #The user is allowed to give / as action names because it fits the user dir for user scripts in ~/.laborejo/scripts. But we can't use those as variable names, we use µ instead.
#unlike shortcuts we only accept real menu actions here.
self.ui.toolBar.addAction(eval("self.ui." + value))
(eval("self.ui." + value)).setText(key.title())
#self.allActions.append(eval("self.ui." + value))
def addRecentFiles(self, fileName):
"""Add one file to the recent save file. If there are too much
in that file delete the oldest entry"""
if not self.nonSessionManager:
recentList = self.settings.value("recentFilesList")
if not recentList:
recentList = []
if fileName in recentList:
return False
else:
recentList.append(fileName)
if len(recentList) >6:
recentList.pop(0)
self.settings.setValue("recentFilesList", recentList)
self.generateRecentFilesMenu()
def generateRecentFilesMenu(self):
"""Generate the recent files menu.
This is the step after self.addRecentFiles.
This always addes the complete recent files file to the menu."""
if not self.nonSessionManager:
#First remove the old files menu actions
for menuAction in self.recentFilesMenuActions:
self.ui.menuRecent_2.removeAction(menuAction)
self.recentFilesMenuActions = []
#Create a new recent files menu from the save file.
nameList = self.settings.value("recentFilesList")
if not nameList:
nameList = []
nameList.reverse()
for fString in nameList:
fString = fString.rstrip()
menuAction = self.ui.menuRecent_2.addAction(fString)
self.recentFilesMenuActions.append(menuAction)
self.connectMenuAction(menuAction, lambda fString = fString: self.load(directLoad = fString), append = False) #Don't append to the activate/deactivate list.
def generateUserCommands(self):
"""Parse ~/.laborejo/scripts/ and create a menu structure
which will execute the files in there.
This is done by creating actions and BEFORE setting shortcuts.
So the user can bind their own shortcuts in qt-lab.config.
The name of the action is "user_" plus the name of the path
without ~/.laborejo/scripts/ and the tailing ".py"
Any / is substituted with µ
Example:
~/.laborejo/scripts/somedir/temp.py would be
self.ui.user_somedirµtemp
or just "user_somedirµtemp" for the config/shortcut file
"""
userScriptDir = api._getConfigDir() + "scripts/"
allowedChars = [c for c in "abcdefghijklmnoprstuvwyxzABCDEFGHIJKLMNOPRSTUVWXYZ/"]
def execfile(filepath):
global_namespace = {"__file__": filepath, "__name__": "__main__"}
with open(filepath, 'rb') as file:
exec(compile("import laborejocore as api\n".encode() + file.read(), filepath, 'exec'), global_namespace)
if os.path.isdir(userScriptDir):
#menu = self.ui.menuAdvanced.addMenu('User Commands')
#menu = self.ui.menubar.addMenu('User Commands')
menu = self.ui.menuUser_Commands
subs = {"":menu,} #all submenus. Starts only with the scripts/ menu which has no extra name.
for rootOriginal, dirs, files in os.walk(userScriptDir):
root = rootOriginal.replace(api._getConfigDir() + "scripts/", '')
current = subs[root.split("/")[-1]]
if dirs:
for submenu in dirs:
newSubMenu = current.addMenu(submenu)
subs[submenu] = newSubMenu
for name in files:
if name.endswith((".py")):
pathOriginal = rootOriginal + "/" + name
path = pathOriginal.replace(".py", "")
path = path.replace("//", "/")
path = "".join([c for c in path if c in allowedChars])
path = path.replace(api._getConfigDir() + "scripts/", '')
actionName = "user_" + path
actionName = actionName.replace("/", "µ") #replace with a seldom symbol. / is not allowed in variable names.
entry = current.addAction(actionName) #just to avoid collisions
entry.setText(name.replace(".py", "")) #but use a pretty name.
#self.connectMenuAction(entry, lambda pathOriginal=pathOriginal: exec(open(pathOriginal, encoding="utf-8").read()))
self.connectMenuAction(entry, lambda pathOriginal=pathOriginal: execfile(pathOriginal))
#self.connect(entry,QtCore.SIGNAL('triggered()'), lambda pathOriginal=pathOriginal: exec(open(pathOriginal).read()))
exec("self.ui." + actionName + " = entry") #build the variable name from the strings so we can assign shortcuts to it later with our normal method.
with open(pathOriginal, 'r', encoding="utf-8") as f: #peak into the first line of the file
first_line = f.readline()
#Only if this is a normal script file add it to the allActions list which is used to deactivate actions on program start.
#If you add #START as first line you can use your script anyway.
if not first_line.strip().startswith("#START"):
self.allActions.append(eval("self.ui." + actionName))
#vars()["self.ui." + actionName] = entry #somehow this does not work in this scope.
else:
warnings.warn("Script dir not found. Creating empty " + userScriptDir + " with README file.")
os.makedirs(userScriptDir)
#Create small readme
f2 = open(api._getConfigDir() + 'scripts/README', "w", encoding="utf-8")
f2.write("Place script files with .py extensions here. You can use nested directories.\n\nThe script files can use the 'api.foobar()' namespace and the complete python syntax.\nThey work with the visible user cursor. This means what a user can do, a script can do as well.\nConsult the Laborejo manual for more information or read the api.py file for commands.\n\nExample:\nfor i in range(8):\n api.insert4()\n api.up()\n")
f2.close()
def closeTabMenu(self):
"""Close the tab through the menu or by a shortcut.
But not by clicking with the mouse on an [x]"""
idx = self.ui.Tab.currentIndex()
return self.closeTabWarning(idx)
def closeTabWarning(self, tabIndex):
"""Check if there is unsaved data in a score before closing
the tab."""
t = self.ui.Tab
t.setCurrentIndex(tabIndex)
if not tabIndex == t.currentIndex():
raise IndexError("Tab to close is not current tab eventhough it was changed beforehand")
GuiWs = self.session.scenes[self.ui.Tab.currentWidget().data]
if self.session.isCurrentClean() or GuiWs.trackEdit: #It is maybe just a track/container edit. This needs no saving at all.
del self.session.scenes[self.ui.Tab.currentWidget().data]
api.close()
t.removeTab(tabIndex)
if GuiWs.trackEdit:
self.ui.Tab.setCurrentWidget(GuiWs.parentTabWidget)
if GuiWs.data.originalStandaloneContainer.cursorWalk: #Can we see the content inside the container?
GuiWs.parentGuiWorkspace.fullReload() #Since we expect container edits we must update the whole thing. Maybe slow right now, but better safe than sorry
else: #we don't see the content. Just need to adjust the visible duration.
api.l_send(lambda: api.l_item.updateDynamic(GuiWs.data.originalStandaloneContainer))
api.l_send(lambda: api.l_item.updateDuration(GuiWs.data.originalStandaloneContainer))
api.l_send(lambda: api.l_score.updateTrackFromItem(GuiWs.data.originalStandaloneContainer))
GuiWs.parentGuiWorkspace.setCurrentIndex(0) #Switch to Main View
self.focusOnActiveScore()
else:
tabname = t.tabText(tabIndex)
reply = QtGui.QMessageBox.question(self, 'Unsaved Data', "Unsaved Data in " + tabname + ".\nHow to proceed?", QtGui.QMessageBox.Save | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel , QtGui.QMessageBox.Cancel)
if reply == QtGui.QMessageBox.Discard:
del self.session.scenes[self.ui.Tab.currentWidget().data]
api.close()
t.removeTab(tabIndex) #Just close
elif reply == QtGui.QMessageBox.Save:
if self.save(): #This calls the gui dialog if there is no filename. Could be canceled as well.
del self.session.scenes[self.ui.Tab.currentWidget().data]
self.session.setSavestatusClean()
api.close()
t.removeTab(tabIndex)
else: #If canceled just safely return to the unsaved data.
return False
else: #Cancel
return False
if not self.session.scenes: #it is empty? No files left open?
self.switchActionsOff()
self.placeholderScoreSubstitutions.clear()
self.placeholderScoreContainers.clear()
self.session.saveStatus = set() #Force all scores to 'clean'
return True #no return up to this point means the tab was really closed.
def closeEvent(self, event): #does not need to be assigned or connected. This overwrites a default qt method.
"""Check if there is any unsaved data in the session before
closing the program"""
#Save the window geometry, even if the program is not closed because of unsaved files, it does not hurt to save it now.
#Luckily this function gets not called at all when we use the NSM Stop button. Only when the Window Manager closes the program. We avoid an infinite loop.
if self.nonSessionManager:
return event.ignore()
#os.kill(os.getpid(), SIGTERM) #Close ourselves through sigterm which is handled by NSM already and knows how to close calfbox.
#I am unsure if this ever gets called. But just in case:
#return True
self.settings.setValue("geometry", self.saveGeometry())
if self.session.saveStatus: #There is dirty data.
#Offer to cancel, Quit Anyway or SaveAll and then Quit.
reply = QtGui.QMessageBox.question(self, 'Unsaved Data', "One or more files are unsaved. How to proceed?\nWarning: Unnamed Files will be discarded.", QtGui.QMessageBox.SaveAll | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel , QtGui.QMessageBox.Cancel)
if reply == QtGui.QMessageBox.Discard:
event.accept() #Just quit
elif reply == QtGui.QMessageBox.SaveAll:
api.saveAll() #this never fails. It has no user interaction. No test necessarry.
event.accept()
else: #Cancel
event.ignore()
else: #Everything is clean and saved. Good Bye.
event.accept()
#Save, Load, Export
#####
def new(self, backendWorkspace):
"""create a new tab with an empty, unsaved score
this function gets called by the backend/api. Just send
api.new and this will be executed automatically.
DON'T call it directly from the GUI."""
if backendWorkspace.lastKnownFilename:
fileName = backendWorkspace.lastKnownFilename
else:
fileName = "unnamed"
workspace = GuiScore(backendWorkspace)
self.session.scenes[backendWorkspace] = workspace #This must be done early. loadBackendData already depends on existing session.foo vars.
workspace.loadBackendData() #This is not load a file but create the gui from the backend data.
workspace.fileName = fileName
if self.nonSessionManager:
tabIndex = self.ui.Tab.addTab(workspace, os.path.basename(fileName))
else:
tabIndex = self.ui.Tab.addTab(workspace, fileName)
self.ui.Tab.setCurrentIndex(tabIndex)
c = self.randomColor()
pixmap = QtGui.QPixmap(20, 20)
pixmap.fill(QtGui.QColor(c))
workspace.icon = QtGui.QIcon(pixmap)
self.ui.Tab.tabBar().setTabIcon(tabIndex, workspace.icon)
workspace.updateGui() #Update Track Properties etc.
workspace.cursorPitch.update()
workspace.cursorPosition.update()
self.session.setSavestatusClean()
self.switchActionsOn() #We have at least one file now, everything is allowed.
def editContainerContent(self):
#Replace the current scene with a temporary editing chain
#to edit a single container, be it an atomic container or single-
#track edit.
mainGuiWorkspace = self.session.currentGuiWorkspace
w = self.ui.Tab.currentWidget()
self.session.currentGuiWorkspace.setCurrentIndex(1) #Switch to Container View
backendWorkspace = api.createContainerWorkspace(container = None, fullLoad = True)
tempGuiWorkspace = GuiScore(backendWorkspace) #This is a full GuiScore.
self.session.scenes[backendWorkspace] = tempGuiWorkspace #This must be done early. loadBackendData already depends on existing session.foo vars.
tempGuiWorkspace.loadBackendData() #This is not load a file but create the gui from the backend data.
tempGuiWorkspace.fileName = ""
tempGuiWorkspace.trackEdit = True #Makes closing a one-click action regardless of unsaved data or not.
tempGuiWorkspace.parentTabWidget = w
tempGuiWorkspace.parentGuiWorkspace = mainGuiWorkspace
tabIndex = self.ui.Tab.addTab(tempGuiWorkspace, tempGuiWorkspace.data.score.container[0].uniqueContainerName + " (" + mainGuiWorkspace.data.lastKnownFilename + ")")
self.ui.Tab.setCurrentIndex(tabIndex)
tempGuiWorkspace.updateGui() #Update Track Properties etc.
tempGuiWorkspace.cursorPitch.update()
tempGuiWorkspace.cursorPosition.update()
self.focusOnActiveScore()
def load(self, directLoad = None, asTemplate = False, fixedColor = None, newTabName = None):
"""Present the gui load dialog,
ask the api to open the filepath"""
if directLoad:
if type(directLoad) is list:
fileNameList = directLoad
else:
fileNameList = [directLoad]
else:
fileNameList = QtGui.QFileDialog.getOpenFileNames(self, "Open File(s)", self.session.last_open_dir, "Laborejo Score Files (*.lbjs);;All Files (*.*)")
if fileNameList: #not cancelled
atLeastOneFileOpened = False
#Special Case: There is only one file open, it is unnamed but savestatus is clean. This means it is a new, unmodified file.
#In that case close that empty file.
if len(self.session.scenes.items()) == 1 and (not self.session.saveStatus) and self.session.currentGuiWorkspace.fileName is "":
self.closeTabWarning(0) #despite the name this will not result in any GUI or warning. SaveStatus is all good.
for fileName in fileNameList:
fileName = os.path.abspath(fileName)
#first check if this file is already open in this GUI. Templates can always be opened.
if self.session.isFilenameAvailable(fileName) or asTemplate:
backendWorkspace = api.load(fileName, force = False, asTemplate = asTemplate) #this returns False if the user chose a non-laborejo file. Only use for testing or emergency.
if backendWorkspace:
workspace = GuiScore(backendWorkspace)
self.session.scenes[backendWorkspace] = workspace #This must be done early. loadBackendData already depends on existing session.foo vars.
workspace.loadBackendData()
if asTemplate:
# The backend does not know about templates. It just has open and new. New has no filename, open has one. A template is a gui construct which gives a "new" file to the user which already has content.
workspace.fileName = ""
backendWorkspace.lastKnownFilename = "" #We switch the backend name to "new" here.
if self.nonSessionManager:
n = newTabName if newTabName else os.path.basename(fileName)
tabIndex = self.ui.Tab.addTab(workspace, n)
else:
tabIndex = self.ui.Tab.addTab(workspace, "unnamed")
else:
workspace.fileName = fileName
if self.nonSessionManager:
tabIndex = self.ui.Tab.addTab(workspace, os.path.basename(fileName))
else:
tabIndex = self.ui.Tab.addTab(workspace, fileName)
self.addRecentFiles(fileName)
self.ui.Tab.setCurrentIndex(tabIndex)
c = fixedColor if fixedColor else self.randomColor()
pixmap = QtGui.QPixmap(20, 20)
pixmap.fill(QtGui.QColor(c))
workspace.icon = QtGui.QIcon(pixmap)
self.ui.Tab.tabBar().setTabIcon(tabIndex, workspace.icon)
workspace.updateGui()
workspace.cursorPitch.update()
workspace.cursorPosition.update()
self.session.setSavestatusClean()
atLeastOneFileOpened = True
self.session.last_open_dir = os.path.dirname(fileName)
else:
warnings.warn("File " + fileName + "is already open")
return False
if atLeastOneFileOpened:
self.switchActionsOn() #We have at least one file now, everything is allowed.
return True
def loadAsTemplate(self, directLoad = None):
self.load(directLoad, asTemplate = True)
def loadCollection(self, lbjPathList = None):
"""Load one ore more lbj files as seperate lbjs workspaces"""
if lbjPathList:
lbjPathList = lbjPathList
else:
lbjPathList = QtGui.QFileDialog.getOpenFileNames(self, "Open File(s)", self.session.last_open_dir, "Laborejo Collection Files (*.lbj);;All Files (*.*)")
for lbj in lbjPathList:
lbjsFiles = api.col_getAllFilepaths(lbj)
fixedColor = self.randomColor()
for lbjs in lbjsFiles:
self.load(directLoad = lbjs, asTemplate = False, fixedColor = fixedColor)
def previewPDF(self):
api.previewPDF(pdfviewer = config.pdfviewer)
def previewPDFSingle(self):
api.previewPDFSingle(pdfviewer = config.pdfviewer)
def substitutionsScoreFromFile(self):
fileName = QtGui.QFileDialog.getOpenFileName(self, "Choose File to convert to Substitutions", self.session.last_subst_dir, "Laborejo Files (*.lbj *.lbjs);;All Files (*.*)")
if fileName:
api.substitutionsScoreFromFile(fileName)
self.session.last_subst_dir = os.path.dirname(fileName)
def substitutionsScoreToFile(self):
fileName = QtGui.QFileDialog.getSaveFileName(self, "Save Laborejo Substitutions as Score.", self.session.last_save_dir , "Laborejo Score (*.lbjs)")
if fileName:
self.session.last_subst_dir = os.path.dirname(fileName)
api.substitutionsScoreToFile(filepath = fileName)
def save(self, saveAs = False):
"""The gui save dialog to get a filepath or direct save.
Save is always for the current active workspace/score"""
currentWs = self.session.currentGuiWorkspace
if (not currentWs.fileName) and currentWs.data.lastKnownFilename:
currentWs.fileName = currentWs.data.lastKnownFilename
if saveAs or not currentWs.data.lastKnownFilename: #TODO: was just currentWs.filename
fileName = QtGui.QFileDialog.getSaveFileName(self, "Save Laborejo Score file.", self.session.last_save_dir , "Laborejo Score (*.lbjs)")
if fileName: #Not pressed cancel?
if not os.path.splitext(fileName)[1]: #no file extension given?
fileName = fileName + ".lbjs"
x = api.save(fileName)
currentWs.fileName = fileName
self.ui.Tab.setTabText(self.ui.Tab.currentIndex(), fileName)
self.addRecentFiles(fileName)
self.session.setSavestatusClean() #The currently active file will be set clean.
self.session.last_save_dir = os.path.dirname(fileName)
return True
else: #User pressed cancel
return False
elif currentWs.fileName:
api.save(currentWs.fileName)
self.session.setSavestatusClean() #The currently active file will be set clean.
if self.nonSessionManager and not self.session.saveStatus: #no unclean files left?
self.session.ourNsmClient.setDirty(False)
return True
def saveAs(self):
self.save(saveAs = True)
def customExport(self):
"""A gui go click around which results in a variety of export
parameters."""
dialog = ExportDialog() #TODO: does this need the refenrece to the current backend score or is it enough to use api. Api. should be enough since you can't change the active score while the export dialog is active
dialog.exec_() #show as modal (blocking) dialog. Works with tiling and dynamic window managers as well.
def exportMidi(self):
fileName = QtGui.QFileDialog.getSaveFileName(self, "Export Score as midi. 'Simple' Track Settings will be used. Give full name including file extension.", self.session.last_export_dir, "*.mid *.midi *.MID *.MIDI;;All Files (*.*)")
if fileName:
api.exportMidi(fileName)
self.session.last_export_dir = os.path.dirname(fileName)
def exportArdour(self):
dirName = QtGui.QFileDialog.getExistingDirectory(self, caption = "Export Score as Ardour 3 Session. Choose a directory where ANOTHER directory will be created.", directory = self.session.last_export_dir)
if dirName:
api.exportArdourThree(dirName)
self.session.last_export_dir = dirName
def exportMidiJack(self):
fileName = QtGui.QFileDialog.getSaveFileName(self, "Export Score as midi. 'Jack' Track Settings will be used. Give full name including file extension.", self.session.last_export_dir, "*.mid *.midi *.MID *.MIDI;;All Files (*.*)")
if fileName:
api.exportMidi(fileName, jackMode = True)
self.session.last_export_dir = os.path.dirname(fileName)
def exportLilypond(self):
fileName = QtGui.QFileDialog.getSaveFileName(self, "Export complete Laborejo Score as Lilypond. Give full name including file extension.", self.session.last_export_dir, "*.ly;;All Files (*.*)")
if fileName:
api.exportLilypond(fileName)
self.session.last_export_dir = os.path.dirname(fileName)
def exportPDF(self, parts):
partsString = " " + parts.upper() + " Parts will be derived from the filename." if parts else ""
fileName = QtGui.QFileDialog.getSaveFileName(self, "Export complete Laborejo Score as PDF (Lilypond)"+partsString, self.session.last_export_dir, "*.pdf;;All Files (*.*)")
if fileName:
api.exportPDF(fileName, parts = parts)
self.session.last_export_dir = os.path.dirname(fileName)
def viewLilypondText(self):
if self.ui.lilyfloat.isVisible():
self.ui.lilyfloat.hide()
else:
self.ui.lilyfloat.setText(api.generateLilypond())
self.ui.lilyfloat.show()
def importWrapperSingleFile(self, function):
"""Without the session manager this returns False.
WIth nsm and Cancel it returns None
The given function must be a api. function that creates
and switches to a new file so we can call api.save() directly
This functions add one parameter, the new save path.
So expect it in your lambda. For standalone mode this will be
None.
"""
if self.nonSessionManager:
ret = api.l_form.generateForm({"name" : (" ", "")}, _("Score Name"), _("Enter a name for the new score"))
if ret:
filepath = os.path.join(self.session.ourNsmClient.states.pathBeginning, os.path.splitext(ret["name"])[0] + ".lbjs")
if os.path.exists(filepath):
filepath = os.path.join(self.session.ourNsmClient.states.pathBeginning, os.path.splitext(ret["name"])[0] + str(datetime.now()) + ".lbjs")
r = function(filepath)
if r:
api._getWorkspace().lastKnownFilename = filepath
api.save(filepath)
return r
else:
return False
else:
return function(None)
def importLisalo(self):
fileName = QtGui.QFileDialog.getOpenFileName(self, "Import Lisalo File", self.session.last_import_dir, "Lisalo Files (*.lsl);;All Files (*.*)")
if fileName:
self.session.last_import_dir = os.path.dirname(fileName)
return self.importWrapperSingleFile(lambda newSavePath: api.importLisalo(fileName, newSavePath = newSavePath))
def importLisaloBus(self):
fileName = QtGui.QFileDialog.getOpenFileName(self, "Import Lisalo File", self.session.last_import_dir, "Lisalo Files (*.lsl);;All Files (*.*)")
if fileName:
self.session.last_import_dir = os.path.dirname(fileName)
return self.importWrapperSingleFile(lambda newSavePath: api.importLisalo(fileName, trackPerBus = True, newSavePath = newSavePath))
def nsmLoad(self, pathBeginning, clientId):
"""This is the init load. It happens exactly once per instance
and we get the clientId which must be saved immediatly because
the laborejo-qt starter, which is still active at this point
in runtime, depends on it and uses it to give jack prefixes
to the backend when creating calfbox"""
self.session.nsmClientId = clientId #will be used for later to create jack ports
potentialPath = os.path.join(pathBeginning, "nsm.lbjs")
#check if the core file is there. If not we assume it is a new session and create a file with this name.
self.nsmWhatToLoad = None
if os.path.exists(potentialPath):
self.nsmWhatToLoad = "existing"
#There is at least one lbjs file. Load them all.
#self.load(directLoad = [os.path.join(pathBeginning, score) for score in os.listdir(pathBeginning) if score.endswith(".lbjs")])
return True, "*.lbjs"
else:
if os.path.isdir(pathBeginning): #The directory already exists but there is no nsm.lbjs?!
if os.listdir(pathBeginning):
return False, "There was no 'nsm.lbjs' in " + pathBeginning + " but other files were present. Suspecting modification by instance not under session control. Abort. Please clean directory manually first."
#else: #The directory is already there but was empty. That is uncommon but not wrong. Go on.
# pass
else: #this is indeed the first time for Laborejo in this session. Everything is fine. Create dir
os.makedirs(pathBeginning)
#If we came to this point there is an empty directory pathBeginning. We create a new, empty, lbjs file there.
self.nsmWhatToLoad = "new"
#api.new(filepath = potentialPath)
return True, "nsm.lbjs"
def nsmActuallyLoadFirstFiles(self):
"""This is a separate function than nsmLoad because
we load in two stages. First the initial load which remembers
which gets the client id and then we actually restore all the
files
"""
assert self.nsmWhatToLoad
if self.nsmWhatToLoad == "existing":
self.load(directLoad = [os.path.join(self.session.ourNsmClient.states.pathBeginning, score) for score in os.listdir(self.session.ourNsmClient.states.pathBeginning) if score.endswith(".lbjs")])
elif self.nsmWhatToLoad == "new":
api.new(filepath = os.path.join(self.session.ourNsmClient.states.pathBeginning, "nsm.lbjs"))
else:
raise ValueError
def nsmSave(self, pathBeginning):
ret = api.saveAll()
if ret:
self.session.setAllClean() #NSM clean status is done by nsmclient.py
return True, "*.lbjs"
else:
return False, " ".join(["Not all files in", pathBeginning, "were saved. Reason unknown."])
def nsmRemoveFromSession(self):
"""Remove the current tab/file from the session.
But make a copy in a sub-backup-dir.
"""
removedDir = os.path.join(self.session.ourNsmClient.states.pathBeginning, "removed")
if not os.path.exists(removedDir):
os.makedirs(removedDir)
oldFilepath = self.session.currentGuiWorkspace.data.lastKnownFilename #A full path
if self.closeTabMenu(): #including all the standalone stuff like warning for unsaved changes. But asking for a filename will never happen since all nsm-laborejo files have names.
oldfile = os.path.join(removedDir, os.path.basename(oldFilepath))
try:
move(oldFilepath, os.path.join(removedDir, str(datetime.now())+"."+os.path.basename(oldFilepath)))
except IsADirectoryError: #happens if you remove/close a container edit tab. That never was a real file.
pass
except FileNotFoundError: #if the initial nsm.lbjs was never saved
pass
#Do not allow nsm.lbjs to be closed. It is the critical marker file.
mainFilepath = os.path.join(self.session.ourNsmClient.states.pathBeginning, "nsm.lbjs")
if oldFilepath == mainFilepath: #nsm.lbjs was closed.
api.new(filepath = mainFilepath)
api.save(filepath = mainFilepath)
#else:
#user cancelled. Nothing happens.
def nsmImportToSession(self):
"""Import an existing lbjs file to the session and its directory
First let the user select a file, copy that to our nsm dir.
After that use the normal load mechanism, as in nsmLoad.
"""
openedFileNames = QtGui.QFileDialog.getOpenFileNames(self, "Import Lbjs Score File", self.session.last_import_dir, "Laborejo Score (*.lbjs);;All Files (*.*)")
importList = []
if openedFileNames:
for srcfileName in openedFileNames:
newFilepath = os.path.join(self.session.ourNsmClient.states.pathBeginning, os.path.basename(srcfileName))
copyfile(srcfileName, newFilepath)
importList.append(newFilepath)
#We now have a copies in our session dir. We can open them directly.
self.load(directLoad = importList)
self.session.last_import_dir = os.path.dirname(srcfileName)
return True
else:
return False
def nsmExportFromSession(self):
"""Export the current tab/file to a file outside the session dir
Changes nothing in the session. Does not even open the exported
file in a new tab. Fire and forget.
"""
currentWs = self.session.currentGuiWorkspace
fileName = QtGui.QFileDialog.getSaveFileName(self, "Export Laborejo Score file.", self.session.last_export_dir , "Laborejo Score (*.lbjs)")
if fileName: #Not pressed cancel?
if not os.path.splitext(fileName)[1]: #no file extension given?
fileName = fileName + ".lbjs"
api.save(fileName)
self.session.last_export_dir = os.path.dirname(fileName)
return True
else: #User pressed cancel
return False
def nsmNewToSession(self):
"""Create an empty file in the session dir and open it.
We can already depend on the existing laborejo session dir
since self.nsmLoad() was called"""
ret = api.l_form.generateForm({"name" : (" ", "")}, _("Score Name"), _("Enter a name for the score"))
if ret:
filepath = os.path.join(self.session.ourNsmClient.states.pathBeginning, os.path.splitext(ret["name"])[0] + ".lbjs")
api.new(filepath)
def nsmImportToSessionAsTemplate(self):
"""same as ImportToSession, only as template"""
openedFileNames = QtGui.QFileDialog.getOpenFileNames(self, "Import Lbjs Score File", self.session.last_import_dir, "Laborejo Score (*.lbjs);;All Files (*.*)")
if openedFileNames:
for srcfileName in openedFileNames:
self.importWrapperSingleFile(lambda newSavePath: self.load(directLoad = srcfileName, asTemplate = True, newTabName = os.path.splitext(os.path.basename(newSavePath))[0] + ".lbjs"))
self.session.last_import_dir = os.path.dirname(srcfileName)
return True
else:
return False
def randomColor(self):
"""Generates a nice pastell color"""
def newColor():
red, green, blue = randint(1, 255), randint(1, 255), randint(1, 255)
#red, green, blue = 205 + random() * 50, 205 + random() * 50, 205 + random() * 50,
alpha = 91 + random() * 100
return (red, green, blue, alpha)
c = newColor()
while c in self.colors:
c = new()
self.colors.append(c)
return QtGui.QColor(c[0], c[1], c[2], 255)
class ExportDialog(QtGui.QDialog):
def __init__(self):
super(ExportDialog, self).__init__()
self.ui = Ui_ExportDialog() #self.ui is the node to all qt widgets in this tab.
self.ui.setupUi(self)
self.ui.warningLabel.hide()
#self.setWindowFlags(QtCore.Qt.Dialog)
#self.setModal(True)
self.saveOriginalSettings()
#Set initial tab status and connect format radio buttons to switch the tab.
#indices: 0-lilypond, 1-midi, 2-other
self.ui.pdf.clicked.connect(lambda: self.ui.settingsTab.setCurrentIndex(0))
self.ui.pdf.toggled.connect(lambda: self.ui.preview.setEnabled(self.ui.pdf.isChecked()))
self.ui.lilypond.clicked.connect(lambda: self.ui.settingsTab.setCurrentIndex(0))
self.ui.lilybin.clicked.connect(lambda: self.ui.settingsTab.setCurrentIndex(0))
self.ui.midijack.clicked.connect(lambda: self.ui.settingsTab.setCurrentIndex(1))
self.ui.midisimple.clicked.connect(lambda: self.ui.settingsTab.setCurrentIndex(1))
#The preview buttons gets a hover to indicate that you don'T need a filepath
self.ui.preview.setEnabled(self.ui.pdf.isChecked())
def leavePreview(event):
if self.ui.preview.isEnabled(): self.ui.path.setEnabled(True)
event.accept()
def enterPreview(event):
if self.ui.preview.isEnabled(): self.ui.path.setEnabled(False)
event.accept()
self.ui.preview.leaveEvent = leavePreview
self.ui.preview.enterEvent = enterPreview
#Parts Radio Button:
self.ui.pdf.clicked.connect(self.populatePathComboBox)
self.ui.lilypond.clicked.connect(self.populatePathComboBox)
self.ui.lilybin.clicked.connect(self.populatePathComboBox)
self.ui.midijack.clicked.connect(self.populatePathComboBox)
self.ui.midisimple.clicked.connect(self.populatePathComboBox)
#Auto-Update the filepath extension when changing the format
self.ui.pdf.clicked.connect(self.correctCurrentPathExtension)
self.ui.lilypond.clicked.connect(self.correctCurrentPathExtension)
self.ui.lilybin.clicked.connect(self.correctCurrentPathExtension)
self.ui.midijack.clicked.connect(self.correctCurrentPathExtension)
self.ui.midisimple.clicked.connect(self.correctCurrentPathExtension)
#Path
self.ui.lilybin.toggled.connect(lambda: self.ui.path.setEnabled(not self.ui.lilybin.isChecked()))
self.ui.lilybin.toggled.connect(lambda: self.ui.pathOpen.setEnabled(not self.ui.lilybin.isChecked()))
self.ui.path.setDuplicatesEnabled(False)
self.ui.pathOpen.clicked.connect(self.openPathButton) #Open button
#Initiliaze safed values
self.lilypondTemplates = list(api.getTemplateList(extension = "ly"))
self.ardourTemplates = list(api.getTemplateList(extension = "ardour"))
self.ui.lytemplate.addItems(self.lilypondTemplates)
self.ui.ardourTemplate.addItems(self.ardourTemplates)
#It is possible that you got an lbjs file without the template.
warning = []
if api._getWorkspace().lytemplate in self.lilypondTemplates:
self.ui.lytemplate.setCurrentIndex(self.lilypondTemplates.index(api._getWorkspace().lytemplate))
else: #don't choose an index
warning.append("Lilypond-Template: " + api._getWorkspace().lytemplate)
if api._getWorkspace().ardourtemplate in self.ardourTemplates:
self.ui.ardourTemplate.setCurrentIndex(self.ardourTemplates.index(api._getWorkspace().ardourtemplate))
else: #don't choose an index
warning.append("Ardour Template: " + api._getWorkspace().ardourtemplate)
if warning:
warning= _(" and ").join(warning)
warning = _("Warning: ") + warning + _(" could not be found! Choose a different one now or avoid to safe.")
self.ui.warningLabel.setText("" + warning + "")
self.ui.warningLabel.show()
self.ui.transpositionFrom.addItems(api.lilypond.sortedNoteNameList)
self.ui.transpositionTo.addItems(api.lilypond.sortedNoteNameList)
self.ui.transpositionFrom.setCurrentIndex(api.lilypond.sortedNoteNameList.index(api.lilypond.pitch2ly[api._getScore().transposition[0]]))
self.ui.transpositionTo.setCurrentIndex(api.lilypond.sortedNoteNameList.index(api.lilypond.pitch2ly[api._getScore().transposition[1]]))
self.ui.transpositionJack.setValue(api._getScore().jackTransposition)
self.ui.transpositionSimple.setValue(api._getScore().smfTransposition)
self.ui.fontsize.setValue(api._getWorkspace().lyFontSize)
self.ui.splitByToHeader.setChecked(api._getScore().splitByToHeader)
#Export, Close, Save
self.ui.close.clicked.connect(self.accept)
self.ui.exportnow.clicked.connect(self.export)
self.ui.preview.clicked.connect(self.preview)
self.ui.savesettings.clicked.connect(lambda: self.saveSettings(permanent=True))
#This also sets the right tab, populates the path combo box etc.
self.ui.pdf.click()
self.ui.none.click()
if main.session.last_export_splitBy_radioButton: #not first start?. extension is set to something else before this check.
getattr(self.ui, main.session.last_export_extension_radioButton).click()
getattr(self.ui, main.session.last_export_splitBy_radioButton).click()
def saveOriginalSettings(self):
"""And finally: When clicking Export! the backend uses the
internal, saved values from the export settings. So we need to
override them on each Export!, eventhough the GUI asures you
that the data will not be saved. No matter if cancel, close,
accept or whatever is used to close the dialog,
in the end we restore the original data.
That does no harm
a) combined with saveSettings() since these overwrite
the original settings.
b) if the program crashes it might be in a temporary
state regarding the exportOptions, but the original
save file is still in the original form. """
self.orgLytemplate = api._getWorkspace().lytemplate
self.orfLyFontSize = api._getWorkspace().lyFontSize
self.orgTransposition = api._getScore().transposition
self.orgjackTransposition = api._getScore().jackTransposition
self.orgsmfTransposition = api._getScore().smfTransposition
self.orgArdourTempalte = api._getWorkspace().ardourtemplate
self.orgSplitByToHeader = api._getScore().splitByToHeader
def restoreOriginalSettings(self):
"""This function is save to call at the end of the dialog
no matter what happend since self.saveSettings overrides the
originalSettings as well"""
api._getWorkspace().lytemplate = self.orgLytemplate
api._getWorkspace().lyFontSize = self.orfLyFontSize
api._getScore().transposition = self.orgTransposition
api._getScore().jackTransposition = self.orgjackTransposition
api._getScore().smfTransposition = self.orgsmfTransposition
api._getScore().splitByToHeader = self.orgSplitByToHeader
api._getWorkspace().ardourtemplate = self.orgArdourTempalte
def saveSettings(self, permanent):
"""Save all export options in the lbj file.
SplitBy and Format are not saved in the file but in the session
and this is done by the Export button"""
#The tab self.ui.settingsTab
#ly
api._getWorkspace().lytemplate = self.ui.lytemplate.currentText() #combobox
api._getWorkspace().lyFontSize = self.ui.fontsize.value() #spinbox
api._getScore().transposition = (api.lilypond.ly2pitch[self.ui.transpositionFrom.currentText()], api.lilypond.ly2pitch[self.ui.transpositionTo.currentText()])
api._getScore().splitByToHeader = self.ui.splitByToHeader.checkState() #Checkbox
#midi
api._getScore().jackTransposition = self.ui.transpositionJack.value() #spinbox
api._getScore().smfTransposition = self.ui.transpositionSimple.value() #spinbox
#other
api._getWorkspace().ardourtemplate = self.ui.ardourTemplate.currentText() #combobox
api._getWorkspace().ardourtemplate = self.ui.ardourTemplate.currentText() #combobox
if permanent:
self.saveOriginalSettings()
def _getFunctionAndExtension(self, preview = False):
if self.ui.pdf.isChecked():
if preview:
function = api.previewPDF
else:
function = api.exportPDF
extension = "pdf"
main.session.last_export_extension_radioButton = "pdf"
elif self.ui.lilybin.isChecked():
function = api.exportLilyBin
extension = "bin"
main.session.last_export_extension_radioButton = "lilybin"
elif self.ui.lilypond.isChecked():
function = api.exportLilypond
extension = "ly"
main.session.last_export_extension_radioButton = "lilypond"
elif self.ui.midijack.isChecked():
function = lambda filepath, parts: api.exportMidi(filepath = filepath, workspace = None, jackMode = True, parts=parts)
extension = "jack"
main.session.last_export_extension_radioButton = "midijack"
elif self.ui.midisimple.isChecked():
function = api.exportMidi
extension = "smf"
main.session.last_export_extension_radioButton = "midisimple"
else:
raise ValueError("Not possible. One of the format radio buttons has to be clicked. Perhaps your Qt Version is different or broken.")
return function, extension
def export(self, preview = False):
"""Export! button.
Also saves paths, SplitBy and Format in the Gui session"""
def startLyExportProcess(string):
def reset():
api.core.lilypond.callExternalCustom = api.core.lilypond._callExternalCustom
#Override the lilypond export function in core so that exporting does not block the gui and we can route output to self.ui.output (QTextEdit)
process = QtCore.QProcess(self)
process.setProcessChannelMode(QtCore.QProcess.MergedChannels)
process.readyReadStandardOutput.connect(lambda: self.write(str(process.readAllStandardOutput(), encoding='utf-8')))
process.finished.connect(reset)
process.start(string)
process.waitForFinished()
return process.exitCode()
api.core.lilypond.callExternalCustom = startLyExportProcess
self.ui.warningLabel.hide()
#Format radio buttons
function, extension = self._getFunctionAndExtension(preview)
#SplitBy radio buttons
if self.ui.none.isChecked():
splitby = None
main.session.last_export_splitBy_radioButton = "none"
elif self.ui.exportparts.isChecked():
splitby = "exportExtractPart"
main.session.last_export_splitBy_radioButton = "exportparts"
elif self.ui.group.isChecked():
splitby = "group"
main.session.last_export_splitBy_radioButton = "group"
elif self.ui.track.isChecked():
splitby = "_uniqueContainerName"
main.session.last_export_splitBy_radioButton = "track"
else:
raise ValueError("Not possible. One of the Split By radio buttons has to be clicked. Perhaps your Qt Version is different or broken.")
filepath = self.ui.path.currentText()
self.updatePathComboBoxSessionDatabase()
self.saveSettings(permanent=False)
self.ui.output.clear()
if extension == "bin" or preview or filepath:
self.sysOrg = sys.stdout
sys.stdout = self
if preview:
function(parts=splitby, pdfviewer = config.pdfviewer)
else:
function(filepath=filepath, parts=splitby)
sys.stdout = self.sysOrg
else:
warning = _("You must provide a filepath!")
self.ui.warningLabel.setText("" + warning + "")
self.ui.warningLabel.show()
return False
def preview(self):
"""Is only active when PDF is checked, so we only need this"""
self.export(preview = True)
def write(self, txt):
"""Emulates sys.stdout and sys.stderr behaviour.
Write the stdout and stderror to the output text edit"""
self.ui.output.insertPlainText(txt)
#self.sysOrg.write(txt)
def openPathButton(self):
doesntmatter, extension = self._getFunctionAndExtension()
realFileExtensions = {"pdf":("pdf", "Portable Document Format(PDF) (*.pdf)"), "bin":("bin", "LilyBin.com "), "ly":("ly", "Lilypond Text (*.ly)"), "jack":("mid", "Midi (*.mid)"), "smf":("mid", "Midi (*.mid)")}
fileName = QtGui.QFileDialog.getSaveFileName(self, _("Export file name. Split Export will derive their own filen names."), main.session.last_export_dir, realFileExtensions[extension][1]+";;All Files (*.*)")
if fileName:
main.last_export_dir = os.path.dirname(fileName)
self.ui.path.setEditText(fileName)
self.correctCurrentPathExtension()
def correctCurrentPathExtension(self):
"""Corrects the current path according to the chosen radio
button, in place."""
current = self.ui.path.currentText()
if current:
realFileExtensions = {"pdf":"pdf", "bin":"bin", "ly":"ly", "jack":"mid", "smf":"mid"}
doesntmatter, extension = self._getFunctionAndExtension()
withoutextension = os.path.splitext(current)[0]
self.ui.path.setEditText(withoutextension+"."+realFileExtensions[extension])
def populatePathComboBox(self):
#Populate the export fields
#main.session.last_export_files = {"pdf":()[], "ly":[], "jack":[], "smf":[], "bin":[]}
function, extension = self._getFunctionAndExtension()
current = self.ui.path.currentText()
self.ui.path.clear()
if main.session.last_export_files[extension] and current == main.session.last_export_files[extension][0]:
self.ui.path.addItems(main.session.last_export_files[extension])
else:
self.ui.path.addItems([current] + main.session.last_export_files[extension])
def updatePathComboBoxSessionDatabase(self):
function, extension = self._getFunctionAndExtension()
if self.ui.path.currentText() in main.session.last_export_files[extension] or not self.ui.path.currentText():
return False #abort. Don't create duplicate entries.
main.session.last_export_files[extension].append(self.ui.path.currentText())
def accept(self):
"""There is no difference between acccept and reject, but
it is implemented anyway and mapped to the "Close" button.
Maybe we need it later"""
super(ExportDialog, self).accept()
def reject(self):
"""Window manager close, Escape key"""
super(ExportDialog, self).reject()
def done(self, var):
"""Called by accept and reject"""
self.restoreOriginalSettings()
super(ExportDialog, self).done(var)
class DidYouKnow(QtGui.QDialog):
"""A help window with useful tips.
Also the nagscreen for Donations."""
def __init__(self, parent, parentPyClass):
#super(DidYouKnow, self).__init__(parent, QtCore.Qt.WindowStaysOnTopHint|QtCore.Qt.CustomizeWindowHint|QtCore.Qt.X11BypassWindowManagerHint)
#super(DidYouKnow, self).__init__(parent, QtCore.Qt.FramelessWindowHint)
super(DidYouKnow, self).__init__(parent)
self.ui = Ui_DidYouKnow() #self.ui is the node to all qt widgets in this tab.
self.ui.setupUi(self)
self.parentPyClass = parentPyClass
self.ui.didyouknowLabel.setText(choice(dictionaries.didYouKnow))
self.index = dictionaries.didYouKnow.index(self.ui.didyouknowLabel.text())
self.ui.numberSlider.setMaximum(len(dictionaries.didYouKnow)-1)
self.ui.numberSlider.setValue(self.index)
self.ui.numberLabel.setText("Trick " + str(self.index+1) + "/" + str(len(dictionaries.didYouKnow)))
self.ui.numberSlider.valueChanged.connect(self.moveSlider)
#Image: 300x151
if self.palette().window().color().lightness() > 100: # light
pixmap = QtGui.QPixmap(os.path.join(os.path.dirname(__file__), "resources", "logo300_black.png"))
else:
pixmap = QtGui.QPixmap(os.path.join(os.path.dirname(__file__), "resources", "logo300_white.png"))
pixmap_scaled = pixmap.scaled(self.ui.laborejologo.size(), QtCore.Qt.KeepAspectRatio)
self.ui.laborejologo.setPixmap(pixmap_scaled)
if not self.parentPyClass.settings.contains("DidYouKnow"):
#A trick. The don't show on startup checkbox only appears after the second start
self.ui.showOnStartup.hide()
self.parentPyClass.settings.setValue("DidYouKnow", "2") #for the next time.
self.ui.showOnStartup.stateChanged.connect(self.saveStartupState)
"""
QAbstractSlider.SliderNoAction 0
QAbstractSlider.SliderSingleStepAdd 1
QAbstractSlider.SliderSingleStepSub 2
QAbstractSlider.SliderPageStepAdd 3
QAbstractSlider.SliderPageStepSub 4
QAbstractSlider.SliderToMinimum 5
QAbstractSlider.SliderToMaximum 6
QAbstractSlider.SliderMove 7
"""
self.shortcut("right", lambda: self.ui.numberSlider.triggerAction(1))
self.shortcut("left", lambda: self.ui.numberSlider.triggerAction(2))
self.shortcut("up", lambda: self.ui.numberSlider.triggerAction(1))
self.shortcut("down", lambda: self.ui.numberSlider.triggerAction(2))
self.ui.numberSlider.wheelEvent = self.mouseWheelEventCustom #Deactivate the normal number slider wheel event
self.wheelEvent = self.mouseWheelEventCustom #Use a window wide one that is easier to control
self.ui.showOnStartup.setCheckState(int(self.parentPyClass.settings.value("DidYouKnow")))
self.ui.closeButton.setFocus(True)
self.show()
def mouseWheelEventCustom(self, ev):
if ev.delta() > 0:
self.ui.numberSlider.triggerAction(1)
else:
self.ui.numberSlider.triggerAction(2)
def shortcut(self, key, function):
act = QtGui.QAction(QtGui.QIcon(), '', self)
act.setShortcut(key)
act.triggered.connect(function)
self.addAction(act)
def saveStartupState(self):
self.parentPyClass.settings.setValue("DidYouKnow", self.ui.showOnStartup.checkState())
def moveSlider(self):
nowIdx = self.ui.numberSlider.value()
self.ui.didyouknowLabel.setText(dictionaries.didYouKnow[nowIdx])
self.ui.numberLabel.setText("Trick " + str(nowIdx+1) + "/" + str(len(dictionaries.didYouKnow)))
class MusicTab(QtGui.QStackedWidget):
"""The ui part of a GuiScore"""
def __init__(self):
super(MusicTab, self).__init__()
self.setParent(main.ui.Tab)
self.ui = Ui_stackedMusicTab() #self.ui is the node to all qt widgets in this tab.
self.ui.setupUi(self)
self.main = main #a shortcut so that tracks and other items can access the main menu if they need.
self.workingAreaWidget = self.ui.score #The QGraphicsView
#Connect the numpad buttons, which are per MusicTab(), to the global actions.
self.numpadWidgetToolbuttons = [self.ui.numpad0, self.ui.numpad1, self.ui.numpad2, self.ui.numpad3, self.ui.numpad4, self.ui.numpad5, self.ui.numpad6, self.ui.numpad7, self.ui.numpad8, self.ui.numpad9,]
for globalAction, localButton in zip(main.numpadWidgetActions, self.numpadWidgetToolbuttons):
localButton.setDefaultAction(globalAction)
self.tracks = [] #this is just for updateViewRect when MusicTab is initialized the first time. the real self.tracks in in GuiScore
self.rubberBandOrigin = None #the temporary rubberband origin
self.rubberBand = None #the temporary rubberband
self.icon = None # Groups and Scores use the same icon/color.
self.orgFocusIn = self.workingAreaWidget.focusInEvent
self.orgFocusOut = self.workingAreaWidget.focusOutEvent
self.workingAreaWidget.focusInEvent = self.customFocusIn
self.workingAreaWidget.focusOutEvent = self.customFocusOut
self.workingAreaWidget.setFocusPolicy(QtCore.Qt.WheelFocus)
#TODO: self.workingAreaWidget.setFocus(True) Does not work in the beginning. We need to click in the score with the mouse at least once!
#Setup the main notation view, the score, by adding a Scene.
self.graphicsViewRect = [0, 0, 0 , 0] #x, y, width, height
self.scene = QtGui.QGraphicsScene()
self.scene.setBackgroundBrush(QtGui.QColor("white"))
self.workingAreaWidget.setScene(self.scene)
self.updateSceneRect()
self.wheelEventOrg = self.workingAreaWidget.wheelEvent
self.workingAreaWidget.mousePressEvent = self.mousePressEventCustom
self.workingAreaWidget.mouseMoveEvent = self.mouseMoveEventCustom
self.workingAreaWidget.wheelEvent = self.mouseWheelEventCustom
self.scene.mouseReleaseEvent = self.mouseReleaseEventCustom
self.scene.mouseDoubleClickEvent = self.mouseReleaseEventCustom
self.scene.contextMenuEvent = self.contextMenuEventCustom
self.middleClickOrigin = None
#Setup the synced incipit frame left of the score for group and other meta data.
self.incipitScene = QtGui.QGraphicsScene()
self.incipitScene.setBackgroundBrush(QtGui.QColor("white"))
self.ui.incipit.setScene(self.incipitScene)
#Sync the vertical incipit scrollbar (which is never shown) with the score scrollbar.
self.incipitVerticalBar = self.ui.incipit.verticalScrollBar()
#self.scoreVerticalBar = self.workingAreaWidget.verticalScrollBar()
self.workingAreaWidget.setVerticalScrollBar(self.incipitVerticalBar)
#Initial Zoom Levels
newTransform = QtGui.QTransform()
newTransform.scale(0.7, 0.7)
self.workingAreaWidget.setTransform(newTransform)
newTransform2 = QtGui.QTransform()
newTransform2.scale(1, 0.7)
self.ui.incipit.setTransform(newTransform2)
#Minimap
self.ui.minimap.hide() #hidden by default
self.ui.minimap.setScene(self.scene)
self.scene.sceneRectChanged.connect(lambda newRect: self.ui.minimap.fitInView(newRect, QtCore.Qt.KeepAspectRatio))
self.ui.minimap.setViewportUpdateMode(QtGui.QGraphicsView.FullViewportUpdate)
#Deactivate minimap mouse buttons which were originally for the whole scene.
def nothingMouse(ev):
pass
self.ui.minimap.mouseReleaseEvent = lambda ev: self.workingAreaWidget.centerOn(self.ui.minimap.mapToScene(ev.pos()))
self.ui.minimap.mousePressEvent = nothingMouse
self.ui.minimap.contextMenuEvent = nothingMouse
self.ui.minimap.mouseDoubleClickEvent = nothingMouse
#we update the viewport manually
#but some actions trigger an update, like scrollbars.
self.workingAreaWidget.setViewportUpdateMode(QtGui.QGraphicsView.NoViewportUpdate)
self.workingAreaWidget.horizontalScrollBar().valueChanged.connect(self.workingAreaWidget.viewport().update)
self.workingAreaWidget.verticalScrollBar().valueChanged.connect(self.workingAreaWidget.viewport().update) #slider move is the manual slider score.
#Track Properties
self.ui.trackUniqueName.textEdited.connect(lambda: api.trackName(self.ui.trackUniqueName.text())) #The api function will send back the change to the trackProperties listener which updates the gui.
self.ui.trackGroup.textEdited.connect(lambda: self.changeGroup(self.ui.trackGroup.text()))
self.ui.trackExportPart.textEdited.connect(lambda: api.trackChangeAttribute("exportExtractPart", self.ui.trackExportPart.text()))
self.ui.trackLongInstrumentName.textEdited.connect(lambda: api.trackChangeAttribute("longInstrumentName", self.ui.trackLongInstrumentName.text()))
self.ui.trackShortInstrumentName.textEdited.connect(lambda: self.changeNameMarker(self.ui.trackShortInstrumentName.text()))
self.ui.trackVoice.stateChanged.connect(lambda: api.trackChangeAttribute("mergeWithUpper", self.ui.trackVoice.checkState()))
self.ui.trackDirectives.clicked.connect(lambda: api.directivesGui(api._getTrack()))
self.ui.trackAmbitus.stateChanged.connect(lambda: api.trackChangeAttribute("ambitus", self.ui.trackAmbitus.checkState()))
self.ui.trackLyricsAbove.stateChanged.connect(lambda: api.trackChangeAttribute("forceLyricsAbove", self.ui.trackLyricsAbove.checkState()))
self.ui.trackHideLilypond.stateChanged.connect(lambda: api.trackChangeAttribute("hideLilypond", self.ui.trackHideLilypond.checkState()))
self.ui.trackNrOfLines.valueChanged.connect(lambda: api.trackChangeAttribute("nrOfLines", self.ui.trackNrOfLines.value()))
self.ui.trackTranposeFrom.addItems(api.lilypond.sortedNoteNameList)
self.ui.trackTranposeTo.addItems(api.lilypond.sortedNoteNameList)
self.ui.trackTranposeFrom.view().setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) #make sure the list is visible, always.
self.ui.trackTranposeTo.view().setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)#make sure the list is visible, always.
self.ui.trackTranposeFrom.setCurrentIndex(api.lilypond.sortedNoteNameList.index(api.lilypond.pitch2ly[api._getTrack().transposition[0]]))
self.ui.trackTranposeTo.setCurrentIndex(api.lilypond.sortedNoteNameList.index(api.lilypond.pitch2ly[api._getTrack().transposition[1]]))
self.ui.trackTranposeFrom.currentIndexChanged.connect(lambda: api.trackChangeAttribute("transposition", (api.lilypond.ly2pitch[api.lilypond.sortedNoteNameList[self.ui.trackTranposeFrom.currentIndex()]], api.lilypond.ly2pitch[api.lilypond.sortedNoteNameList[self.ui.trackTranposeTo.currentIndex()]]))) # :)
self.ui.trackTranposeTo.currentIndexChanged.connect(lambda: api.trackChangeAttribute("transposition", (api.lilypond.ly2pitch[api.lilypond.sortedNoteNameList[self.ui.trackTranposeFrom.currentIndex()]], api.lilypond.ly2pitch[api.lilypond.sortedNoteNameList[self.ui.trackTranposeTo.currentIndex()]]))) # ;)
self.ui.trackSize.addItems(["normal", "big", "small", "tiny"]) #Sizes List
self.ui.trackSize.view().setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
self.ui.trackSize.currentIndexChanged.connect(lambda: api.trackChangeAttribute("lilypondSize", self.ui.trackSize.currentText()))
self.ui.trackVoicePreset.addItems(dictionaries.voicePresets) #Voice Presets List
self.ui.trackVoicePreset.currentIndexChanged.connect(lambda: api.trackChangeAttribute("voicePreset", self.ui.trackVoicePreset.currentText()))
self.ui.trackMute.stateChanged.connect(lambda: api.trackChangeAttribute("smfMute", self.ui.trackMute.checkState()))
self.ui.trackSolo.stateChanged.connect(lambda: api.trackChangeAttribute("smfSolo", self.ui.trackSolo.checkState()))
self.ui.trackChannelMin.valueChanged.connect(lambda: api.trackChangeAttribute("smfChannel", [self.ui.trackChannelMin.value() -1, self.ui.trackChannelMin.value() -1])) #In the GUI we keep both values seperate, but the backend safes both as list [min, max]
self.ui.trackMidiTransposition.valueChanged.connect(lambda: api.trackChangeAttribute("smfTransposition", self.ui.trackMidiTransposition.value()))
self.ui.trackVolume.valueChanged.connect(lambda: api.trackChangeAttribute("smfVolume", self.ui.trackVolume.value() -1))
self.ui.trackPan.valueChanged.connect(lambda: api.trackChangeAttribute("smfPan", self.ui.trackPan.value() -1))
self.ui.trackBank.valueChanged.connect(lambda: api.trackChangeAttribute("smfBank", self.ui.trackBank.value() -1))
self.ui.trackInstrument.addItems(api.playback.instrumentList) #Instrument List
self.ui.trackInstrument.view().setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
self.ui.trackInstrument.currentIndexChanged.connect(lambda: api.trackChangeAttribute("smfPatch", self.ui.trackInstrument.currentIndex()))
self.ui.trackInstrumentNumber.valueChanged.connect(lambda: api.trackChangeAttribute("smfPatch", self.ui.trackInstrumentNumber.value() -1))
#Crosslink:
self.ui.trackInstrumentNumber.valueChanged.connect(lambda: self.ui.trackInstrument.setCurrentIndex(self.ui.trackInstrumentNumber.value() -1))
self.ui.trackInstrument.currentIndexChanged.connect(lambda: self.ui.trackInstrumentNumber.setValue(self.ui.trackInstrument.currentIndex() +1))
self.ui.jackChannelMin.valueChanged.connect(lambda: api.trackChangeAttribute("jackChannel", [self.ui.jackChannelMin.value() -1, self.ui.jackChannelMax.value() -1])) #A change of one frontend channel parameter changes both backend min, max values.
self.ui.jackChannelMax.valueChanged.connect(lambda: api.trackChangeAttribute("jackChannel", [self.ui.jackChannelMin.value() -1, self.ui.jackChannelMax.value() -1])) #A change of one frontend channel parameter changes both backend min, max values.
self.ui.jackPatch.valueChanged.connect(lambda: api.trackChangeAttribute("jackPatch", self.ui.jackPatch.value() -1))
self.ui.jackBank.valueChanged.connect(lambda: api.trackChangeAttribute("jackBank", self.ui.jackBank.value() -1))
self.ui.jackVolume.valueChanged.connect(lambda: api.trackChangeAttribute("jackVolume", self.ui.jackVolume.value() -1))
self.ui.jackPan.valueChanged.connect(lambda: api.trackChangeAttribute("jackPan", self.ui.jackPan.value() -1))
self.ui.jackTranspose.valueChanged.connect(lambda: api.trackChangeAttribute("jackTransposition", self.ui.jackTranspose.value()))
#Lyric Frame / TextEdit
self.ui.lyrics.hide() #Lyrics are hidden by default
def changeLyrics(): #What happens when the lyric frame is changed.
api._getTrack().lyrics = self.ui.lyricTextEdit.toPlainText()
self.currentTrack.drawLyrics() #eventhough we are in MusicTab we are also in GuiScore since it is a child class. The only child class.
self.workingAreaWidget.viewport().update() #Update the grahipcsview manually
self.ui.lyricTextEdit.textChanged.connect(changeLyrics)
self.lyricTextEditOriginalKeyPressEvent = self.ui.lyricTextEdit.keyPressEvent
self.ui.lyricTextEdit.keyPressEvent = self.lyricKeyPressInterceptor
#Substitutions
self.scoreSubstitutionsMenu = None #an everchanging menu of substitutions
self.scoreContainerMenu = None #an everchanging menu of container
def customFocusIn(self, event):
"""Entering the main working area, the score"""
for action in main.genericKeyActions:
action.setEnabled(True)
self.orgFocusIn(event)
def customFocusOut(self, event):
"""Leaving the main working area, the score"""
for action in main.genericKeyActions:
action.setDisabled(True)
self.orgFocusOut(event)
def lyricKeyPressInterceptor(self, qKeyEvent):
if qKeyEvent.nativeModifiers() and qKeyEvent.nativeVirtualKey() == 32: #shift and space
self.ui.lyricTextEdit.insertPlainText(" -- ")
self.lyricTextEditOriginalKeyPressEvent(qKeyEvent)
def updateGui(self):
"""Update several frame and widgets that derive their appearance
from backend data"""
self.updateTrackProperties()
self.updateLyricsFrame()
def updateStatusBar(self):
cursor = api._getActiveCursor()
msg = ("Pitch: " + api.lilypond.pitch2ly[api.pitch.toScale(cursor.pitchindex, cursor.prevailingKeySignature[-1])]
+ " || " + "Track: " + str(api._getTrackIndex() +1 )
+ " Bar: " + str(cursor.measureNumber + 1)
+ " Pos: " + str(round(cursor.metricalPosition +1, 4))
+ ". Sec: " + str(round(cursor.timeindex, 4))
+ " TickIndex: " + str(cursor.tickindex))
main.statusBar().showMessage(msg + " || " + main.more)
def updateTrackProperties(self):
"""Uses the (backend) cursor position.
Each of the following updates will trigger a change signal,
defined in MusicTab.__init__(), which will in return trigger
a re-set of the backend value.
In most cases this is just a waste of resources, in cases like
JackMidiChannel where a single backend value influences two
frontend values this leads to value errors.
We can't prevent the Qt Signal flow but we can prevent the value
changing in the backend by temporarily deactivating the api
function.
"""
#GUI Track changes
main.ui.actionToggle_Extended_Track_View.setChecked(self.currentTrack.dualView)
main.ui.actionToggle_Collapse_Track.setChecked(self.currentTrack.collapsed)
#Change the Track Strip with backend data
#If we don't do this we get an endless loop of changing between backend and gui event signals
org = api.trackChangeAttribute
def empty(*args):
pass
api.trackChangeAttribute = empty #At the end of this function the original function gets restored.
track = api._getTrack() #backend instance
if track.group:
nameLabel =str(api._getTrackIndex() +1 ) + ": " + track.uniqueContainerName + "(" + track.group + ")"
else:
nameLabel = str(api._getTrackIndex() +1 ) + ": " + track.uniqueContainerName
self.ui.trackPropertiesLabel.setText(nameLabel)
self.ui.trackNrOfLines.setValue(track.nrOfLines)
#Trackname is different from the rest of the properties. It needs checking after every char added/deleted if the name is unique or not. So we have to update the gui field after each modification which lets the cursor jump to the end. Workaround that:
nameCursorPos = self.ui.trackUniqueName.cursorPosition()
self.ui.trackUniqueName.setText(track.uniqueContainerName)
self.ui.trackUniqueName.setCursorPosition(nameCursorPos)
self.ui.trackGroup.setText(track.group)
self.ui.trackExportPart.setText(track.exportExtractPart)
self.ui.trackShortInstrumentName.setText(track.shortInstrumentName)
self.ui.trackLongInstrumentName.setText(track.longInstrumentName)
self.ui.trackTranposeFrom.setCurrentIndex(api.lilypond.sortedNoteNameList.index(api.lilypond.pitch2ly[track.transposition[0]]))
self.ui.trackTranposeTo.setCurrentIndex(api.lilypond.sortedNoteNameList.index(api.lilypond.pitch2ly[track.transposition[1]]))
self.ui.trackHideLilypond.setChecked(track.hideLilypond)
self.ui.trackLyricsAbove.setChecked(track.forceLyricsAbove)
self.ui.trackVoice.setChecked(track.mergeWithUpper)
self.ui.trackMute.setChecked(track.smfMute)
self.ui.trackSolo.setChecked(track.smfSolo)
self.ui.trackSize.setCurrentIndex(["normal", "big", "small", "tiny"].index(track.lilypondSize))
self.ui.trackVoicePreset.setCurrentIndex(dictionaries.voicePresets.index(track.voicePreset))
directives = len(track.directivePre) + len(track.directiveMid) + len(track.directivePst) + len(track.instructionPre) + len(track.instructionPst) #total number of directives
self.ui.trackDirectives.setText(str(directives) + " Directives")
self.ui.trackAmbitus.setChecked(track.ambitus)
self.ui.trackVolume.setValue(track.smfVolume + 1)
self.ui.trackPan.setValue(track.smfPan +1)
self.ui.trackInstrument.setCurrentIndex(track.smfPatch)
self.ui.trackInstrumentNumber.setValue(track.smfPatch + 1)
self.ui.trackChannelMin.setValue(track.smfChannel[0] + 1)
self.ui.trackMidiTransposition.setValue(track.smfTransposition)
self.ui.trackBank.setValue(track.smfBank + 1)
self.ui.jackChannelMin.setValue(track.jackChannel[0] + 1)
self.ui.jackChannelMax.setValue(track.jackChannel[1] + 1)
self.ui.jackPatch.setValue(track.jackPatch + 1)
self.ui.jackVolume.setValue(track.jackVolume + 1)
self.ui.jackPan.setValue(track.jackPan + 1)
self.ui.jackTranspose.setValue(track.jackTransposition)
self.ui.jackBank.setValue(track.jackBank + 1)
api.trackChangeAttribute = org
def updateLyricsFrame(self):
"""Called at each track change"""
track = api._getTrack() #backend instance
self.ui.lyrics.setTitle("Lyrics - Track " + track.uniqueContainerName)
self.ui.lyricTextEdit.setPlainText(track.lyrics)
def updateLilypondStaffGroups(self):
self.currentTrack.incipit.changeLilypondStaffGroupMarkers()
def updateSceneRect(self):
"""setSceneRect(x, y, width, height)"""
mod = len(self.tracks) * 11
self.workingAreaWidget.setSceneRect(self.graphicsViewRect[0], -60, self.graphicsViewRect[2] + 100, self.graphicsViewRect[3] + mod)
self.ui.incipit.setSceneRect(self.graphicsViewRect[0], -59, 50, self.graphicsViewRect[3] + mod) #50 because the view is fixed to 50 pixels
#Yes, -60 and -59. The one pixel has its purposes. GUI Finetuning.
self.workingAreaWidget.viewport().update()
def visibleRect(self):
topLeft = QtCore.QPointF(self.workingAreaWidget.mapToScene( 0, 0 ))
bottomRight = QtCore.QPointF(self.workingAreaWidget.mapToScene(self.workingAreaWidget.viewport().width() - 1, self.workingAreaWidget.viewport().height() - 1 ))
rect = QtCore.QRectF(topLeft, bottomRight)
return rect
def findGuiItemsFromPosCrawlLeft(self, parameterPos):
#init
clickPos = parameterPos
x = clickPos.x()
y = clickPos.y()
directHit = False
#First find the track.
#tupl = (lowest pos, highest pos, gui-track) #'lowest' means highest in gui coordinates. 0 is the top scene border
guiTrack = [tupl for tupl in self.cachedTrackPositions if tupl[0] < y < tupl[1]][0][2]
#Create a rectangle/beam that crawls left and returns all items within.
#We take the last one
qRectangleF = QtCore.QRectF(x-200, y-20, 200, 45) #shift-x, shift-y, width, height . If you shift the middle of the max height/width you have the cursor in the middle.
#global draw
#try: self.scene.removeItem(draw)
#except: pass
#draw = QtGui.QGraphicsRectItem(qRectangleF)
#self.scene.addItem(draw)
foundItems = self.scene.items(qRectangleF)
foundItemsFilter = list(filter(lambda item: isinstance(item, guiitems.GuiItem) and item.track is guiTrack, foundItems))
if list(filter(lambda item: isinstance(item, guiitems.GuiItem), self.scene.items(x-3, y-10, 6, 30))):
directHit = True
if foundItemsFilter: #Item left of the click found.
foundItem = sorted(foundItemsFilter, key=lambda x: x.cachedIndex)[-1] #the highest cached flat cursor index is the topmost right item.
foundItemIndex = foundItem.cachedIndex
elif len(guiTrack.data.container) == 1: #empty track, only appending. Hopefully the backend never changes "Only Appending = Empty".
foundItem = PSEUDO #Appending
foundItemIndex = 0
else:
return (None, None, None, None)
return (foundItem, foundItemIndex, guiTrack.data, directHit)
def mouseReleaseEventCustom(self,ev):
"""Create a virtual "big" cursor that is not a point
but a rectangle.
Step by step increase the search rectangle until you find
something or the left border, which is 0."""
modifiers = QtGui.QApplication.keyboardModifiers()
if ev.button() == QtCore.Qt.LeftButton:
self.rubberBand.hide()
#Rubberband selection
#does not move the cursor.
if self.rubberBand.size().height() * self.rubberBand.size().width() > 100: #treshhold to not trigger a rubberband selection by accident
viewCoordinatesRect = self.rubberBand.geometry()
if modifiers == QtCore.Qt.ControlModifier:
self.deselectInRectangle((self.workingAreaWidget.mapToScene(viewCoordinatesRect)).boundingRect())
else:
self.selectInRectangle((self.workingAreaWidget.mapToScene(viewCoordinatesRect)).boundingRect())
#Single Click
#Not a rubberband.
else:
foundItem, foundItemIndex, backendTrack, directHit = self.findGuiItemsFromPosCrawlLeft(parameterPos = ev.scenePos())
if backendTrack:
#Ctrl+Click. Add one Item to the selection
if modifiers == QtCore.Qt.ControlModifier:
try: #items like the MultiMeasureRest and Upbeat hide their data for the caching engine to work.
api.remoteToggleSelect(foundItem.dataOrg, backendTrack)
except:
api.remoteToggleSelect(foundItem.data, backendTrack)
#Shift+Click. Add a rectangle of items to the selection
elif modifiers == QtCore.Qt.ShiftModifier:
#We create a rectangle from the old cursor position and the new. From then:
#Is the same as rectangle selection plus moving the cursor to the target position afterwards.
#this way we get a multitrack selection. Something that the api alone cannot do.
originCursorPosX = self.cursorPosition.pos().x()
originCursorPosY = self.cursorPosition.pos().y()
api.cursorFlatPosition((api._getIndexByTrack(backendTrack), foundItemIndex))
if not directHit:
api.right() #we search left but want in the space 'between' the notes. This is already protected against going right at the end of the track.
targetCursorPosX = self.cursorPosition.pos().x()
targetCursorPosY = self.cursorPosition.pos().y()
if originCursorPosX <= targetCursorPosX: #the rectangle goes from left to right
if originCursorPosY <= targetCursorPosY: #from top to bottom
self.selectInRectangle(QtCore.QRectF(originCursorPosX+20, originCursorPosY, targetCursorPosX-originCursorPosX-20, originCursorPosY + targetCursorPosY + 80)) #build a rectangle from the current and old position and let the function create a selection from it.
else: #bottom to top
self.selectInRectangle(QtCore.QRectF(originCursorPosX+20, targetCursorPosY, targetCursorPosX-originCursorPosX-20, originCursorPosY + targetCursorPosY + 80)) #build a rectangle from the current and old position and let the function create a selection from it.
else: #backwards
if originCursorPosY <= targetCursorPosY: #from top to bottom
self.selectInRectangle(QtCore.QRectF(targetCursorPosX+20, targetCursorPosY, originCursorPosX-targetCursorPosX-20, 80))
else: #bottom to top
self.selectInRectangle(QtCore.QRectF(targetCursorPosX+20, targetCursorPosY, originCursorPosX-targetCursorPosX-20, originCursorPosY + targetCursorPosY + 80)) #build a rectangle from the current and old position and let the function create a selection from it.
#No modifiers. Move the cursor
else:
api.cursorFlatPosition((api._getIndexByTrack(backendTrack), foundItemIndex))
if not directHit:
api.right() #we search left but want in the space 'between' the notes. This is already protected against going right at the end of the track.
self.updateStatusBar()
#User clicked outside of any reasonable perimeter.
#else:
# return None #nothing happens.
#elif ev.button() == QtCore.Qt.RightButton:
elif ev.button() == QtCore.Qt.MidButton:
#nothing happens. Context menu is already done on press, not release.
#if not self.middleClickOrigin:
# api.deselectScore()
self.middleClickOrigin = None
self.middleClickSrollBarOrigin = None
self.workingAreaWidget.viewport().update() #Update the grahipcsview manually
def mouseWheelEventCustom(self, ev):
modifiers = QtGui.QApplication.keyboardModifiers()
if modifiers == QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier:
if ev.delta() > 0:
self.widen()
else:
self.shrinken()
elif modifiers == QtCore.Qt.ControlModifier:
if ev.delta() > 0:
self.zoomIn()
else:
self.zoomOut()
else:
self.wheelEventOrg(ev)
self.workingAreaWidget.viewport().update()
def mousePressEventCustom(self, ev):
"""Mouse Press is either the beginning of a 'single click'
to set the cursor position or to toggleSelect a single item.
Or it is the beginning of a rubberband """
if ev.button() == QtCore.Qt.LeftButton:
self.rubberBandOrigin = ev.pos()
self.rubberBand = QtGui.QRubberBand(QtGui.QRubberBand.Rectangle, parent = self.workingAreaWidget)
self.rubberBand.setGeometry(QtCore.QRect(self.rubberBandOrigin, QtCore.QSize()))
self.rubberBand.show()
elif ev.button() == QtCore.Qt.MidButton:
#self.middleClickOrigin = self.workingAreaWidget.mapToScene(evvpos()) #QPointF
self.middleClickOrigin = ev.pos()
self.middleClickSrollBarOrigin = (self.workingAreaWidget.horizontalScrollBar().value(), self.workingAreaWidget.verticalScrollBar().value())
def mouseMoveEventCustom(self, ev):
if self.rubberBand:
self.rubberBand.setGeometry(QtCore.QRect(self.rubberBandOrigin, ev.pos()).normalized())
if self.middleClickOrigin:
#Custom Middle Button ScrollDrag
difference = self.middleClickOrigin - ev.pos()
x = difference.x()
y = difference.y()
if abs(x) > 20 or abs(y) > 20:
self.workingAreaWidget.horizontalScrollBar().setValue(self.middleClickSrollBarOrigin[0] + difference.x() * 2 )
self.workingAreaWidget.verticalScrollBar().setValue(self.middleClickSrollBarOrigin[1] + difference.y() * 2)
def contextMenuEventCustom(self, ev):
foundItem, foundItemIndex, backendTrack, directHit = self.findGuiItemsFromPosCrawlLeft(parameterPos = ev.scenePos())
if backendTrack and not foundItem is PSEUDO:
api.cursorFlatPosition((api._getIndexByTrack(backendTrack), foundItemIndex))
if not directHit:
api.right() #we search left but want in the space 'between' the notes. This is already protected against going right at the end of the track.
else: #User clicked outside of any reasonable perimeter.
return None #nothing happens.
#We are now at the cursor position. Decide which context menu is correct.
cur = self.currentTrack.getCurrentItem()
if type(cur) is guiitems.GuiChord:
tmpMenu = QtGui.QMenu()
tmpMenu.addMenu(self.scoreContainerMenu)
tmpMenu.addSeparator()
tmpMenu.addMenu(main.placeholderScoreSubstitutions)
tmpMenu.addMenu(main.substitutionsMenu)
tmpMenu.addAction(main.ui.actionCreate_Substitution_from_Selection)
tmpMenu.addAction(main.ui.actionRemove_Substitution)
#tmpMenu.exec_(self.workingAreaWidget.mapToGlobal(ev.scenePos().toPoint())) #this needs the cursor position to be correct or a selection. Normal backend behaviour, but prevents us from using a hypothetical substitutionsRemote() which is maybe better that way. The cursor should always move.
tmpMenu.exec_(ev.screenPos()) #this needs the cursor position to be correct or a selection. Normal backend behaviour, but prevents us from using a hypothetical substitutionsRemote() which is maybe better that way. The cursor should always move.
else:
return None
def selectInRectangle(self, qRectangleF):
"""Used in eventFilter for rubberband selection and
mouseButtonPressed for Shift+Press"""
#draw = QtGui.QGraphicsRectItem(qRectangleF)
#self.scene.addItem(draw)
rectangledItems = self.scene.items(qRectangleF, mode = QtCore.Qt.IntersectsItemShape)
filtered = list(filter(lambda item: isinstance(item, guiitems.GuiItem), rectangledItems))
for guiItem in filtered:
try: #items like the MultiMeasureRest and Upbeat hide their data for the caching engine to work.
api.remoteSelect(guiItem.dataOrg, guiItem.track.data)
except:
api.remoteSelect(guiItem.data, guiItem.track.data)
def deselectInRectangle(self, qRectangleF):
"""Used in eventFilter for rubberband selection and
mouseButtonPressed for Shift+Press"""
#draw = QtGui.QGraphicsRectItem(qRectangleF)
#self.scene.addItem(draw)
rectangledItems = self.scene.items(qRectangleF, mode = QtCore.Qt.IntersectsItemShape)
filtered = list(filter(lambda item: isinstance(item, guiitems.GuiItem), rectangledItems))
for guiItem in filtered:
api.remoteDeselect(guiItem.dataOrg, guiItem.track.data)
def zoomIn(self):
x = self.workingAreaWidget.transform().m11() #Y is the same
newTransform = QtGui.QTransform()
newTransform.scale(round(x+0.1, 2), round(x+0.1, 2))
self.workingAreaWidget.setTransform(newTransform)
#self.workingAreaWidget.centerOn(self.cursorPosition.pos())
#The order of setIncipit Transform and cursor position is critical! I don't know why, but else zooming both views in sync does not work.
newTransform2 = QtGui.QTransform()
newTransform2.scale(1, round(x+0.1, 2))
self.ui.incipit.setTransform(newTransform2)
self.workingAreaWidget.viewport().update #it is possible that scrollbars have to appear. Update is needed for this.
def zoomOut(self):
x = self.workingAreaWidget.transform().m11() #Y is the same
newTransform = QtGui.QTransform()
newTransform.scale(round(x-0.1, 2), round(x-0.1, 2))
self.workingAreaWidget.setTransform(newTransform)
newTransform2 = QtGui.QTransform()
newTransform2.scale(1, round(x-0.1, 2))
self.ui.incipit.setTransform(newTransform2)
#The order of setIncipit Transform and cursor position is critical! I don't know why, but else zooming both views in sync does not work.
#It is exactly the opposite of zoomIn here.
#self.workingAreaWidget.centerOn(self.cursorPosition.pos())
self.workingAreaWidget.viewport().update #it is possible that scrollbars have to appear. Update is needed for this.
def zoomNull(self):
x = self.workingAreaWidget.transform().m11() #Y is the same
newTransform = QtGui.QTransform()
newTransform.scale(1,1)
self.workingAreaWidget.setTransform(newTransform)
self.ui.incipit.setTransform(newTransform)
def _stretchXCoordinates(self, factor):
config.DURATION_MOD *= factor
for backendItem, item in self.allItems.items():
for i in item:
i.setX(i.pos().x() * factor) #adjust all track items
if i.group: #adjust beam
i.updateGroupStemAndFlag()
for tr in self.tracks:
for barline in tr.barlines: #adjust barlines
barline.setX(barline.pos().x() * factor)
for trline in tr.lines: #adjust stafflines
new = trline.line()
new.setLength(new.length() * factor)
trline.setLine(new)
self.sendMaxTrackWidthToMain() #new scrollbars
self.cursorPosition.update()
def widen(self):
self._stretchXCoordinates(1*1.2) #2 is good
def shrinken(self):
self._stretchXCoordinates(1/1.2) #0.5 is good
def centerOnCursor(self):
self.cursorPosition.centerOn()
def collapseAllTracks(self):
for trk in self.tracks:
trk.collapseView(repositionTracks = False)
self.repositionTracks()
def collapseEmptyTracks(self):
for trk in self.tracks:
if trk.data.isEmpty(): #this is not very performant, but collapseEmptyTracks is not supposed to be a frequent command anyway...
trk.collapseView(repositionTracks = False)
self.repositionTracks()
def expandAllTracks(self):
for trk in self.tracks:
trk.expandView(repositionTracks = False)
self.repositionTracks()
def invertCollapsing(self):
for trk in self.tracks:
trk.toggleCollapse(repositionTracks = False)
self.repositionTracks()
def connectMenuAction(self, action, function, append = True):
"""Connect the menu action with the backend function,
or qt function in a few cases like Save and Open.
The actions already exist in their places and
no shortcuts are getting set here."""
def funcWrap():
function()
self.workingAreaWidget.viewport().update()
self.connect(action, QtCore.SIGNAL("triggered()"), funcWrap)
def generateScoreSubstitutionsMenu(self):
"""Look up all score substitutions and generate a menu for
them. This is self updating. Call it again if new substitutions
are added to the score."""
mainMenu = main.placeholderScoreSubstitutions
mainMenu.clear()
if self.scoreSubstitutionsMenu:
self.scoreSubstitutionsMenu.clear()
self.scoreSubstitutionsMenu = None
self.scoreSubstitutionsMenu = mainMenu
alreadyProcessedGroups = {} #each group shall only create one submenu. No nested menus.
for key, value in sorted(api._getScore().substitutions.items()): #key is the name string, value a backend Container.
group = value.group
if group and not group in alreadyProcessedGroups:
newSubMenu = self.scoreSubstitutionsMenu.addMenu(group)
alreadyProcessedGroups[group] = newSubMenu
pretty = " ".join(key.split("_")).title()
if group:
entry = alreadyProcessedGroups[group].addAction(key)
else:
entry = self.scoreSubstitutionsMenu.addAction(key) #use the real name.
entry.setText(pretty) #but display a pretty name.
#self.connect(entry, QtCore.SIGNAL('triggered()'), lambda key=key: api.substitution(key))
self.connectMenuAction(entry, lambda key=key: api.substitution(key))
def generateSubstitutionsMenu(self):
"""Generate the program wide substitutions.
No filespecific data.
Runs only once add the beginning of the program."""
if not main.substitutionsMenu:
main.substitutionsMenu = QtGui.QMenu()
#tmp = main.ui.menuAdvanced.addMenu(main.substitutionsMenu, )
tmp = main.ui.menuAdvanced.insertMenu(main.ui.actionRemove_Substitution, main.substitutionsMenu )
tmp.setText('Laborejo Substitutions')
alreadyProcessedGroups = {} #each group shall only create one submenu. No nested menus.
for key, value in sorted(api._getWorkspace().substitutiondatabase.items()): #key is the name string. value is a tuple. (optional group, core.container). We don't care about the container here.
group = value.group
if group and not group in alreadyProcessedGroups:
newSubMenu = main.substitutionsMenu.addMenu(group)
alreadyProcessedGroups[group] = newSubMenu
key2 = key.replace("subst_", "")
pretty = " ".join(key2.split("_")).title()
if group:
entry = alreadyProcessedGroups[group].addAction(key)
else:
entry = main.substitutionsMenu.addAction(key) #use the real name.
main.allActions.append(entry)
entry.setText(pretty) #but display a pretty name.
#main.connect(entry,QtCore.SIGNAL('triggered()'), lambda key=key: api.substitution(key))
self.connectMenuAction(entry, lambda key=key: api.substitution(key))
def generateScoreContainerMenu(self):
"""Look up all score container and generate a menu for
them. This is self updating. Call it again if new container
are added to the score."""
mainMenu = main.placeholderScoreContainers
mainMenu.clear()
if self.scoreContainerMenu:
self.scoreContainerMenu.clear()
self.scoreContainerMenu = None
self.scoreContainerMenu = mainMenu
alreadyProcessedGroups = {} #each group shall only create one submenu. No nested menus.
for key, value in api._getScore().nonTrackContainers.items(): #key is the backend container, value is the instance count and not important.
group = key.group
if group and not group in alreadyProcessedGroups:
newSubMenu = self.scoreContainerMenu.addMenu(group)
alreadyProcessedGroups[group] = newSubMenu
pretty = " ".join(key.uniqueContainerName.split("_")).title()
if group:
entry = alreadyProcessedGroups[group].addAction(key.uniqueContainerName)
else:
entry = self.scoreContainerMenu.addAction(key.uniqueContainerName)
entry.setText(pretty) #but display a pretty name.
self.connectMenuAction(entry, lambda key=key: api.insertContainer(key))
#self.connect(entry,QtCore.SIGNAL('triggered()'), lambda key=key: api.insertContainer(key))
def toggleBarlines(self, onOff):
"""Switch GUI barlines on or off.
This alone is only a relay station and is not a switch in itself
toggleBarlines in main decides what to do"""
#switching on
if onOff:
for tr in self.tracks:
tr.updateBarlines()
#switching off
else:
for tr in self.tracks:
tr.deleteBarlines()
def changeGroup(self, groupText):
"""Changes the current active Track group and its color"""
api.trackChangeAttribute("group", groupText)
self.currentTrack.incipit.changeGroupColor()
def changeNameMarker(self, nameText):
"""Changes the current active Track group and its color"""
api.trackChangeAttribute("shortInstrumentName", nameText)
self.currentTrack.incipit.changeNameMarker()
class WelcomeTab(QtGui.QWidget):
"""The first tab. Give direct control to mouse users"""
def __init__(self):
super(WelcomeTab, self).__init__()
self.ui = Ui_Form() #self.ui is the node to all qt widgets in this tab.
self.ui.setupUi(self)
class GuiCursorPosition(QtGui.QGraphicsRectItem):
def __init__(self, parent):
super(GuiCursorPosition, self).__init__(0, 0, 3, 40)
self.setOpacity(1)
self.setBrush(QtGui.QColor("red"))
self.pitch = api._getCursorPitch()
self.setZValue(0)
self.parent = parent # I belong to this parent score/Workspace
self.position = 0 #current X position, in pixel/guiTicks. Needed for the pitch cursor up and down without changing X.
self.posX = 0 # a cache value.
#self.highlightEffect = QtGui.QGraphicsColorizeEffect() #conveniently this is a unique effect. apply it one item and it deletes itself from all other items. But this is also non-convenient because it removes from all linked items.
def update(self):
#self.position = api._getFlatCursorIndex() #get the position directly from the backend
#self.parent.currentTrack
currentGuiItem = self.parent.currentTrack.getCurrentItem()
posY = self.parent.currentTrack.pos().y()
if currentGuiItem:
self.posX = currentGuiItem.pos().x()
else: #appending
self.posX = self.parent.currentTrack.cachedTrackWidth * config.DURATION_MOD
self.setPos(self.posX, posY)
if self.parent.currentTrack.collapsed:
self.setTransform(COLLAPSED_TRANSFORM)
else:
self.setTransform(EXPANDED_TRANSFORM)
self.parent.cursorPitch.update()
self.makeVisible()
def makeVisible(self):
"""Check if the cursor is outside the visible working area.
if not make it visible."""
scenePos = self.parent.workingAreaWidget.mapFromScene(self.pos())
cursorViewPosX = scenePos.x() #the cursor position in View coordinates
cursorViewPosY = scenePos.y() #the cursor position in View coordinates. 0 is the view beginning, has nothing to do with the geometry/main window boundaries.
geo = self.parent.workingAreaWidget.geometry()
if cursorViewPosY + TRACK_SIZE > geo.height (): #pagebreak down
bar = self.parent.workingAreaWidget.verticalScrollBar()
bar.setValue(self.pos().y() * self.parent.workingAreaWidget.transform().m11() - self.parent.workingAreaWidget.viewport().height() /2)
elif cursorViewPosY < 10: #pagebreak down
bar = self.parent.workingAreaWidget.verticalScrollBar()
bar.setValue(bar.value() - self.parent.workingAreaWidget.viewport().height() /2 + 50)
if cursorViewPosX + 50 >= geo.width(): #pagebreak forward
bar = self.parent.workingAreaWidget.horizontalScrollBar()
bar.setValue((self.posX-8) * self.parent.workingAreaWidget.transform().m11())
elif cursorViewPosX < 10: #pagebreak backwards
bar = self.parent.workingAreaWidget.horizontalScrollBar()
bar.setValue(bar.value() - self.parent.workingAreaWidget.viewport().width() + 50)
#last resort. The cursor is still not visible. We had a go to head etc.
if self.parent.workingAreaWidget.mapFromScene(self.pos()).x() < 10:
self.parent.workingAreaWidget.centerOn(self.posX, self.pos().y())
self.parent.workingAreaWidget.viewport().update()
def centerOn(self):
"""Forces the cursor position to a centered location,
even if it already was visible somehow.
Intended for manual repositioning."""
self.parent.workingAreaWidget.centerOn(self.posX, self.parent.currentTrack.pos().y())
class GuiCursorPitch(QtGui.QGraphicsRectItem):
def __init__(self, parent):
super(GuiCursorPitch, self).__init__(5, 0, 20, 4)
self.setOpacity(1)
self.setBrush(QtGui.QColor("red"))
self.pitch = api._getCursorPitch()
self.setZValue(10)
self.parent = parent # I belong to this parent score/Workspace
self.ledgerlines = []
def updateLedgerLines(self):
#Draw Ledger Lines
for line in self.ledgerlines:
self.scene().removeItem(line)
self.ledgerlines = []
start_under = 50
start_above = -10
#Determine if we need ledger lines.
if self.pitch == 20:
var = 0
else:
part1 = -1 * (self.pitch / PITCH_MOD) + self.parent.currentTrack.cachedClefPitch
var = part1 + part1 + PITCH_MOD/2 #PM/2 is half of a glyph size. Normally glyphs would bottom align on the Y coordinate/staff-line so we shift half of the glyph so we have the glyph in the middle.
if self.parent.currentTrack.dualView and var >= 45: #Only if we are going down and have a gui-dual staff active
var -= 115
start_under = 110
if var >= 45: #ledger lines below
for nr in range(math.floor(var / 2 / PITCH_MOD) - 1):
lines_under = QtGui.QGraphicsLineItem(QtCore.QLineF(0, start_under + nr * 10 , 22, start_under + nr * 10))
lines_under.setPen(PEN_LINE)
lines_under.setParentItem(self.parent.currentTrack)
lines_under.setPos(2+self.parent.cursorPosition.posX,0)
self.ledgerlines.append(lines_under)
elif var <= -75: #ledger lines above
for nr in range(math.floor(-1 * var / 2 / PITCH_MOD -2.5)):
lines_above = QtGui.QGraphicsLineItem(QtCore.QLineF(0, start_above - nr * 10 , 22, start_above - nr * 10))
lines_above.setPen(PEN_LINE)
lines_above.setParentItem(self.parent.currentTrack)
lines_above.setPos(3+self.parent.cursorPosition.posX,0)
self.ledgerlines.append(lines_above)
def update(self):
self.pitch = api._getCursorPitch() #why is this not needed for standard update? But ledgerlines needs it.
x = self.parent.cursorPosition.posX
y = self.parent.currentTrack.pos().y() + -1*(self.pitch / PITCH_MOD) + self.parent.currentTrack.cachedClefPitch
if self.parent.currentTrack.collapsed:
self.hide()
else:
self.show()
self.setPos(x, y + 28)
self.updateLedgerLines()
class GuiCursorPlayback(QtGui.QGraphicsRectItem):
"""One for each GuiTrack"""
def __init__(self, parent):
super(GuiCursorPlayback, self).__init__(0, 0, 0, 0)
self.parent = parent # I belong to this parent GuiTrack
self.setOpacity(1)
self.setBrush(QtGui.QColor("blue"))
self.setPen(QtCore.Qt.transparent)
self.setZValue(90)
self.hide()
self.playbackActive = False
def update(self):
"""Collaps transform is done automatically since this is part
of the track Item Group"""
self.setRect(0,0,3,self.parent.graphicsViewRect[3])
def makeVisible(self):
self.parent.workingAreaWidget.centerOn(self.pos().x(), self.parent.currentTrack.pos().y())
self.parent.workingAreaWidget.viewport().update()
class GuiScore(MusicTab):
"""A gui score holds all guiItems in plain python data types
but it also the access point to the qgraphicsview and scene.
The GuiScore itself is also the Widget inside one Tab
through inherited MusicTab"""
def __init__(self, backendWorkspace):
super(GuiScore, self).__init__()
self.tracks = [] #GuiTracks
self.cursorPitch = GuiCursorPitch(self)
self.scene.addItem(self.cursorPitch)
self.cursorPosition = GuiCursorPosition(self)
self.scene.addItem(self.cursorPosition)
self.playbackCursor = GuiCursorPlayback(parent = self)
self.scene.addItem(self.playbackCursor)
self.data = backendWorkspace
self.fileName = None
self.trackEdit = False #Is this a solo container edit? Normally not.
self.displacementMap = [] # A sorted list of pairs (tick-position, displacement) which contains the maximum displacement from all tracks. A very dynamic variable which gets changed and calculated all the time.
def appendingItem():
return [PSEUDO]
self.allItems=defaultdict(appendingItem,[]) # All items. backend-instance as key, list of gui-items as value. There is only one instance for each unique backend item. A linked item is twice the same. So we can actually use the instance as key in this dict to find all gui items based on that backend-item.
self.updateStatusBar()
def insertItemRelativeToContainerStart(self, backendItem, container, howManySteps, standaloneInsert):
"""This is a gui only update process. No backend data,
especially not their cursors, are changed
For each track with a containerStart item crawl from the
beginning to the end (lefPart + rightPart) and stop on
each containerStartItem, go right the howManySteps, insert
the item. Continue to search right. Thank you, next track.
In the end go back to the backend cursor position which did not
change during the whole process.
Then update the changes in the gui.
This insert assumes that there are no recursive containers.
We need to create new items from the backendItem here. One
for each container instance.
"""
itemType = type(backendItem)
#typ = type(guiItem)
#if typ is GuiMultiMeasureRest or typ is GuiUpbeat: #some GuiItems don't work with the backendData but are synced manually. Multimeasure Rests and Upbeats.
# data = guiItem.dataOrg
#else:
# data = guiItem.data
realSteps = howManySteps -2 #-1 for 1vs0 counting. additional -1 because we are already at the container start.
containerBackendStartItem = container[0] # the backend container start.
allTracks = set()
for tr in self.allItems[containerBackendStartItem]: #The list of guiItems connected to this backend Item. All container start in the current score.
allTracks.add(tr.track) #the guiTracks
for tra in allTracks:
tra.reset() #all items to track.rightPart
#steps in nested containers do not count. The whole nested container counts as 1 step.
countdown = realSteps
while True:
containerStack = [] #register to keep track of nested containers in the gui, where they are just items in a row, not real nested like in the backend.
currentItem = tra._right() #returns the current item or false.
if not currentItem:
break #Track End
#print ("[InsertRelative]Found Match Start at", len(tra.rightPart), ". Items left:", len(tra.leftPart)) #len() returns counting from 1
if currentItem.breakContainerLoop and currentItem.data == containerBackendStartItem: #we have found a containerStart and it is the same. Start a sub-loop.
while countdown > 0:
innerItem = tra.getCurrentItem()
if innerItem.breakContainerLoop: #container Start()!
containerStack.append(True)
elif innerItem.breakContainerLoop is None: #and not False! Container End()
#print (innerItem, innerItem.data, innerItem.data.exportLilypond())
containerStack.pop()
if not containerStack: #we are not in a nested container
countdown -= 1
tra._right()
else: #we reached 0 steps.
countdown = realSteps
before = tra.leftPart[-1]
#print (before.data.exportLilypon(), before.
forceSigs = [tra, before.cachedClefPitch, before.cachedKeysigData, before.cachedTimesigData]
new = api.l_item._convertBackendItemToGuiItem(backendItem, itemType, forceSigs = forceSigs) #the big typechecking machine
#new = typ(data) #create a new for each container. The gui only knows unique items. Essentialy that means we copy, and forget the original one.
#new = copy.copy(guiItem) #QGraphicsItems are NOT copy-able. Qt simply does not allow it.
if new.breakContainerLoop is None and tra.getCurrentItem().breakContainerLoop: #and not False! #a quick bugfix for container ends. Move one further. Else container start and end are reversed.
tra._right()
#Achtung: Inserting an empty container into a container end may result in two reversed containerEnd in the GUI. For the user it makes no difference. Only when we begin to utilize the containerEnd for something else, like drawing backgrounds, this will confuse the display.
tra.insert(new, standaloneInsert = standaloneInsert) #Insert at cursor position. Goes right after inserting.
self.allItems.setdefault(backendItem, []).append(new)
#Continue looping, there may be more container in the same track. Actually that is very likely and the normal case.
#finally update all necessary track durations and positioning.
api.l_send(lambda: api.l_score.updateTrackFromItem(backendItem)) #update cursor position is done in here also
def deletetItemRelativeToContainerStart(self, backendItem, container, howManySteps):
"""Based on the insert variant"""
realSteps = howManySteps -1 #-1 for 1vs0 counting.
containerBackendStartItem = container[0] # the backend container start.
allTracks = set()
for tr in self.allItems[containerBackendStartItem]: #The list of guiItems connected to this backend Item. All container start in the current score.
allTracks.add(tr.track) #the guiTracks
for tra in allTracks:
tra.reset() #all items to track.rightPart
#steps in nested containers do not count. The whole nested container counts as 1 step.
countdown = realSteps
while True:
containerStack = [] #register to keep track of nested containers in the gui, where they are just items in a row, not real nested like in the backend.
currentItem = tra._right() #returns the current item or false.
if not currentItem:
break #Track End
if currentItem.breakContainerLoop and currentItem.data == containerBackendStartItem: #we have found a containerStart and it is the same. Start a sub-loop.
while countdown > 0:
innerItem = tra._right()
if innerItem.breakContainerLoop: #container start!
containerStack.append(True)
elif innerItem.breakContainerLoop is None: #and not False!
containerStack.pop()
if not containerStack: #we are not in a nested container
countdown -= 1
else: #we reached 0 steps
countdown = realSteps
tra.delete(backendItem)
#Continue looping, there may be more container in the same track. Actually that is very likely and the normal case.
#finally update all necessary track durations and positioning.
api.l_send(lambda: api.l_score.updateTrackFromItem(containerBackendStartItem)) #update cursor position is done in here also
def fullReload(self):
api.trackFirst()
api.head()
self.loadBackendData()
def loadBackendData(self):
"""Read in the backend score and create GUI items.
Used on start and load file.
This is the only time where items are not inserted at
the backendcursor position. So we have to make a few update runs
"""
main.ui.centralwidget.hide()
for num, tr in enumerate(self.tracks): #it is possible to call this function more than once, in this case we need to get rid of old items first
self.incipitScene.removeItem(tr.incipit)
self.scene.removeItem(tr)
self.repositionTracks()
self.tracks = []
for track in api._getScore(): #First pass create all tracks. Otherwise api.trackDown() in the next step will trigger a gui track down which will not know where to go.
self.addTrack(track)
for track in api._getScore():
for item in track:
api.l_item.insertAtCursor(item, getContainer =None, standaloneInsert = False) #don't update after every item insert. . #we are assuming a non-container based entry. This is safe on load (in opposite to cursor insert) because if there is a container it is already complete needs no checking if the cursor is in front of a ContainerStart etc. insertAtCursor will take care of the recursive container insert and force getContainer to True
api.trackDown()
api.trackFirst()
api.head()
self.buildDisplacementMap()
for track in self.tracks:
track.signatureReset()
track.updateRightFromStart() #This creates the correct positioning. Until now all items were just added to 0,0 so that we don't get a gui update after each insert
api.trackFirst()
api.head()
self.generateScoreSubstitutionsMenu()
self.generateSubstitutionsMenu()
self.generateScoreContainerMenu()
main.ui.centralwidget.show()
def buildDisplacementMap(self):
"""Return a unified list for all tracks.
Contains the maximum displacement for a tickposition
from all tracks.
It modifies an instance variable which is basically a chache."""
combined_dicts = []
for track in self.tracks:
#Goal: [(384, 10), (384, 15), (768, 15)] => [(384,25), (768, 15)]
d = defaultdict(int) #int = 0. with a default dict we later can overwrite AND create a key with += instead of having to check for existence first.
for guiItem in track.displacements:
d[guiItem.cachedTickIndex] += guiItem.displacement
combined_dicts.append(d)
result = {}
for d in combined_dicts:
result.update((k, v) for k, v in d.items() if v > result.get(k, 0))
self.displacementMap = sorted(result.items())
def getDisplacement(self, tickindex, includeSelf):
"""Return the complete displacement up to a certain tickindex
while you can choose to include the tickindex position itself
or not"""
complete = 0
if includeSelf:
for position, displacement in self.displacementMap:
if position > tickindex:
break
complete += displacement
else:
for position, displacement in self.displacementMap:
if position == tickindex:
break
complete += displacement
return complete
@property
def currentTrackIndex(self):
return api._getTrackIndex()
@property
def currentTrack(self):
return self.tracks[self.currentTrackIndex]
def swapTrackWithAbove(self):
"""Move the complete Track up which results in the upper Track moving down"""
#When now is defined it is already the new situation because we derive tracknumber from the api
above = self.currentTrackIndex
now = above + 1
self.tracks[now].setPos(0, above * TRACK_SIZE)
self.tracks[above].setPos(0, now * TRACK_SIZE)
self.tracks.insert(above , self.tracks.pop(now)) #swap the track
self.repositionTracks()
def swapTrackWithBelow(self):
"""Move the complete Track down which results in the lower Track moving up"""
#When now is defined it is already the new situation because we derive tracknumber from the api
below = self.currentTrackIndex
now = below - 1
self.tracks[now].setPos(0, below * TRACK_SIZE)
self.tracks[below].setPos(0, now * TRACK_SIZE)
self.tracks.insert(below , self.tracks.pop(now)) #swap the track
self.repositionTracks()
def addTrack(self, backendTrack):
#Let's assume the backend tells us to create a track in the last position if api.addTrack() is called. So this is only for creating a gui track.
track = GuiTrack(workspace = self, backendTrack = backendTrack)
self.tracks.append(track)
self.scene.addItem(track)
self.incipitScene.addItem(track.incipit)
self.repositionTracks()
track.updateRight() #Do it once for the empty track. This shows the stafflines and costs nothing
def deleteTrack(self, trackNumberToDelete, newBackendTrackIndex):
"""delete all the items and lines"""
currentTrack = self.tracks[trackNumberToDelete]
self.incipitScene.removeItem(currentTrack.incipit)
self.scene.removeItem(currentTrack)
del self.tracks[trackNumberToDelete]
self.repositionTracks()
if not self.tracks: #was this the last track?
self.addTrack(api._getTrack()) #there is only one left in the backend.
def sendMaxTrackWidthToMain(self):
self.graphicsViewRect[2] = max([trk.cachedTrackWidth for trk in self.tracks]) * config.DURATION_MOD
#no need for incipitRectView updates here
self.updateSceneRect()
def repositionTracks(self):
"""Reposition all tracks according to their index.
Very fast."""
offsetsSoFar = 0
trackPositions = [] # (highest, lowest, gui-track)
oneLyricSpace = FONT_SIZE/1.5 if config.LYRICS else 0
lowerBoundary = 0
for trk in self.tracks:
highestPos = lowerBoundary #from the last time
trk.setPos(0, highestPos)
trk.incipit.setPos(0, highestPos)
lowerBoundary += (trk.cachedVerseCount*oneLyricSpace + trk.size) * trk.offsetFactor + 10/trk.offsetFactor
trackPositions.append((highestPos, lowerBoundary, trk)) #upper boundary, lower boundary, track-object
self.graphicsViewRect[3] = len(self.tracks) * TRACK_SIZE #TODO: doesn't this make the viewport too small if we have mostly double sized tracks?! There is an ugly +safetyPixels elsewhere to prevent that! Better correct here.
#no need for incipitGraphicsViewRect update here.
#Uncomment to visualize track boundaries
"""
try:
for r in self.rects:
self.scene.removeItem(r)
except:
pass
self.rects = []
for ob, un, tr in trackPositions:
rect = QtGui.QGraphicsRectItem(0, ob, 100, un-ob)
#rect = QtGui.QGraphicsRectItem(tr.sceneBoundingRect())
rect.setBrush(QtGui.QColor("pink"))
self.scene.addItem(rect)
self.rects.append(rect)
"""
#The outer tracks have no boundaries.
if len(trackPositions) >= 2:
trackPositions[0] = (float("-inf"), trackPositions[0][1], trackPositions[0][2])
trackPositions[-1] = (trackPositions[-1][0], float("inf"), trackPositions[-1][2])
elif len(trackPositions) == 1:
trackPositions = [(float("-inf"), float("inf"), self.tracks[0])]
self.cachedTrackPositions = trackPositions #is used by the mouse click
self.updateSceneRect()
def playbackCursorSetVisible(self, boolean):
"""Called by signal playbackSetPosition"""
if self.playbackCursor.playbackActive: #only for the current tab
if boolean:
self.playbackCursor.makeVisible()
self.playbackCursor.update() #adjust to track height etc.
self.playbackCursor.show()
else:
self.playbackCursor.hide()
self.workingAreaWidget.viewport().update()
def playbackCursorSetTicks(self, ticks):
if self.playbackCursor.playbackActive: #only for the current tab
#TODO: this will possibly block the GUI. Needs performance tests. Is it possible to do in parallel?
linePos = (ticks + self.getDisplacement(ticks, includeSelf = True)) + 96 #Small trick. It is always a 32th note ahead. has a better "during the note" playback feel.
self.playbackCursor.setX(linePos * config.DURATION_MOD)
self.playbackCursor.makeVisible()
#TODO: Make visible? Option to follow cursor or not? Scroll Lock!
class Session(object):
"""All open files with their QGraphicScenes etc.
Also manages the saveStatus warning. The savestatus system is purely
a GUI one.
If the saveStatus set is empty/clean there are no unsaved changes.
So only the "save" function can call setSavestatusClean while
a lot of functions can call it dirty.
Load does not need any saveStatus access because initially loaded
data is clean."""
def __init__(self):
self.scenes = {} # key is backend Workspace, value is the current workspace.
self.saveStatus = set() #A set of all changed and unsaved backend workspaces. Scores check with "if self in saveStatus" and the program checks with "if saveStatus".
self.playbackEngine = None #initiated through laborejo-qt
self.ourNsmClient = None #In case we are under session control
self.nsmClientId = None
#Last Known Dirs. Remember for convenience
self.last_open_dir = HOME
self.last_save_dir = HOME
self.last_export_dir = HOME
self.last_import_dir = HOME
self.last_subst_dir = HOME
self.last_export_files = {"pdf":[], "ly":[], "jack":[], "smf":[], "bin":[], }
self.last_export_extension_radioButton = None
self.last_export_splitBy_radioButton = None
self.palette = QtGui.QPalette()
@property
def currentGuiWorkspace(self):
if api._getWorkspace() in self.scenes:
return self.scenes[api._getWorkspace()]
else:
return None
def backendWorkspaceToGuiTabIndex(self, backendWs):
if backendWs in self.scenes:
return main.ui.Tab.indexOf(self.scenes[backendWs]) #from 0 to n
else:
raise BaseException("Backend-Workspace is not in the scene database. Please write down what you did to load this file and contact the developers. This is critical.")
return None
def isFilenameAvailable(self, newFileName):
l = set()
for backendMov, guiMov in self.scenes.items():
l.add(guiMov.fileName)
if newFileName in l:
return False
else:
return True
def isCurrentClean(self):
"""Check if the current active workspace/score is clean"""
return not api._getWorkspace() in self.saveStatus #return True if it is not in saveStatus, which means there is no unsaved Data which is good and therefore true.
def setSavestatusClean(self):
"""Clean the save status for the current active workspace."""
ws = api._getWorkspace()
if ws in self.saveStatus:
self.saveStatus.remove(ws)
main.ui.Tab.tabBar().setTabTextColor(self.backendWorkspaceToGuiTabIndex(ws), self.palette.color(self.palette.WindowText))
def setAllClean(self):
for ws in self.saveStatus:
main.ui.Tab.tabBar().setTabTextColor(self.backendWorkspaceToGuiTabIndex(ws), self.palette.color(self.palette.WindowText))
self.saveStatus.clear()
def setSavestatusDirty(self):
"""Add the current score to the set of unclean data"""
ws = api._getWorkspace()
if not ws in self.saveStatus: #no point in making something dirty even dirtier.
self.saveStatus.add(ws)
main.ui.Tab.tabBar().setTabTextColor(self.backendWorkspaceToGuiTabIndex(ws), self.palette.color(self.palette.LinkVisited))
if self.ourNsmClient:
self.ourNsmClient.setDirty(True)
HOME = os.path.expanduser("~") #lin and win
laborejo-0.8~ds0.orig/laborejoqt/config.py 0000664 0001750 0001750 00000050005 12154405225 021221 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
import sys
from os import path
import laborejocore as api
JACK = True #Switch on/off the whole playback engine. Critical setting. Needs restarting for change.
JACKMODE = False #Determine if you want jackmode on playback or not. Trivial setting, can be toggled at any time in the program itself.
BARLINES = True #Show the barlines in the GUI. Trivial setting, can be toggled at any time in the program itself.
LYRICS = False #Show the Lyrics in the GUI. Trivial setting, can be toggled at any time in the program itself.
DURATION_MOD = 0.15 #Default: 0.15 #Bigger means more space between all notes and objects
MIDI_TIMER = 34 #miliseconds update period. Used for midi-in detection and playback cursor movement smoothness. Default 34 is equal to around 30 frames/updates per second. The lower it is the less latency you experience for midi in. Low values may drag down performance. Try to stay above 10ms.
AUDIO_FEEDBACK = True #Change to False if you want to start the GUI without Audio feedback (e.g. flats/sharps, virtual Piano). Trivial setting, can be toggled at any time in the program itself.
TRANSPORT_KEEP_ROLLING = False #True lets the jack transport system, aka playback, rolling even after the song in Laborejo is over. Trivial setting, can be toggled at any time in the program itself.
#Laborejo uses external programs for some of its functions. It has default names for these but they can be changed.
#You can give a executable name to use a specific progra version (either in your PATH or absolute path).
#Use an empty string "" for the default value
lilypondbinary = "" #Default: "lilypond". Alternative example: "/usr/local/bin/lilypond"
pdfviewer = "" #Default: "xdg-open". Alternative example: "/usr/bin/xpdf"
midiinport = "" #Jack Midi input port for note insert. "client:port". No ALSA. Default: no connection. Alternative example: "jack-keyboad:midi_out"
#Shortcuts
shortcuts = {
#Non-menu
#Modal Commands
"1" : "modalcommands.commands.keys[1]",
"2" : "modalcommands.commands.keys[2]",
"3" : "modalcommands.commands.keys[3]",
"4" : "modalcommands.commands.keys[4]",
"5" : "modalcommands.commands.keys[5]",
"6" : "modalcommands.commands.keys[6]",
"7" : "modalcommands.commands.keys[7]",
"8" : "modalcommands.commands.keys[8]",
"9" : "modalcommands.commands.keys[9]",
#"0" : "modalcommands.commands.keys[0]", #0 is used as emacs shortcut for direct duration insert.
"Shift+1" : "modalcommands.commands.shifts[1]",
"Shift+2" : "modalcommands.commands.shifts[2]",
"Shift+3" : "modalcommands.commands.shifts[3]",
"Shift+4" : "modalcommands.commands.shifts[4]",
"Shift+5" : "modalcommands.commands.shifts[5]",
"Shift+6" : "modalcommands.commands.shifts[6]",
"Shift+7" : "modalcommands.commands.shifts[7]",
"Shift+8" : "modalcommands.commands.shifts[8]",
"Shift+9" : "modalcommands.commands.shifts[9]",
"Shift+0" : "modalcommands.commands.shifts[0]",
#"Alt+1" : "modalcommands.commands.alts[1]",
#"Alt+2" : "modalcommands.commands.alts[2]",
#"Alt+3" : "modalcommands.commands.alts[3]",
#"Alt+4" : "modalcommands.commands.alts[4]",
#"Alt+5" : "modalcommands.commands.alts[5]",
#"Alt+6" : "modalcommands.commands.alts[6]",
#"Alt+7" : "modalcommands.commands.alts[7]",
#"Alt+8" : "modalcommands.commands.alts[8]",
#"Alt+9" : "modalcommands.commands.alts[9]",
#"Alt+0" : "modalcommands.commands.alts[0]",
"Alt+Shift+1" : "modalcommands.commands.altShifts[1]",
"Alt+Shift+2" : "modalcommands.commands.altShifts[2]",
"Alt+Shift+3" : "modalcommands.commands.altShifts[3]",
"Alt+Shift+4" : "modalcommands.commands.altShifts[4]",
"Alt+Shift+5" : "modalcommands.commands.altShifts[5]",
"Alt+Shift+6" : "modalcommands.commands.altShifts[6]",
"Alt+Shift+7" : "modalcommands.commands.altShifts[7]",
"Alt+Shift+8" : "modalcommands.commands.altShifts[8]",
"Alt+Shift+9" : "modalcommands.commands.altShifts[9]",
"Alt+Shift+0" : "modalcommands.commands.altShifts[0]",
#Keypad / Numpad Widget
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_1" : "numpadAction1",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_2" : "numpadAction2",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_3" : "numpadAction3",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_4" : "numpadAction4",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_5" : "numpadAction5",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_6" : "numpadAction6",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_7" : "numpadAction7",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_8" : "numpadAction8",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_9" : "numpadAction9",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_0" : "numpadAction0",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_Plus" : "actionPaletteNext",
"QtCore.Qt.KeypadModifier+QtCore.Qt.Key_Minus" : "actionPalettePrevious",
#Non-Modal Commands
"Alt+1" : "actionClefs",
"Alt+2" : "actionTime_Signatures",
"Alt+3" : "actionKey_Signatures",
"Alt+4" : "actionPerformance_Signature",
"Alt+5" : "actionTempo_Signature",
"Alt+6" : "actionInstrument_Change",
#"Alt+7" : "",
#"Alt+8" : "",
#"Alt+9" : "",
#"Alt+0" : "",
"F2" : "actionScript",
"F3" : "actionView_PDF",
"Shift+F3" : "actionQuick_View_PDF_Export_Group",
"F5" : "actionToolbarPlayStop",
"Ctrl+F5" : "actionToolbarPlayFromStart",
"Shift+F5" : "actionPlaySolo",
"Alt+F5" : "actionPlayGroup",
"F6" : "actionToolbarEmergencyPlaybackStop",
"F7" : "actionToolbarJackModeToggle",
"F8" : "actionMIDI_Note_Entry",
#Navigation
"Left" : "api.left",
"Right" : "api.right",
"Shift+Left" : "api.selectLeft",
"Shift+Right" : "api.selectRight",
"Ctrl+Left" : "api.measureLeft",
"Ctrl+Right" : "api.measureRight",
"Ctrl+Shift+Left" : "api.selectMeasureLeft",
"Ctrl+Shift+Right" : "api.selectMeasureRight",
"Ctrl+Shift+Up" : "api.selectMeasure",
"Ctrl+Shift+Down" : "api.selectMeasure",
"Ctrl+Up" : "api.upOctave",
"Ctrl+Down" : "api.downOctave",
"Home" : "api.head",
"Shift+Home" : "api.selectHead",
"End" : "api.tail",
"Shift+End" : "api.selectTail",
"Up" : "api.up",
"Down" : "api.down",
"Page Up" : "api.trackUp",
"Page Down" : "api.trackDown",
"Ctrl+Home" : "api.trackFirst",
"Ctrl+End" : "api.trackLast",
#Basic Modification
"W" : "actionShift_Up",
"S" : "actionShift_Down",
"Shift+W" : "actionShift_Octave_Up",
"Shift+S" : "actionShift_Octave_Down",
"Alt+W" : "actionShift_Note_Up",
"Alt+S" : "actionShift_Note_Down",
"Alt+Shift+W" : "actionShift_Note_Octave_Up",
"Alt+Shift+S" : "actionShift_Note_Octave_Down",
"Return" : "actionAdd_Note_to_Chord",
"Shift+Return" : "actionAdd_Octave_to_Chord",
"Shift+Delete" : "actionRemove_Note_from_Chord",
"+" : "actionSharp",
"-" : "actionFlat",
"?" : "actionReminder",
#"Shift+#" : "actionCautionary",
#Beware of the + and - keys. Locale Alert!
#"Alt+-" : "", reserved for micro-tonality
#"Alt++" : "", reserved for micro-tonality
#Menu
#File
#With a small python trick. Dictionaries are case sensitive, but Qt does not care about the case for shortcuts.
#So we assign the same shortcuts to mutually exclusive menu entries.
"Ctrl+O" : "actionOpen",
"Ctrl+o" : "actionImport_to_Session",
"Ctrl+Shift+O" : "actionOpen_as_Template",
"Ctrl+Shift+o" : "actionImport_to_Session_as_Template",
"Ctrl+S" : "actionSave",
"Ctrl+Shift+S" : "actionSave_As",
"Ctrl+Shift+s" : "actionExport_from_Session",
"Ctrl+N" : "actionNew",
"Ctrl+n" : "actionNew_to_Session_2",
"Ctrl+Q" : "actionQuit",
"Ctrl+W" : "actionClose",
#Edit
"Ctrl+a" : "actionSelect_Track",
"Ctrl+Shift+a" : "actionSelect_All",
"Ctrl+i" : "actionInvert_Selection",
"Space" : "actionClear_Selection",
"Ctrl+C" : "actionCopy",
"Ctrl+X" : "actionCut",
"Ctrl+V" : "actionPaste",
"Ctrl+Z" : "actionUndo",
"Ctrl+Shift+Z" : "actionRedo",
"Delete" : "actionDelete",
"Ctrl+Shift+V" : "actionPaste_replace_Selection",
"Backspace" : "actionDelete_Previous",
"E" : "actionDuplicate",
"Shift+E" : "actionLink",
#View
"Ctrl+E" : "actionSidebar",
"Ctrl+L" : "actionLyrics",
"Ctrl+M" : "actionMinimap",
"Ctrl+B" : "actionBarlines",
"Ctrl+Shift++" : "actionWiden",
"Ctrl+Shift+-" : "actionShrinken",
"Ctrl++" : "actionZoom_In",
"Ctrl+-" : "actionZoom_Out",
"F1" : "actionSmall_Terminal",
#Container
#"Alt+Shift+Page Up" : "actionDelete_Current_Track",
#"Alt+Shift+Page Down" : "actionAdd_Track",
"Insert" : "actionInsert_Empty_Container",
"Shift+Insert" : "actionInsert_Existing_Container",
"Alt+Insert" : "actionEdit_Container_Content",
"Alt+Page Up" : "actionMove_Track_Up",
"Alt+Page Down" : "actionMove_Track_Down",
#
"Alt+Return" : "actionEdit_Current_Object",
"T" : "actionTriplet",
"Alt+T" : "actionCustom_Tuplet",
"D" : "actionAugment",
"A" : "actionDiminish",
"Tab" : "actionAdd_Dot", #This is a duplicate entry. Dot is in twice and the menu version shows "."
"Shift+Tab" : "actionRemove_Dot", #This is a duplicate entry. Dot is in twice and the menu version shows "Shift+."
"." : "actionToolbarNext_Becomes_Dotted",
"Alt+." : "actionToggle_Prevailing_Dot",
"Alt+M" : "actionMultiMeasureRest",
"M" : "actionFullMeasureRest",
"Shift+T" : "actionClear_Tuplets",
"F" : "actionFermata",
"B" : "actionBeam_Start",
"Shift+B" : "actionBeam_End",
"G" : "actionSlur_Start_On_Off",
"Shift+G" : "actionSlur_End_On_Off",
"C" : "actionEdit_Chord_Symbol",
"Shift+C" : "actionClear_Chord_Symbol",
"Alt+C" : "actionMass_Insert_Chord_Symbols",
"P" : "actionEdit_Figured_Bass",
"Shift+P" : "actionClear_Figured_Bass",
"Alt+P" : "actionMass_Insert_Figured_Bass",
"Q" : "actionSplit_in_Two",
"Shift+Q" : "actionSplit_in_Three",
"Alt+Q" : "actionCustom_Split",
"I" : "actionTie_One_Note_On_Off",
"U" : "actionUpbeat",
"R" : "actionTrill",
"," : "actionStaccato",
"_" : "actionTenuto",
"x" : "actionFree_Text",
"j" : "actionJoin_to_Chord_prevalent_duration",
"Shift+j" : "actionJoin_to_Chord_sum_durations",
"z" : "actionSustain_Change_non_print",
"Shift+z" : "action_Sustain_On",
"Alt+z" : "action_Sustain_Off",
"Alt+E" : "actionFull_Dual_Ending_Sequence",
#Advanced
"h": "actionToggleTransparent",
"Alt+h" : "actionToggleHidden",
"Shift+h" : "actionCleanHiddenTransparent",
#Force new duration emacs shortcut
"0, ., 1" : "lambda: api.putDurations(4*384, dots = 1)",
"0, ., 2" : "lambda: api.putDurations(2*384, dots = 1)",
"0, ., 3" : "lambda: api.putDurations(384, dots = 1)",
"0, ., 4" : "lambda: api.putDurations(192, dots = 1)",
"0, ., 5" : "lambda: api.putDurations(96, dots = 1)",
"0, ., 6" : "lambda: api.putDurations(48, dots = 1)",
"0, ., 7" : "lambda: api.putDurations(8*384, dots = 1)",
"0, ., 8" : "lambda: api.putDurations(16*384, dots = 1)",
"0, 1" : "lambda: api.putDurations(4*384)",
"0, 2" : "lambda: api.putDurations(2*384)",
"0, 3" : "lambda: api.putDurations(384)",
"0, 4" : "lambda: api.putDurations(192)",
"0, 5" : "lambda: api.putDurations(96)",
"0, 6" : "lambda: api.putDurations(48)",
"0. 7" : "lambda: api.putDurations(8*384)",
"0, 8" : "lambda: api.putDurations(16*384)",
}
virtualPiano = {
"c" : "lambda: main.virtualPianoInsertNote(20)",
"d" : "lambda: main.virtualPianoInsertNote(70)",
"e" : "lambda: main.virtualPianoInsertNote(120)",
"f" : "lambda: main.virtualPianoInsertNote(170)",
"g" : "lambda: main.virtualPianoInsertNote(220)",
"a" : "lambda: main.virtualPianoInsertNote(270)",
"b" : "lambda: main.virtualPianoInsertNote(320)",
"h" : "lambda: main.virtualPianoInsertNote(320)",
#We need the shift versions because they block the global shift+char shortcuts. Even if we didn't need the function call itself.
"shift+c" : "lambda: main.virtualPianoInsertChord(20)",
"shift+d" : "lambda: main.virtualPianoInsertChord(70)",
"shift+e" : "lambda: main.virtualPianoInsertChord(120)",
"shift+f" : "lambda: main.virtualPianoInsertChord(170)",
"shift+g" : "lambda: main.virtualPianoInsertChord(220)",
"shift+a" : "lambda: main.virtualPianoInsertChord(270)",
"shift+b" : "lambda: main.virtualPianoInsertChord(320)",
"shift+h" : "lambda: main.virtualPianoInsertChord(320)",
}
#Key = string, value = dict of keynumber and a tuple with information for the button: function, label, toolTip, whatIsThis
#Achtung! The palettes have shortcuts. It is not checked if a shorcut is duplicated for the palette versus normale shortcuts. The result if two shorctus are assigned could be random.
palettes = {
"dynamics": {
"title": "Dynamics",
"shortcut" : "Alt+D",
0:("actionTacet", "tacet", _("Tacet (Silence)"), ""),
1:("actionPianissimo", "𝆏𝆏", _("Pianissimo"), ""),
2:("actionPiano", "𝆏", _("Piano"), ""),
3:("actionMezzo_piano", "𝆐𝆏", _("Mezzo Piano"), ""),
4:("actionMezzo_forte", "𝆐𝆑", _("Mezzo Forte"), ""),
5:("actionForte", "𝆑", _("Forte"), ""),
6:("actionFortissimo", "𝆑𝆑", _("Fortissimo"), ""),
7:("actionCrescendo", "𝆒", _("Crescendo "), ""),
8:("actionEnd_cresc_decresc", "|", _("Stop Cresc/Decresc"), ""),
9:("actionDecrescendo", "𝆓", _("Decrescendo"), ""),
},
"barlines": {
"title": "Barlines",
"shortcut" : "Alt+B",
1:("actionBarOpen", "𝄃", _("Open"), ""),
2:("actionEnd_Open", "𝄂𝄃", _("End-Open"), ""),
3:("actionEnd", "𝄂", _("End"), ""),
4:("actionRepeat_Open", "𝄆", _("Repeat Open"), ""),
5:("actionRepeat_Close_Open", "𝄇𝄆", _("Repeat Close-Open"), ""),
6:("actionRepeat_Close", "𝄇", _("Repeat Close"), ""),
7:("actionDouble", "𝄁", _("Double "), ""),
8:("actionHalf", "𝄅", _("Half"), ""),
9:("actionDashed", "𝄄", _("Dashed"), ""),
},
"fingerings": {
"title": "Fingerings",
"shortcut" : "Alt+F",
0:("actionFinger_0", "0", _("Thumb"), ""),
1:("actionFinger_1", "1", _("Finger 1"), ""),
2:("actionFinger_2", "2", _("Finger 2"), ""),
3:("actionFinger_3", "3", _("Finger 3"), ""),
4:("actionFinger_4", "4", _("Finger 4"), ""),
5:("actionFinger_5", "5", _("Finger 5"), ""),
7:("actionCustom_Finger", "✎", _("Custom Finger "), ""),
9:("actionClear_All_Fingerings", "✗", _("Remove Fingering"), ""),
},
"right hand fingering": {
"title": "Stroke Finger",
1:("actionStroke_1", "p", _("Stroke Finger p/1"), ""),
2:("actionStroke_2", "i", _("Stroke Finger i/2"), ""),
3:("actionStroke_3", "m", _("Stroke Finger m/3"), ""),
4:("actionStroke_4", "a", _("Stroke Finger a/4"), ""),
5:("actionStroke_x", "x", _("Stroke Finger x/5"), ""),
7:("actionCustom_Right_Hand_Stroke_Finger", "✎", _("Custom Finger "), ""),
9:("actionClear_All_Fingerings", "✗", _("Remove Fingering"), ""),
},
"string numbers": {
"title": "String Nums",
1:("actionString_1", "①", _("String 1"), ""),
2:("actionString_2", "②", _("String 2"), ""),
3:("actionString_3", "③", _("String 3"), ""),
4:("actionString_4", "④", _("String 4"), ""),
5:("actionString_5", "⑤", _("String 5"), ""),
6:("actionString_6", "⑥", _("String 6"), ""),
7:("actionCustom_String_Number", "|", _("Custom String Number"), ""),
9:("actionClear_All_Fingerings", "✗", _("Remove Fingering"), ""),
},
"voice presets": {
"title": "Voice Presets",
0:("actionVoiceAutomatic", "Auto", _("Automatic voice from here"), ""),
1:("actionVoiceOne", "v1", _("Voice one, stems up, from here"), ""),
2:("actionVoiceTwo", "v2", _("Voice one, stems down, from here"), ""),
3:("actionVoiceThree", "v3", _("Voice three, stems up, from here"), ""),
4:("actionVoiceFour", "v4", _("Voice four, stems down, from here"), ""),
},
"midi fine tuning": {
"title": "Fine Tuning",
"shortcut" : "Alt+R",
4:("actionChord_Duration_Factor_Minus", "↤", _("Less Duration (shorter)"), ""),
5:("actionChord_Duration_Factor_Reset", "✗", _("Reset Duration Finetuning"), ""),
6:("actionChord_Duration_Factor_Plus", "↦", _("More Duration (longer)"), ""),
7:("actionChord_Velocity_Factor_Minus", "↧", _("Less Velocity (softer) "), ""),
8:("actionChord_Velocity_Factor_Reset", "✗", _("Reset Velocity Finetuning"), ""),
9:("actionChord_Velocity_Factor_Plus", "↥", _("More Velocity (louder)"), ""),
},
"channels and programs": {
"title": "Chan + Prog",
0:("actionChannel_Clear", "Ch clear", _("Clear Channel Offset"), ""),
1:("actionChannel_Minus", "Ch-", _("Channel Offset +1"), ""),
2:("actionChannel_Force", "Ch?", _("Force Channel"), ""),
3:("actionChannel_Plus", "Ch+", _("Channel Offset -1"), ""),
8:("actionProgram_Clear", "PrX", _("Clear Program Offset"), ""),
4:("actionProgram_Minus", "Pr-", _("Program Offset +1"), ""),
5:("actionProgram_Force", "Pr?", _("Force Program"), ""),
6:("actionProgram_Plus", "Pr+", _("Program Offset -1"), ""),
},
"playback effects": {
"title": "Effects",
0:("actionClean_Tremolo", "Clear", _("Clear Tremolo"), ""),
1:("actionTremolo_in_Two", "Trm2", _("Tremolo in two"), ""),
2:("actionCustom_Tremolo", "Trm?", _("Custom Tremolo"), ""),
3:("actionTremolo_in_Four", "Trm4", _("Tremolo in four"), ""),
},
}
midiCCShortcuts = {
#Scope is autodetected. main. or laborejoqt directliy (so you can use main functions or api.foo())
#All these functions need to accept two parameters: the second midi byte (e.g. velocity) and the same byte but right before this function was called. So you can compare the new value to the old value
10 : "numpadNextPreviousMidiController", # in main. to control numpadNext and numpadPrevious
}
#Add an action to the toolbar
toolbar = {
#"titleString":"actionName",
}
#Load a personal config file which can overide the default config.
def reloadPersonalConfig():
"""It is important to execute this function before any other gui
functions like generating toolbars or user menus."""
try:
f = open(api._getConfigDir() + "laborejo-qt.config")
extras = compile(f.read(), '', 'exec')
f.close()
exec(extras, locals(), globals()) #override the existing variables.
except:
pass #personal config file does not exist
#Make all keys lowercase except for the numpad keys
#new = dict((k.lower(), v) for k,v in globals()["shortcuts"].items() if not "KeypadModifier" in k)
#shortcuts.update(new)
#globals()["shortcuts"] = dict((k.lower(), v) for k,v in globals()["shortcuts"].items())
#globals()["virtualPiano"] = dict((k.lower(), v) for k,v in globals()["virtualPiano"].items())
#Set initial playback feedback based on listener status
api.l_playback.enabled = globals()["AUDIO_FEEDBACK"]
laborejo-0.8~ds0.orig/laborejoqt/constants.py 0000664 0001750 0001750 00000004335 12154405225 021775 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
from os import path
PITCH_MOD = 10
#Nearly all these values are trial and error to compensat different positioning of music fonts, text fonts, qt line objects etc.
TEXT_SCALE_CORRECTION = - 10
MUSIC_SCALE_CORRECTION = - 40
NOTE_MOD = 1.5
TRACK_SIZE = PITCH_MOD * 10 #*15 is safe.
FONT_SIZE = 24
MIDDLE_LINE = -5
DISPLACE = FONT_SIZE * 18
#DISPLACE_TRESHOLD = 192 # Everything that is smaller than 192 gets displacement.
PEN_LINE = QtGui.QPen(QtCore.Qt.black, 0, QtCore.Qt.SolidLine)
PEN_LINE.setCosmetic(True) #Prevents OpenGL zooming from eating lines.
PEN_LINETWO = QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.SolidLine)
PEN_LINETWO.setCosmetic(True)
PEN_STEM = QtGui.QPen(QtCore.Qt.black, 2, QtCore.Qt.SolidLine)
PEN_STEM.setCosmetic(True)
PEN_BEAM = QtGui.QPen(QtCore.Qt.black, 3, QtCore.Qt.SolidLine)
PEN_POSITION = QtGui.QPen(QtCore.Qt.black, 3, QtCore.Qt.DashLine)
PEN_LINE.setColor(QtGui.QColor("black"))
PEN_STEM.setColor(QtGui.QColor("black"))
PEN_BEAM.setColor(QtGui.QColor("black"))
PEN_POSITION.setColor(QtGui.QColor("grey"))
PEN_LINETWO.setColor(QtGui.QColor("red"))
PEN_BARLINE = QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.SolidLine)
PEN_BARLINE.setColor(QtGui.QColor("black"))
PEN_BARLINE.setCosmetic(True)
PEN_LINEFORBIDDEN = QtGui.QPen(QtCore.Qt.black, 4, QtCore.Qt.SolidLine)
PEN_LINEFORBIDDEN.setColor(QtGui.QColor("red"))
#Two fonts which are used in the QGraphicsScene. They are special because they don't scale with the DPI.
#the fontDB is part of qt, which makes it global. It does not need to get imported in other modules. import qt is enough.
fontDB = QtGui.QFontDatabase()
fid1 = fontDB.addApplicationFont(path.join(path.dirname(__file__), "resources", "euterpe.ttf"))
fid2 = fontDB.addApplicationFont(path.join(path.dirname(__file__), "resources", "freesans.ttf"))
if fid1 == -1 or fid2 == -1:
raise ValueError("One of the two fonts euterpe.ttf and freesans.ttf were not loaded. This is critical. Did someone move the files around?")
MUSIC_FONT_STRING = "Euterpe"
TEXT_FONT_STRING = "FreeSans"
COLLAPSED_FACTOR = 0.5
COLLAPSED_TRANSFORM = QtGui.QTransform()
COLLAPSED_TRANSFORM.scale(1, COLLAPSED_FACTOR)
EXPANDED_TRANSFORM = QtGui.QTransform()
EXPANDED_TRANSFORM.scale(1, 1)
laborejo-0.8~ds0.orig/laborejoqt/container.py 0000664 0001750 0001750 00000142263 12154405225 021746 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
from collections import deque
from hashlib import md5
import laborejocore as api
from laborejoqt import config, dictionaries
from laborejoqt.items import GuiTimeSignature, GuiText, GuiMultiMeasureRest, GuiUpbeat, GuiChord, GuiSlurOn, GuiSlurOff
from laborejoqt.constants import *
#These two must be independent (memory) objects.
DEFAULT_TIMESIG = GuiTimeSignature(api.items.DEFAULT_TIMESIG, forceSigs=[0, 162, api.items.DEFAULT_KEYSIG, api.items.DEFAULT_TIMESIG]) #4/4 - Lilypond Default #the forced sigs do not matter here. Just get them out of the way so we can start the program. #if forceSigs: # [track, clefPitch, backendKeysig, backendTimesig]
ENDMARKER_TIMESIG = GuiTimeSignature(api.items.DEFAULT_TIMESIG, forceSigs=[0, 162, api.items.DEFAULT_KEYSIG, api.items.DEFAULT_TIMESIG]) #4/4 - Lilypond Default #the forced sigs do not matter here. Just get them out of the way so we can start the program. #if forceSigs: # [track, clefPitch, backendKeysig, backendTimesig]
class Pseudo(object):
"""A general purpose empty item which is needed for iterating cases.
For example beaming groups look at the previous items, and there
must be one before the first, Pseudo"""
class Pos(object):
def x(self):
return 0
def y(self):
return 0
def __init__(self):
self.cachedDuration = 0
self.cachedBaseDuration = 0
self.group = 0
self.data = False
self.dataOrg = False
self.cachedMinMax = [float("inf"), -1 * float("inf")] #out of range for any pitch.
self.data = self
self.noteheads = False
self.posObj = self.Pos()
self.displacement = 0
self.track = None
def nothing(self, *args):
pass
def pos(self):
return self.posObj
setX = setY = tremoloMarker = chordSymbols = tupletMarkers = smfChannel = directivesPst = updateDots = updateGroupStemAndFlag = figuredBass = updateRightFromThisItem = updateStatic = extensions = updateDynamic = update = setSelected = nothing
def exportLilypond(self):
return "Pseudo"
PSEUDO = Pseudo()
class GuiIncipit(QtGui.QGraphicsItemGroup):
"""Each GUI Track has an Incipit which is always visible to the left
of the tracks.
The incipit view width is 50 pixel.
An object with 10 width which shall be on the right edge has to
start at pixel position 40"""
def __init__(self, guiTrack):
super(GuiIncipit, self).__init__()
self.guiTrack = guiTrack
self.data = self.guiTrack.data
#"\\new " + what + " <<\n" + extra
self.glyphes = { "\\new GrandStaff <<\n" : "𝄔",
"\\new PianoStaff <<\n" : "𝄔",
"\\new ChoirStaff <<\n\\set ChoirStaff.systemStartDelimiter = #'SystemStartBrace \n" : "𝄔", #groupVoiceAndFiguredBassStart
#Squared:
"\\new ChoirStaff <<\n" : "𝄕",
"\\new StaffGroup <<\n\\set StaffGroup.systemStartDelimiter = #'SystemStartSquare \n" : "𝄕", #groupSquareStart
"\\new StaffGroup <<\n" : "𝄕", }
#Colored Group Marker
self.backendGroupMarker = QtGui.QGraphicsRectItem(0, 0, 9, 40)
self.addToGroup(self.backendGroupMarker)
self.backendGroupMarker.setParentItem(self)
self.backendGroupMarker.setPos(70,0)
self.changeGroupColor()
#Name
self.nameMarker = QtGui.QGraphicsTextItem("")
self.addToGroup(self.nameMarker)
self.nameMarker.setParentItem(self)
self.nameMarker.setPos(5,0)
self.nameMarker.setDefaultTextColor(QtGui.QColor("black"))
self.changeNameMarker()
#Lilypond Group Marker
self.lilypondGroupMarkers = []
self.changeLilypondStaffGroupMarkers()
self.updateMarkerSize()
def stringToColor(self, st):
"""Convert a string to QColor. Same string, same color
Is used for group coloring"""
if st:
c = md5(st.encode()).hexdigest()
return QtGui.QColor(int(c[0:9],16) % 255, int(c[10:19],16) % 255, int(c[20:29],16)% 255, 255)
else:
return QtGui.QColor(255,255,255,255) #Return White
def changeLilypondStaffGroupMarkers(self):
#delete old
for mark in self.lilypondGroupMarkers:
self.scene().removeItem(mark)
self.lilypondGroupMarkers = []
for k,v in sorted(self.data.directivePre.items()) + sorted(self.data.directivePst.items()):
if k.startswith("StaffGroupEnd"):
marker = QtGui.QGraphicsTextItem(")")
marker.setParentItem(self)
marker.setScale(3)
marker.setDefaultTextColor(QtGui.QColor("black"))
self.addToGroup(marker)
marker.translate(0, 25)
self.lilypondGroupMarkers.append(marker)
elif k.startswith("StaffGroup"):
marker = QtGui.QGraphicsTextItem(self.glyphes[v])
marker.setParentItem(self)
marker.setScale(3.5)
marker.setDefaultTextColor(QtGui.QColor("black"))
self.addToGroup(marker)
self.lilypondGroupMarkers.append(marker)
offset = 43
for x in self.lilypondGroupMarkers:
if x: #not None
x.setPos(offset, -39)
offset -= 7
def updateMarkerSize(self):
height = 101 if self.guiTrack.dualView else 41
self.backendGroupMarker.setRect(0, 0, 9, height)
def changeGroupColor(self):
self.cachedGroupColor = self.stringToColor(self.data.group)
self.backendGroupMarker.setBrush(self.cachedGroupColor)
def changeNameMarker(self):
self.nameMarker.setPlainText(self.data.shortInstrumentName)
class GuiTrack(QtGui.QGraphicsItemGroup):
"""A list which holds one track of Guitems. Also holds one cursor
which can go left and right. Internal cursor only. Has little to do
with the api or gui cursor."""
def __init__(self, workspace, backendTrack):
super(GuiTrack, self).__init__()
self.dualView = False
self.data = backendTrack
self.incipit = GuiIncipit(self)
self.leftPart = deque([])
self.leftPartTicks = 0
self.cursorTempDisplacement = [[]] #If there is more than one displaced item in a row this will keep track of how many there are.
self.rightPart = deque([])
self.barlines = []
self.lines = []
self.lyrics = []
self.workspace = workspace #I am in that workspace / Gui score
self.setHandlesChildEvents(False) #A mouseclick will select the a child, not the whole Group.
self.setEnabled(True)
self.displacements = set() #a shortcut to all items guiItem with displacement
self.cachedTimeSignatures = {DEFAULT_TIMESIG:(-1, -1)} #a shortcut to all time signatures. There is one key 'None' which is the end of the tracks in ticks.
self.cachedTrackTicks = 0 #the last time this track was updated it had this many ticks.
self.cachedClefPitch = 162
self.cachedVerseCount = 0
self.size = TRACK_SIZE #Y Dimension
self.cachedTrackWidth = 0 #in pixel
self.collapsed = False
#The data set determines where ledger lines up and down start and where they will be drawn.
#The first two are start under and start above. They are the graphical positioning above/below the track of the first ledger line. 10 points is one step from line to line.
#The second two are the boundary. If the note is below/above that we start drawing ledger lines. These are not pixels but pitch units. Or better: minMax units
#start_under, start_above, lower_boundary, upper_boundary, offset_below, offset_above, middle_line_special = ledgerLinesDataSet
self.ledgerLinesDataSetSingleView = (50, -10, 23, -33, 0, 0, False)
self.ledgerLinesDataSetDualView = (50+60, -10, 23+60, -33, -5.8, 0, True)
self.ledgerLinesDataSetCurrent = self.ledgerLinesDataSetSingleView
@property
def offsetFactor(self):
"""For GUI space calculation"""
dualFactor = 1.6 if self.dualView else 1 #2.2 is 11 lines. 5 lines equals factor 1, double size +1 line more.
collapsedFactor = COLLAPSED_FACTOR/2 if self.collapsed else 1
return collapsedFactor * dualFactor
def toggleDualView(self):
"""A Gui-Only mode that shows one system with 11 lines. The
middle line is invisible and is the middle c' in both violin
and bass clef (if the main clef is a violin clef anyway.)
But it is not dependent on clefs. Everything works normally.
Technically you just get more lines and space so that
ledger lines are easier to see."""
if self.dualView: #we are already in Dual Mode
self.dualView = False
self.ledgerLinesDataSetCurrent = self.ledgerLinesDataSetSingleView
else:
#self.offset = TRACK_SIZE + TRACK_SIZE/5 #double size plus space for one more line.
self.dualView = True
self.ledgerLinesDataSetCurrent = self.ledgerLinesDataSetDualView
self.drawLines(self.cachedTrackWidth)
self.drawLyrics()
self.incipit.updateMarkerSize()
self.updateBarlines()
self.workspace.main.ui.actionToggle_Extended_Track_View.setChecked(self.dualView)
self.workspace.repositionTracks()
def toggleCollapse(self, repositionTracks = True):
if self.collapsed:
self.expandView(repositionTracks)
else:
self.collapseView(repositionTracks)
self.drawLyrics()
def collapseView(self, repositionTracks = True):
"""Scale the Y height to 50%"""
self.setTransform(COLLAPSED_TRANSFORM)
self.incipit.setTransform(COLLAPSED_TRANSFORM)
self.incipit.nameMarker.scale(1,2) #counter effect
self.collapsed = True
self.setOpacity(0.5)
if repositionTracks: #a performance tweak
self.workspace.repositionTracks()
self.workspace.main.ui.actionToggle_Collapse_Track.setChecked(True)
def expandView(self, repositionTracks = True):
"""Scale the Y height to 100%"""
self.setTransform(EXPANDED_TRANSFORM)
self.incipit.setTransform(EXPANDED_TRANSFORM)
self.incipit.nameMarker.scale(1,0.5) #counter effect
self.collapsed = False
self.setOpacity(1)
if repositionTracks: #a performance tweak
self.workspace.repositionTracks()
self.workspace.main.ui.actionToggle_Collapse_Track.setChecked(False)
def select(self):
for i in self.leftPart:
i.setSelected(True)
for i in self.rightPart:
i.setSelected(True)
def deselect(self):
"""Never used""" #TODO: remove? no.. why, looks nice.
for i in self.leftPart:
i.setSelected(False)
for i in self.rightPart:
i.setSelected(False)
def getCurrentItem(self):
if self.rightPart:
return self.rightPart[0]
else:
return False
def getIndex(self):
"""This is the same as the backend cursor flat index"""
return len(self.leftPart)
def reset(self):
#import pprint
#Move all items to self.rightPart and empty left part
self.leftPart.extend(self.rightPart)
self.rightPart = self.leftPart
self.leftPart = deque([])
#Reset all parameters
self.leftPartTicks = 0
self.cursorTempDisplacement = [[]]
def goToIndex(self, indexGoal):
"""Always goes to the right"""
start = self.getIndex()
if indexGoal == start : #already correct
return True
else:
if not indexGoal > start: #the item is not on the right side?
self.reset()
while indexGoal != self.getIndex():
if not self._right(): #this moves right
return False #track is shorter than goal.
return True
def goToTickIndex(self, ticksGoal):
"""Always go to the earliest item with this tickindex.
If there is a clef and a chord on tick 0, then we seek the clef"""
if ticksGoal <= self.leftPartTicks: #the item is left. search from the beginning
self.reset()
while self.rightPart and ticksGoal > self.rightPart[0].cachedTickIndex:
if not self._right(): #this moves right
return False
return True
def insert(self, guiItem, standaloneInsert):
"""standaloneInsert means that after insert the gui does
update right and all the stuff. If it is false it will just
create the item and place it in the track so it can be
repositioned later."""
self.rightPart.appendleft(guiItem)
guiItem.track = self
guiItem.setParentItem(self)
guiItem.setPos(0,0) #Needed to update guiItems position to the parents/track coordinates, after it was created.
guiItem.cachedTickIndex = self.leftPartTicks #TODO It is wrong for linked items and gets update by firstPass right after insert anyway. But we need it immediatly for buildDisplacementMap()
#guiItem.cachedIndex is not necessary here since there is no displacement calculation with that.
disp = guiItem.displacement
if disp: #extra space created by this item?
self.displacements.add(guiItem)
#self.workspace.buildDisplacementMap() #updateRight->firstPassRight does this.
if standaloneInsert:
self.updateRight(forceDisplacementUpdatingOtherTracks = disp) #include the current item in the update process.
self._right() #place the current item in self.leftPart
def drawLines(self, end):
"""The drawing method differs for even and odd numbers of lines.
Odd numbers are centered around 'b on a line (Treble clef)
Even numbers are centered around 'b between to lines.
No no no. I don't care. We don't need number of lines here."""
#Remove old track lines
for line in self.lines:
self.scene().removeItem(line)
self.lines[:] = []
if self.data.uniqueContainerName.lower() == "master":
normalLines = False
else:
normalLines = True
gapToNextLine = 0
end *= config.DURATION_MOD
#nr_of_lines = (TRACK_SIZE + self.offset) / (TRACK_SIZE/5) #track size is always only for 5 lines.
if self.dualView:
nr_of_lines = 11
else:
nr_of_lines = 5
for x in range(int(nr_of_lines)):
line = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 0, end + 50, 0))
line.setEnabled(False)
self.addToGroup(line)
line.setParentItem(self)
if normalLines:
line.setPen(PEN_LINE)
else:
line.setPen(PEN_LINETWO)
if x == 5: #one special case
line.setOpacity(0)
self.lines.append(line)
line.setPos(0, gapToNextLine)
gapToNextLine += PITCH_MOD
def _removeLyrics(self):
for lyrics in self.lyrics:
self.scene().removeItem(lyrics)
self.lyrics[:] = []
def drawLyrics(self):
memberset = set((GuiChord, GuiSlurOn, GuiSlurOff))
if config.LYRICS: #Lyrics can be switched off
self._removeLyrics()
yStartPosition = self.size/1.5 * self.offsetFactor
backendLyrics = self.data.getLyricsAsList() #Returns a list of list. Each list for one verse.
if backendLyrics:
count = 0
self.cachedVerseCount = 0
#Get all chords and slurs
rawData = [x for x in list(self.leftPart) + list(self.rightPart) if type(x) in memberset]
#Now delete everything that is not a a standalone chord or the beginning of a slurred group
chordsForSyllabes = []
gen = iter(rawData)
group = False #A switch for the loop. Are we in a slur-group?
for x in gen:
ty = type(x)
if ty is GuiSlurOn:
group = True
chordsForSyllabes.append(next(gen))
continue
elif ty is GuiSlurOff:
group = False
continue
if not group:
chordsForSyllabes.append(x)
#chordsForSyllabes is now a list with exactly all chords that get syllabes.
for verse in backendLyrics:
for guiChord, syllabe in zip(chordsForSyllabes, verse):
#zip makes sure that we only iterate as long there are both items. No need for a break condition.
lItem = GuiText(text='', shift = 0, fontScale = 1, pitch = MIDDLE_LINE)
lItem.setHtml("" + syllabe + "
")
self.addToGroup(lItem)
lItem.setParentItem(self)
#lItem.setDefaultTextColor(QtGui.QColor("blue"))
lItem.setPos(guiChord.pos().x(), yStartPosition + count) #just under the track. Since it is above all (zValue) and has background it will be visible but most likely hide notes.
lItem.setZValue(200) #on top.
self.lyrics.append(lItem)
count += FONT_SIZE / 1.5
self.cachedVerseCount += 1
def _storeExtremePitches(self, guiItem, returnlst):
"""When beaming we need to know what is the highest and what
is the lowest pitch in the group to position stems and the beam."""
low = guiItem.cachedMinMax[0]
high = guiItem.cachedMinMax[1]
if low < returnlst[0]:
returnlst[0] = low #lowest note pitch
if high > returnlst[1]:
returnlst[1] = high #highest note pitch
return returnlst
def firstPassRight(self, forceDisplacementUpdatingOtherTracks = False):
"""Update cached GuiItem values.
Displacement information is not gathered.
This means that you cannot add displacement to items
which had non before (changing an existing >0 value is fine).
If you do so you have to add it to track.displacements
in the changing function.
"""
#First get the previous item from the left part. it may need modification if it was the end of a beam group the last time.
try:
previousGuiItem = self.leftPart[-1]
except IndexError:
previousGuiItem = PSEUDO #This will be reset several times. Do not use it for anything else than beaming groups. It really means the last item which was part of a beaming group.
if previousGuiItem.data and previousGuiItem.group == 0 and 0 < previousGuiItem.cachedBaseDuration <= 192:
previousGuiItem.group = 2
positionUntilNow = self.leftPartTicks
indexUntilNow = len(self.leftPart)
currentBeamGroup = []
currentExtremePitches = [float("inf"), -1 * float("inf")] #out of range for any pitch.
if self.rightPart:
startItem = self.rightPart[0]
else:
startItem = PSEUDO
for guiItem in reversed(self.leftPart):
if guiItem.noteheads:
if startItem.cachedBaseDuration == guiItem.cachedBaseDuration and (guiItem.group == 3 or guiItem.group == 1): #We are in a group
self._storeExtremePitches(guiItem, currentExtremePitches)
currentBeamGroup.append(guiItem)
elif startItem.cachedBaseDuration == guiItem.cachedBaseDuration and guiItem.group == 2: #Beginning of a group. We don't need to go further/backwards
self._storeExtremePitches(guiItem, currentExtremePitches)
currentBeamGroup.append(guiItem)
break
elif guiItem.group == 2: #old beginning of a group but the new duration does not match the old. we have a group here where one member got augmented or similar.
guiItem.group = 0
guiItem.updateStandaloneStemAndFlag()
guiItem.lastPassWasGroup = False
break
elif guiItem.group == 1: #old member of a group but the new duration does not match the old. we have a group here where one member got augmented or similar.
guiItem.group = 0
startItem = PSEUDO
guiItem.updateStandaloneStemAndFlag()
guiItem.lastPassWasGroup = False
else: #group = 0 or different duration
break
else: #group = 0 or different duration
break
for i in currentBeamGroup:
i.cachedGroupStemExtremePitches = currentExtremePitches
#Loop right to update cached values
thereWasDisplacement = False
for guiItem in self.rightPart:
guiItem.cachedDuration = guiItem.data.duration
guiItem.cachedBaseDuration = guiItem.data.base
if guiItem.breakTimesigLoop: #it's a timesig!
self.cachedTimeSignatures[guiItem] = (positionUntilNow, len(self.leftPart)) #we can NOT use the backend data directly to make it easier later. backend items are unique, so are dict keys. If it is two times in a track we loose data in our dict.
if not thereWasDisplacement and (guiItem.displacement or guiItem.widthDependentOnDisplacement): #widthDependentOnDisplacement is for intransparent containers that need to change if a disp. item is in the other track.
thereWasDisplacement = positionUntilNow
guiItem.cachedTickIndex = positionUntilNow
guiItem.cachedIndex = indexUntilNow
#prepare stems and beaming groups which will be used in self.updateRight(). Depends on correct timesig information.
#0 means no group. 1=groupMember, 2= groupStart, 3=groupEnd.
metricalPosition = divmod(positionUntilNow / guiItem.cachedTimesigData.denominator, guiItem.cachedTimesigData.nominator)[1] / guiItem.cachedTimesigMod
guiItem.group = 0 #reset group
if guiItem.noteheads and 0 < guiItem.cachedBaseDuration <= 192: #under 8th but not zero and the same value as the last note?
if guiItem.cachedBaseDuration == previousGuiItem.cachedBaseDuration and not metricalPosition % 1 == 0: #metrical main position? Then it is a new group.
guiItem.group = 3 #Each is considered the Group End first. This will change eventually in the next steps when comparing the last with the current one.
if previousGuiItem.noteheads and previousGuiItem.data: #it is a real guiItem with the correct duration, not the pseudo which is any other item.
if previousGuiItem.group == 3: #The last item has the same duration and is marked as an EndGroup. Change it to be a normal groupmember which wanders in the middle.
previousGuiItem.group = 1
elif previousGuiItem.group == 0: #The last item was not the same duration (or wrong metrical pos) as the item before it so it was not given a group. This becomes the group start
previousGuiItem.group = 2
currentBeamGroup.append(previousGuiItem)
self._storeExtremePitches(previousGuiItem, currentExtremePitches)
self._storeExtremePitches(guiItem, currentExtremePitches)
currentBeamGroup.append(guiItem)
else: #not a group member but still a duration which could become a group. That is why here are two different "else". One for the duration, one if it is the same duration as the last item.
for i in currentBeamGroup:
i.cachedGroupStemExtremePitches = currentExtremePitches
currentBeamGroup = []
currentExtremePitches = [float("inf"), -1 * float("inf")] #out of range for any pitch.
previousGuiItem = guiItem
else: #wrong duration or tpye
previousGuiItem = PSEUDO
#This else: marks the end of a group or no group at all. We can now iterrate over currentBeamGroup if it is not empty.
#Find out the stem and beam configuration for this group and cache it so that updateRight can instruct them to draw later.
for i in currentBeamGroup:
i.cachedGroupStemExtremePitches = currentExtremePitches
currentBeamGroup = []
currentExtremePitches = [float("inf"), -1 * float("inf")] #out of range for any pitch.
positionUntilNow += guiItem.cachedDuration
indexUntilNow += 1
#the loop is over. The parameter of the last group were not set yet. Take the last set values for that, which is the last group.
for guiItem in currentBeamGroup:
guiItem.cachedGroupStemExtremePitches = currentExtremePitches
self.cachedTimeSignatures[ENDMARKER_TIMESIG] = (positionUntilNow +1, len(self.leftPart) + 1) #it has this format because drawing barlines needs this as delimiter timesig. The DEFAULT_TIMESIG is just random, just use the latest item. It is not used. We just need the same data structure. + 1 because it is always after appending. + 1 cannot trigger one barline too much. This is just for drawing the gui, so it is safe anyway.
#If we had displacement we need to update all other tracks from the first tick position of a changed displacement item. This is done by updateRight or whatever called this function.
if forceDisplacementUpdatingOtherTracks or thereWasDisplacement: #either false or the tickindex of the first displaced item.
self.workspace.buildDisplacementMap()
return thereWasDisplacement
def updateRightFromTickindexOnlyNewDisplacement(self, tickIndex):
"""This is a light variant of updateRight.
It's only purpose is to reposition the items.
No beaming, no recalulation, no firstPassRight."""
self.goToTickIndex(tickIndex)
positionUntilNow = self.leftPartTicks
tempDisplacement = 0 #for encountering displaced items in a row. The global dictionary only stores the sum of all displacements for one tickindex and not how they are divided in a track.
for z in reversed(self.leftPart): #First look left: Check if we are in displacement group. If yes add to tempDisplacement so we start on the correct position updating right for the current item first item.
if z.displacement:
tempDisplacement += z.displacement
else:
break
#Set new X positions for each item from here on until the End of the Track.
for x in self.rightPart:
if x.displacement:
x.setX((positionUntilNow + tempDisplacement + self.workspace.getDisplacement(positionUntilNow, includeSelf = False)) * config.DURATION_MOD)
tempDisplacement += x.displacement
else:
x.setX((positionUntilNow + self.workspace.getDisplacement(positionUntilNow, includeSelf = True)) * config.DURATION_MOD)
tempDisplacement = 0
positionUntilNow += x.cachedDuration
wholeLength = positionUntilNow + self.workspace.getDisplacement(positionUntilNow, includeSelf = True) + 50 # * config.DURATION_MOD #the last is a cosmetic addition.
self.drawLines(wholeLength)
self.cachedTrackWidth = wholeLength
self.updateBarlines()
self.drawLyrics() #most of the time this will be deactivated.
def updateRight(self, forceDisplacementUpdatingOtherTracks = False):
"""Recalculate all item positions right of the current position.
Does not touch the items except for beaming, stems and container
width modifications."""
updateAllOther = self.firstPassRight(forceDisplacementUpdatingOtherTracks) #If we had displacement we need to update all other tracks from the first tick position of a changed displacement item, which is returned by firstPassRight. At the end of this updateRight we tell all other staves to reposition themselves.
positionUntilNow = self.leftPartTicks
#Before updating right find out in which beaming group we are and if there is displacement going on.
tempDisplacement = 0 #for encountering displaced items in a row. The global dictionary only stores the sum of all displacements for one tickindex and not how they are divided in a track.
for z in reversed(self.leftPart): #First look left: Check if we are in displacement group. If yes add to tempDisplacement so we start on the correct position updating right for the current item first item.
if z.displacement:
tempDisplacement += z.displacement
else:
break
for y in reversed(self.leftPart):
if y.noteheads and y.lastPassWasGroup and (not y.group == 3) and (not self.rightPart[0].cachedBaseDuration == y.cachedBaseDuration) and not self.rightPart[0].group: #the item before that changed from beeing in a group to no group. Redraw the stem/flag to be a standalone chord
y.updateStandaloneStemAndFlag()
y.lastPassWasGroup = False
break
elif y.group == 3: #We are at a group end
y.lastPassWasGroup = True
break
elif y.group == 1: #We are in a group
y.updateGroupStemAndFlag()
y.lastPassWasGroup = True
elif y.group == 2: #Beginning of a group. We don't need to go further/backwards
y.updateGroupStemAndFlag()
y.lastPassWasGroup = True
break
else: #group = 0 or different duration
break
#Set new X positions for each item from here on until the End of the Track.
for x in self.rightPart:
if x.displacement:
x.setX((positionUntilNow + tempDisplacement + self.workspace.getDisplacement(positionUntilNow, includeSelf = False)) * config.DURATION_MOD)
tempDisplacement += x.displacement
else:
x.setX((positionUntilNow + self.workspace.getDisplacement(positionUntilNow, includeSelf = True)) * config.DURATION_MOD)
tempDisplacement = 0
#beaming and stems #0 means no group. 1=groupMember, 2= groupStart, 3=groupEnd.
if x.group: #it is part of a group. Draw accordingly
x.updateGroupStemAndFlag()
x.lastPassWasGroup = True
elif x.noteheads and x.lastPassWasGroup and (not x.group): #the item changed from beeing in a group to no group. Redraw the stem/flag to be a standalone chord
x.updateStandaloneStemAndFlag()
x.lastPassWasGroup = False
else: #not a group at all.
x.lastPassWasGroup = False
x.updateForIteration()
positionUntilNow += x.cachedDuration
if forceDisplacementUpdatingOtherTracks or updateAllOther:
tmp = self.workspace.tracks[:]
tmp.remove(self)
for tr in tmp:
#TODO: updateRightFromTickindexOnlyNewDisplacement is more performant (unmeasured, so it is a guess). But is inaccurate because it does not get the correct starting point when inserting new items in a track so that the discplament items moves to the right.
#tr.updateRightFromTickindexOnlyNewDisplacement(updateAllOther)
tr.updateRightFromTickindexOnlyNewDisplacement(0)
wholeLength = positionUntilNow + self.workspace.getDisplacement(positionUntilNow, includeSelf = True)
self.drawLines(end = wholeLength)
self.updateBarlines()
self.drawLyrics() #most of the time this will be deactivated.
#Send updated values to get the correct sceneRect. We don't know all track widths from here. So we call the parent score method to reset it all:
self.cachedTrackWidth = wholeLength
self.workspace.sendMaxTrackWidthToMain() #TODO: this can be optimized by placing this function not here but after all queued actions are done. If you insert 10 items with copy and paste we have 10 screen rects updates. However: If the system is intelligent it will not call updateRight 10 times then. So updating the sceneRect might be the smallest problem when it comes to this.
def deleteBarlines(self):
"""This is its own function becauses toggleBarlines
can just switch them off without redrawing"""
for line in self.barlines:
self.scene().removeItem(line)
self.barlines = []
def updateBarlines(self):
"""
The strategy is to make use of a list of timesigs and their
tickpositions.
We can then draw all barlines on their position without crawling
through the track objects.
Update barlines redraws all barlines. It cannot redraw from
the current position because we do not store the tickindexes of
barlines. Anyway, this would result in for loops with if and
tick score, which is also slow. For performance it is
better to just draw all of them.
"""
if config.BARLINES: #Barlines can be switched off.
self.deleteBarlines()
#The cachedTimesigs stored their beginning, but not their ending. We skip the first round and then use lastRoundTimesig and not the current one. The current one indicates the end timesig.
#timesiglist = sorted([(v,k.data) for k,v in self.cachedTimeSignatures.items()]) #create a list which is sorted after their tickindex which is [n][0]. [n][1] is the backend timesignature
#timesiglist = sorted([(v[0],v[1], k.data) for k,v in self.cachedTimeSignatures.items()], key=lambda x: x[0]) #create a list which is sorted after their tickindex which is [n][0]. [n][1] is the backend timesignature . v[0] is the tickPositon v[1] the index as item count
#timesiglist = sorted((v[0],v[1], k.data) for k,v in self.cachedTimeSignatures.items()) #create a list which is sorted after their tickindex which is [n][0]. [n][1] is the backend timesignature . v[0] is the tickPositon v[1] the index as item count
#The version above, without key=, can't handle two timesigs in a row. Probably I should filter them out first?
#TODO: but we had that version already. Why was that commented out and replaced without a non-key version?
timesiglist = sorted(((v[0],v[1], k.data) for k,v in self.cachedTimeSignatures.items()), key=lambda x: x[0]) #create a list which is sorted after their tickindex which is [n][0]. [n][1] is the backend timesignature . v[0] is the tickPositon v[1] the index as item count
#IF SOMETHING IS WRONG WITH THE BARLINES PRINT OUT THE TIMESIGLIST!
lastRoundTimesig = timesiglist[0][2]
ticksAlreadyProcessed = 0
modFactor = 2.2 if self.dualView else 1 #for 11 lines.
for tickIndex, index, timesig in timesiglist[1:]:
completeMeasureTick = lastRoundTimesig.nominator * lastRoundTimesig.denominator
currentChunk = tickIndex - ticksAlreadyProcessed
#print ("currentChunk", currentChunk)#, "tickIndex", tickIndex, "completeMeasureTick", completeMeasureTick, "ticksAlreadyProcessed", ticksAlreadyProcessed)
nrOfMeasures = currentChunk / completeMeasureTick #this gets the number of barlines/measure for the current chunk. In a common piece this could be the only chunk. One track 4/4.
#print ("nrOfMeasures", nrOfMeasures, int(nrOfMeasures, ))
#For each timesignature we have a chunk now which can be looped over
for measure in range(int(nrOfMeasures)):
#graphical creation
line = QtGui.QGraphicsLineItem(QtCore.QLineF(0, (TRACK_SIZE * modFactor)/2 -10 , 0, 0 )) #-10 is cosmetic
line.setPen(PEN_BARLINE)
line.setEnabled(False) #Don't react to the mouse.
line.setParentItem(self)
self.addToGroup(line) #part of the track. The barlines gets its Y-root from here.
#parent and storing
self.barlines.append(line)
#position
#measure +1 is not the absolute measure but the order in the current chunk
linePos = (ticksAlreadyProcessed + (measure + 1) * completeMeasureTick + self.workspace.getDisplacement((measure +1) * completeMeasureTick + ticksAlreadyProcessed, includeSelf = True)) * config.DURATION_MOD +1 #+1 is cosmetic
line.setPos(linePos, 0)
#Measure numbers are attached to barlines as child items.
guiNum = GuiText(text = str(measure+2))
guiNum.setParentItem(line)
guiNum.setPos(-6, -20)
ticksAlreadyProcessed += currentChunk
lastRoundTimesig = timesig
def firstPassRightFromTickindex(self, tickindex):
"""First pass is to correct cached ticks so that
_left and _right and updateRight work correctly after the
backend changed durations/ticks not on the cursor position.
We cannot use _left and _right here because they would
work on the wrong values.
But everything is correct until the first modified item.
Which is the tickindex parameter. We don't need any update
until then. """ #TODO: If it turns out that this is the performance bottle neck go to to 0/reset, then goToTickIndex(tickindex) and firstPass from there. But this might be even slower because it uses many ifs in goToTickIndex.
oldindex = self.getIndex()
self.reset() #this uses go to index 0, not tickindex!
self.firstPassRight()
self.goToIndex(oldindex)
def updateRightFromTickindex(self, tickindex, forceDisplacementUpdatingOtherTracks = False):
"""Reposition all items right of tickindex.
All cached durations must be correct"""
oldindex = self.getIndex()
self.goToTickIndex(tickindex)
self.updateRight(forceDisplacementUpdatingOtherTracks)
self.goToIndex(oldindex)
def updateRightFromIndex(self, flatIndex, forceDisplacementUpdatingOtherTracks = False):
oldindex = self.getIndex()
self.goToIndex(flatIndex)
self.updateRight(forceDisplacementUpdatingOtherTracks)
self.goToIndex(oldindex)
def updateRightFromStart(self, forceDisplacementUpdatingOtherTracks = False):
oldindex = self.getIndex()
self.reset()
self.updateRight(forceDisplacementUpdatingOtherTracks)
self.goToIndex(oldindex)
def signatureReset(self):
"""From the beginning to the end update all cached signatures
and clefs.
This is essentially for load file. If you want to use it
anywhere else you are creating a critical performance problem.
This depends on having the backend cursor in the right track,
which is the case in score.load() (Reminder: The only place
where it matters)
No cursor needs to be set here, eventhough load is at the
beginning anyway."""
#All backend data
backendStatus = api._getActiveCursor()
#self.prevailingTimeSignature = [TimeSignature(4, 384)] # A stack to hold tuplets of (Tickindex, TimeSig) pairs. Default 4/4, as Lilypond dictates. The default one never gets deleted if every stack modification is done by the cursor.
#self.prevailingKeySignature = [KeySignature(20, [(3,0), (0,0), (4,0), (1,0), (5,0), (2,0), (6,0)])] #C Major by default, as Lilypond dictates. The first one never gets deleted if every stack modification is done by the cursor.
#self.prevailingTempoSignature = [TempoSignature(120, 384)] #A stack to hold the tempo and relative to what duration. Defaults to 120 quarter notes per minute. The other stacks above for more info. #TODO: Technically it's possible to have different tempos in different tracks. Thats not how time works.
#self.prevailingPerformanceSignature = [workspace.defaultPerformanceSignature] # A stack to hold performance data. How loud is "Forte" at the moment? How short a staccato note?
#self.prevailingDynamicSignature = [DynamicSignature("mf")] #A stack to hold the currently valid dynamic. Which is itself just a reference to the currenctly valid PerformanceSignature
#self.prevailingClef = [Clef("treble", "")] #For convenience. Has no usage in the backend, only in importers or other api based programs.
timesigData = backendStatus.prevailingTimeSignature[0]
keysigData = backendStatus.prevailingKeySignature[0]
clefPitch = dictionaries.clefs[backendStatus.prevailingClef[0].clefString + backendStatus.prevailingClef[0].octave][1]
for x in self.leftPart:
if x.breakClefLoop: #a clef. no typeChecking
clefPitch = x.pitch
continue
elif x.breakKeysigLoop: #a keysig. no typeChecking
keysigData = x.data
continue
elif x.breakTimesigLoop: #a timesig. no typeChecking
timesigData = x.data
continue
x.cachedTimesigData = timesigData
if x.cachedTimesigData.denominator <= 192: #for example 3/8
x.cachedTimesigMod = x.cachedTimesigData.nominator / 2
else:
x.cachedTimesigMod = 1
x.cachedKeysigData = keysigData
x.cachedClefPitch = clefPitch
x.updateDynamic()
for x in self.rightPart:
if x.breakClefLoop: #a clef. no typeChecking
clefPitch = x.pitch
continue
elif x.breakKeysigLoop: #a keysig. no typeChecking
keysigData = x.data
continue
elif x.breakTimesigLoop: #a timesig. no typeChecking
timesigData = x.data
continue
x.cachedTimesigData = timesigData
if x.cachedTimesigData.denominator <= 192: #for example 3/8
x.cachedTimesigMod = x.cachedTimesigData.nominator / 2
else:
x.cachedTimesigMod = 1
x.cachedKeysigData = keysigData
x.cachedClefPitch = clefPitch
x.updateDynamic()
def clefUpdate(self, clefPitch):
"""Update clef pitches to the next clef
Just set all items to the clef pitch. We don't need to
check if it is a chord or not, it doesn't matter and makes
the program slower"""
for x in self.rightPart:
if x.breakClefLoop: #a clef. no typeChecking
break
x.cachedClefPitch = clefPitch
x.updateDynamic() #only things that move with the pitches up and down
self.cachedClefPitch = clefPitch #The pitch cursors needs this
def keysigUpdate(self, keysigData):
"""Update chord cache keysigs with a new backend-keysig.
Same principle as track.clefUpdate()"""
for x in self.rightPart:
if x.breakKeysigLoop: #a keysig. no typeChecking
break
x.cachedKeysigData = keysigData
x.updateDynamic() #only things that move with the pitches up and down
def timesigUpdate(self, timesigData):
"""Update item cache with a new backend-timesig.
Same principle as track.clefUpdate()"""
for x in self.rightPart:
if x.breakTimesigLoop: #a timesig. no typeChecking
return 1
x.cachedTimesigData = timesigData
if x.cachedTimesigData.denominator <= 192: #for example 3/8
x.cachedTimesigMod = x.cachedTimesigData.nominator / 2
else:
x.cachedTimesigMod = 1
#we do not need to do any other updates here. timesigUpdate is called by insert or delete (a timesig) which is always followed by updateRight. We have anything we need in there.
def delete(self, backendItem):
"""Update right is done by the signal-wrapper.
This way delete selection and in containers
does not trigger an update right every time.
Same is true for buildDisplacementMap"""
if self.rightPart:
guiItem = self.rightPart.popleft()
#This is too strict: guiItem.data is different for upbeat and and multiMeasureRest
#if not guiItem.data is backendItem:
# raise ValueError("GuiItem to delete does not match given backendItem")
if guiItem.displacement: #also delete from the dict
self.displacements.remove(guiItem)
#self.workspace.buildDisplacementMap() #don't do that now. let the signal/wrapper do it.
guiItem.scene().removeItem(guiItem)
if guiItem.breakClefLoop: #Trigger a re-cleffing if the deleted item was a clef.
nowClef = api._getClef()
self.clefUpdate(dictionaries.clefs[nowClef.clefString + nowClef.octave][1])
elif guiItem.breakKeysigLoop: #Trigger re-accidentals if deleted item was a keysig.
self.keysigUpdate(api._getKeysig())
elif guiItem.breakTimesigLoop: #Trigger re-timesig if deleted item was a time sig
del self.cachedTimeSignatures[guiItem]
self.timesigUpdate(api._getTimesig())
#Remove from global dict. This handles deleting of links and containers.
self.workspace.allItems[backendItem].remove(guiItem)
if not self.workspace.allItems[backendItem]: #if this was the last item for this backendItem, delete the whole dict entry
del self.workspace.allItems[backendItem]
return guiItem
else: #Nothing to delete
return False
def deleteContainerInstance(self, backendContainer):
"""Delete the instance of the most inner container.
For the backend this is just one delete. For a gui it may
be splitted in single guiItem deletes.
When receiving this signal the backend-container is already
gone. The strategy is going left until we find the next
GuiContainerStart and delete everything until and including
the matching GuiContainerEnd, deleting any nested container
in the process.
We cannot move anything in the backend during the deletion.
"""
#First find the next container start
containerBackendStartItem = backendContainer[0]
while True:
currentItem = self.getCurrentItem()
if currentItem.breakContainerLoop and currentItem.data == containerBackendStartItem:
break
self._left()
#print ("\nBefore deleting. Left:", self.leftPart, "right:", self.rightPart)
#Now we can delete which conveniently gives us the next item automatically
containerStack = [] #delete over nested containers
#Begin by deleting the first ContainerStart outside the loop so the containerStack does not catch it.
self.delete(self.getCurrentItem().data)
while True:
cur = self.getCurrentItem()
typ = type(cur)
if typ is GuiMultiMeasureRest or typ is GuiUpbeat: #some GuiItems don't work with the backendData but are synced manually. Multimeasure Rests and Upbeats.
lastDeletedItem = self.delete(cur.dataOrg)
else:
lastDeletedItem = self.delete(cur.data)
if (not containerStack) and lastDeletedItem.breakContainerLoop is None: #not false.
break #everything including the correct ContainerEnd was deleted.
elif lastDeletedItem.breakContainerLoop: #Nested ContainerStart
containerStack.append(True)
elif lastDeletedItem.breakContainerLoop is None: #Nested container End
containerStack.pop()
#The cursor will be corrected outside of this function.
def _right(self):
"""Cut the first item of the right part and insert it as last
item of the left part.
Save various kind of data when this happens."""
try:
cutItem = self.rightPart.popleft()
self.leftPartTicks += cutItem.cachedDuration
self.leftPart.append(cutItem)
if cutItem.displacement :
self.cursorTempDisplacement[-1].append(cutItem.displacement)
else:
if not self.cursorTempDisplacement[-1] == []:
self.cursorTempDisplacement.append([])
return cutItem
except:
return False #End of Track
def _left(self):
"""Cut the last item of the left part and insert it as first
item of the right part"""
cutItem = self.leftPart.pop()
if cutItem.displacement:
if self.cursorTempDisplacement[-1] == []: #The end/last member of a displacement-group was detected.
self.cursorTempDisplacement.pop() #get rid of the empty group to enter the displacement group
try:
self.cursorTempDisplacement[-1].pop()
except:
pass
self.leftPartTicks -= cutItem.cachedDuration
self.rightPart.appendleft(cutItem)
if self.leftPart: #after stepping left check if there is an item left.
return cutItem
else:
#self.leftPartTicks = 0
self.cursorTempDisplacement = [[]]
return False #Beginning of Track
laborejo-0.8~ds0.orig/laborejoqt/modalcommands.py 0000664 0001750 0001750 00000006144 12154405225 022577 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
import laborejocore as api
class Commands(object):
"""Change _key_x, not the function:
Qt shortcuts do not hold a reference to a function but it copies
the function content. So we need an additional step in between which
can be re-defined. Putting the api. methods directly into
key_one(self) will work but is unchangable.
That is because we bind the functions in here to an action and do
not create the shortcut directly.
Other modal systems, like the numpad, use actions themselves
and disconnect/reconnect each time the palette changes
"""
def __init__(self):
self.defaults()
#Add rebindable layer functions
self.keys = dict((number, lambda number=number: self._keys[number]()) for number, function in self._keys.items())
self.shifts = dict((number, lambda number=number: self._shifts[number]()) for number, function in self._shifts.items())
self.alts = dict((number, lambda number=number: self._alts[number]()) for number, function in self._alts.items())
self.altShifts = dict((number, lambda number=number: self._altShifts[number]()) for number, function in self._altShifts.items())
def defaults(self):
self._keys = {
0 : api.nothing,
1 : api.insert1,
2 : api.insert2,
3 : api.insert4,
4 : api.insert8,
5 : api.insert16,
6 : api.insert32,
7 : api.insertBreve,
8 : api.insertLonga,
9 : api.nothing,
}
self._shifts = {
0 : api.nothing,
1 : api.insertRest1,
2 : api.insertRest2,
3 : api.insertRest4,
4 : api.insertRest8,
5 : api.insertRest16,
6 : api.insertRest32,
7 : api.insertRestBreve,
8 : api.insertRestLonga,
9 : api.nothing,
}
#Do not use the alts. Used by normal commands.
self._alts = {
0 : api.nothing,
1 : api.prevailing1,
2 : api.prevailing2,
3 : api.prevailing4,
4 : api.prevailing8,
5 : api.prevailing16,
6 : api.prevailing32,
7 : api.prevailingBreve,
8 : api.prevailingLonga,
9 : api.nothing,
}
self._altShifts = {
0 : api.nothing,
1 : api.insertSkip1,
2 : api.insertSkip2,
3 : api.insertSkip4,
4 : api.insertSkip8,
5 : api.insertSkip16,
6 : api.insertSkip32,
7 : api.insertSkipBreve,
8 : api.insertSkipLonga,
9 : api.nothing,
}
def prevailing(self):
self._keys = {
0 : api.nothing,
1 : api.prevailing1,
2 : api.prevailing2,
3 : api.prevailing4,
4 : api.prevailing8,
5 : api.prevailing16,
6 : api.prevailing32,
7 : api.prevailingBreve,
8 : api.prevailingLonga,
9 : api.nothing,
}
commands = Commands()
laborejo-0.8~ds0.orig/laborejoqt/items.py 0000664 0001750 0001750 00000213442 12154405225 021103 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
from PyQt4 import QtCore, QtGui
from operator import attrgetter #for sorting, max, min with a key.
import math, re
from hashlib import md5
import laborejocore as api
from laborejoqt import config
from laborejoqt import dictionaries
from laborejoqt.constants import *
def stringToColor(st):
"""Convert a string to QColor. Same string, same color
Is used for group coloring"""
if st:
c = md5(st.encode()).hexdigest()
return QtGui.QColor(int(c[0:9],16) % 255, int(c[10:19],16) % 255, int(c[20:29],16)% 255, 255)
else:
return QtGui.QColor(255,255,255,255) #Return White
class GuiGlyph(QtGui.QGraphicsTextItem):
"""A non-standalone glyph to use in GuiItem"""
def __init__(self, text='\u25C8', shift = MUSIC_SCALE_CORRECTION, fontScale = 1, pitch = MIDDLE_LINE):
super(GuiGlyph, self).__init__(text)
self.pitch = pitch
self.font = fontDB.font(MUSIC_FONT_STRING, "", FONT_SIZE * fontScale)
self.font.setPixelSize(FONT_SIZE * fontScale * 1.33) #It is very important to set the pixel size before setting the font to self
self.setFont(self.font)
self.shift = shift #Shift up and down for misaligned glyphs in a font like uft8 noteheads.
self.setDefaultTextColor(QtGui.QColor("black"))
self.setOpacity(1)
class GuiText(QtGui.QGraphicsTextItem):
"""A non-standalone glyph to use in GuiItem"""
def __init__(self, text='x', shift = 0, fontScale = 1, pitch = MIDDLE_LINE):
super(GuiText, self).__init__(text)
self.pitch = pitch
self.font = fontDB.font(TEXT_FONT_STRING, "", FONT_SIZE / 2 * fontScale)
self.font.setPixelSize(FONT_SIZE / 2 * fontScale) #It is very important to set the pixel size before setting the font to self
self.setFont(self.font)
self.shift = TEXT_SCALE_CORRECTION #Shift up and down for misaligned glyphs in a font like uft8 noteheads.
self.setDefaultTextColor(QtGui.QColor("black"))
self.setOpacity(1)
class GuiNote(QtGui.QGraphicsTextItem):
"""A single graphical note to use in GuiItem.
Does not have update, only init.
Every notehead change is delete/recreate """
def __init__(self, backendNote, chordParent):
super(GuiNote, self).__init__(dictionaries.dur2notehead[chordParent.cachedBaseDuration])
self.font = fontDB.font(MUSIC_FONT_STRING, "", FONT_SIZE * 1.5)
self.font.setPixelSize(FONT_SIZE * 2) #It is very important to set the pixel size before setting the font to self
self.setFont(self.font)
self.data = backendNote
self.shift = MUSIC_SCALE_CORRECTION
self.translate(-3, -1)
self.durationFactor = chordParent.data.durationFactor
if self.durationFactor > 1: #to the right
self.rectD = QtGui.QGraphicsRectItem(0, 0, 15*self.durationFactor -10, 3)
self.rectD.setParentItem(self)
self.rectD.setPos(20,63) #coming out of the notehead
self.rectD.setBrush(QtGui.QColor("red"))
elif self.durationFactor < 1:
self.rectD = QtGui.QGraphicsRectItem(0, 0, -15*(2-self.durationFactor) +10 , 3) #backwards. Factor cannot go below 0.1.
self.rectD.setParentItem(self)
self.rectD.setPos(10,63) #coming out of the notehead
self.rectD.setBrush(QtGui.QColor("red"))
self.velocityFactor = chordParent.data.velocityFactor
if self.velocityFactor > 1: #to the right
self.rectV = QtGui.QGraphicsRectItem(0, 0, 15*self.velocityFactor -10, 3)
self.rectV.setParentItem(self)
self.rectV.setPos(20,66) #coming out of the notehead
self.rectV.setBrush(QtGui.QColor("yellow"))
elif self.velocityFactor < 1:
self.rectV = QtGui.QGraphicsRectItem(0, 0, -15*(2-self.velocityFactor) +10 , 3) #backwards. Factor cannot go below 0.1.
self.rectV.setParentItem(self)
self.rectV.setPos(10,66) #coming out of the notehead
self.rectV.setBrush(QtGui.QColor("yellow"))
self.setDefaultTextColor(QtGui.QColor("black"))
self.setOpacity(1)
self.chord = chordParent #What chord am I in?
self.dots = None
self.usedAccidental = None
self.cachedPitch = self.data.pitch
self.finger = None
self.righthandfinger = None
self.stringnumber = None
self.tie = None
self.accidental()
self.fingering()
self.rightHandFingering()
self.stringNumber()
self.tieF()
def fingering(self):
"""Update finger, right hand and string number for this note"""
if self.data.finger:
if not self.finger: #the first time.
self.finger = GuiText(self.data.finger)
else:
self.finger.setPlainText(self.data.finger)
self.finger.setParentItem(self)
self.finger.setPos(20,50) #position right of the notehead. May collide with the notes right of it, but who cares...
self.finger.setDefaultTextColor(QtGui.QColor("green"))
self.finger.setZValue(7)
def rightHandFingering(self):
if "RightHandFinger" in self.data.directivePst:
glyph = self.data.directivePst["RightHandFinger"].split("#")[-1]
if not self.righthandfinger: #the first time.
self.righthandfinger = GuiText(glyph, fontScale = 1)
else:
self.righthandfinger.setPlainText(glyph)
self.righthandfinger.setParentItem(self)
self.righthandfinger.setDefaultTextColor(QtGui.QColor("red"))
self.righthandfinger.setPos(0,TRACK_SIZE / 2)
def stringNumber(self):
if "StringNumber" in self.data.directivePst:
glyph = int(self.data.directivePst["StringNumber"].split("\\")[-1]) + 0x2460 - 1 #2460 in hex cicled 1 in unicode
glyph = chr(glyph)
if not self.stringnumber: #the first time.
self.stringnumber = GuiText(glyph, fontScale = 1)
else:
self.stringnumber.setPlainText(glyph)
self.stringnumber.setParentItem(self)
self.stringnumber.setDefaultTextColor(QtGui.QColor("red"))
self.stringnumber.setPos(0,TRACK_SIZE / 2)
def tieF(self):
if self.data.tie:
if not self.tie: #the first time.
self.tie = GuiText("~")
else:
self.tie.setPlainText("~")
self.tie.setParentItem(self)
self.tie.setScale(2)
self.tie.setPos(20,40) #position right of the notehead. May collide with the notes right of it, but who cares...
#self.tie.setDefaultTextColor(QtGui.QColor("black"))
self.tie.setZValue(7)
def accidental(self):
"""The accidentals are style independet or "Twelve-Tonal".
If the note is in the keysig it has no accidental.
If it is not in the keysig it gets an absolute accidental,
even if it already was in the same measure."""
scaleStat = self.data.scaleStatus(self.chord.cachedKeysigData)
#Scalesat:
#[0] = Pitchstatus. Difference to White, independent of keysig
#[1] = Difference to keysig. feses in G-Major is -30
#[2] = Keysig version. Complementary to [0], shows always the same number no matter which accidental
if scaleStat[1] == 0: #no difference to keysig
accidentalString = ""
elif scaleStat[1] + scaleStat[2] == 0:
accidentalString = "\u266E"
else:
diff = scaleStat[0]
accidentalString = dictionaries.keysigDiff2accidental[diff]
extraString = ""
if "accidental" in self.data.directivePst:
if self.data.directivePst["accidental"] == "!":
extraString = "\uFE57" #this is a unicode small exclamation mark ﹗
elif self.data.directivePst["accidental"] == "?":
extraString = "\uFE56" #this is a unicode small question mark ﹖
else:
warnings.warning("Unrecognized accidental tag/string:", self.data.directivePst["accidental"])
minusSpace = 8
if accidentalString: #Only if this needs an accidental.
self.usedAccidental = GuiGlyph(accidentalString, fontScale = 1.2)
self.usedAccidental.setParentItem(self)
self.usedAccidental.setPos(-8, 12)
minusSpace = 0
if extraString:
self.extraAccidental = GuiGlyph(extraString, fontScale = 0.7)
self.extraAccidental.setDefaultTextColor(QtGui.QColor("darkred"))
self.extraAccidental.setParentItem(self)
self.extraAccidental.setPos(-20 + minusSpace, 37)
class GuiItem(QtGui.QGraphicsItemGroup):
#class GuiItem(QtGui.QGraphicsItem):
#http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsitemgroup.html#details
"""Base item group. Can hold several glyphs."""
def __init__(self, backendItem, displacement = 0, mainGlyph = None, mainGlyphShift = 0, fontScale = 1, forceSigs = None, parentTrack = None): #forceSigs is important for non-cursor input like Container
super(GuiItem, self).__init__()
self.breakClefLoop = False #instead of typesetting this is a break marker when track.clefUpdate() runs.
self.breakKeysigLoop = False #instead of typesetting this is a break marker when track.keysigUpdate() runs.
self.breakTimesigLoop = False #instead of typesetting this is a break marker when track.timesigUpdate() runs. Additionaly this is used by timesig index generation in firstPass
self.breakContainerLoop = False #instead of typesetting this is an indicator.
self.displacement = displacement
self.data = self.dataOrg = backendItem
self.noteheads = [] #prevent typechecking.
#self.setHandlesChildEvents(False) #A mouseclick will select the whole Group, not a child.
self.setFlag(QtGui.QGraphicsItem.ItemIsSelectable)
#self.mouseReleaseEvent = #Override pyqt command
self.mainGlyphObject = None
if mainGlyph:
mainGlyphItem = GuiGlyph(text = mainGlyph, pitch = MIDDLE_LINE, fontScale = fontScale)
mainGlyphItem.setPos(0, -15 + mainGlyphShift)
self.addToGroup(mainGlyphItem)
self.mainGlyphObject = mainGlyphItem
self.setZValue(5) #just setting the z value of the children if needed does not work.
self.cachedDuration = backendItem.duration # later it is self.data.duration
self.cachedBaseDuration = backendItem.base
self.cachedTickIndex = 0 #Last known tickindex. This is not an init parameter because the tickindex is best known by track.insert. So it is set in insert, when the GuiItem was already created. And it is technically correct because on creation it has no position in a track and so it has no tickindex.
if forceSigs: # [track, clefPitch, backendKeysig, backendTimesig]
self.track = forceSigs[0]
self.cachedClefPitch = forceSigs[1]
self.cachedKeysigData = forceSigs[2]
self.cachedTimesigData = forceSigs[3]
else: #insert on the cursor position. Safely use the backend data and wait for track.insert() to set the rest.
self.track = parentTrack #I am in that track. This is always unique. Even cut and paste in the backend is a delete and insert new in Laborejo. But it only valid from track.insert on because on creation it has no position in a track. So it is set in track.insert
nowClef = api._getClef() #only for init. On item creation/insert.
self.cachedClefPitch = dictionaries.clefs[nowClef.clefString + nowClef.octave][1] #Only for GuiChord. But prevents typechecking on update. Just save the number value. Will be much faster than accessing an instance var each time. Will also be much faster when updating a whole track if a clef is changed in front. It just needs to get the number once and then save it in any GuiChord item.
self.cachedKeysigData = api._getKeysig() #A Backend keysig.
self.cachedTimesigData = api._getTimesig() #A Backend timesig
self.cachedMinMax = None #Is updated in self.update() Highest and lowest note pitch. Changes only in self.update()
if self.cachedTimesigData.denominator <= 192: #for example 3/8
self.cachedTimesigMod = self.cachedTimesigData.nominator / 2
else:
self.cachedTimesigMod = 1
self.cachedGroupStemExtremePitches = [] #This is the flag if this is a beamgroup member. obviously only for GuiChord. Has the lowest[0] and highest[1] pitch of that group.
self.group = 0 #Part of a beaming group? Only for chords, but it will be tested for all items while drawing. #0 means no. 1=groupMember, 2= groupStart, 3=groupEnd.
self.lastPassWasGroup = False #addition to self.group. Indicates if the stem/flag needs updating at all. if group and lastPassWasGroup are both false there is not even the need to delete and redraw the stem.
self.widthDependentOnDisplacement = False #widthDependentOnDisplacement is for intransparent containers that need to change if a disp. item is in the other track.
self.hiddenCrossed = None #A line marker to indicate that this item is hidden
#Extensions are child items.
#DynamicDynamic extensions need updating when the pitch/clef changes.
#Static extensions only need updating when they change. Very performant. That means they may collide but who cares, my duty ends here.
self.tuplets = [] #static
self.chordGlyph = None #static
self.channelGlyph = None #static
self.programGlyph = None #static
self.triggerGlyph = None # static
self.guiDirectivesPst = [] #static
self.figuresGlyph = None #static
self.tremoloGlyph = None #static (see GuiItem)
self.substitutionGlyph = None #static (see GuiItem)
self.aboveStatics = []
self.belowStatics = []
if not type(self) is GuiChord:
self.extensions() #on load create all the stuff. This is partly redundant with chord.update()
self.updateVisibility()
def updateVisibility(self):
"""The backend can be normal, hidden or transparent"""
if self.data.hidden:
if self.hiddenCrossed:
self.scene().removeItem(self.hiddenCrossed)
self.scene().removeItem(self.hiddenCrossed2)
self.hiddenCrossed = None
self.hiddenCrossed2 = None
line = QtGui.QGraphicsLineItem(QtCore.QLineF(0, TRACK_SIZE/2.1, 0, 0 ))
line2 = QtGui.QGraphicsLineItem(QtCore.QLineF(0, TRACK_SIZE/2.1, 0, 0 ))
line.setParentItem(self)
line2.setParentItem(self)
line.rotate(-20)
line.setPos(3, -3)
line.setPen(PEN_LINEFORBIDDEN)
line2.rotate(20)
line2.setPos(23, 5)
line2.setPen(PEN_LINEFORBIDDEN)
self.hiddenCrossed = line
self.hiddenCrossed2 = line2
else:
if self.hiddenCrossed:
self.scene().removeItem(self.hiddenCrossed)
self.scene().removeItem(self.hiddenCrossed2)
self.hiddenCrossed = None
self.hiddenCrossed2 = None
if self.data.transparent:
self.setOpacity(0.5)
else:
self.setOpacity(1)
def verticalLine(self):
line_vertical = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 30, 0, 0))
line_vertical.setPen(PEN_POSITION)
line_vertical.setParentItem(self)
line_vertical.setPos(12, 5)
self.addToGroup(line_vertical)
def lineUpAboveStatics(self):
offset = -TRACK_SIZE/4
#the noteheads are sorted because the backend notesheads are sorted
#and the GUI creates them one after another with a for x in list loop.
#So the last notehead is the highest one.
if self.noteheads:
startY = self.noteheads[-1].pos().y()/3
else:
startY = 0
for x in self.aboveStatics:
if x: #not None
x.setPos(5, startY + offset)
#print (x.shape().controlPointRect().height())
offset -= 8
def lineUpBelowStatics(self):
offset = TRACK_SIZE/2
for x in self.belowStatics:
if x: #not None
x.setPos(0, offset)
offset += 10
def updateRightFromThisItem(self):
"""Calls the parent track to update the x positions"""
self.track.updateRightFromTickindex(self.cachedTickIndex, forceDisplacementUpdatingOtherTracks = self.displacement)
#self.track.updateRightFromStart(forceDisplacementUpdatingOtherTracks = self.displacement)
def FirstPassRightFromThisItem(self):
self.track.firstPassRightFromTickindex(self.cachedTickIndex)
def getFirstNote(self):
return self.data.notelist[0]
def yFormulaPart1(self, pitch, clefPitch):
return -1 * (pitch / PITCH_MOD) + clefPitch
def yFormulaPart2(self, part1):
return part1 + PITCH_MOD/2 #PM/2 is half of a glyph size. Normally glyphs would bottom align on the Y coordinate/staff-line so we shift half of the glyph so we have the glyph in the middle.
def getY(self, guiNote, clefPitch):
"""Return the pitch of the complete Item.
Can handle both a guiNote or a backendNote"""
part1 = MIDDLE_LINE #If there is no note, for example a clef, the base line is the middle line.
try:
data = divmod(guiNote.data.pitch, 50)[0] * 50 + 20 #use white version of the pitch
except:
data = divmod(guiNote.pitch, 50)[0] * 50 + 20
if self.getFirstNote().pitch: #The backend.EmptyNote has 0 as pitch.
part1 = self.yFormulaPart1(data, clefPitch)
return self.yFormulaPart2(part1)
def maxminFromNotelist(self, clefPitch):
"""It is important to save the highest and lowest note/pitch in
the notelist. First because we want to know if stem up or down
(compare how far away both notes are from the middle line.
Second for ledger lines"""
notelist = self.data.notelist #it is always ordered.
maxi = notelist[-1].pitch
mini = notelist[0].pitch
if maxi == 20:
return (0, 0)
else:
return (self.yFormulaPart2(self.yFormulaPart1(mini, clefPitch)) , self.yFormulaPart2(self.yFormulaPart1(maxi, clefPitch)))
def hasMiddleLine(self, clefPitch):
"""Return true if this chord has a middle line position.
c' in treble clef."""
return 25 in [self.yFormulaPart2(self.yFormulaPart1(note.pitch, clefPitch)) for note in self.data.notelist]
def updateDynamic(self):
"""Redraw only parts that move on the Y axis.
Only chords and the keysig need this currently because they
depend on the clef position.
If your item needs a clef, use this."""
self.cachedDuration = self.data.duration
self.cachedBaseDuration = self.data.base
if self.cachedTimesigData.denominator <= 192: #for example 3/8
self.cachedTimesigMod = self.cachedTimesigData.nominator / 2
else:
self.cachedTimesigMod = 1
def updateStatic(self):
"""Redraw the part of a guiItem which changes only seldomly.
Like the displayed name of a performance sig.
This is the "leftover" signal for anything which has no signal
of their own. FiguredBass and ChordSymbol have."""
pass
def extensions(self):
"""Item specific optional. Reimplement if needed.
Call super() first.
This is for items which do NOT change the position
if the pitch changes.
Normally the extensions are functions of their own and this
is just a central place to call them all at once for __init__
and occassions when the item needs to be forcefully reset.
If something is an extension it most likely has its
own signal already. This is really only for load
or special cases. Don't mis-use."""
self.chordSymbols()
self.tupletMarkers()
self.directivesPst()
self.figuredBass()
self.tremoloMarker()
self.substitutionMarker()
self.smfTrigger()
def update(self):
"""Redraw this item.
This is the complete graphic update, even if unnecessarry.
Avoid using it. """
self.updateDynamic()
self.updateStatic()
self.extensions()
self.setSelected(self.data.selected)
def updateForIteration(self):
"""Super expensive function.
Only for extreme special cases. Will be called for EVERY
object after EVERY delete/insert/modification.
In 99.9% of the cases this is just a pass function."""
pass
def tupletMarkers(self):
if self.data.tuplets:
if not self.tuplets: #the first time.
self.tuplets = GuiText("") #just prepare
self.tuplets.setParentItem(self)
self.aboveStatics.append(self.tuplets)
t = self.data.tuplets
if t == [[2,3]]:
marker = "3"
#marker = "⅔" #triplet
elif t == [[4,6]]:
marker = "6"
elif t == [[4,5]]:
marker = "⅘"
elif t == [[2,5]]:
marker = "⅖"
else: #build our own fraction
marker = re.sub(r'\[|\]|\(|\)', "", str(self.data.tuplets).replace("),", ""))
marker = marker.replace(", ", "/")
self.tuplets.setPlainText(marker)
self.lineUpAboveStatics()
elif self.tuplets: #There was one before. We had a delete
self.aboveStatics.remove(self.tuplets)
self.scene().removeItem(self.tuplets)
self.tuplets = None
def figuredBass(self):
if self.data.figures:
if not self.figuresGlyph: #the first time.
self.figuresGlyph = GuiText(self.data.figures.replace(' ', ','))
self.figuresGlyph.setParentItem(self)
self.belowStatics.append(self.figuresGlyph)
else:
self.figuresGlyph.setPlainText(self.data.figures.replace(' ', ','))
self.lineUpBelowStatics()
#self.figuresGlyph.setPos(0,TRACK_SIZE / 1.5)
elif self.figuresGlyph: #There was one before. We had a delete/reset to 1.
self.belowStatics.remove(self.figuresGlyph)
self.scene().removeItem(self.figuresGlyph)
self.figuresGlyph = None
def chordSymbols(self):
if self.data.chordsymbols:
if not self.chordGlyph: #the first time.
self.chordGlyph = GuiText(self.data.chordsymbols, fontScale = 1.5)
self.chordGlyph.setParentItem(self)
self.aboveStatics.append(self.chordGlyph)
else:
self.chordGlyph.setPlainText(self.data.chordsymbols)
self.lineUpAboveStatics()
elif self.chordGlyph: #There was one before. We had a delete
self.aboveStatics.remove(self.chordGlyph)
self.scene().removeItem(self.chordGlyph)
self.chordGlyph = None
def tremoloMarker(self):
if self.data.split > 1:
if not self.tremoloGlyph: #the first time.
self.tremoloGlyph = GuiText("t" + str(self.data.split))
self.belowStatics.append(self.tremoloGlyph)
self.tremoloGlyph.setParentItem(self)
self.tremoloGlyph.setDefaultTextColor(QtGui.QColor("blue"))
else:
self.tremoloGlyph.setPlainText("t" + str(self.data.split))
self.lineUpBelowStatics()
#self.tremoloGlyph.setPos(3, TRACK_SIZE / 1.6)
elif self.tremoloGlyph: #There was one before. We had a delete/reset to 1.
self.belowStatics.remove(self.tremoloGlyph)
self.scene().removeItem(self.tremoloGlyph)
self.tremoloGlyph = None
def substitutionMarker(self):
if self.data.substitution:
string = "".join(self.data.substitution.split("_")[-1]).title()
if not self.substitutionGlyph: #the first time.
self.substitutionGlyph = GuiText(string)
self.belowStatics.append(self.substitutionGlyph)
self.substitutionGlyph.setParentItem(self)
self.substitutionGlyph.setDefaultTextColor(QtGui.QColor("red"))
else:
self.substitutionGlyph.setPlainText(string)
self.lineUpBelowStatics()
elif self.substitutionGlyph: #There was one before. We have a delete.
self.belowStatics.remove(self.substitutionGlyph)
self.scene().removeItem(self.substitutionGlyph)
self.substitutionGlyph = None
def smfTrigger(self):
#start gui drawing
if self.data.triggerString:
if not self.triggerGlyph: #the first time.
self.triggerGlyph = GuiText("trg")
self.triggerGlyph.setParentItem(self)
self.belowStatics.append(self.triggerGlyph)
self.triggerGlyph.setDefaultTextColor(QtGui.QColor("blue"))
else:
self.triggerGlyph.setPlainText("trg")
self.lineUpBelowStatics()
elif self.triggerGlyph: #There was one before. We had a delete
self.belowStatics.remove(self.triggerGlyph)
self.scene().removeItem(self.triggerGlyph)
self.triggerGlyph = None
def directivesPst(self):
"""Markers like staccato, fermata and tenuto"""
for pstGlyph in self.guiDirectivesPst:
self.aboveStatics.remove(pstGlyph)
if self.scene():
self.scene().removeItem(pstGlyph)
self.guiDirectivesPst = []
for pstDirective in self.data.directivePst.items():
txt = dictionaries.directives[pstDirective[0]]
if txt: #Could have returned "None" -> Unknown directive
pstGlyph = GuiGlyph(txt)
pstGlyph.translate(0, -15)
else: #If unknown use the first four chars of the key
if pstDirective[0] in ["beam"]: #one of these tags?
pstGlyph = GuiText(pstDirective[1], ) #Use Lilypond instead of the tag string
elif pstDirective[0][0:4] == "usr_":
pstGlyph = GuiText(pstDirective[1][0:4], ) #Use the directive
pstGlyph.rotate(-90)
pstGlyph.translate(-20, 0) #this is actually the Y-direction. It moves the glyph downwards.
else:
pstGlyph = GuiText(pstDirective[0][0:4], ) #Use the key
pstGlyph.rotate(-90)
pstGlyph.translate(-20, 0) #this is actually the Y-direction. It moves the glyph downwards.
pstGlyph.setParentItem(self)
self.aboveStatics.append(pstGlyph)
self.guiDirectivesPst.append(pstGlyph)
self.lineUpAboveStatics()
def updateDots(self):
pass
def updateGroupStemAndFlag(self):
pass
def smfChannel(self):
pass
def smfProgram(self):
pass
def allFingers(self):
raise RuntimeError("called allfinger for non chord. Error in API call")
class GuiClef(GuiItem):
def __init__(self, backendItem, glyph, pitch, offset, forceSigs = None, parentTrack = None): #offset is in note-position. 1 means one step in the notelines/between up. -1 down.
super(GuiClef, self).__init__(backendItem, displacement = DISPLACE, forceSigs = forceSigs, parentTrack = parentTrack)
self.pitch = pitch
self.breakClefLoop = True #instead of typesetting this is a break marker when track.clefUpdate() runs.
self.mainGlyph = GuiGlyph(text = glyph, fontScale = 1.6)
self.mainGlyph.setPos(0, -35 + (-1 * offset * PITCH_MOD / 2))
self.addToGroup(self.mainGlyph)
self.setPos(0, 0)
class GuiChord(GuiItem):
"""One GuiChord holds several GuiNotes. It makes it possible to combine notehead(s) with a stem(s), directives etc."""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiChord, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.stem = None
self.flags = []
#The invis glyph is to make selection work.
self.invis = GuiGlyph(text = " ")
self.noteheads = [] #dynamic (see GuiItem)
self.ledgerlines = [] #dynamic
self.addToGroup(self.invis)
self.update()
def allFingers(self):
for head in self.noteheads:
head.fingering()
head.rightHandFingering()
head.stringNumber()
def extensions(self):
super(GuiChord, self).extensions()
self.smfChannel()
self.smfProgram()
def updateLedgerLines(self):
#Draw Ledger Lines
for line in self.ledgerlines:
self.scene().removeItem(line)
self.ledgerlines = []
start_under, start_above, lower_boundary, upper_boundary, offset_below, offset_above, middle_line_special = self.track.ledgerLinesDataSetCurrent
nrOfLedgerLinesUnder = 0
nrOfLedgerLinesAbove = 0
#Determine if we need ledger lines.
if self.cachedMinMax[0] >= lower_boundary:
nrOfLedgerLinesUnder = math.floor(self.cachedMinMax[0] / PITCH_MOD - 1.4 + offset_below)
if not nrOfLedgerLinesUnder:
nrOfLedgerLinesUnder = 1
if self.cachedMinMax[1] <= upper_boundary:
nrOfLedgerLinesAbove = math.floor(-1 * self.cachedMinMax[1] / PITCH_MOD - 2.4 + offset_above)
if not nrOfLedgerLinesAbove:
nrOfLedgerLinesAbove = 1
#Now drawing the lines. We always draw both, for chords which spread wide.
for nr in range(nrOfLedgerLinesUnder):
lines_under = QtGui.QGraphicsLineItem(QtCore.QLineF(0, start_under + nr * 10 , 22, start_under + nr * 10))
lines_under.setPen(PEN_LINE)
lines_under.setParentItem(self)
lines_under.setPos(2,0)
self.ledgerlines.append(lines_under)
for nr in range(nrOfLedgerLinesAbove):
lines_above = QtGui.QGraphicsLineItem(QtCore.QLineF(0, start_above - nr * 10 , 22, start_above - nr * 10))
lines_above.setPen(PEN_LINE)
lines_above.setParentItem(self)
lines_above.setPos(2,0)
self.ledgerlines.append(lines_above)
if middle_line_special and self.hasMiddleLine(self.cachedClefPitch): #In case of dual view the middle line gets no ledger line. We create one.
lines_middle = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 50, 22, 50))
lines_middle.setPen(PEN_LINE)
lines_middle.setParentItem(self)
lines_middle.setPos(2,0)
self.ledgerlines.append(lines_middle)
def updateDynamic(self):
"""Create the noteheads and accidentals.
Each update all heads get deleted and recreated.
The chord is responsible to set the Y position of the heads
the head does not know what pitch it is, it is just a head.
Attached are all things that move with the chord. E.g.
everything that depends on the highest/lowest note.
"""
super(GuiChord, self).updateDynamic()
previousIterationNotePitch = (0, False) #The first comparison later will be predictable this way.
self.cachedMinMax = self.maxminFromNotelist(self.cachedClefPitch)
#First delete all old noteheads
scene = self.scene()
for head in self.noteheads:
scene.removeItem(head)
self.noteheads = []
#Now draw new noteheads
for backendNote in self.data.notelist:
head = GuiNote(backendNote, self)
headY = self.getY(head, self.cachedClefPitch) + head.shift
pitch = backendNote.pitch
head.setParentItem(self)
self.noteheads.append(head)
if self.data.instanceCount > 1: #If this is a link mark it.
head.setDefaultTextColor(QtGui.QColor("magenta"))
if not previousIterationNotePitch[1] and pitch - previousIterationNotePitch[0] < 80: #The notes are too near too each other. Shift one to the Right if the last note was not already shifted.
head.setPos(FONT_SIZE / 2, headY)
previousIterationNotePitch = (pitch, True)
else:
head.setPos(0, headY)
previousIterationNotePitch = (pitch, False)
if not self.group:
self.updateStandaloneStemAndFlag()
else: #if this is called by l_item.updateDynamic it does not reposition the beam or stem direction.. However, it keeps the stem attached, which is enough to look ok until the next updateRight.
self.updateGroupStemAndFlag()
self.updateDots()
self.updateLedgerLines()
self.resetTransform() #resets the <=96 translation
if self.data.base <= 96:
self.scale(0.9,0.9)
self.translate(-3, 3)
def updateDots(self):
if self.data.dots:
dotsString = "\U0001D16D\u2006" * self.data.dots #2006 is 1/4 em space
for head in self.noteheads:
if head.dots:
head.scene().removeItem(head.dots) #remove the old one first.
head.dots = GuiGlyph(dotsString, fontScale = 1.5)
head.dots.setParentItem(head)
head.dots.setPos(FONT_SIZE, 0)
def getStemDirection(self, lowest, highest):
"""Returns True for right/up and False for left/down
Higher is the negative direction. These are Qt coordinates.
All values include the given boundaries:
higher than -5: Stem left/down
-4 to 55: Stem right/up.
If dual view:
56 to 114: left/down
116 to inf: right/up
"""
val = lowest + highest
return -4 <= val <=55 or (val >= -5 and not self.track.dualView) or (self.track.dualView and val >= 116)
def updateStandaloneStemAndFlag(self):
"""Does all the calculation if and what stem to draw."""
if self.stem:
self.scene().removeItem(self.stem)
self.stem = None
for flag in self.flags:
self.scene().removeItem(flag)
self.flags = []
if self.group:
raise ValueError(self, self.data, self.data.exportLilypond(), "is part of the beaming group", self.group , "but was instructed for a standalone drawing")
#Draw stem
if not 1536 <= self.cachedBaseDuration < 6144: #not smaller than a whole note and not higher than a longa -> not for whole and breve.
rightStemUp = self.getStemDirection(self.cachedMinMax[0], self.cachedMinMax[1])
if rightStemUp: #right stem, up
stem = QtGui.QGraphicsLineItem(QtCore.QLineF(0, self.cachedMinMax[0] + TRACK_SIZE/4, 0, self.cachedMinMax[1] - PITCH_MOD))
stem.setPos(18, 0)
else: #left stem, down
stem = QtGui.QGraphicsLineItem(QtCore.QLineF(0 , self.cachedMinMax[1] + TRACK_SIZE/3.8 , 0 , self.cachedMinMax[0] + PITCH_MOD * 6 ))
stem.setPos(7, 0)
self.stem = stem
stem.setPen(PEN_STEM)
stem.setParentItem(self)
#Draw Flag
if self.cachedBaseDuration <= 192:
flag = dictionaries.dur2flags[self.cachedBaseDuration]
if flag:
flag = GuiGlyph(flag, MUSIC_SCALE_CORRECTION, 1.5)
flag.setParentItem(self)
self.flags.append(flag)
if rightStemUp: #right stem, up. flag normal, on the right side.
flag.setPos(17, self.cachedMinMax[1] - TRACK_SIZE/2)
else: #left stem, down. flag upside down but still to the right.
flag.setPos(6, self.cachedMinMax[0] + TRACK_SIZE)
trans = QtGui.QTransform()
trans.scale (1, -1)
flag.setTransform(trans)
def updateGroupStemAndFlag(self):
"""#0 means no group. 1=groupMember, 2= groupStart, 3=groupEnd"""
if self.stem:
self.scene().removeItem(self.stem)
self.stem = None
for flag in self.flags:
self.scene().removeItem(flag)
self.flags = []
if not self.group:
raise ValueError(self, self.data, self.data.exportLilypond(), "is NOT part of a beaming group or is in an incomplete group but was instructed for a group drawing.")
if self.group == 3: #group endings get a small, overlapping beam to the left to work with rests before them
beamDirection = -0.5 * (self.cachedDuration + self.displacement) * config.DURATION_MOD
else:
beamDirection = (self.cachedDuration + self.displacement) * config.DURATION_MOD
#rightStemUp = self.cachedGroupStemExtremePitches[0] + self.cachedGroupStemExtremePitches[1] >= -5
rightStemUp = self.getStemDirection(self.cachedGroupStemExtremePitches[0], self.cachedGroupStemExtremePitches[1])
if rightStemUp: #right stem, up, defined by group
stem = QtGui.QGraphicsLineItem(QtCore.QLineF(0,
self.cachedMinMax[0] + TRACK_SIZE/4, #lowest point. The individual notehead.
0,
self.cachedGroupStemExtremePitches[1] -10)) #highest point, defined by group
stem.setPos(18, 0)
self.stem = stem
#Beaming above the notes:
offset = 0
for flag in range(dictionaries.dur2beams[self.cachedBaseDuration]):
flag = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 0, beamDirection, 0))
flag.setPen(PEN_BEAM)
flag.setParentItem(self)
flag.setPos(18, self.cachedGroupStemExtremePitches[1] + offset -10)
self.flags.append(flag)
offset += 5
else: #left stem, down
stem = QtGui.QGraphicsLineItem(QtCore.QLineF(0 ,
self.cachedGroupStemExtremePitches[0] + 60, #lowest point, defined by group
0 ,
self.cachedMinMax[1]+ TRACK_SIZE/4)) #highest point, the individual notehead.
stem.setPos(7, 0)
self.stem = stem
#Beaming below the notes:
offset = 0
for flag in range(dictionaries.dur2beams[self.cachedBaseDuration]):
flag = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 0, beamDirection, 0))
flag.setPen(PEN_BEAM)
flag.setParentItem(self)
flag.setPos(7, self.cachedGroupStemExtremePitches[0] + 60 - offset)
self.flags.append(flag)
offset += 5
stem.setPen(PEN_STEM)
stem.setParentItem(self)
def smfChannel(self):
#Build string from data
channelString = ""
if self.data.channelOffset > 0:
channelString = "+" + str(self.data.channelOffset)
elif self.data.channelOffset < 0:
channelString = str(self.data.channelOffset)
if self.data.forceChannel >= 0:
channelString = str(1 + self.data.forceChannel) + channelString #+1 to convert smf 0-15 to human 1-16
#start gui drawing
if channelString or channelString == "": #TODO: Workaround. Somehow delete below did not work.
if not self.channelGlyph: #the first time.
suffix = "c" if channelString else ""
self.channelGlyph = GuiText(channelString+suffix)
self.channelGlyph.setParentItem(self)
self.belowStatics.append(self.channelGlyph)
self.channelGlyph.setDefaultTextColor(QtGui.QColor("green"))
else:
suffix = "c" if channelString else ""
self.channelGlyph.setPlainText(channelString+suffix)
self.lineUpBelowStatics()
elif self.channelGlyph: #There was one before. We had a delete
self.belowStatics.remove(self.channelGlyph)
self.scene().removeItem(self.channelGlyph)
self.channelGlyph = None
def smfProgram(self):
#Build string from data
programString = ""
if self.data.programOffset > 0:
programString = "+" + str(self.data.programOffset)
elif self.data.programOffset < 0:
programString = str(self.data.programOffset)
if self.data.forceProgram >= 0:
programString = str(1 + self.data.forceProgram) + programString #+1 to convert smf 0-15 to human 1-16
#start gui drawing
if programString or programString == "": #TODO: Workaround. Somehow delete below did not work.
if not self.programGlyph: #the first time.
suffix = "p" if programString else ""
self.programGlyph = GuiText(programString+suffix)
self.programGlyph.setParentItem(self)
self.belowStatics.append(self.programGlyph)
self.programGlyph.setDefaultTextColor(QtGui.QColor("cyan"))
else:
suffix = "p" if programString else ""
self.programGlyph.setPlainText(programString+suffix)
self.lineUpBelowStatics()
elif self.programGlyph: #There was one before. We had a delete
self.belowStatics.remove(self.programGlyph)
self.scene().removeItem(self.programGlyph)
self.programGlyph = None
class GuiRest(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiRest, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.mainGlyph = GuiGlyph(text = "", fontScale = 1.6)
if self.data.pitch == "s": #skips
self.mainGlyph.setOpacity(0.5)
self.dots = None
self.updateDynamic()
self.mainGlyph.setPos(0,-35)
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
def updateDots(self):
dotsString = "\U0001D16D\u2006" * self.data.dots #2006 is 1/4 em space
if self.dots:
self.dots.scene().removeItem(self.dots) #remove the old one first.
self.dots = GuiGlyph(dotsString, fontScale = 1.5)
self.dots.setParentItem(self)
self.dots.setPos(FONT_SIZE, -50)
def updateDynamic(self):
super(GuiRest, self).updateDynamic()
self.mainGlyph.setPlainText(dictionaries.dur2rest[self.cachedBaseDuration])
self.updateDots()
class GuiClosedContainer(GuiItem):
"""A container with no visible content. The cursor treats this
as one big item"""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiClosedContainer, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.widthDependentOnDisplacement = True
self.startGlyph = GuiText(text = '\U0001D115')
self.startGlyph.setScale(4)
self.startGlyph.setPos(-15, -45)
self.startGlyph.setDefaultTextColor(QtGui.QColor("green"))
self.addToGroup(self.startGlyph)
self.endGlyph = GuiText(text = '\U0001D115')
self.endGlyph.setScale(-4)
self.endGlyph.setDefaultTextColor(QtGui.QColor("green"))
self.addToGroup(self.endGlyph)
self.background = None
self.brush = QtGui.QBrush(QtCore.Qt.SolidPattern)
self.brush.setColor(stringToColor(self.data.uniqueContainerName))
self.nameGlyph = GuiText(text="")
#self.nameGlyph.setHtml("" + self.data.uniqueContainerName + "")
self.nameGlyph.setPos(17,-30)
self.nameGlyph.setScale(1.5)
self.addToGroup(self.nameGlyph)
self.background = QtGui.QGraphicsRectItem(10, 0, 1, 40)
self.background.setBrush(self.brush)
self.background.setOpacity(0.4)
self.addToGroup(self.background)
self.background.setPos(0,0)
self.updateStatic()
self.updateDynamic()
self.setPos(0,0)
def updateStatic(self):
self.brush.setColor(stringToColor(self.data.uniqueContainerName))
if self.background:
self.background.setBrush(self.brush)
if self.data.repeatPercent > 1:
self.nameGlyph.setPlainText(self.data.uniqueContainerName + "(" + str(self.data.repeatPercent) + "x)")
else:
self.nameGlyph.setPlainText(self.data.uniqueContainerName)
def updateForIteration(self):
"""Depends on an up-to-date self.cachedIndex"""
self.updateDynamic()
def updateDynamic(self):
"""Regulates the graphical dimensions of this object"""
if self.track:
end = (self.data.duration + self.track.workspace.getDisplacement(self.data.duration + self.cachedTickIndex, includeSelf = False) - self.track.workspace.getDisplacement(self.cachedTickIndex, includeSelf = True)) * config.DURATION_MOD
self.endGlyph.setPos(end + 10 , 85)
self.background.setRect(10, 0, end -25 , 40)
class GuiMultiMeasureRest(GuiItem):
"""This is a trick item. We never check the backend in the gui
to get the duration. We try to keep it in sync with the gui only.
This has no effect on playback or lilypond.
The problem is that the multiMeasureRest is dependent of the
backend cursor system. Linked Items and containers do not work that
way since the gui does not use the backend cursor. """
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiMultiMeasureRest, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.dataOrg = self.data
self.data = self
self.mainGlyph = GuiGlyph(text = "\U0001D129", fontScale = 1.6)
self.mainGlyph.setPos(0, -35)
self.addToGroup(self.mainGlyph)
if not self.dataOrg.lilysyntax == "R": #Lilypond Skip
self.setOpacity(0.3)
self.measures = GuiText (text = str(self.dataOrg.measures))
self.addToGroup(self.measures)
self.measures.setPos(FONT_SIZE, TEXT_SCALE_CORRECTION)
self.setPos(0,0)
@property
def figures(self):
return self.dataOrg.figures
@property
def chordsymbols(self):
return self.dataOrg.chordsymbols
@property
def cachedDuration(self):
return self.dataOrg.measures * self.cachedTimesigData.nominator * self.cachedTimesigData.denominator
@cachedDuration.setter
def cachedDuration(self, value):
return True
@property
def duration(self):
return self.dataOrg.measures * self.cachedTimesigData.nominator * self.cachedTimesigData.denominator
@property
def cachedBaseDuration(self):
return 0
@cachedDuration.setter
def cachedBaseDuration(self, value):
return True
@property
def base(self):
return 0
def updateDynamic(self):
super(GuiMultiMeasureRest, self).updateDynamic()
self.measures.setPlainText(str(self.dataOrg.measures))
class GuiPlaceholder(GuiMultiMeasureRest):
"""MMRest but with more space in Lilypond"""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiPlaceholder, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.mainGlyph.setDefaultTextColor(QtGui.QColor("green"))
class GuiUpbeat(GuiItem):
"""This is a trick item. We never check the backend in the gui
to get the duration. We try to keep it in sync with the gui only.
This has no effect on playback or lilypond.
See Multi Measure Rest"""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiUpbeat, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.dataOrg = self.data
self.data = self
try: #who knows what weird combination they want. better prepare for the unknown
upbeatString = "Upbeat:\n" + str(self.cachedTimesigData.nominator) + "/" + api.lilypond.dur2ly[self.cachedTimesigData.denominator] + " - " + api.lilypond.dur2ly[self.dataOrg.base]
except:
upbeatString = "Upbeat"
self.mainGlyph = GuiGlyph(text = upbeatString, fontScale = 0.5)
self.mainGlyph.setPos(0, 0)
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
@property
def cachedDuration(self):
fullMeasureTick = self.cachedTimesigData.nominator * self.cachedTimesigData.denominator
return fullMeasureTick - self.dataOrg.base
@property
def duration(self):
fullMeasureTick = self.cachedTimesigData.nominator * self.cachedTimesigData.denominator
return fullMeasureTick - self.dataOrg.base
@cachedDuration.setter
def cachedDuration(self, value):
try:
self.mainGlyph #cachedDuration.setter is ready before parent init() is executed so parent will already execute this here. The first time this will fail
try: #who knows what weird combination they want. better prepare for the unknown
upbeatString = "Upbeat:\n" + str(self.cachedTimesigData.nominator) + "/" + api.lilypond.dur2ly[self.cachedTimesigData.denominator] + " - " + api.lilypond.dur2ly[self.dataOrg.base]
except:
upbeatString = "Upbeat"
self.mainGlyph.setPlainText(upbeatString)
except:
pass
return True
@property
def cachedBaseDuration(self):
return 0
@cachedDuration.setter
def cachedBaseDuration(self, value):
return True
@property
def base(self):
return 0
class GuiKeySignature(GuiItem):
"""We get the order and kind of accidentals from the backend.
Numbers 0-6 for c to b/h.
To decide on which pitch/line to draw the glyph we search for the
first position from high to low which has no ledger line for the
current clef."""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiKeySignature, self).__init__(backendItem, displacement = DISPLACE, forceSigs = forceSigs, parentTrack = parentTrack)
self.breakKeysigLoop = True #marks this item as keysig for track.keysigUpdate
self.update()
#TODO: less update, more static.
def update(self):
allNatural = True
self.displacement = DISPLACE + FONT_SIZE #Was fuer ein Gefrickel...
#Show the root, always.
rootString = GuiText(text = api.lilypond.pitch2ly[self.data.root + 1050].title()) #three octaves higher is a plain Lilypond note string without octaves.
self.addToGroup(rootString)
rootString.setPos(0, -1 * MUSIC_SCALE_CORRECTION)
#Generate accidentals
posX = 0
for x in self.data.keysigtuplet:
if not self.data.explicit and x[1] == 0: #natural / C Major without "explicit" flag.
pass
else:
startPosition = 2820 + x[0] * 50 #highest C (2820) + position of the accidental in pitch numbers. x[0] = 0:c, 1:d, 2:e etc.
result = -1 * (startPosition / PITCH_MOD) + self.cachedClefPitch
if result >= 25: #under the lines
while result >= 25:
result -= 35 #one octave up.
elif result <= -35: #above the lines
while result <= -35:
result += 35 #one octave down.
new = GuiGlyph(dictionaries.keysigDiff2accidental[x[1]])
self.addToGroup(new)
new.setPos(posX, result - 15) #G Major: [(3,10), (0,0), (4,0), (1,0), (5,0), (2,0), (6,0)] 10:Shartp, -10:Flat. #-15 to get the the accidentals up to their lines
self.displacement += FONT_SIZE * 2
posX += FONT_SIZE / 2
allNatural = False
if allNatural: #create a natural glyph that is as heigh as the whole track to show C Major or A Minor or whatever the scale is.
self.mainGlyph = GuiGlyph(text="\u266E", fontScale= 2)
self.displacement = DISPLACE
self.mainGlyph.setPos(-3, - 66)
self.addToGroup(self.mainGlyph)
class GuiTimeSignature(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiTimeSignature, self).__init__(backendItem, displacement = DISPLACE/2 , forceSigs = forceSigs, parentTrack = parentTrack)
#self.nominator = self.data.nominator #example: x/4 Upper number
#self.denominator = self.data.denominator #example: 384/x lower number
self.breakTimesigLoop = True #instead of typesetting this is a break marker when track.timesigUpdate() runs. Additionaly this is used by timesig index generation in firstPass
self.upper = GuiText(str(self.data.nominator), fontScale = 2)
self.lower = GuiText(str(api.lilypond.dur2ly[self.data.denominator]), fontScale = 2)
self.addToGroup(self.upper)
self.addToGroup(self.lower)
self.lower.setPos(0, PITCH_MOD)
self.upper.setPos(0, -PITCH_MOD)
self.setY(-PITCH_MOD)
class GuiDynamicSignature(GuiItem):
"""Take the expression string and place it into the scene"""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiDynamicSignature, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = "", fontScale = 1.5)
self.mainGlyph.setPos(5, TRACK_SIZE/2.5)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
self.updateStatic()
def updateStatic(self):
self.mainGlyph.setHtml("" + str(self.data._expression) + "")
class GuiPerformanceSignature(GuiItem):
"""Take the expression string and place it into the scene"""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiPerformanceSignature, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = "\u2707", fontScale = 2)
self.addToGroup(self.mainGlyph)
self.mainGlyph.setPos(5, 0)
self.name = GuiText(text = self.data.name, fontScale = 1)
self.addToGroup(self.name)
self.name.setPos(-5, -25)
self.setPos(0,0)
def updateStatic(self):
self.name.setPlainText(self.data.name)
class GuiWaitForChord(GuiItem):
"""The difference to GuiDynamicSignature is that this uses the
lilystring variable and strips any backslashes.
Different font as well."""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiWaitForChord, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE
self.mainGlyph = GuiText(text = self.data.lilystring.lstrip('\\'))
self.mainGlyph.setPos(0, TRACK_SIZE/2.5)
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiContainerStart(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiContainerStart, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.setFlag(QtGui.QGraphicsItem.ItemIsSelectable, False)
self.breakContainerLoop = True #instead of typechecking this is a break marker when adding items in containers.
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = '\U0001D115')
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-10, -45)
self.mainGlyph.setDefaultTextColor(QtGui.QColor("green"))
self.addToGroup(self.mainGlyph)
self.nameGlyph = GuiText(text = "")
#self.nameGlyph.rotate(-90)
self.nameGlyph.setPos(3, -28)
#self.nameGlyph.setScale(1.5)
self.addToGroup(self.nameGlyph)
self.updateStatic()
self.setPos(0,0)
def updateStatic(self):
if self.data.parentContainer.repeatPercent > 1:
self.nameGlyph.setPlainText(self.data.parentContainer.uniqueContainerName + "(" + str(self.data.parentContainer.repeatPercent) + "x)")
else:
self.nameGlyph.setPlainText(self.data.parentContainer.uniqueContainerName)
class GuiContainerEnd(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None): #, dataContainer): #dataContainer is not needed currently. And if it becomes needed don't forget to forward it in insertRelativeToContainerBegin
super(GuiContainerEnd, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
#self.dataContainer = dataContainer #is set directly on GUI insert.
self.setFlag(QtGui.QGraphicsItem.ItemIsSelectable, False)
self.breakContainerLoop = None #! important. All other items have False. This is needed in insertRelativeToContainerBegin to prevent typechecking
self.widthDependentOnDisplacement = True
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = '\U0001D115')
self.mainGlyph.setScale(-4)
self.mainGlyph.setPos(30,85)
self.mainGlyph.setDefaultTextColor(QtGui.QColor("green"))
self.addToGroup(self.mainGlyph)
#self.brush = QtGui.QBrush(QtCore.Qt.SolidPattern)
#self.background = QtGui.QGraphicsRectItem(10, 0, 1, 40)
#self.background.setBrush(self.brush)
#self.background.setOpacity(0.5)
#self.addToGroup(self.background)
#self.updateStatic()
#self.updateDynamic()
"""
def updateStatic(self):
print ("s")
self.brush.setColor(stringToColor(self.data.parentContainer.uniqueContainerName))
self.background.setBrush(self.brush)
def updateForIteration(self):
print ("i")
#Depends on an up-to-date self.cachedIndex
self.updateDynamic()
def updateDynamic(self):
print ("d")
if self.track:
completeDur = self.data.parentContainer.duration
rep = self.data.parentContainer.repeatPercent
repeatRestDuration = completeDur / rep * (rep -1)
if repeatRestDuration:
end = repeatRestDuration + self.track.workspace.getDisplacement(repeatRestDuration + self.cachedTickIndex, includeSelf = False)
end = end * config.DURATION_MOD - 30
else:
end = 1
self.background.setRect(10, 0, end-10, 40)
"""
class GuiMarkup(GuiItem):
"""The difference to GuiDynamicSignature is that this uses the
lilystring variable and strips any backslashes.
Different font as well."""
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiMarkup, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = self.data.lilystring[:11])
self.mainGlyph.rotate(-90)
self.mainGlyph.setPos(0, TRACK_SIZE/2)
self.addToGroup(self.mainGlyph)
self.verticalLine()
self.setPos(0,0)
self.updateStatic()
def updateStatic(self):
self.mainGlyph.setHtml("" + self.data.lilystring[:11] + "")
class GuiSegno(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiSegno, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/4
self.mainGlyph = GuiText(text = '\U0001D10B')
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-20, -55)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiCoda(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiCoda, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/4
self.mainGlyph = GuiText(text = '\U0001D10C')
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-20, -55)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiFine(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiFine, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = 'Fine')
self.mainGlyph.setScale(2)
self.mainGlyph.rotate(-90)
self.mainGlyph.setPos(-10, 50)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiGotoSegno(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiGotoSegno, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/4
self.mainGlyph = GuiText(text = '\U0001D109')
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-30, -50)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiGotoCapo(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiGotoCapo, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/4
self.mainGlyph = GuiText(text = '\U0001D10A')
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-30, -50)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiGotoCoda(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiGotoCoda, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/4
self.mainGlyph = GuiText(text = '\u21B7\U0001D10C')
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-30, -50)
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiPedalSustainChange(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiPedalSustainChange, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/10
self.mainGlyph = GuiText(text = '𝆰')
self.mainGlyph.setScale(3)
self.mainGlyph.setPos(-10, 30)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
class GuiSpecialBarline(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiSpecialBarline, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.repeatGlyph = None
self.mainGlyph = GuiText(text = dictionaries.barlines[self.data.lilypond.split('"')[1]])
self.mainGlyph.setScale(4)
self.mainGlyph.setPos(-15, -45)
self.displacement = DISPLACE/2
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
self.updateStatic()
def updateStatic(self):
if self.repeatGlyph:
self.scene().removeItem(self.repeatGlyph)
self.repeatGlyph = None
repeat = self.data.repeat
if repeat > 1:
self.repeatGlyph = GuiText(text = "(" + str(repeat ) + ")", fontScale = 1)
self.addToGroup(self.repeatGlyph)
self.repeatGlyph.setPos(-5, 45)
class GuiAlternateEnd(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiAlternateEnd, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.endingNumbers = None
self.mainGlyph = GuiText(text = self.data.text)
#self.mainGlyph.setScale(1)
self.mainGlyph.setPos(10, -40)
self.displacement = DISPLACE/2
self.addToGroup(self.mainGlyph)
line_vertical = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 55, 0, 0))
line_vertical.setPen(PEN_BEAM)
line_vertical.setParentItem(self)
line_vertical.setPos(7, -20)
self.addToGroup(line_vertical)
line_horizontal = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 0, 60, 0))
line_horizontal.setPen(PEN_BEAM)
line_horizontal.setParentItem(self)
line_horizontal.setPos(7, -20)
self.addToGroup(line_horizontal)
self.setPos(0,0)
def updateStatic(self):
self.mainGlyph.setPlainText(self.data.text)
class GuiAlternateEndClose(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiAlternateEndClose, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/2
self.mainGlyph = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 55, 0, 0))
self.mainGlyph.setPen(PEN_BEAM)
self.mainGlyph.setParentItem(self)
self.mainGlyph.setPos(7, -20)
self.addToGroup(self.mainGlyph)
line_horizontal = QtGui.QGraphicsLineItem(QtCore.QLineF(0, 0, -60, 0))
line_horizontal.setPen(PEN_BEAM)
line_horizontal.setParentItem(self)
line_horizontal.setPos(7, -20)
self.addToGroup(line_horizontal)
self.setPos(0,0)
class GuiTempoSignature(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiTempoSignature, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.endingNumbers = None
self.mainGlyph = GuiText(text = "") #"" for now
self.mainGlyph.setPos(0, -40)
self.displacement = DISPLACE/2
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
self.updateStatic()
def updateStatic(self):
self.mainGlyph.setPlainText("⌛" + self.data.tempostring + " " + api.lilypond.dur2ly[self.data.referenceTicks] + "=" + str(self.data.beatsPerMinute))
class GuiTempoModification(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiTempoModification, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.endingNumbers = None
self.mainGlyph = GuiText(text = "") #"" for now
self.mainGlyph.setPos(0, -40)
self.displacement = DISPLACE/4
self.addToGroup(self.mainGlyph)
self.verticalLine()
self.setPos(0,0)
self.updateStatic()
def updateStatic(self):
self.mainGlyph.setPlainText("⌛ " + str(self.data.bpmModificator))
updateDynamic = updateStatic # the api signal for augment is dynamic.
class GuiChannelChange(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiChannelChange, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.mainGlyph = GuiText(text = "") #"" for now
self.mainGlyph.setScale(1.5)
self.displacement = DISPLACE/2
self.mainGlyph.setPos(-5, -30)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
self.updateStatic()
self.mainGlyph.setDefaultTextColor(QtGui.QColor("green"))
def updateStatic(self):
if type(self.data) is api.items.ChannelChangeAbsolute:
self.mainGlyph.setPlainText("C" + str(self.data.number +1))
else: #relative
if self.data.number > 0:
extra = "C+"
else:
extra = "C" #the minus is added by the number
self.mainGlyph.setPlainText(extra + str(self.data.number))
class GuiProgramChange(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiProgramChange, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.mainGlyph = GuiText(text = "") #"" for now
self.mainGlyph.setScale(1.5)
self.displacement = DISPLACE/2
self.mainGlyph.setPos(-5, -30)
self.verticalLine()
self.addToGroup(self.mainGlyph)
self.setPos(0,0)
self.updateStatic()
self.mainGlyph.setDefaultTextColor(QtGui.QColor("cyan"))
def updateStatic(self):
if type(self.data) is api.items.ProgramChangeAbsolute:
self.mainGlyph.setPlainText("P" + str(self.data.number +1))
else: #relative
if self.data.number > 0:
extra = "P+"
else:
extra = "P" #the minus is added by the number
self.mainGlyph.setPlainText(extra + str(self.data.number))
class GuiInstrumentChange(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiInstrumentChange, self).__init__(backendItem, forceSigs = forceSigs, parentTrack = parentTrack)
self.displacement = DISPLACE/2
self.mainGlyph = GuiText(text = "♺", fontScale = 2)
self.mainGlyph.setPos(5, 0)
self.addToGroup(self.mainGlyph)
self.name = GuiText(text = "", fontScale = 1) #empty until updateStatic
self.addToGroup(self.name)
self.name.setPos(-5, -25)
self.setPos(0,0)
self.updateStatic()
def updateStatic(self):
self.name.setPlainText(self.data.shortInstrumentName + "(Prg:" + str(self.data.smfPatch +1 ) + ")")
class GuiSlurOn(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiSlurOn, self).__init__(backendItem, displacement = DISPLACE/4, mainGlyph = "(", forceSigs = forceSigs, parentTrack = parentTrack)
class GuiSlurOff(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiSlurOff, self).__init__(backendItem, displacement = DISPLACE/4, mainGlyph = ")", forceSigs = forceSigs, parentTrack = parentTrack)
self.setPos(4,0)
class GuiPhrasingSlurOn(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiPhrasingSlurOn, self).__init__(backendItem, displacement = DISPLACE/2, mainGlyph = "((", forceSigs = forceSigs, parentTrack = parentTrack)
class GuiPhrasingSlurOff(GuiItem):
def __init__(self, backendItem, forceSigs = None, parentTrack = None):
super(GuiPhrasingSlurOff, self).__init__(backendItem, displacement = DISPLACE/2, mainGlyph = "))", forceSigs = forceSigs, parentTrack = parentTrack)
laborejo-0.8~ds0.orig/laborejoqt/designer/ 0000775 0001750 0001750 00000000000 12154405225 021202 5 ustar glowworm glowworm laborejo-0.8~ds0.orig/laborejoqt/designer/gui_stacked_musictab.ui 0000664 0001750 0001750 00000151330 12154405225 025715 0 ustar glowworm glowworm
stackedMusicTab
0
0
1182
926
StackedWidget
0
-
16777215
200
Lyrics
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
false
4
6
4
6
4
-
-
An empty line means a new verse. Shift+Space for " -- " syllabe connector. Underscore _ to skip a position.
Qt::AlignCenter
-
0
-
QFrame::StyledPanel
QFrame::Sunken
1
0
0
-
80
0
80
16777215
Qt::NoFocus
false
QFrame::NoFrame
QFrame::Plain
0
0
Qt::ScrollBarAlwaysOff
Qt::ScrollBarAlwaysOn
false
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
QGraphicsView::FullViewportUpdate
-
true
0
0
0
0
false
Qt::LeftToRight
QFrame::NoFrame
QFrame::Plain
0
Qt::ScrollBarAsNeeded
Qt::ScrollBarAlwaysOn
255
255
255
true
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
QPainter::Antialiasing|QPainter::NonCosmeticDefaultPen|QPainter::TextAntialiasing
QGraphicsView::NoDrag
QGraphicsView::NoAnchor
QGraphicsView::NoAnchor
QGraphicsView::FullViewportUpdate
-
16777215
100
false
QFrame::StyledPanel
QFrame::Sunken
Qt::ScrollBarAlwaysOff
Qt::ScrollBarAlwaysOff
221
221
221
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
QPainter::Antialiasing
-
0
-
true
0
0
180
0
170
16777215
QFrame::StyledPanel
QFrame::Raised
1
Qt::ScrollBarAsNeeded
Qt::ScrollBarAlwaysOff
true
Qt::AlignHCenter|Qt::AlignTop
0
0
176
501
-1
QLayout::SetDefaultConstraint
6
-
Track
-
QFrame::NoFrame
QFrame::Plain
0
0
9
0
9
0
-
Solo
-
Mute
-
0
0
Qt::LeftToRight
QFrame::Sunken
0
0
0
0
164
251
0
0
General
-
Track Unique ID
-
Trackname
Qt::ImhNone
-
Instrument Name
-
-
Short Name
-
-
Group
-
-
Export Part
-
0
0
143
336
0
0
Print && Lilypond
-
Voice Preset
-
-
Transposition
-
110
0
110
16777215
QFrame::NoFrame
QFrame::Plain
0
0
0
-
55
0
55
16777215
-
55
0
55
16777215
-
Size
-
-
Number of Lines
-
1
5
-
Lyrics Above
-
Merge w/ Above
-
Don't Print
-
Ambitus
-
Edit Directives
0
0
127
226
0
0
Internal Sound
-
Instrument/Patch
-
QFrame::NoFrame
QFrame::Plain
0
0
-
0
0
1
128
-
0
0
-1
QComboBox::AdjustToMinimumContentsLengthWithIcon
0
0
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
0
Channel
-
Midi Channel
1
16
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Volume
-
1
128
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Pan
-
1
128
64
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Transp.
-
true
-64
64
0
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Bank
-
1
128
1
0
0
148
268
0
0
JACK Sound
-
Channel Range
true
0
0
2
0
2
-
1
16
-
1
16
-
Values: 1 to 128
-
0 to disable
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Patch
-
0
128
0
-
QFrame::NoFrame
QFrame::Plain
0
0
-
Volume
-
0
128
0
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Pan
-
0
128
0
-
QFrame::NoFrame
QFrame::Plain
0
0
-
0
Transp.
-
-64
64
-
QFrame::NoFrame
QFrame::Plain
0
0
0
-
Bank
-
0
128
0
-
Numpad Palette
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
false
-1
2
6
2
6
-
0
-
32
32
32
32
32
32
-
32
32
32
32
32
32
-
32
32
32
32
32
32
-
32
32
32
32
32
32
false
Qt::NoArrow
-
32
32
32
32
32
32
-
32
32
32
32
32
32
-
32
32
32
32
32
32
-
32
32
32
32
32
32
-
32
32
32
32
32
32
-
-
64
32
64
32
32
32
-
File is in Container Edit mode. Close the container tab to continue editing on the whole file.
Qt::AlignCenter
laborejo-0.8~ds0.orig/laborejoqt/designer/gui_main.py 0000664 0001750 0001750 00000514031 12154405225 023350 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_main.ui'
#
# Created: Fri Jun 7 17:45:01 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1119, 797)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setUnifiedTitleAndToolBarOnMac(True)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.Tab = QtGui.QTabWidget(self.centralwidget)
self.Tab.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Tab.sizePolicy().hasHeightForWidth())
self.Tab.setSizePolicy(sizePolicy)
self.Tab.setTabPosition(QtGui.QTabWidget.North)
self.Tab.setElideMode(QtCore.Qt.ElideNone)
self.Tab.setDocumentMode(False)
self.Tab.setTabsClosable(True)
self.Tab.setMovable(True)
self.Tab.setObjectName(_fromUtf8("Tab"))
self.TabScore = QtGui.QWidget()
self.TabScore.setObjectName(_fromUtf8("TabScore"))
self.Tab.addTab(self.TabScore, _fromUtf8(""))
self.Lilypond = QtGui.QWidget()
self.Lilypond.setObjectName(_fromUtf8("Lilypond"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.Lilypond)
self.horizontalLayout_3.setSpacing(0)
self.horizontalLayout_3.setMargin(0)
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.editorWindow = QtGui.QTextBrowser(self.Lilypond)
self.editorWindow.setFrameShape(QtGui.QFrame.NoFrame)
self.editorWindow.setFrameShadow(QtGui.QFrame.Sunken)
self.editorWindow.setLineWidth(0)
self.editorWindow.setObjectName(_fromUtf8("editorWindow"))
self.horizontalLayout_3.addWidget(self.editorWindow)
self.Tab.addTab(self.Lilypond, _fromUtf8(""))
self.verticalLayout.addWidget(self.Tab)
self.smallTerminal = QtGui.QGroupBox(self.centralwidget)
self.smallTerminal.setMinimumSize(QtCore.QSize(0, 150))
self.smallTerminal.setMaximumSize(QtCore.QSize(16777215, 150))
self.smallTerminal.setObjectName(_fromUtf8("smallTerminal"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.smallTerminal)
self.verticalLayout_2.setSpacing(1)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.terminal = QtGui.QPlainTextEdit(self.smallTerminal)
self.terminal.setObjectName(_fromUtf8("terminal"))
self.verticalLayout_2.addWidget(self.terminal)
self.verticalLayout.addWidget(self.smallTerminal)
self.virtualPianoGroup = QtGui.QGroupBox(self.centralwidget)
self.virtualPianoGroup.setMinimumSize(QtCore.QSize(0, 100))
self.virtualPianoGroup.setMaximumSize(QtCore.QSize(16777215, 100))
self.virtualPianoGroup.setObjectName(_fromUtf8("virtualPianoGroup"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.virtualPianoGroup)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.virtualPiano = QtGui.QWidget(self.virtualPianoGroup)
self.virtualPiano.setFocusPolicy(QtCore.Qt.ClickFocus)
self.virtualPiano.setObjectName(_fromUtf8("virtualPiano"))
self.horizontalLayout_2.addWidget(self.virtualPiano)
self.verticalLayout.addWidget(self.virtualPianoGroup)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1119, 25))
self.menubar.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
self.menubar.setAcceptDrops(False)
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName(_fromUtf8("menuFile"))
self.menuExport = QtGui.QMenu(self.menuFile)
self.menuExport.setObjectName(_fromUtf8("menuExport"))
self.menuRecent_2 = QtGui.QMenu(self.menuFile)
self.menuRecent_2.setObjectName(_fromUtf8("menuRecent_2"))
self.menuImport = QtGui.QMenu(self.menuFile)
self.menuImport.setObjectName(_fromUtf8("menuImport"))
self.menuEdit = QtGui.QMenu(self.menubar)
self.menuEdit.setObjectName(_fromUtf8("menuEdit"))
self.menuObjects = QtGui.QMenu(self.menubar)
self.menuObjects.setObjectName(_fromUtf8("menuObjects"))
self.menuOrnaments = QtGui.QMenu(self.menuObjects)
self.menuOrnaments.setObjectName(_fromUtf8("menuOrnaments"))
self.menuRhythm_and_Dynamics = QtGui.QMenu(self.menuOrnaments)
self.menuRhythm_and_Dynamics.setObjectName(_fromUtf8("menuRhythm_and_Dynamics"))
self.menuEmbellishments = QtGui.QMenu(self.menuOrnaments)
self.menuEmbellishments.setObjectName(_fromUtf8("menuEmbellishments"))
self.menuStrings = QtGui.QMenu(self.menuOrnaments)
self.menuStrings.setObjectName(_fromUtf8("menuStrings"))
self.menuOrgan = QtGui.QMenu(self.menuOrnaments)
self.menuOrgan.setObjectName(_fromUtf8("menuOrgan"))
self.menuAncient = QtGui.QMenu(self.menuOrnaments)
self.menuAncient.setObjectName(_fromUtf8("menuAncient"))
self.menuOther = QtGui.QMenu(self.menuOrnaments)
self.menuOther.setObjectName(_fromUtf8("menuOther"))
self.menuNote_Duration = QtGui.QMenu(self.menuObjects)
self.menuNote_Duration.setObjectName(_fromUtf8("menuNote_Duration"))
self.menuRests = QtGui.QMenu(self.menuObjects)
self.menuRests.setObjectName(_fromUtf8("menuRests"))
self.menuDynamics = QtGui.QMenu(self.menuObjects)
self.menuDynamics.setObjectName(_fromUtf8("menuDynamics"))
self.menuStyles = QtGui.QMenu(self.menuDynamics)
self.menuStyles.setObjectName(_fromUtf8("menuStyles"))
self.menuSlurs = QtGui.QMenu(self.menuObjects)
self.menuSlurs.setObjectName(_fromUtf8("menuSlurs"))
self.menuStyles_2 = QtGui.QMenu(self.menuSlurs)
self.menuStyles_2.setObjectName(_fromUtf8("menuStyles_2"))
self.menuTies = QtGui.QMenu(self.menuObjects)
self.menuTies.setObjectName(_fromUtf8("menuTies"))
self.menuStyles_3 = QtGui.QMenu(self.menuTies)
self.menuStyles_3.setObjectName(_fromUtf8("menuStyles_3"))
self.menuVoice_Presets = QtGui.QMenu(self.menuObjects)
self.menuVoice_Presets.setObjectName(_fromUtf8("menuVoice_Presets"))
self.menuChord_Symbols = QtGui.QMenu(self.menuObjects)
self.menuChord_Symbols.setObjectName(_fromUtf8("menuChord_Symbols"))
self.menuFigured_Bass = QtGui.QMenu(self.menuObjects)
self.menuFigured_Bass.setObjectName(_fromUtf8("menuFigured_Bass"))
self.menuBeaming = QtGui.QMenu(self.menuObjects)
self.menuBeaming.setObjectName(_fromUtf8("menuBeaming"))
self.menuFingering = QtGui.QMenu(self.menuObjects)
self.menuFingering.setObjectName(_fromUtf8("menuFingering"))
self.menuFingering_Style = QtGui.QMenu(self.menuFingering)
self.menuFingering_Style.setObjectName(_fromUtf8("menuFingering_Style"))
self.menuString_Number_Style = QtGui.QMenu(self.menuFingering)
self.menuString_Number_Style.setObjectName(_fromUtf8("menuString_Number_Style"))
self.menuStroke_Finger_Style = QtGui.QMenu(self.menuFingering)
self.menuStroke_Finger_Style.setObjectName(_fromUtf8("menuStroke_Finger_Style"))
self.menuBarlines = QtGui.QMenu(self.menuObjects)
self.menuBarlines.setObjectName(_fromUtf8("menuBarlines"))
self.menuAdvanced_2 = QtGui.QMenu(self.menuBarlines)
self.menuAdvanced_2.setObjectName(_fromUtf8("menuAdvanced_2"))
self.menuNote_Pitch = QtGui.QMenu(self.menuObjects)
self.menuNote_Pitch.setObjectName(_fromUtf8("menuNote_Pitch"))
self.menuStyles_4 = QtGui.QMenu(self.menuNote_Pitch)
self.menuStyles_4.setObjectName(_fromUtf8("menuStyles_4"))
self.menuJumps = QtGui.QMenu(self.menuObjects)
self.menuJumps.setObjectName(_fromUtf8("menuJumps"))
self.menuPedals = QtGui.QMenu(self.menuObjects)
self.menuPedals.setObjectName(_fromUtf8("menuPedals"))
self.menuPrint_Lilypond = QtGui.QMenu(self.menuObjects)
self.menuPrint_Lilypond.setObjectName(_fromUtf8("menuPrint_Lilypond"))
self.menuHelp = QtGui.QMenu(self.menubar)
self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
self.menuView = QtGui.QMenu(self.menubar)
self.menuView.setObjectName(_fromUtf8("menuView"))
self.menuCollapse_Tracks = QtGui.QMenu(self.menuView)
self.menuCollapse_Tracks.setObjectName(_fromUtf8("menuCollapse_Tracks"))
self.menuContainer = QtGui.QMenu(self.menubar)
self.menuContainer.setObjectName(_fromUtf8("menuContainer"))
self.menu_Grouping_Print = QtGui.QMenu(self.menuContainer)
self.menu_Grouping_Print.setObjectName(_fromUtf8("menu_Grouping_Print"))
self.menuAdvanced = QtGui.QMenu(self.menubar)
self.menuAdvanced.setTearOffEnabled(False)
self.menuAdvanced.setObjectName(_fromUtf8("menuAdvanced"))
self.menuMidi = QtGui.QMenu(self.menuAdvanced)
self.menuMidi.setObjectName(_fromUtf8("menuMidi"))
self.menuLilypond_Directives = QtGui.QMenu(self.menuAdvanced)
self.menuLilypond_Directives.setObjectName(_fromUtf8("menuLilypond_Directives"))
self.menuTrigger = QtGui.QMenu(self.menuAdvanced)
self.menuTrigger.setObjectName(_fromUtf8("menuTrigger"))
self.menuOther_2 = QtGui.QMenu(self.menuAdvanced)
self.menuOther_2.setObjectName(_fromUtf8("menuOther_2"))
self.menuRearrange = QtGui.QMenu(self.menuAdvanced)
self.menuRearrange.setObjectName(_fromUtf8("menuRearrange"))
self.menuSubstitutions = QtGui.QMenu(self.menuAdvanced)
self.menuSubstitutions.setObjectName(_fromUtf8("menuSubstitutions"))
self.menuJack_Midi_Mode = QtGui.QMenu(self.menuAdvanced)
self.menuJack_Midi_Mode.setObjectName(_fromUtf8("menuJack_Midi_Mode"))
self.menuLilypond = QtGui.QMenu(self.menuAdvanced)
self.menuLilypond.setObjectName(_fromUtf8("menuLilypond"))
self.menuDebug_and_Tests = QtGui.QMenu(self.menuAdvanced)
self.menuDebug_and_Tests.setObjectName(_fromUtf8("menuDebug_and_Tests"))
self.menuUser_Commands = QtGui.QMenu(self.menubar)
self.menuUser_Commands.setObjectName(_fromUtf8("menuUser_Commands"))
self.menuPalette = QtGui.QMenu(self.menubar)
self.menuPalette.setObjectName(_fromUtf8("menuPalette"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtGui.QToolBar(MainWindow)
self.toolBar.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
self.toolBar.setAcceptDrops(False)
self.toolBar.setMovable(False)
self.toolBar.setIconSize(QtCore.QSize(24, 24))
self.toolBar.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly)
self.toolBar.setFloatable(False)
self.toolBar.setObjectName(_fromUtf8("toolBar"))
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.actionOpen = QtGui.QAction(MainWindow)
self.actionOpen.setObjectName(_fromUtf8("actionOpen"))
self.actionNew = QtGui.QAction(MainWindow)
self.actionNew.setObjectName(_fromUtf8("actionNew"))
self.actionSave = QtGui.QAction(MainWindow)
self.actionSave.setObjectName(_fromUtf8("actionSave"))
self.actionSave_As = QtGui.QAction(MainWindow)
self.actionSave_As.setObjectName(_fromUtf8("actionSave_As"))
self.actionPdf = QtGui.QAction(MainWindow)
self.actionPdf.setObjectName(_fromUtf8("actionPdf"))
self.actionLilypond = QtGui.QAction(MainWindow)
self.actionLilypond.setObjectName(_fromUtf8("actionLilypond"))
self.actionMidi = QtGui.QAction(MainWindow)
self.actionMidi.setObjectName(_fromUtf8("actionMidi"))
self.actionView_PDF = QtGui.QAction(MainWindow)
self.actionView_PDF.setObjectName(_fromUtf8("actionView_PDF"))
self.actionQuit = QtGui.QAction(MainWindow)
self.actionQuit.setObjectName(_fromUtf8("actionQuit"))
self.actionClose = QtGui.QAction(MainWindow)
self.actionClose.setObjectName(_fromUtf8("actionClose"))
self.actionStaccato = QtGui.QAction(MainWindow)
self.actionStaccato.setShortcutContext(QtCore.Qt.WindowShortcut)
self.actionStaccato.setObjectName(_fromUtf8("actionStaccato"))
self.actionFermata = QtGui.QAction(MainWindow)
self.actionFermata.setObjectName(_fromUtf8("actionFermata"))
self.actionTrill = QtGui.QAction(MainWindow)
self.actionTrill.setObjectName(_fromUtf8("actionTrill"))
self.actionDownbow = QtGui.QAction(MainWindow)
self.actionDownbow.setObjectName(_fromUtf8("actionDownbow"))
self.actionCopy = QtGui.QAction(MainWindow)
self.actionCopy.setObjectName(_fromUtf8("actionCopy"))
self.actionCut = QtGui.QAction(MainWindow)
self.actionCut.setObjectName(_fromUtf8("actionCut"))
self.actionPaste = QtGui.QAction(MainWindow)
self.actionPaste.setObjectName(_fromUtf8("actionPaste"))
self.actionUndo = QtGui.QAction(MainWindow)
self.actionUndo.setObjectName(_fromUtf8("actionUndo"))
self.actionRedo = QtGui.QAction(MainWindow)
self.actionRedo.setObjectName(_fromUtf8("actionRedo"))
self.actionDelete = QtGui.QAction(MainWindow)
self.actionDelete.setObjectName(_fromUtf8("actionDelete"))
self.actionPreferences = QtGui.QAction(MainWindow)
self.actionPreferences.setObjectName(_fromUtf8("actionPreferences"))
self.actionAbout = QtGui.QAction(MainWindow)
self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
self.actionChat = QtGui.QAction(MainWindow)
self.actionChat.setObjectName(_fromUtf8("actionChat"))
self.actionManual = QtGui.QAction(MainWindow)
self.actionManual.setObjectName(_fromUtf8("actionManual"))
self.actionMetadata = QtGui.QAction(MainWindow)
self.actionMetadata.setObjectName(_fromUtf8("actionMetadata"))
self.actionClefs = QtGui.QAction(MainWindow)
self.actionClefs.setObjectName(_fromUtf8("actionClefs"))
self.actionTime_Signatures = QtGui.QAction(MainWindow)
self.actionTime_Signatures.setObjectName(_fromUtf8("actionTime_Signatures"))
self.actionKey_Signatures = QtGui.QAction(MainWindow)
self.actionKey_Signatures.setObjectName(_fromUtf8("actionKey_Signatures"))
self.actionPaste_As_Link = QtGui.QAction(MainWindow)
self.actionPaste_As_Link.setObjectName(_fromUtf8("actionPaste_As_Link"))
self.actionDelete_Previous = QtGui.QAction(MainWindow)
self.actionDelete_Previous.setObjectName(_fromUtf8("actionDelete_Previous"))
self.actionDuplicate = QtGui.QAction(MainWindow)
self.actionDuplicate.setObjectName(_fromUtf8("actionDuplicate"))
self.actionLink = QtGui.QAction(MainWindow)
self.actionLink.setObjectName(_fromUtf8("actionLink"))
self.actionSidebar = QtGui.QAction(MainWindow)
self.actionSidebar.setCheckable(True)
self.actionSidebar.setChecked(True)
self.actionSidebar.setObjectName(_fromUtf8("actionSidebar"))
self.actionAdd_Track = QtGui.QAction(MainWindow)
self.actionAdd_Track.setObjectName(_fromUtf8("actionAdd_Track"))
self.actionDelete_Current_Track = QtGui.QAction(MainWindow)
self.actionDelete_Current_Track.setObjectName(_fromUtf8("actionDelete_Current_Track"))
self.actionMove_Track_Up = QtGui.QAction(MainWindow)
self.actionMove_Track_Up.setObjectName(_fromUtf8("actionMove_Track_Up"))
self.actionMove_Track_Down = QtGui.QAction(MainWindow)
self.actionMove_Track_Down.setObjectName(_fromUtf8("actionMove_Track_Down"))
self.actionBarlines = QtGui.QAction(MainWindow)
self.actionBarlines.setCheckable(True)
self.actionBarlines.setChecked(True)
self.actionBarlines.setObjectName(_fromUtf8("actionBarlines"))
self.actionEdit_Current_Object = QtGui.QAction(MainWindow)
self.actionEdit_Current_Object.setObjectName(_fromUtf8("actionEdit_Current_Object"))
self.actionTriplet = QtGui.QAction(MainWindow)
self.actionTriplet.setObjectName(_fromUtf8("actionTriplet"))
self.actionCustom_Tuplet = QtGui.QAction(MainWindow)
self.actionCustom_Tuplet.setObjectName(_fromUtf8("actionCustom_Tuplet"))
self.actionAugment = QtGui.QAction(MainWindow)
self.actionAugment.setObjectName(_fromUtf8("actionAugment"))
self.actionDiminish = QtGui.QAction(MainWindow)
self.actionDiminish.setObjectName(_fromUtf8("actionDiminish"))
self.actionAdd_Dot = QtGui.QAction(MainWindow)
self.actionAdd_Dot.setObjectName(_fromUtf8("actionAdd_Dot"))
self.actionRemove_Dot = QtGui.QAction(MainWindow)
self.actionRemove_Dot.setObjectName(_fromUtf8("actionRemove_Dot"))
self.actionMultiMeasureRest = QtGui.QAction(MainWindow)
self.actionMultiMeasureRest.setObjectName(_fromUtf8("actionMultiMeasureRest"))
self.actionFullMeasureRest = QtGui.QAction(MainWindow)
self.actionFullMeasureRest.setObjectName(_fromUtf8("actionFullMeasureRest"))
self.actionClear_Tuplets = QtGui.QAction(MainWindow)
self.actionClear_Tuplets.setObjectName(_fromUtf8("actionClear_Tuplets"))
self.actionInsert_Lilypond = QtGui.QAction(MainWindow)
self.actionInsert_Lilypond.setObjectName(_fromUtf8("actionInsert_Lilypond"))
self.actionInsert_Wait_For_Chord_Lilypond = QtGui.QAction(MainWindow)
self.actionInsert_Wait_For_Chord_Lilypond.setObjectName(_fromUtf8("actionInsert_Wait_For_Chord_Lilypond"))
self.actionClear_Object_Directives = QtGui.QAction(MainWindow)
self.actionClear_Object_Directives.setObjectName(_fromUtf8("actionClear_Object_Directives"))
self.actionClear_Notes_Directives = QtGui.QAction(MainWindow)
self.actionClear_Notes_Directives.setObjectName(_fromUtf8("actionClear_Notes_Directives"))
self.actionClear_All_Directives = QtGui.QAction(MainWindow)
self.actionClear_All_Directives.setObjectName(_fromUtf8("actionClear_All_Directives"))
self.actionEdit_Lilypond = QtGui.QAction(MainWindow)
self.actionEdit_Lilypond.setObjectName(_fromUtf8("actionEdit_Lilypond"))
self.actionEdit_Wait_For_Chord_Lilypond = QtGui.QAction(MainWindow)
self.actionEdit_Wait_For_Chord_Lilypond.setObjectName(_fromUtf8("actionEdit_Wait_For_Chord_Lilypond"))
self.actionCreate_Pre_Mid_Post_Directives = QtGui.QAction(MainWindow)
self.actionCreate_Pre_Mid_Post_Directives.setObjectName(_fromUtf8("actionCreate_Pre_Mid_Post_Directives"))
self.actionEdit_Pre_Mid_Post_Directives = QtGui.QAction(MainWindow)
self.actionEdit_Pre_Mid_Post_Directives.setObjectName(_fromUtf8("actionEdit_Pre_Mid_Post_Directives"))
self.actionEdit_Note_Directives = QtGui.QAction(MainWindow)
self.actionEdit_Note_Directives.setObjectName(_fromUtf8("actionEdit_Note_Directives"))
self.actionCreate_Notes_Directives = QtGui.QAction(MainWindow)
self.actionCreate_Notes_Directives.setObjectName(_fromUtf8("actionCreate_Notes_Directives"))
self.actionCustom_Key_Signature = QtGui.QAction(MainWindow)
self.actionCustom_Key_Signature.setObjectName(_fromUtf8("actionCustom_Key_Signature"))
self.actionPiano = QtGui.QAction(MainWindow)
self.actionPiano.setObjectName(_fromUtf8("actionPiano"))
self.actionForte = QtGui.QAction(MainWindow)
self.actionForte.setObjectName(_fromUtf8("actionForte"))
self.actionMezzo_piano = QtGui.QAction(MainWindow)
self.actionMezzo_piano.setObjectName(_fromUtf8("actionMezzo_piano"))
self.actionMezzo_forte = QtGui.QAction(MainWindow)
self.actionMezzo_forte.setObjectName(_fromUtf8("actionMezzo_forte"))
self.actionFortissimo = QtGui.QAction(MainWindow)
self.actionFortissimo.setObjectName(_fromUtf8("actionFortissimo"))
self.actionFortississimo = QtGui.QAction(MainWindow)
self.actionFortississimo.setObjectName(_fromUtf8("actionFortississimo"))
self.action4xforte = QtGui.QAction(MainWindow)
self.action4xforte.setObjectName(_fromUtf8("action4xforte"))
self.actionPianissimo = QtGui.QAction(MainWindow)
self.actionPianissimo.setObjectName(_fromUtf8("actionPianissimo"))
self.actionPianississimo = QtGui.QAction(MainWindow)
self.actionPianississimo.setObjectName(_fromUtf8("actionPianississimo"))
self.action4xpiano = QtGui.QAction(MainWindow)
self.action4xpiano.setObjectName(_fromUtf8("action4xpiano"))
self.action5xpiano = QtGui.QAction(MainWindow)
self.action5xpiano.setObjectName(_fromUtf8("action5xpiano"))
self.actionCrescendo = QtGui.QAction(MainWindow)
self.actionCrescendo.setObjectName(_fromUtf8("actionCrescendo"))
self.actionDecrescendo = QtGui.QAction(MainWindow)
self.actionDecrescendo.setObjectName(_fromUtf8("actionDecrescendo"))
self.actionEnd_cresc_decresc = QtGui.QAction(MainWindow)
self.actionEnd_cresc_decresc.setObjectName(_fromUtf8("actionEnd_cresc_decresc"))
self.actionDynamicStyle_Above_Track = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Above_Track.setObjectName(_fromUtf8("actionDynamicStyle_Above_Track"))
self.actionDynamicStyle_Below_Track = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Below_Track.setObjectName(_fromUtf8("actionDynamicStyle_Below_Track"))
self.actionDynamicStyle_Neutral = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Neutral.setObjectName(_fromUtf8("actionDynamicStyle_Neutral"))
self.actionDynamicStyle_Crescendo_as_text = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Crescendo_as_text.setObjectName(_fromUtf8("actionDynamicStyle_Crescendo_as_text"))
self.actionDynamicStyle_Crescendo_as_hairpin = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Crescendo_as_hairpin.setObjectName(_fromUtf8("actionDynamicStyle_Crescendo_as_hairpin"))
self.actionDynamicStyle_Decrescendo_as_text = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Decrescendo_as_text.setObjectName(_fromUtf8("actionDynamicStyle_Decrescendo_as_text"))
self.actionDynamicStyle_Decrescendo_as_hairpin = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Decrescendo_as_hairpin.setObjectName(_fromUtf8("actionDynamicStyle_Decrescendo_as_hairpin"))
self.actionDynamicStyle_Decrescendo_as_Diminuendo = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Decrescendo_as_Diminuendo.setObjectName(_fromUtf8("actionDynamicStyle_Decrescendo_as_Diminuendo"))
self.actionDynamicStyle_Decrescendo_as_Decresc = QtGui.QAction(MainWindow)
self.actionDynamicStyle_Decrescendo_as_Decresc.setObjectName(_fromUtf8("actionDynamicStyle_Decrescendo_as_Decresc"))
self.actionSlur_Start_On_Off = QtGui.QAction(MainWindow)
self.actionSlur_Start_On_Off.setObjectName(_fromUtf8("actionSlur_Start_On_Off"))
self.actionSlur_End_On_Off = QtGui.QAction(MainWindow)
self.actionSlur_End_On_Off.setObjectName(_fromUtf8("actionSlur_End_On_Off"))
self.actionPhrasing_Slur_Start_On_Off = QtGui.QAction(MainWindow)
self.actionPhrasing_Slur_Start_On_Off.setObjectName(_fromUtf8("actionPhrasing_Slur_Start_On_Off"))
self.actionPhrasing_Slur_End_On_Off = QtGui.QAction(MainWindow)
self.actionPhrasing_Slur_End_On_Off.setObjectName(_fromUtf8("actionPhrasing_Slur_End_On_Off"))
self.actionSlurStyleUp = QtGui.QAction(MainWindow)
self.actionSlurStyleUp.setObjectName(_fromUtf8("actionSlurStyleUp"))
self.actionSlurStyleDown = QtGui.QAction(MainWindow)
self.actionSlurStyleDown.setObjectName(_fromUtf8("actionSlurStyleDown"))
self.actionSlurStyleNeutral = QtGui.QAction(MainWindow)
self.actionSlurStyleNeutral.setObjectName(_fromUtf8("actionSlurStyleNeutral"))
self.actionSlurStyleDashed = QtGui.QAction(MainWindow)
self.actionSlurStyleDashed.setObjectName(_fromUtf8("actionSlurStyleDashed"))
self.actionSlurStyleDotted = QtGui.QAction(MainWindow)
self.actionSlurStyleDotted.setObjectName(_fromUtf8("actionSlurStyleDotted"))
self.actionSlurStyleSolid = QtGui.QAction(MainWindow)
self.actionSlurStyleSolid.setObjectName(_fromUtf8("actionSlurStyleSolid"))
self.actionSlurStyleDoubleOn = QtGui.QAction(MainWindow)
self.actionSlurStyleDoubleOn.setObjectName(_fromUtf8("actionSlurStyleDoubleOn"))
self.actionSlurStyleDoubleOff = QtGui.QAction(MainWindow)
self.actionSlurStyleDoubleOff.setObjectName(_fromUtf8("actionSlurStyleDoubleOff"))
self.actionPhrasingSlurStyleUp = QtGui.QAction(MainWindow)
self.actionPhrasingSlurStyleUp.setObjectName(_fromUtf8("actionPhrasingSlurStyleUp"))
self.actionPhrasingSlurStyleDown = QtGui.QAction(MainWindow)
self.actionPhrasingSlurStyleDown.setObjectName(_fromUtf8("actionPhrasingSlurStyleDown"))
self.actionPhrasingSlurStyleNeutral = QtGui.QAction(MainWindow)
self.actionPhrasingSlurStyleNeutral.setObjectName(_fromUtf8("actionPhrasingSlurStyleNeutral"))
self.actionPhrasingSlurStyleDashed = QtGui.QAction(MainWindow)
self.actionPhrasingSlurStyleDashed.setObjectName(_fromUtf8("actionPhrasingSlurStyleDashed"))
self.actionPhrasingSlurStyleDotted = QtGui.QAction(MainWindow)
self.actionPhrasingSlurStyleDotted.setObjectName(_fromUtf8("actionPhrasingSlurStyleDotted"))
self.actionPhrasingSlurStyleSolid = QtGui.QAction(MainWindow)
self.actionPhrasingSlurStyleSolid.setObjectName(_fromUtf8("actionPhrasingSlurStyleSolid"))
self.actionTie_On_Off = QtGui.QAction(MainWindow)
self.actionTie_On_Off.setObjectName(_fromUtf8("actionTie_On_Off"))
self.actionLaissez_Vibrer_On_Off = QtGui.QAction(MainWindow)
self.actionLaissez_Vibrer_On_Off.setObjectName(_fromUtf8("actionLaissez_Vibrer_On_Off"))
self.actionLaissez_Vibrer_On_Off_Chord = QtGui.QAction(MainWindow)
self.actionLaissez_Vibrer_On_Off_Chord.setObjectName(_fromUtf8("actionLaissez_Vibrer_On_Off_Chord"))
self.actionTie_One_Note_On_Off = QtGui.QAction(MainWindow)
self.actionTie_One_Note_On_Off.setObjectName(_fromUtf8("actionTie_One_Note_On_Off"))
self.actionTieStyleUp = QtGui.QAction(MainWindow)
self.actionTieStyleUp.setObjectName(_fromUtf8("actionTieStyleUp"))
self.actionTieStyleDown = QtGui.QAction(MainWindow)
self.actionTieStyleDown.setObjectName(_fromUtf8("actionTieStyleDown"))
self.actionTieStyleNeutral = QtGui.QAction(MainWindow)
self.actionTieStyleNeutral.setObjectName(_fromUtf8("actionTieStyleNeutral"))
self.actionTieStyleDotted = QtGui.QAction(MainWindow)
self.actionTieStyleDotted.setObjectName(_fromUtf8("actionTieStyleDotted"))
self.actionTieStyleDashed = QtGui.QAction(MainWindow)
self.actionTieStyleDashed.setObjectName(_fromUtf8("actionTieStyleDashed"))
self.actionTieStyleSolid = QtGui.QAction(MainWindow)
self.actionTieStyleSolid.setObjectName(_fromUtf8("actionTieStyleSolid"))
self.actionTieStyleWaitForNoteOn = QtGui.QAction(MainWindow)
self.actionTieStyleWaitForNoteOn.setObjectName(_fromUtf8("actionTieStyleWaitForNoteOn"))
self.actionTieStyleWaitForNoteOff = QtGui.QAction(MainWindow)
self.actionTieStyleWaitForNoteOff.setObjectName(_fromUtf8("actionTieStyleWaitForNoteOff"))
self.actionPiano_Staff_Start = QtGui.QAction(MainWindow)
self.actionPiano_Staff_Start.setObjectName(_fromUtf8("actionPiano_Staff_Start"))
self.actionGrand_Staff_Start = QtGui.QAction(MainWindow)
self.actionGrand_Staff_Start.setObjectName(_fromUtf8("actionGrand_Staff_Start"))
self.actionOrchestral_Staff_Start = QtGui.QAction(MainWindow)
self.actionOrchestral_Staff_Start.setObjectName(_fromUtf8("actionOrchestral_Staff_Start"))
self.actionChoir_Staff_Start = QtGui.QAction(MainWindow)
self.actionChoir_Staff_Start.setObjectName(_fromUtf8("actionChoir_Staff_Start"))
self.actionSquare_Staff_Start = QtGui.QAction(MainWindow)
self.actionSquare_Staff_Start.setObjectName(_fromUtf8("actionSquare_Staff_Start"))
self.actionVoice_and_Figured_Bass_Start = QtGui.QAction(MainWindow)
self.actionVoice_and_Figured_Bass_Start.setObjectName(_fromUtf8("actionVoice_and_Figured_Bass_Start"))
self.actionEnd_One_Group = QtGui.QAction(MainWindow)
self.actionEnd_One_Group.setObjectName(_fromUtf8("actionEnd_One_Group"))
self.actionClear_All_Groupings = QtGui.QAction(MainWindow)
self.actionClear_All_Groupings.setObjectName(_fromUtf8("actionClear_All_Groupings"))
self.actionPerformance_Signature = QtGui.QAction(MainWindow)
self.actionPerformance_Signature.setObjectName(_fromUtf8("actionPerformance_Signature"))
self.actionEdit_Performance_Signature = QtGui.QAction(MainWindow)
self.actionEdit_Performance_Signature.setObjectName(_fromUtf8("actionEdit_Performance_Signature"))
self.actionDefault_Performance = QtGui.QAction(MainWindow)
self.actionDefault_Performance.setObjectName(_fromUtf8("actionDefault_Performance"))
self.actionUser_Dynamic_1 = QtGui.QAction(MainWindow)
self.actionUser_Dynamic_1.setObjectName(_fromUtf8("actionUser_Dynamic_1"))
self.actionUser_Dynamic_2 = QtGui.QAction(MainWindow)
self.actionUser_Dynamic_2.setObjectName(_fromUtf8("actionUser_Dynamic_2"))
self.actionUser_Dynamic_3 = QtGui.QAction(MainWindow)
self.actionUser_Dynamic_3.setObjectName(_fromUtf8("actionUser_Dynamic_3"))
self.actionUpbeat = QtGui.QAction(MainWindow)
self.actionUpbeat.setObjectName(_fromUtf8("actionUpbeat"))
self.actionVoiceAutomatic = QtGui.QAction(MainWindow)
self.actionVoiceAutomatic.setObjectName(_fromUtf8("actionVoiceAutomatic"))
self.actionVoiceOne = QtGui.QAction(MainWindow)
self.actionVoiceOne.setObjectName(_fromUtf8("actionVoiceOne"))
self.actionVoiceTwo = QtGui.QAction(MainWindow)
self.actionVoiceTwo.setObjectName(_fromUtf8("actionVoiceTwo"))
self.actionVoiceThree = QtGui.QAction(MainWindow)
self.actionVoiceThree.setObjectName(_fromUtf8("actionVoiceThree"))
self.actionVoiceFour = QtGui.QAction(MainWindow)
self.actionVoiceFour.setObjectName(_fromUtf8("actionVoiceFour"))
self.actionBeam_Start = QtGui.QAction(MainWindow)
self.actionBeam_Start.setObjectName(_fromUtf8("actionBeam_Start"))
self.actionBeam_End = QtGui.QAction(MainWindow)
self.actionBeam_End.setObjectName(_fromUtf8("actionBeam_End"))
self.actionNo_Beam = QtGui.QAction(MainWindow)
self.actionNo_Beam.setObjectName(_fromUtf8("actionNo_Beam"))
self.actionForce_Beam = QtGui.QAction(MainWindow)
self.actionForce_Beam.setObjectName(_fromUtf8("actionForce_Beam"))
self.actionExport_Options = QtGui.QAction(MainWindow)
self.actionExport_Options.setObjectName(_fromUtf8("actionExport_Options"))
self.actionEdit_Chord_Symbol = QtGui.QAction(MainWindow)
self.actionEdit_Chord_Symbol.setObjectName(_fromUtf8("actionEdit_Chord_Symbol"))
self.actionClear_Chord_Symbol = QtGui.QAction(MainWindow)
self.actionClear_Chord_Symbol.setObjectName(_fromUtf8("actionClear_Chord_Symbol"))
self.actionEdit_Figured_Bass = QtGui.QAction(MainWindow)
self.actionEdit_Figured_Bass.setObjectName(_fromUtf8("actionEdit_Figured_Bass"))
self.actionClear_Figured_Bass = QtGui.QAction(MainWindow)
self.actionClear_Figured_Bass.setObjectName(_fromUtf8("actionClear_Figured_Bass"))
self.actionMass_Insert_Chord_Symbols = QtGui.QAction(MainWindow)
self.actionMass_Insert_Chord_Symbols.setObjectName(_fromUtf8("actionMass_Insert_Chord_Symbols"))
self.actionMass_Insert_Figured_Bass = QtGui.QAction(MainWindow)
self.actionMass_Insert_Figured_Bass.setObjectName(_fromUtf8("actionMass_Insert_Figured_Bass"))
self.actionLyrics = QtGui.QAction(MainWindow)
self.actionLyrics.setCheckable(True)
self.actionLyrics.setChecked(True)
self.actionLyrics.setObjectName(_fromUtf8("actionLyrics"))
self.actionPaste_as_One_Track_Stream = QtGui.QAction(MainWindow)
self.actionPaste_as_One_Track_Stream.setObjectName(_fromUtf8("actionPaste_as_One_Track_Stream"))
self.actionSplit_in_Two = QtGui.QAction(MainWindow)
self.actionSplit_in_Two.setObjectName(_fromUtf8("actionSplit_in_Two"))
self.actionSplit_in_Three = QtGui.QAction(MainWindow)
self.actionSplit_in_Three.setObjectName(_fromUtf8("actionSplit_in_Three"))
self.actionCustom_Split = QtGui.QAction(MainWindow)
self.actionCustom_Split.setObjectName(_fromUtf8("actionCustom_Split"))
self.actionTremolo_in_Two = QtGui.QAction(MainWindow)
self.actionTremolo_in_Two.setObjectName(_fromUtf8("actionTremolo_in_Two"))
self.actionTremolo_in_Four = QtGui.QAction(MainWindow)
self.actionTremolo_in_Four.setObjectName(_fromUtf8("actionTremolo_in_Four"))
self.actionCustom_Tremolo = QtGui.QAction(MainWindow)
self.actionCustom_Tremolo.setObjectName(_fromUtf8("actionCustom_Tremolo"))
self.actionEdit_Default_Performance_Signature = QtGui.QAction(MainWindow)
self.actionEdit_Default_Performance_Signature.setObjectName(_fromUtf8("actionEdit_Default_Performance_Signature"))
self.actionInstrument_Change = QtGui.QAction(MainWindow)
self.actionInstrument_Change.setObjectName(_fromUtf8("actionInstrument_Change"))
self.actionChannel_Plus = QtGui.QAction(MainWindow)
self.actionChannel_Plus.setObjectName(_fromUtf8("actionChannel_Plus"))
self.actionChannel_Minus = QtGui.QAction(MainWindow)
self.actionChannel_Minus.setObjectName(_fromUtf8("actionChannel_Minus"))
self.actionChannel_Force = QtGui.QAction(MainWindow)
self.actionChannel_Force.setObjectName(_fromUtf8("actionChannel_Force"))
self.actionWiden = QtGui.QAction(MainWindow)
self.actionWiden.setObjectName(_fromUtf8("actionWiden"))
self.actionShrinken = QtGui.QAction(MainWindow)
self.actionShrinken.setObjectName(_fromUtf8("actionShrinken"))
self.actionZoom_In = QtGui.QAction(MainWindow)
self.actionZoom_In.setObjectName(_fromUtf8("actionZoom_In"))
self.actionZoom_Out = QtGui.QAction(MainWindow)
self.actionZoom_Out.setObjectName(_fromUtf8("actionZoom_Out"))
self.actionScript = QtGui.QAction(MainWindow)
self.actionScript.setObjectName(_fromUtf8("actionScript"))
self.actionPrevailing_Duration = QtGui.QAction(MainWindow)
self.actionPrevailing_Duration.setCheckable(True)
self.actionPrevailing_Duration.setObjectName(_fromUtf8("actionPrevailing_Duration"))
self.actionInsert_Duration = QtGui.QAction(MainWindow)
self.actionInsert_Duration.setCheckable(True)
self.actionInsert_Duration.setChecked(True)
self.actionInsert_Duration.setObjectName(_fromUtf8("actionInsert_Duration"))
self.actionToggle_Insert_Prevailing = QtGui.QAction(MainWindow)
self.actionToggle_Insert_Prevailing.setObjectName(_fromUtf8("actionToggle_Insert_Prevailing"))
self.actionMode_Fingerings = QtGui.QAction(MainWindow)
self.actionMode_Fingerings.setObjectName(_fromUtf8("actionMode_Fingerings"))
self.actionMode_String_Numbers = QtGui.QAction(MainWindow)
self.actionMode_String_Numbers.setObjectName(_fromUtf8("actionMode_String_Numbers"))
self.actionMode_Stroke_Fingering = QtGui.QAction(MainWindow)
self.actionMode_Stroke_Fingering.setObjectName(_fromUtf8("actionMode_Stroke_Fingering"))
self.actionChannel_Clear = QtGui.QAction(MainWindow)
self.actionChannel_Clear.setObjectName(_fromUtf8("actionChannel_Clear"))
self.actionToggle_Prevailing_Dot = QtGui.QAction(MainWindow)
self.actionToggle_Prevailing_Dot.setCheckable(True)
self.actionToggle_Prevailing_Dot.setObjectName(_fromUtf8("actionToggle_Prevailing_Dot"))
self.actionTempo_Signature = QtGui.QAction(MainWindow)
self.actionTempo_Signature.setObjectName(_fromUtf8("actionTempo_Signature"))
self.actionClear_All_Fingerings = QtGui.QAction(MainWindow)
self.actionClear_All_Fingerings.setObjectName(_fromUtf8("actionClear_All_Fingerings"))
self.actionCustom_Finger = QtGui.QAction(MainWindow)
self.actionCustom_Finger.setObjectName(_fromUtf8("actionCustom_Finger"))
self.actionFinger_1 = QtGui.QAction(MainWindow)
self.actionFinger_1.setObjectName(_fromUtf8("actionFinger_1"))
self.actionFinger_2 = QtGui.QAction(MainWindow)
self.actionFinger_2.setObjectName(_fromUtf8("actionFinger_2"))
self.actionFinger_3 = QtGui.QAction(MainWindow)
self.actionFinger_3.setObjectName(_fromUtf8("actionFinger_3"))
self.actionFinger_4 = QtGui.QAction(MainWindow)
self.actionFinger_4.setObjectName(_fromUtf8("actionFinger_4"))
self.actionFinger_5 = QtGui.QAction(MainWindow)
self.actionFinger_5.setObjectName(_fromUtf8("actionFinger_5"))
self.actionFinger = QtGui.QAction(MainWindow)
self.actionFinger.setObjectName(_fromUtf8("actionFinger"))
self.actionCustom_String_Number = QtGui.QAction(MainWindow)
self.actionCustom_String_Number.setObjectName(_fromUtf8("actionCustom_String_Number"))
self.actionString_1 = QtGui.QAction(MainWindow)
self.actionString_1.setObjectName(_fromUtf8("actionString_1"))
self.actionString_2 = QtGui.QAction(MainWindow)
self.actionString_2.setObjectName(_fromUtf8("actionString_2"))
self.actionString_3 = QtGui.QAction(MainWindow)
self.actionString_3.setObjectName(_fromUtf8("actionString_3"))
self.actionString_4 = QtGui.QAction(MainWindow)
self.actionString_4.setObjectName(_fromUtf8("actionString_4"))
self.actionString_5 = QtGui.QAction(MainWindow)
self.actionString_5.setObjectName(_fromUtf8("actionString_5"))
self.actionString_6 = QtGui.QAction(MainWindow)
self.actionString_6.setObjectName(_fromUtf8("actionString_6"))
self.actionString_7 = QtGui.QAction(MainWindow)
self.actionString_7.setObjectName(_fromUtf8("actionString_7"))
self.actionString_8 = QtGui.QAction(MainWindow)
self.actionString_8.setObjectName(_fromUtf8("actionString_8"))
self.actionString_9 = QtGui.QAction(MainWindow)
self.actionString_9.setObjectName(_fromUtf8("actionString_9"))
self.actionString_0 = QtGui.QAction(MainWindow)
self.actionString_0.setObjectName(_fromUtf8("actionString_0"))
self.actionCustom_Right_Hand_Stroke_Finger = QtGui.QAction(MainWindow)
self.actionCustom_Right_Hand_Stroke_Finger.setObjectName(_fromUtf8("actionCustom_Right_Hand_Stroke_Finger"))
self.actionStroke_1 = QtGui.QAction(MainWindow)
self.actionStroke_1.setObjectName(_fromUtf8("actionStroke_1"))
self.actionStroke_2 = QtGui.QAction(MainWindow)
self.actionStroke_2.setObjectName(_fromUtf8("actionStroke_2"))
self.actionStroke_3 = QtGui.QAction(MainWindow)
self.actionStroke_3.setObjectName(_fromUtf8("actionStroke_3"))
self.actionStroke_4 = QtGui.QAction(MainWindow)
self.actionStroke_4.setObjectName(_fromUtf8("actionStroke_4"))
self.actionStroke_x = QtGui.QAction(MainWindow)
self.actionStroke_x.setObjectName(_fromUtf8("actionStroke_x"))
self.actionFingering_Direction = QtGui.QAction(MainWindow)
self.actionFingering_Direction.setObjectName(_fromUtf8("actionFingering_Direction"))
self.actionFingering_Toggle_Allow_in_Staff = QtGui.QAction(MainWindow)
self.actionFingering_Toggle_Allow_in_Staff.setObjectName(_fromUtf8("actionFingering_Toggle_Allow_in_Staff"))
self.actionFingering_Add_Stem_Support = QtGui.QAction(MainWindow)
self.actionFingering_Add_Stem_Support.setObjectName(_fromUtf8("actionFingering_Add_Stem_Support"))
self.actionFingering_Disable_Stem_Support = QtGui.QAction(MainWindow)
self.actionFingering_Disable_Stem_Support.setObjectName(_fromUtf8("actionFingering_Disable_Stem_Support"))
self.actionString_Toggle_Allow_in_Staff = QtGui.QAction(MainWindow)
self.actionString_Toggle_Allow_in_Staff.setObjectName(_fromUtf8("actionString_Toggle_Allow_in_Staff"))
self.actionString_Add_Stem_Support = QtGui.QAction(MainWindow)
self.actionString_Add_Stem_Support.setObjectName(_fromUtf8("actionString_Add_Stem_Support"))
self.actionString_Disable_Stem_Support = QtGui.QAction(MainWindow)
self.actionString_Disable_Stem_Support.setObjectName(_fromUtf8("actionString_Disable_Stem_Support"))
self.actionStroke_Directions = QtGui.QAction(MainWindow)
self.actionStroke_Directions.setObjectName(_fromUtf8("actionStroke_Directions"))
self.actionStroke_Toggle_Allow_in_Staff = QtGui.QAction(MainWindow)
self.actionStroke_Toggle_Allow_in_Staff.setObjectName(_fromUtf8("actionStroke_Toggle_Allow_in_Staff"))
self.actionStroke_Add_Stem_Support = QtGui.QAction(MainWindow)
self.actionStroke_Add_Stem_Support.setObjectName(_fromUtf8("actionStroke_Add_Stem_Support"))
self.actionStroke_Disable_Stem_Support = QtGui.QAction(MainWindow)
self.actionStroke_Disable_Stem_Support.setObjectName(_fromUtf8("actionStroke_Disable_Stem_Support"))
self.actionFinger_0 = QtGui.QAction(MainWindow)
self.actionFinger_0.setObjectName(_fromUtf8("actionFinger_0"))
self.actionDouble = QtGui.QAction(MainWindow)
self.actionDouble.setObjectName(_fromUtf8("actionDouble"))
self.actionBarOpen = QtGui.QAction(MainWindow)
self.actionBarOpen.setObjectName(_fromUtf8("actionBarOpen"))
self.actionEnd = QtGui.QAction(MainWindow)
self.actionEnd.setObjectName(_fromUtf8("actionEnd"))
self.actionOpen_End = QtGui.QAction(MainWindow)
self.actionOpen_End.setObjectName(_fromUtf8("actionOpen_End"))
self.actionEnd_Open = QtGui.QAction(MainWindow)
self.actionEnd_Open.setObjectName(_fromUtf8("actionEnd_Open"))
self.actionDotted = QtGui.QAction(MainWindow)
self.actionDotted.setObjectName(_fromUtf8("actionDotted"))
self.actionDashed = QtGui.QAction(MainWindow)
self.actionDashed.setObjectName(_fromUtf8("actionDashed"))
self.actionHalf = QtGui.QAction(MainWindow)
self.actionHalf.setObjectName(_fromUtf8("actionHalf"))
self.actionRepeat_Open = QtGui.QAction(MainWindow)
self.actionRepeat_Open.setObjectName(_fromUtf8("actionRepeat_Open"))
self.actionRepeat_Close = QtGui.QAction(MainWindow)
self.actionRepeat_Close.setObjectName(_fromUtf8("actionRepeat_Close"))
self.actionRepeat_Close_Open = QtGui.QAction(MainWindow)
self.actionRepeat_Close_Open.setObjectName(_fromUtf8("actionRepeat_Close_Open"))
self.actionEnd_Repeat_Open = QtGui.QAction(MainWindow)
self.actionEnd_Repeat_Open.setObjectName(_fromUtf8("actionEnd_Repeat_Open"))
self.actionEspressivo = QtGui.QAction(MainWindow)
self.actionEspressivo.setObjectName(_fromUtf8("actionEspressivo"))
self.actionPortato = QtGui.QAction(MainWindow)
self.actionPortato.setObjectName(_fromUtf8("actionPortato"))
self.actionStaccatissimo = QtGui.QAction(MainWindow)
self.actionStaccatissimo.setObjectName(_fromUtf8("actionStaccatissimo"))
self.actionTenuto = QtGui.QAction(MainWindow)
self.actionTenuto.setObjectName(_fromUtf8("actionTenuto"))
self.actionPrall = QtGui.QAction(MainWindow)
self.actionPrall.setObjectName(_fromUtf8("actionPrall"))
self.actionMordent = QtGui.QAction(MainWindow)
self.actionMordent.setObjectName(_fromUtf8("actionMordent"))
self.actionPrallmordent = QtGui.QAction(MainWindow)
self.actionPrallmordent.setObjectName(_fromUtf8("actionPrallmordent"))
self.actionTurn = QtGui.QAction(MainWindow)
self.actionTurn.setObjectName(_fromUtf8("actionTurn"))
self.actionUpprall = QtGui.QAction(MainWindow)
self.actionUpprall.setObjectName(_fromUtf8("actionUpprall"))
self.actionDownprall = QtGui.QAction(MainWindow)
self.actionDownprall.setObjectName(_fromUtf8("actionDownprall"))
self.actionUpmordent = QtGui.QAction(MainWindow)
self.actionUpmordent.setObjectName(_fromUtf8("actionUpmordent"))
self.actionLineprall = QtGui.QAction(MainWindow)
self.actionLineprall.setObjectName(_fromUtf8("actionLineprall"))
self.actionPrallprall = QtGui.QAction(MainWindow)
self.actionPrallprall.setObjectName(_fromUtf8("actionPrallprall"))
self.actionPrallup = QtGui.QAction(MainWindow)
self.actionPrallup.setObjectName(_fromUtf8("actionPrallup"))
self.actionReverseturn = QtGui.QAction(MainWindow)
self.actionReverseturn.setObjectName(_fromUtf8("actionReverseturn"))
self.actionShortfermata = QtGui.QAction(MainWindow)
self.actionShortfermata.setObjectName(_fromUtf8("actionShortfermata"))
self.actionVerylongfermata = QtGui.QAction(MainWindow)
self.actionVerylongfermata.setObjectName(_fromUtf8("actionVerylongfermata"))
self.actionOpen_2 = QtGui.QAction(MainWindow)
self.actionOpen_2.setObjectName(_fromUtf8("actionOpen_2"))
self.actionStopped = QtGui.QAction(MainWindow)
self.actionStopped.setObjectName(_fromUtf8("actionStopped"))
self.actionOrnament_open = QtGui.QAction(MainWindow)
self.actionOrnament_open.setObjectName(_fromUtf8("actionOrnament_open"))
self.actionLeftheel = QtGui.QAction(MainWindow)
self.actionLeftheel.setObjectName(_fromUtf8("actionLeftheel"))
self.actionRightheel = QtGui.QAction(MainWindow)
self.actionRightheel.setObjectName(_fromUtf8("actionRightheel"))
self.actionLefttoe = QtGui.QAction(MainWindow)
self.actionLefttoe.setObjectName(_fromUtf8("actionLefttoe"))
self.actionRighttoe = QtGui.QAction(MainWindow)
self.actionRighttoe.setObjectName(_fromUtf8("actionRighttoe"))
self.actionSignum_Congruentia = QtGui.QAction(MainWindow)
self.actionSignum_Congruentia.setObjectName(_fromUtf8("actionSignum_Congruentia"))
self.actionIctus = QtGui.QAction(MainWindow)
self.actionIctus.setObjectName(_fromUtf8("actionIctus"))
self.actionAccentus = QtGui.QAction(MainWindow)
self.actionAccentus.setObjectName(_fromUtf8("actionAccentus"))
self.actionCirculus = QtGui.QAction(MainWindow)
self.actionCirculus.setObjectName(_fromUtf8("actionCirculus"))
self.actionSemi_Circulus = QtGui.QAction(MainWindow)
self.actionSemi_Circulus.setObjectName(_fromUtf8("actionSemi_Circulus"))
self.actionAugmentum = QtGui.QAction(MainWindow)
self.actionAugmentum.setObjectName(_fromUtf8("actionAugmentum"))
self.actionPizzicato = QtGui.QAction(MainWindow)
self.actionPizzicato.setObjectName(_fromUtf8("actionPizzicato"))
self.actionSnap_Piz_Bartok = QtGui.QAction(MainWindow)
self.actionSnap_Piz_Bartok.setObjectName(_fromUtf8("actionSnap_Piz_Bartok"))
self.actionAccent = QtGui.QAction(MainWindow)
self.actionAccent.setObjectName(_fromUtf8("actionAccent"))
self.actionMarcato = QtGui.QAction(MainWindow)
self.actionMarcato.setObjectName(_fromUtf8("actionMarcato"))
self.actionLong_Fermata = QtGui.QAction(MainWindow)
self.actionLong_Fermata.setObjectName(_fromUtf8("actionLong_Fermata"))
self.actionDownmordent = QtGui.QAction(MainWindow)
self.actionDownmordent.setObjectName(_fromUtf8("actionDownmordent"))
self.actionPrall_Down = QtGui.QAction(MainWindow)
self.actionPrall_Down.setObjectName(_fromUtf8("actionPrall_Down"))
self.actionUpbow = QtGui.QAction(MainWindow)
self.actionUpbow.setObjectName(_fromUtf8("actionUpbow"))
self.actionToolbarClefTreble = QtGui.QAction(MainWindow)
self.actionToolbarClefTreble.setObjectName(_fromUtf8("actionToolbarClefTreble"))
self.actionToolbarClefBass = QtGui.QAction(MainWindow)
self.actionToolbarClefBass.setObjectName(_fromUtf8("actionToolbarClefBass"))
self.actionToolbarTimeThreeFour = QtGui.QAction(MainWindow)
self.actionToolbarTimeThreeFour.setObjectName(_fromUtf8("actionToolbarTimeThreeFour"))
self.actionToolbarTimeCommon = QtGui.QAction(MainWindow)
self.actionToolbarTimeCommon.setObjectName(_fromUtf8("actionToolbarTimeCommon"))
self.actionToolbarKeysig = QtGui.QAction(MainWindow)
self.actionToolbarKeysig.setObjectName(_fromUtf8("actionToolbarKeysig"))
self.actionToolbarTrackDelete = QtGui.QAction(MainWindow)
self.actionToolbarTrackDelete.setObjectName(_fromUtf8("actionToolbarTrackDelete"))
self.actionToolbarTrackAdd = QtGui.QAction(MainWindow)
self.actionToolbarTrackAdd.setObjectName(_fromUtf8("actionToolbarTrackAdd"))
self.actionToolbarTwoTwo = QtGui.QAction(MainWindow)
self.actionToolbarTwoTwo.setObjectName(_fromUtf8("actionToolbarTwoTwo"))
self.actionFree_Text = QtGui.QAction(MainWindow)
self.actionFree_Text.setObjectName(_fromUtf8("actionFree_Text"))
self.actionEyeglasses = QtGui.QAction(MainWindow)
self.actionEyeglasses.setObjectName(_fromUtf8("actionEyeglasses"))
self.actionUndress_While_Playing = QtGui.QAction(MainWindow)
self.actionUndress_While_Playing.setObjectName(_fromUtf8("actionUndress_While_Playing"))
self.actionLilyBin = QtGui.QAction(MainWindow)
self.actionLilyBin.setObjectName(_fromUtf8("actionLilyBin"))
self.actionShift_Up = QtGui.QAction(MainWindow)
self.actionShift_Up.setObjectName(_fromUtf8("actionShift_Up"))
self.actionShift_Down = QtGui.QAction(MainWindow)
self.actionShift_Down.setObjectName(_fromUtf8("actionShift_Down"))
self.actionShift_Note_Up = QtGui.QAction(MainWindow)
self.actionShift_Note_Up.setObjectName(_fromUtf8("actionShift_Note_Up"))
self.actionShift_Note_Down = QtGui.QAction(MainWindow)
self.actionShift_Note_Down.setObjectName(_fromUtf8("actionShift_Note_Down"))
self.actionShift_Octave_Up = QtGui.QAction(MainWindow)
self.actionShift_Octave_Up.setObjectName(_fromUtf8("actionShift_Octave_Up"))
self.actionShift_Octave_Down = QtGui.QAction(MainWindow)
self.actionShift_Octave_Down.setObjectName(_fromUtf8("actionShift_Octave_Down"))
self.actionNote_Sharp = QtGui.QAction(MainWindow)
self.actionNote_Sharp.setObjectName(_fromUtf8("actionNote_Sharp"))
self.actionNote_Flat = QtGui.QAction(MainWindow)
self.actionNote_Flat.setObjectName(_fromUtf8("actionNote_Flat"))
self.actionEnharmonic_Sharp = QtGui.QAction(MainWindow)
self.actionEnharmonic_Sharp.setObjectName(_fromUtf8("actionEnharmonic_Sharp"))
self.actionEnharmonic_Flat = QtGui.QAction(MainWindow)
self.actionEnharmonic_Flat.setObjectName(_fromUtf8("actionEnharmonic_Flat"))
self.actionAdd_Note_to_Chord = QtGui.QAction(MainWindow)
self.actionAdd_Note_to_Chord.setObjectName(_fromUtf8("actionAdd_Note_to_Chord"))
self.actionRemove_Note_from_Chord = QtGui.QAction(MainWindow)
self.actionRemove_Note_from_Chord.setObjectName(_fromUtf8("actionRemove_Note_from_Chord"))
self.actionTranspose = QtGui.QAction(MainWindow)
self.actionTranspose.setObjectName(_fromUtf8("actionTranspose"))
self.actionTranspose_Down = QtGui.QAction(MainWindow)
self.actionTranspose_Down.setObjectName(_fromUtf8("actionTranspose_Down"))
self.actionSelect_Track = QtGui.QAction(MainWindow)
self.actionSelect_Track.setObjectName(_fromUtf8("actionSelect_Track"))
self.actionSelect_All = QtGui.QAction(MainWindow)
self.actionSelect_All.setObjectName(_fromUtf8("actionSelect_All"))
self.actionToolbarWhole = QtGui.QAction(MainWindow)
self.actionToolbarWhole.setCheckable(True)
self.actionToolbarWhole.setObjectName(_fromUtf8("actionToolbarWhole"))
self.actionToolbarHalf = QtGui.QAction(MainWindow)
self.actionToolbarHalf.setCheckable(True)
self.actionToolbarHalf.setObjectName(_fromUtf8("actionToolbarHalf"))
self.actionToolbarQuarter = QtGui.QAction(MainWindow)
self.actionToolbarQuarter.setCheckable(True)
self.actionToolbarQuarter.setObjectName(_fromUtf8("actionToolbarQuarter"))
self.actionToolbarEighth = QtGui.QAction(MainWindow)
self.actionToolbarEighth.setCheckable(True)
self.actionToolbarEighth.setObjectName(_fromUtf8("actionToolbarEighth"))
self.actionToolbarSixteenth = QtGui.QAction(MainWindow)
self.actionToolbarSixteenth.setCheckable(True)
self.actionToolbarSixteenth.setObjectName(_fromUtf8("actionToolbarSixteenth"))
self.actionClear_Selection = QtGui.QAction(MainWindow)
self.actionClear_Selection.setObjectName(_fromUtf8("actionClear_Selection"))
self.actionToolbarFullMeasureRest = QtGui.QAction(MainWindow)
self.actionToolbarFullMeasureRest.setObjectName(_fromUtf8("actionToolbarFullMeasureRest"))
self.actionToolbarWholeRest = QtGui.QAction(MainWindow)
self.actionToolbarWholeRest.setObjectName(_fromUtf8("actionToolbarWholeRest"))
self.actionToolbarHalfRest = QtGui.QAction(MainWindow)
self.actionToolbarHalfRest.setObjectName(_fromUtf8("actionToolbarHalfRest"))
self.actionToolbarQuarterRest = QtGui.QAction(MainWindow)
self.actionToolbarQuarterRest.setObjectName(_fromUtf8("actionToolbarQuarterRest"))
self.actionToolbarEighthRest = QtGui.QAction(MainWindow)
self.actionToolbarEighthRest.setObjectName(_fromUtf8("actionToolbarEighthRest"))
self.actionToolbarSixteenthRest = QtGui.QAction(MainWindow)
self.actionToolbarSixteenthRest.setObjectName(_fromUtf8("actionToolbarSixteenthRest"))
self.actionToolbarToggleDot = QtGui.QAction(MainWindow)
self.actionToolbarToggleDot.setObjectName(_fromUtf8("actionToolbarToggleDot"))
self.actionShift_Note_Octave_Up = QtGui.QAction(MainWindow)
self.actionShift_Note_Octave_Up.setObjectName(_fromUtf8("actionShift_Note_Octave_Up"))
self.actionShift_Note_Octave_Down = QtGui.QAction(MainWindow)
self.actionShift_Note_Octave_Down.setObjectName(_fromUtf8("actionShift_Note_Octave_Down"))
self.actionRemove_Substitution = QtGui.QAction(MainWindow)
self.actionRemove_Substitution.setObjectName(_fromUtf8("actionRemove_Substitution"))
self.actionLaborejo_Substitutions = QtGui.QAction(MainWindow)
self.actionLaborejo_Substitutions.setObjectName(_fromUtf8("actionLaborejo_Substitutions"))
self.actionScore_Substitutions = QtGui.QAction(MainWindow)
self.actionScore_Substitutions.setObjectName(_fromUtf8("actionScore_Substitutions"))
self.actionDelete_Score_Substitutions = QtGui.QAction(MainWindow)
self.actionDelete_Score_Substitutions.setObjectName(_fromUtf8("actionDelete_Score_Substitutions"))
self.actionCreate_Substitution_from_Selection = QtGui.QAction(MainWindow)
self.actionCreate_Substitution_from_Selection.setObjectName(_fromUtf8("actionCreate_Substitution_from_Selection"))
self.actionCreate_Substitutions_from_File = QtGui.QAction(MainWindow)
self.actionCreate_Substitutions_from_File.setObjectName(_fromUtf8("actionCreate_Substitutions_from_File"))
self.actionInsert_Empty_Container = QtGui.QAction(MainWindow)
self.actionInsert_Empty_Container.setObjectName(_fromUtf8("actionInsert_Empty_Container"))
self.actionDelete_Container_Instance = QtGui.QAction(MainWindow)
self.actionDelete_Container_Instance.setObjectName(_fromUtf8("actionDelete_Container_Instance"))
self.actionConvert_Selection_to_Container = QtGui.QAction(MainWindow)
self.actionConvert_Selection_to_Container.setObjectName(_fromUtf8("actionConvert_Selection_to_Container"))
self.actionMinimap = QtGui.QAction(MainWindow)
self.actionMinimap.setCheckable(True)
self.actionMinimap.setChecked(True)
self.actionMinimap.setObjectName(_fromUtf8("actionMinimap"))
self.actionToolbarPlayStop = QtGui.QAction(MainWindow)
self.actionToolbarPlayStop.setObjectName(_fromUtf8("actionToolbarPlayStop"))
self.actionToolbarPlayFromStart = QtGui.QAction(MainWindow)
self.actionToolbarPlayFromStart.setObjectName(_fromUtf8("actionToolbarPlayFromStart"))
self.actionDa_Capo = QtGui.QAction(MainWindow)
self.actionDa_Capo.setObjectName(_fromUtf8("actionDa_Capo"))
self.actionDal_Segno = QtGui.QAction(MainWindow)
self.actionDal_Segno.setObjectName(_fromUtf8("actionDal_Segno"))
self.actionSegno = QtGui.QAction(MainWindow)
self.actionSegno.setObjectName(_fromUtf8("actionSegno"))
self.actionCoda = QtGui.QAction(MainWindow)
self.actionCoda.setObjectName(_fromUtf8("actionCoda"))
self.actionFine = QtGui.QAction(MainWindow)
self.actionFine.setObjectName(_fromUtf8("actionFine"))
self.actionTo_Coda = QtGui.QAction(MainWindow)
self.actionTo_Coda.setObjectName(_fromUtf8("actionTo_Coda"))
self.actionClear_Trigger_from_Item = QtGui.QAction(MainWindow)
self.actionClear_Trigger_from_Item.setObjectName(_fromUtf8("actionClear_Trigger_from_Item"))
self.actionTriggerOnlyFirst = QtGui.QAction(MainWindow)
self.actionTriggerOnlyFirst.setObjectName(_fromUtf8("actionTriggerOnlyFirst"))
self.actionTriggerNeverFirst = QtGui.QAction(MainWindow)
self.actionTriggerNeverFirst.setObjectName(_fromUtf8("actionTriggerNeverFirst"))
self.actionEdit_Trigger = QtGui.QAction(MainWindow)
self.actionEdit_Trigger.setObjectName(_fromUtf8("actionEdit_Trigger"))
self.actionAdd_Octave_to_Chord = QtGui.QAction(MainWindow)
self.actionAdd_Octave_to_Chord.setObjectName(_fromUtf8("actionAdd_Octave_to_Chord"))
self.actionInvert_Selection = QtGui.QAction(MainWindow)
self.actionInvert_Selection.setObjectName(_fromUtf8("actionInvert_Selection"))
self.actionJoin_to_Chord_prevalent_duration = QtGui.QAction(MainWindow)
self.actionJoin_to_Chord_prevalent_duration.setObjectName(_fromUtf8("actionJoin_to_Chord_prevalent_duration"))
self.actionJoin_to_Chord_sum_durations = QtGui.QAction(MainWindow)
self.actionJoin_to_Chord_sum_durations.setObjectName(_fromUtf8("actionJoin_to_Chord_sum_durations"))
self.actionEdit_Container = QtGui.QAction(MainWindow)
self.actionEdit_Container.setObjectName(_fromUtf8("actionEdit_Container"))
self.actionAlternate_End = QtGui.QAction(MainWindow)
self.actionAlternate_End.setObjectName(_fromUtf8("actionAlternate_End"))
self.actionAlternate_Ending_1 = QtGui.QAction(MainWindow)
self.actionAlternate_Ending_1.setObjectName(_fromUtf8("actionAlternate_Ending_1"))
self.actionAlternate_Ending_2 = QtGui.QAction(MainWindow)
self.actionAlternate_Ending_2.setObjectName(_fromUtf8("actionAlternate_Ending_2"))
self.actionCustom_Alternate_Ending = QtGui.QAction(MainWindow)
self.actionCustom_Alternate_Ending.setObjectName(_fromUtf8("actionCustom_Alternate_Ending"))
self.actionAlternate_Ending_Close = QtGui.QAction(MainWindow)
self.actionAlternate_Ending_Close.setObjectName(_fromUtf8("actionAlternate_Ending_Close"))
self.actionTie_from_left_side_repeat_Tie = QtGui.QAction(MainWindow)
self.actionTie_from_left_side_repeat_Tie.setObjectName(_fromUtf8("actionTie_from_left_side_repeat_Tie"))
self.actionMIDI_Note_Entry = QtGui.QAction(MainWindow)
self.actionMIDI_Note_Entry.setCheckable(True)
self.actionMIDI_Note_Entry.setChecked(False)
self.actionMIDI_Note_Entry.setObjectName(_fromUtf8("actionMIDI_Note_Entry"))
self.action_Sustain_On = QtGui.QAction(MainWindow)
self.action_Sustain_On.setObjectName(_fromUtf8("action_Sustain_On"))
self.action_Sustain_Off = QtGui.QAction(MainWindow)
self.action_Sustain_Off.setObjectName(_fromUtf8("action_Sustain_Off"))
self.actionUna_Corda_Soft_On = QtGui.QAction(MainWindow)
self.actionUna_Corda_Soft_On.setObjectName(_fromUtf8("actionUna_Corda_Soft_On"))
self.actionUna_Corda_Soft_Off = QtGui.QAction(MainWindow)
self.actionUna_Corda_Soft_Off.setObjectName(_fromUtf8("actionUna_Corda_Soft_Off"))
self.actionSostenuto_On = QtGui.QAction(MainWindow)
self.actionSostenuto_On.setObjectName(_fromUtf8("actionSostenuto_On"))
self.actionSostenuto_Off = QtGui.QAction(MainWindow)
self.actionSostenuto_Off.setObjectName(_fromUtf8("actionSostenuto_Off"))
self.actionSustain_Change_non_print = QtGui.QAction(MainWindow)
self.actionSustain_Change_non_print.setObjectName(_fromUtf8("actionSustain_Change_non_print"))
self.actionLilypond_Text = QtGui.QAction(MainWindow)
self.actionLilypond_Text.setObjectName(_fromUtf8("actionLilypond_Text"))
self.actionOpen_as_Template = QtGui.QAction(MainWindow)
self.actionOpen_as_Template.setObjectName(_fromUtf8("actionOpen_as_Template"))
self.actionMidi_Files_per_Track = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Track.setObjectName(_fromUtf8("actionMidi_Files_per_Track"))
self.actionImportLisalo = QtGui.QAction(MainWindow)
self.actionImportLisalo.setObjectName(_fromUtf8("actionImportLisalo"))
self.actionArdour = QtGui.QAction(MainWindow)
self.actionArdour.setObjectName(_fromUtf8("actionArdour"))
self.actionChannel_Change_Relative = QtGui.QAction(MainWindow)
self.actionChannel_Change_Relative.setObjectName(_fromUtf8("actionChannel_Change_Relative"))
self.actionChannel_Change_Absolute = QtGui.QAction(MainWindow)
self.actionChannel_Change_Absolute.setObjectName(_fromUtf8("actionChannel_Change_Absolute"))
self.actionToolbarUnsetSoloMute = QtGui.QAction(MainWindow)
self.actionToolbarUnsetSoloMute.setObjectName(_fromUtf8("actionToolbarUnsetSoloMute"))
self.actionImportLisaloBus = QtGui.QAction(MainWindow)
self.actionImportLisaloBus.setObjectName(_fromUtf8("actionImportLisaloBus"))
self.actionTerminal = QtGui.QAction(MainWindow)
self.actionTerminal.setObjectName(_fromUtf8("actionTerminal"))
self.actionSmall_Terminal = QtGui.QAction(MainWindow)
self.actionSmall_Terminal.setCheckable(True)
self.actionSmall_Terminal.setEnabled(True)
self.actionSmall_Terminal.setObjectName(_fromUtf8("actionSmall_Terminal"))
self.actionChord_Duration_Factor_Plus = QtGui.QAction(MainWindow)
self.actionChord_Duration_Factor_Plus.setObjectName(_fromUtf8("actionChord_Duration_Factor_Plus"))
self.actionChord_Duration_Factor_Minus = QtGui.QAction(MainWindow)
self.actionChord_Duration_Factor_Minus.setObjectName(_fromUtf8("actionChord_Duration_Factor_Minus"))
self.actionChord_Duration_Factor_Reset = QtGui.QAction(MainWindow)
self.actionChord_Duration_Factor_Reset.setObjectName(_fromUtf8("actionChord_Duration_Factor_Reset"))
self.actionTempo_Change_Relative = QtGui.QAction(MainWindow)
self.actionTempo_Change_Relative.setObjectName(_fromUtf8("actionTempo_Change_Relative"))
self.actionChord_Velocity_Factor_Plus = QtGui.QAction(MainWindow)
self.actionChord_Velocity_Factor_Plus.setObjectName(_fromUtf8("actionChord_Velocity_Factor_Plus"))
self.actionChord_Velocity_Factor_Minus = QtGui.QAction(MainWindow)
self.actionChord_Velocity_Factor_Minus.setObjectName(_fromUtf8("actionChord_Velocity_Factor_Minus"))
self.actionChord_Velocity_Factor_Reset = QtGui.QAction(MainWindow)
self.actionChord_Velocity_Factor_Reset.setObjectName(_fromUtf8("actionChord_Velocity_Factor_Reset"))
self.actionToggle_Extended_Track_View = QtGui.QAction(MainWindow)
self.actionToggle_Extended_Track_View.setCheckable(True)
self.actionToggle_Extended_Track_View.setObjectName(_fromUtf8("actionToggle_Extended_Track_View"))
self.actionAutoChange = QtGui.QAction(MainWindow)
self.actionAutoChange.setObjectName(_fromUtf8("actionAutoChange"))
self.actionRemove_lowest_Note_from_Chord = QtGui.QAction(MainWindow)
self.actionRemove_lowest_Note_from_Chord.setObjectName(_fromUtf8("actionRemove_lowest_Note_from_Chord"))
self.actionRemove_highest_Note_from_Chord = QtGui.QAction(MainWindow)
self.actionRemove_highest_Note_from_Chord.setObjectName(_fromUtf8("actionRemove_highest_Note_from_Chord"))
self.actionToolbarPiano = QtGui.QAction(MainWindow)
self.actionToolbarPiano.setObjectName(_fromUtf8("actionToolbarPiano"))
self.actionToolbarForte = QtGui.QAction(MainWindow)
self.actionToolbarForte.setObjectName(_fromUtf8("actionToolbarForte"))
self.actionToolbarPianissimo = QtGui.QAction(MainWindow)
self.actionToolbarPianissimo.setObjectName(_fromUtf8("actionToolbarPianissimo"))
self.actionToolbarMezzoPiano = QtGui.QAction(MainWindow)
self.actionToolbarMezzoPiano.setObjectName(_fromUtf8("actionToolbarMezzoPiano"))
self.actionToolbarMezzoForte = QtGui.QAction(MainWindow)
self.actionToolbarMezzoForte.setObjectName(_fromUtf8("actionToolbarMezzoForte"))
self.actionToolbarFortissimo = QtGui.QAction(MainWindow)
self.actionToolbarFortissimo.setObjectName(_fromUtf8("actionToolbarFortissimo"))
self.actionSplitChordTrackToVoices = QtGui.QAction(MainWindow)
self.actionSplitChordTrackToVoices.setObjectName(_fromUtf8("actionSplitChordTrackToVoices"))
self.actionTacet = QtGui.QAction(MainWindow)
self.actionTacet.setObjectName(_fromUtf8("actionTacet"))
self.actionMirror = QtGui.QAction(MainWindow)
self.actionMirror.setObjectName(_fromUtf8("actionMirror"))
self.actionReverse = QtGui.QAction(MainWindow)
self.actionReverse.setObjectName(_fromUtf8("actionReverse"))
self.actionShuffle = QtGui.QAction(MainWindow)
self.actionShuffle.setObjectName(_fromUtf8("actionShuffle"))
self.actionSort_Ascending = QtGui.QAction(MainWindow)
self.actionSort_Ascending.setObjectName(_fromUtf8("actionSort_Ascending"))
self.actionSort_Descending = QtGui.QAction(MainWindow)
self.actionSort_Descending.setObjectName(_fromUtf8("actionSort_Descending"))
self.actionPaste_replace_Selection = QtGui.QAction(MainWindow)
self.actionPaste_replace_Selection.setObjectName(_fromUtf8("actionPaste_replace_Selection"))
self.actionFull_Dual_Ending_Sequence = QtGui.QAction(MainWindow)
self.actionFull_Dual_Ending_Sequence.setObjectName(_fromUtf8("actionFull_Dual_Ending_Sequence"))
self.actionSave_Substitutions_to_File = QtGui.QAction(MainWindow)
self.actionSave_Substitutions_to_File.setObjectName(_fromUtf8("actionSave_Substitutions_to_File"))
self.actionUnfold_Substitution_permanently = QtGui.QAction(MainWindow)
self.actionUnfold_Substitution_permanently.setObjectName(_fromUtf8("actionUnfold_Substitution_permanently"))
self.actionCautionary = QtGui.QAction(MainWindow)
self.actionCautionary.setObjectName(_fromUtf8("actionCautionary"))
self.actionReminder = QtGui.QAction(MainWindow)
self.actionReminder.setObjectName(_fromUtf8("actionReminder"))
self.actionSuggestion_Accidentals_On = QtGui.QAction(MainWindow)
self.actionSuggestion_Accidentals_On.setObjectName(_fromUtf8("actionSuggestion_Accidentals_On"))
self.actionSuggestion_Accidentals_Off = QtGui.QAction(MainWindow)
self.actionSuggestion_Accidentals_Off.setObjectName(_fromUtf8("actionSuggestion_Accidentals_Off"))
self.actionFp = QtGui.QAction(MainWindow)
self.actionFp.setObjectName(_fromUtf8("actionFp"))
self.actionSf = QtGui.QAction(MainWindow)
self.actionSf.setObjectName(_fromUtf8("actionSf"))
self.actionSff = QtGui.QAction(MainWindow)
self.actionSff.setObjectName(_fromUtf8("actionSff"))
self.actionSp = QtGui.QAction(MainWindow)
self.actionSp.setObjectName(_fromUtf8("actionSp"))
self.actionSpp = QtGui.QAction(MainWindow)
self.actionSpp.setObjectName(_fromUtf8("actionSpp"))
self.actionSfz = QtGui.QAction(MainWindow)
self.actionSfz.setObjectName(_fromUtf8("actionSfz"))
self.actionRfz = QtGui.QAction(MainWindow)
self.actionRfz.setObjectName(_fromUtf8("actionRfz"))
self.actionCollapse_All = QtGui.QAction(MainWindow)
self.actionCollapse_All.setObjectName(_fromUtf8("actionCollapse_All"))
self.actionExpand_All = QtGui.QAction(MainWindow)
self.actionExpand_All.setObjectName(_fromUtf8("actionExpand_All"))
self.actionCollapse_all_Tracks = QtGui.QAction(MainWindow)
self.actionCollapse_all_Tracks.setObjectName(_fromUtf8("actionCollapse_all_Tracks"))
self.actionToggle_Collapse_Track = QtGui.QAction(MainWindow)
self.actionToggle_Collapse_Track.setCheckable(True)
self.actionToggle_Collapse_Track.setObjectName(_fromUtf8("actionToggle_Collapse_Track"))
self.actionExpand_all_Tracks = QtGui.QAction(MainWindow)
self.actionExpand_all_Tracks.setObjectName(_fromUtf8("actionExpand_all_Tracks"))
self.actionInvert_Collapsing = QtGui.QAction(MainWindow)
self.actionInvert_Collapsing.setObjectName(_fromUtf8("actionInvert_Collapsing"))
self.actionCollapse_empty_Tracks = QtGui.QAction(MainWindow)
self.actionCollapse_empty_Tracks.setObjectName(_fromUtf8("actionCollapse_empty_Tracks"))
self.actionReverse_Pitch = QtGui.QAction(MainWindow)
self.actionReverse_Pitch.setObjectName(_fromUtf8("actionReverse_Pitch"))
self.actionReverse_Rythm = QtGui.QAction(MainWindow)
self.actionReverse_Rythm.setObjectName(_fromUtf8("actionReverse_Rythm"))
self.actionVirtual_Piano = QtGui.QAction(MainWindow)
self.actionVirtual_Piano.setCheckable(True)
self.actionVirtual_Piano.setChecked(False)
self.actionVirtual_Piano.setObjectName(_fromUtf8("actionVirtual_Piano"))
self.actionFocusOnActiveScore = QtGui.QAction(MainWindow)
self.actionFocusOnActiveScore.setObjectName(_fromUtf8("actionFocusOnActiveScore"))
self.actionOpen_Collection = QtGui.QAction(MainWindow)
self.actionOpen_Collection.setObjectName(_fromUtf8("actionOpen_Collection"))
self.actionMidi_Jack = QtGui.QAction(MainWindow)
self.actionMidi_Jack.setObjectName(_fromUtf8("actionMidi_Jack"))
self.actionMidi_Files_per_Track_Jack = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Track_Jack.setObjectName(_fromUtf8("actionMidi_Files_per_Track_Jack"))
self.actionMidi_Files_per_Port_Jack = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Port_Jack.setObjectName(_fromUtf8("actionMidi_Files_per_Port_Jack"))
self.actionEdit_Container_Content = QtGui.QAction(MainWindow)
self.actionEdit_Container_Content.setObjectName(_fromUtf8("actionEdit_Container_Content"))
self.actionPDF_Parts_by_Group = QtGui.QAction(MainWindow)
self.actionPDF_Parts_by_Group.setObjectName(_fromUtf8("actionPDF_Parts_by_Group"))
self.actionPDF_Parts_by_Instrument_Short = QtGui.QAction(MainWindow)
self.actionPDF_Parts_by_Instrument_Short.setObjectName(_fromUtf8("actionPDF_Parts_by_Instrument_Short"))
self.actionPDF_Parts_by_Export_Parts = QtGui.QAction(MainWindow)
self.actionPDF_Parts_by_Export_Parts.setObjectName(_fromUtf8("actionPDF_Parts_by_Export_Parts"))
self.actionPDFs_by_Track = QtGui.QAction(MainWindow)
self.actionPDFs_by_Track.setObjectName(_fromUtf8("actionPDFs_by_Track"))
self.actionMidi_Files_per_Group_Simple = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Group_Simple.setObjectName(_fromUtf8("actionMidi_Files_per_Group_Simple"))
self.actionQTractor = QtGui.QAction(MainWindow)
self.actionQTractor.setObjectName(_fromUtf8("actionQTractor"))
self.actionMidi_Files_per_Export_Parts = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Export_Parts.setObjectName(_fromUtf8("actionMidi_Files_per_Export_Parts"))
self.actionMidi_Files_per_Instrument_Short = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Instrument_Short.setObjectName(_fromUtf8("actionMidi_Files_per_Instrument_Short"))
self.actionMidi_Files_per_Instrument_Short_Jack = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Instrument_Short_Jack.setObjectName(_fromUtf8("actionMidi_Files_per_Instrument_Short_Jack"))
self.actionMidi_Files_per_Group_Jack = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Group_Jack.setObjectName(_fromUtf8("actionMidi_Files_per_Group_Jack"))
self.actionMidi_Files_per_Export_Parts_Jack = QtGui.QAction(MainWindow)
self.actionMidi_Files_per_Export_Parts_Jack.setObjectName(_fromUtf8("actionMidi_Files_per_Export_Parts_Jack"))
self.actionCustom_Export = QtGui.QAction(MainWindow)
self.actionCustom_Export.setObjectName(_fromUtf8("actionCustom_Export"))
self.actionCenterOnCursor = QtGui.QAction(MainWindow)
self.actionCenterOnCursor.setObjectName(_fromUtf8("actionCenterOnCursor"))
self.actionToolbarEmergencyPlaybackStop = QtGui.QAction(MainWindow)
self.actionToolbarEmergencyPlaybackStop.setStatusTip(_fromUtf8(""))
self.actionToolbarEmergencyPlaybackStop.setWhatsThis(_fromUtf8(""))
self.actionToolbarEmergencyPlaybackStop.setObjectName(_fromUtf8("actionToolbarEmergencyPlaybackStop"))
self.actionToolbarJackModeToggle = QtGui.QAction(MainWindow)
self.actionToolbarJackModeToggle.setCheckable(True)
self.actionToolbarJackModeToggle.setChecked(False)
self.actionToolbarJackModeToggle.setObjectName(_fromUtf8("actionToolbarJackModeToggle"))
self.actionPlaySolo = QtGui.QAction(MainWindow)
self.actionPlaySolo.setObjectName(_fromUtf8("actionPlaySolo"))
self.actionRebind_external_Jack_Midi_connections = QtGui.QAction(MainWindow)
self.actionRebind_external_Jack_Midi_connections.setObjectName(_fromUtf8("actionRebind_external_Jack_Midi_connections"))
self.actionDurationInsertMode = QtGui.QAction(MainWindow)
self.actionDurationInsertMode.setCheckable(True)
self.actionDurationInsertMode.setObjectName(_fromUtf8("actionDurationInsertMode"))
self.actionSpeedUpPlayback = QtGui.QAction(MainWindow)
self.actionSpeedUpPlayback.setObjectName(_fromUtf8("actionSpeedUpPlayback"))
self.actionNext_becomes_dotted = QtGui.QAction(MainWindow)
self.actionNext_becomes_dotted.setObjectName(_fromUtf8("actionNext_becomes_dotted"))
self.actionToolbarNext_Becomes_Dotted = QtGui.QAction(MainWindow)
self.actionToolbarNext_Becomes_Dotted.setCheckable(True)
self.actionToolbarNext_Becomes_Dotted.setObjectName(_fromUtf8("actionToolbarNext_Becomes_Dotted"))
self.actionSharp = QtGui.QAction(MainWindow)
self.actionSharp.setObjectName(_fromUtf8("actionSharp"))
self.actionFlat = QtGui.QAction(MainWindow)
self.actionFlat.setObjectName(_fromUtf8("actionFlat"))
self.actionPaletteDynamics = QtGui.QAction(MainWindow)
self.actionPaletteDynamics.setCheckable(False)
self.actionPaletteDynamics.setChecked(False)
self.actionPaletteDynamics.setObjectName(_fromUtf8("actionPaletteDynamics"))
self.actionPaletteFingering = QtGui.QAction(MainWindow)
self.actionPaletteFingering.setObjectName(_fromUtf8("actionPaletteFingering"))
self.actionPaletteBarlines = QtGui.QAction(MainWindow)
self.actionPaletteBarlines.setObjectName(_fromUtf8("actionPaletteBarlines"))
self.actionPaletteStringNumbers = QtGui.QAction(MainWindow)
self.actionPaletteStringNumbers.setObjectName(_fromUtf8("actionPaletteStringNumbers"))
self.actionPaletteVoicePresets = QtGui.QAction(MainWindow)
self.actionPaletteVoicePresets.setObjectName(_fromUtf8("actionPaletteVoicePresets"))
self.actionPaletteMidiFinetuning = QtGui.QAction(MainWindow)
self.actionPaletteMidiFinetuning.setObjectName(_fromUtf8("actionPaletteMidiFinetuning"))
self.actionPaletteStrokeFinger = QtGui.QAction(MainWindow)
self.actionPaletteStrokeFinger.setObjectName(_fromUtf8("actionPaletteStrokeFinger"))
self.actionPaletteNext = QtGui.QAction(MainWindow)
self.actionPaletteNext.setObjectName(_fromUtf8("actionPaletteNext"))
self.actionPalettePrevious = QtGui.QAction(MainWindow)
self.actionPalettePrevious.setObjectName(_fromUtf8("actionPalettePrevious"))
self.actionNew_to_Session = QtGui.QAction(MainWindow)
self.actionNew_to_Session.setObjectName(_fromUtf8("actionNew_to_Session"))
self.actionImport_to_Session = QtGui.QAction(MainWindow)
self.actionImport_to_Session.setObjectName(_fromUtf8("actionImport_to_Session"))
self.actionExport_from_Session = QtGui.QAction(MainWindow)
self.actionExport_from_Session.setObjectName(_fromUtf8("actionExport_from_Session"))
self.actionRemove_from_Session = QtGui.QAction(MainWindow)
self.actionRemove_from_Session.setObjectName(_fromUtf8("actionRemove_from_Session"))
self.actionImport_to_Session_as_Template = QtGui.QAction(MainWindow)
self.actionImport_to_Session_as_Template.setObjectName(_fromUtf8("actionImport_to_Session_as_Template"))
self.actionNew_to_Session_2 = QtGui.QAction(MainWindow)
self.actionNew_to_Session_2.setObjectName(_fromUtf8("actionNew_to_Session_2"))
self.actionQuick_View_PDF_Export_Group = QtGui.QAction(MainWindow)
self.actionQuick_View_PDF_Export_Group.setObjectName(_fromUtf8("actionQuick_View_PDF_Export_Group"))
self.actionToolbarJackTransportKeepRolling = QtGui.QAction(MainWindow)
self.actionToolbarJackTransportKeepRolling.setCheckable(True)
self.actionToolbarJackTransportKeepRolling.setChecked(False)
self.actionToolbarJackTransportKeepRolling.setObjectName(_fromUtf8("actionToolbarJackTransportKeepRolling"))
self.actionExtract_and_render_chordsymbols_to_a_new_track_with_real_chords = QtGui.QAction(MainWindow)
self.actionExtract_and_render_chordsymbols_to_a_new_track_with_real_chords.setObjectName(_fromUtf8("actionExtract_and_render_chordsymbols_to_a_new_track_with_real_chords"))
self.actionInsert_Existing_Container = QtGui.QAction(MainWindow)
self.actionInsert_Existing_Container.setObjectName(_fromUtf8("actionInsert_Existing_Container"))
self.actionToggleHidden = QtGui.QAction(MainWindow)
self.actionToggleHidden.setObjectName(_fromUtf8("actionToggleHidden"))
self.actionToggleTransparent = QtGui.QAction(MainWindow)
self.actionToggleTransparent.setObjectName(_fromUtf8("actionToggleTransparent"))
self.actionCleanHiddenTransparent = QtGui.QAction(MainWindow)
self.actionCleanHiddenTransparent.setObjectName(_fromUtf8("actionCleanHiddenTransparent"))
self.actionHide_Notes_Start = QtGui.QAction(MainWindow)
self.actionHide_Notes_Start.setObjectName(_fromUtf8("actionHide_Notes_Start"))
self.actionHide_Notes_Stop = QtGui.QAction(MainWindow)
self.actionHide_Notes_Stop.setObjectName(_fromUtf8("actionHide_Notes_Stop"))
self.actionHide_Barlines_Start = QtGui.QAction(MainWindow)
self.actionHide_Barlines_Start.setObjectName(_fromUtf8("actionHide_Barlines_Start"))
self.actionHide_Barlines_Stop = QtGui.QAction(MainWindow)
self.actionHide_Barlines_Stop.setObjectName(_fromUtf8("actionHide_Barlines_Stop"))
self.actionDid_you_know = QtGui.QAction(MainWindow)
self.actionDid_you_know.setObjectName(_fromUtf8("actionDid_you_know"))
self.actionClean_Tremolo = QtGui.QAction(MainWindow)
self.actionClean_Tremolo.setObjectName(_fromUtf8("actionClean_Tremolo"))
self.actionPlayGroup = QtGui.QAction(MainWindow)
self.actionPlayGroup.setObjectName(_fromUtf8("actionPlayGroup"))
self.actionProgram_Plus = QtGui.QAction(MainWindow)
self.actionProgram_Plus.setObjectName(_fromUtf8("actionProgram_Plus"))
self.actionProgram_Minus = QtGui.QAction(MainWindow)
self.actionProgram_Minus.setObjectName(_fromUtf8("actionProgram_Minus"))
self.actionProgram_Force = QtGui.QAction(MainWindow)
self.actionProgram_Force.setObjectName(_fromUtf8("actionProgram_Force"))
self.actionProgram_Clear = QtGui.QAction(MainWindow)
self.actionProgram_Clear.setObjectName(_fromUtf8("actionProgram_Clear"))
self.actionProgram_Change_Relative = QtGui.QAction(MainWindow)
self.actionProgram_Change_Relative.setObjectName(_fromUtf8("actionProgram_Change_Relative"))
self.actionProgram_Change_Absolute = QtGui.QAction(MainWindow)
self.actionProgram_Change_Absolute.setObjectName(_fromUtf8("actionProgram_Change_Absolute"))
self.actionReset_and_Redraw_GUI = QtGui.QAction(MainWindow)
self.actionReset_and_Redraw_GUI.setObjectName(_fromUtf8("actionReset_and_Redraw_GUI"))
self.menuExport.addAction(self.actionCustom_Export)
self.menuExport.addSeparator()
self.menuExport.addAction(self.actionPdf)
self.menuExport.addAction(self.actionLilypond)
self.menuExport.addAction(self.actionLilyBin)
self.menuExport.addSeparator()
self.menuExport.addAction(self.actionMidi)
self.menuExport.addAction(self.actionMidi_Jack)
self.menuExport.addAction(self.actionArdour)
self.menuExport.addSeparator()
self.menuImport.addAction(self.actionImportLisalo)
self.menuImport.addAction(self.actionImportLisaloBus)
self.menuFile.addAction(self.actionNew)
self.menuFile.addAction(self.actionOpen)
self.menuFile.addAction(self.actionOpen_Collection)
self.menuFile.addAction(self.actionOpen_as_Template)
self.menuFile.addAction(self.menuRecent_2.menuAction())
self.menuFile.addAction(self.actionNew_to_Session_2)
self.menuFile.addAction(self.actionImport_to_Session)
self.menuFile.addAction(self.actionImport_to_Session_as_Template)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionSave)
self.menuFile.addAction(self.actionSave_As)
self.menuFile.addAction(self.actionExport_from_Session)
self.menuFile.addSeparator()
self.menuFile.addAction(self.menuExport.menuAction())
self.menuFile.addAction(self.menuImport.menuAction())
self.menuFile.addAction(self.actionView_PDF)
self.menuFile.addAction(self.actionQuick_View_PDF_Export_Group)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionMetadata)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionRemove_from_Session)
self.menuFile.addAction(self.actionClose)
self.menuFile.addAction(self.actionQuit)
self.menuFile.addSeparator()
self.menuEdit.addAction(self.actionEdit_Current_Object)
self.menuEdit.addSeparator()
self.menuEdit.addAction(self.actionUndo)
self.menuEdit.addAction(self.actionRedo)
self.menuEdit.addSeparator()
self.menuEdit.addAction(self.actionSelect_Track)
self.menuEdit.addAction(self.actionSelect_All)
self.menuEdit.addAction(self.actionInvert_Selection)
self.menuEdit.addAction(self.actionClear_Selection)
self.menuEdit.addSeparator()
self.menuEdit.addAction(self.actionCopy)
self.menuEdit.addAction(self.actionCut)
self.menuEdit.addAction(self.actionPaste)
self.menuEdit.addAction(self.actionPaste_replace_Selection)
self.menuEdit.addAction(self.actionPaste_As_Link)
self.menuEdit.addAction(self.actionPaste_as_One_Track_Stream)
self.menuEdit.addAction(self.actionDelete)
self.menuEdit.addAction(self.actionDelete_Previous)
self.menuEdit.addSeparator()
self.menuEdit.addAction(self.actionDuplicate)
self.menuEdit.addAction(self.actionLink)
self.menuRhythm_and_Dynamics.addAction(self.actionStaccato)
self.menuRhythm_and_Dynamics.addAction(self.actionStaccatissimo)
self.menuRhythm_and_Dynamics.addAction(self.actionAccent)
self.menuRhythm_and_Dynamics.addAction(self.actionEspressivo)
self.menuRhythm_and_Dynamics.addAction(self.actionTenuto)
self.menuRhythm_and_Dynamics.addAction(self.actionMarcato)
self.menuRhythm_and_Dynamics.addAction(self.actionPortato)
self.menuRhythm_and_Dynamics.addAction(self.actionShortfermata)
self.menuRhythm_and_Dynamics.addAction(self.actionFermata)
self.menuRhythm_and_Dynamics.addAction(self.actionLong_Fermata)
self.menuRhythm_and_Dynamics.addAction(self.actionVerylongfermata)
self.menuRhythm_and_Dynamics.addAction(self.actionPizzicato)
self.menuRhythm_and_Dynamics.addAction(self.actionSnap_Piz_Bartok)
self.menuEmbellishments.addAction(self.actionTrill)
self.menuEmbellishments.addAction(self.actionPrall)
self.menuEmbellishments.addAction(self.actionMordent)
self.menuEmbellishments.addAction(self.actionPrallmordent)
self.menuEmbellishments.addAction(self.actionTurn)
self.menuEmbellishments.addAction(self.actionUpprall)
self.menuEmbellishments.addAction(self.actionDownprall)
self.menuEmbellishments.addAction(self.actionUpmordent)
self.menuEmbellishments.addAction(self.actionDownmordent)
self.menuEmbellishments.addAction(self.actionLineprall)
self.menuEmbellishments.addAction(self.actionPrallprall)
self.menuEmbellishments.addAction(self.actionPrallup)
self.menuEmbellishments.addAction(self.actionPrall_Down)
self.menuEmbellishments.addAction(self.actionReverseturn)
self.menuStrings.addAction(self.actionUpbow)
self.menuStrings.addAction(self.actionDownbow)
self.menuStrings.addAction(self.actionOrnament_open)
self.menuStrings.addAction(self.actionStopped)
self.menuOrgan.addAction(self.actionLeftheel)
self.menuOrgan.addAction(self.actionRightheel)
self.menuOrgan.addAction(self.actionLefttoe)
self.menuOrgan.addAction(self.actionRighttoe)
self.menuAncient.addAction(self.actionSignum_Congruentia)
self.menuAncient.addAction(self.actionIctus)
self.menuAncient.addAction(self.actionAccentus)
self.menuAncient.addAction(self.actionCirculus)
self.menuAncient.addAction(self.actionSemi_Circulus)
self.menuAncient.addAction(self.actionAugmentum)
self.menuOther.addAction(self.actionEyeglasses)
self.menuOther.addAction(self.actionUndress_While_Playing)
self.menuOrnaments.addAction(self.menuRhythm_and_Dynamics.menuAction())
self.menuOrnaments.addAction(self.menuEmbellishments.menuAction())
self.menuOrnaments.addAction(self.menuStrings.menuAction())
self.menuOrnaments.addAction(self.menuOrgan.menuAction())
self.menuOrnaments.addAction(self.menuAncient.menuAction())
self.menuOrnaments.addAction(self.menuOther.menuAction())
self.menuNote_Duration.addAction(self.actionTriplet)
self.menuNote_Duration.addAction(self.actionCustom_Tuplet)
self.menuNote_Duration.addAction(self.actionClear_Tuplets)
self.menuNote_Duration.addSeparator()
self.menuNote_Duration.addAction(self.actionAugment)
self.menuNote_Duration.addAction(self.actionDiminish)
self.menuNote_Duration.addAction(self.actionRemove_Dot)
self.menuNote_Duration.addAction(self.actionAdd_Dot)
self.menuNote_Duration.addSeparator()
self.menuNote_Duration.addAction(self.actionSplit_in_Two)
self.menuNote_Duration.addAction(self.actionSplit_in_Three)
self.menuNote_Duration.addAction(self.actionCustom_Split)
self.menuNote_Duration.addSeparator()
self.menuNote_Duration.addAction(self.actionTremolo_in_Two)
self.menuNote_Duration.addAction(self.actionTremolo_in_Four)
self.menuNote_Duration.addAction(self.actionCustom_Tremolo)
self.menuNote_Duration.addAction(self.actionClean_Tremolo)
self.menuRests.addAction(self.actionFullMeasureRest)
self.menuRests.addAction(self.actionMultiMeasureRest)
self.menuStyles.addAction(self.actionDynamicStyle_Above_Track)
self.menuStyles.addAction(self.actionDynamicStyle_Below_Track)
self.menuStyles.addAction(self.actionDynamicStyle_Neutral)
self.menuStyles.addSeparator()
self.menuStyles.addAction(self.actionDynamicStyle_Crescendo_as_text)
self.menuStyles.addAction(self.actionDynamicStyle_Crescendo_as_hairpin)
self.menuStyles.addAction(self.actionDynamicStyle_Decrescendo_as_text)
self.menuStyles.addAction(self.actionDynamicStyle_Decrescendo_as_hairpin)
self.menuStyles.addAction(self.actionDynamicStyle_Decrescendo_as_Diminuendo)
self.menuStyles.addAction(self.actionDynamicStyle_Decrescendo_as_Decresc)
self.menuDynamics.addAction(self.action5xpiano)
self.menuDynamics.addAction(self.action4xpiano)
self.menuDynamics.addAction(self.actionPianississimo)
self.menuDynamics.addAction(self.actionPianissimo)
self.menuDynamics.addAction(self.actionPiano)
self.menuDynamics.addAction(self.actionMezzo_piano)
self.menuDynamics.addAction(self.actionMezzo_forte)
self.menuDynamics.addAction(self.actionForte)
self.menuDynamics.addAction(self.actionFortissimo)
self.menuDynamics.addAction(self.actionFortississimo)
self.menuDynamics.addAction(self.action4xforte)
self.menuDynamics.addSeparator()
self.menuDynamics.addAction(self.actionSf)
self.menuDynamics.addAction(self.actionFp)
self.menuDynamics.addAction(self.actionSff)
self.menuDynamics.addAction(self.actionSp)
self.menuDynamics.addAction(self.actionSpp)
self.menuDynamics.addAction(self.actionSfz)
self.menuDynamics.addSeparator()
self.menuDynamics.addAction(self.actionTacet)
self.menuDynamics.addAction(self.actionUser_Dynamic_1)
self.menuDynamics.addAction(self.actionUser_Dynamic_2)
self.menuDynamics.addAction(self.actionUser_Dynamic_3)
self.menuDynamics.addSeparator()
self.menuDynamics.addAction(self.actionCrescendo)
self.menuDynamics.addAction(self.actionDecrescendo)
self.menuDynamics.addAction(self.actionEnd_cresc_decresc)
self.menuDynamics.addAction(self.menuStyles.menuAction())
self.menuStyles_2.addAction(self.actionSlurStyleUp)
self.menuStyles_2.addAction(self.actionSlurStyleDown)
self.menuStyles_2.addAction(self.actionSlurStyleNeutral)
self.menuStyles_2.addSeparator()
self.menuStyles_2.addAction(self.actionSlurStyleDashed)
self.menuStyles_2.addAction(self.actionSlurStyleDotted)
self.menuStyles_2.addAction(self.actionSlurStyleSolid)
self.menuStyles_2.addAction(self.actionSlurStyleDoubleOn)
self.menuStyles_2.addAction(self.actionSlurStyleDoubleOff)
self.menuStyles_2.addSeparator()
self.menuStyles_2.addAction(self.actionPhrasingSlurStyleUp)
self.menuStyles_2.addAction(self.actionPhrasingSlurStyleDown)
self.menuStyles_2.addAction(self.actionPhrasingSlurStyleNeutral)
self.menuStyles_2.addSeparator()
self.menuStyles_2.addAction(self.actionPhrasingSlurStyleDashed)
self.menuStyles_2.addAction(self.actionPhrasingSlurStyleSolid)
self.menuStyles_2.addAction(self.actionPhrasingSlurStyleDotted)
self.menuSlurs.addAction(self.actionSlur_Start_On_Off)
self.menuSlurs.addAction(self.actionSlur_End_On_Off)
self.menuSlurs.addAction(self.actionPhrasing_Slur_Start_On_Off)
self.menuSlurs.addAction(self.actionPhrasing_Slur_End_On_Off)
self.menuSlurs.addAction(self.menuStyles_2.menuAction())
self.menuStyles_3.addAction(self.actionTieStyleUp)
self.menuStyles_3.addAction(self.actionTieStyleDown)
self.menuStyles_3.addAction(self.actionTieStyleNeutral)
self.menuStyles_3.addSeparator()
self.menuStyles_3.addAction(self.actionTieStyleDotted)
self.menuStyles_3.addAction(self.actionTieStyleDashed)
self.menuStyles_3.addAction(self.actionTieStyleSolid)
self.menuStyles_3.addAction(self.actionTieStyleWaitForNoteOn)
self.menuStyles_3.addAction(self.actionTieStyleWaitForNoteOff)
self.menuTies.addSeparator()
self.menuTies.addAction(self.actionTie_One_Note_On_Off)
self.menuTies.addAction(self.actionLaissez_Vibrer_On_Off_Chord)
self.menuTies.addAction(self.actionTie_from_left_side_repeat_Tie)
self.menuTies.addAction(self.menuStyles_3.menuAction())
self.menuVoice_Presets.addAction(self.actionVoiceAutomatic)
self.menuVoice_Presets.addAction(self.actionVoiceOne)
self.menuVoice_Presets.addAction(self.actionVoiceTwo)
self.menuVoice_Presets.addAction(self.actionVoiceThree)
self.menuVoice_Presets.addAction(self.actionVoiceFour)
self.menuChord_Symbols.addAction(self.actionEdit_Chord_Symbol)
self.menuChord_Symbols.addAction(self.actionClear_Chord_Symbol)
self.menuChord_Symbols.addAction(self.actionMass_Insert_Chord_Symbols)
self.menuFigured_Bass.addAction(self.actionEdit_Figured_Bass)
self.menuFigured_Bass.addAction(self.actionClear_Figured_Bass)
self.menuFigured_Bass.addAction(self.actionMass_Insert_Figured_Bass)
self.menuBeaming.addAction(self.actionBeam_Start)
self.menuBeaming.addAction(self.actionBeam_End)
self.menuBeaming.addAction(self.actionNo_Beam)
self.menuBeaming.addAction(self.actionForce_Beam)
self.menuFingering_Style.addAction(self.actionFingering_Toggle_Allow_in_Staff)
self.menuFingering_Style.addAction(self.actionFingering_Direction)
self.menuFingering_Style.addAction(self.actionFingering_Add_Stem_Support)
self.menuFingering_Style.addAction(self.actionFingering_Disable_Stem_Support)
self.menuString_Number_Style.addAction(self.actionString_Toggle_Allow_in_Staff)
self.menuString_Number_Style.addAction(self.actionString_Add_Stem_Support)
self.menuString_Number_Style.addAction(self.actionString_Disable_Stem_Support)
self.menuStroke_Finger_Style.addAction(self.actionStroke_Toggle_Allow_in_Staff)
self.menuStroke_Finger_Style.addAction(self.actionStroke_Directions)
self.menuStroke_Finger_Style.addAction(self.actionStroke_Add_Stem_Support)
self.menuStroke_Finger_Style.addAction(self.actionStroke_Disable_Stem_Support)
self.menuFingering.addAction(self.actionCustom_Finger)
self.menuFingering.addAction(self.actionFinger_1)
self.menuFingering.addAction(self.actionFinger_2)
self.menuFingering.addAction(self.actionFinger_3)
self.menuFingering.addAction(self.actionFinger_4)
self.menuFingering.addAction(self.actionFinger_5)
self.menuFingering.addAction(self.actionFinger_0)
self.menuFingering.addAction(self.menuFingering_Style.menuAction())
self.menuFingering.addSeparator()
self.menuFingering.addAction(self.actionCustom_String_Number)
self.menuFingering.addAction(self.actionString_1)
self.menuFingering.addAction(self.actionString_2)
self.menuFingering.addAction(self.actionString_3)
self.menuFingering.addAction(self.actionString_4)
self.menuFingering.addAction(self.actionString_5)
self.menuFingering.addAction(self.actionString_6)
self.menuFingering.addAction(self.actionString_7)
self.menuFingering.addAction(self.actionString_8)
self.menuFingering.addAction(self.actionString_9)
self.menuFingering.addAction(self.actionString_0)
self.menuFingering.addAction(self.menuString_Number_Style.menuAction())
self.menuFingering.addSeparator()
self.menuFingering.addAction(self.actionCustom_Right_Hand_Stroke_Finger)
self.menuFingering.addAction(self.actionStroke_1)
self.menuFingering.addAction(self.actionStroke_2)
self.menuFingering.addAction(self.actionStroke_3)
self.menuFingering.addAction(self.actionStroke_4)
self.menuFingering.addAction(self.actionStroke_x)
self.menuFingering.addAction(self.menuStroke_Finger_Style.menuAction())
self.menuFingering.addSeparator()
self.menuFingering.addAction(self.actionClear_All_Fingerings)
self.menuAdvanced_2.addAction(self.actionDashed)
self.menuAdvanced_2.addAction(self.actionDotted)
self.menuAdvanced_2.addAction(self.actionHalf)
self.menuAdvanced_2.addAction(self.actionEnd_Repeat_Open)
self.menuAdvanced_2.addAction(self.actionOpen_End)
self.menuBarlines.addAction(self.actionDouble)
self.menuBarlines.addAction(self.actionBarOpen)
self.menuBarlines.addAction(self.actionEnd)
self.menuBarlines.addAction(self.actionEnd_Open)
self.menuBarlines.addSeparator()
self.menuBarlines.addAction(self.actionRepeat_Open)
self.menuBarlines.addAction(self.actionRepeat_Close)
self.menuBarlines.addAction(self.actionRepeat_Close_Open)
self.menuBarlines.addSeparator()
self.menuBarlines.addAction(self.menuAdvanced_2.menuAction())
self.menuStyles_4.addAction(self.actionSuggestion_Accidentals_On)
self.menuStyles_4.addAction(self.actionSuggestion_Accidentals_Off)
self.menuNote_Pitch.addAction(self.actionAdd_Note_to_Chord)
self.menuNote_Pitch.addAction(self.actionRemove_Note_from_Chord)
self.menuNote_Pitch.addAction(self.actionRemove_highest_Note_from_Chord)
self.menuNote_Pitch.addAction(self.actionRemove_lowest_Note_from_Chord)
self.menuNote_Pitch.addAction(self.actionAdd_Octave_to_Chord)
self.menuNote_Pitch.addSeparator()
self.menuNote_Pitch.addAction(self.actionShift_Up)
self.menuNote_Pitch.addAction(self.actionShift_Down)
self.menuNote_Pitch.addAction(self.actionShift_Note_Up)
self.menuNote_Pitch.addAction(self.actionShift_Note_Down)
self.menuNote_Pitch.addAction(self.actionShift_Octave_Up)
self.menuNote_Pitch.addAction(self.actionShift_Octave_Down)
self.menuNote_Pitch.addAction(self.actionShift_Note_Octave_Up)
self.menuNote_Pitch.addAction(self.actionShift_Note_Octave_Down)
self.menuNote_Pitch.addSeparator()
self.menuNote_Pitch.addAction(self.actionSharp)
self.menuNote_Pitch.addAction(self.actionFlat)
self.menuNote_Pitch.addAction(self.actionReminder)
self.menuNote_Pitch.addAction(self.actionCautionary)
self.menuNote_Pitch.addAction(self.menuStyles_4.menuAction())
self.menuNote_Pitch.addAction(self.actionEnharmonic_Sharp)
self.menuNote_Pitch.addAction(self.actionEnharmonic_Flat)
self.menuNote_Pitch.addSeparator()
self.menuNote_Pitch.addAction(self.actionTranspose)
self.menuNote_Pitch.addAction(self.actionMirror)
self.menuNote_Pitch.addSeparator()
self.menuNote_Pitch.addAction(self.actionJoin_to_Chord_prevalent_duration)
self.menuNote_Pitch.addAction(self.actionJoin_to_Chord_sum_durations)
self.menuJumps.addAction(self.actionDa_Capo)
self.menuJumps.addAction(self.actionDal_Segno)
self.menuJumps.addAction(self.actionTo_Coda)
self.menuJumps.addSeparator()
self.menuJumps.addAction(self.actionSegno)
self.menuJumps.addAction(self.actionCoda)
self.menuJumps.addAction(self.actionFine)
self.menuJumps.addSeparator()
self.menuJumps.addAction(self.actionAlternate_Ending_1)
self.menuJumps.addAction(self.actionAlternate_Ending_2)
self.menuJumps.addAction(self.actionCustom_Alternate_Ending)
self.menuJumps.addAction(self.actionAlternate_Ending_Close)
self.menuJumps.addAction(self.actionFull_Dual_Ending_Sequence)
self.menuPedals.addAction(self.action_Sustain_On)
self.menuPedals.addAction(self.action_Sustain_Off)
self.menuPedals.addAction(self.actionSustain_Change_non_print)
self.menuPedals.addSeparator()
self.menuPedals.addAction(self.actionUna_Corda_Soft_On)
self.menuPedals.addAction(self.actionUna_Corda_Soft_Off)
self.menuPedals.addSeparator()
self.menuPedals.addAction(self.actionSostenuto_On)
self.menuPedals.addAction(self.actionSostenuto_Off)
self.menuPrint_Lilypond.addAction(self.actionHide_Notes_Start)
self.menuPrint_Lilypond.addAction(self.actionHide_Notes_Stop)
self.menuPrint_Lilypond.addSeparator()
self.menuPrint_Lilypond.addAction(self.actionHide_Barlines_Start)
self.menuPrint_Lilypond.addAction(self.actionHide_Barlines_Stop)
self.menuObjects.addAction(self.menuNote_Duration.menuAction())
self.menuObjects.addAction(self.menuNote_Pitch.menuAction())
self.menuObjects.addAction(self.menuRests.menuAction())
self.menuObjects.addAction(self.menuBarlines.menuAction())
self.menuObjects.addAction(self.menuJumps.menuAction())
self.menuObjects.addAction(self.menuBeaming.menuAction())
self.menuObjects.addAction(self.menuSlurs.menuAction())
self.menuObjects.addAction(self.menuTies.menuAction())
self.menuObjects.addAction(self.menuOrnaments.menuAction())
self.menuObjects.addAction(self.menuDynamics.menuAction())
self.menuObjects.addAction(self.menuVoice_Presets.menuAction())
self.menuObjects.addAction(self.menuChord_Symbols.menuAction())
self.menuObjects.addAction(self.menuFigured_Bass.menuAction())
self.menuObjects.addAction(self.menuFingering.menuAction())
self.menuObjects.addAction(self.menuPedals.menuAction())
self.menuObjects.addAction(self.menuPrint_Lilypond.menuAction())
self.menuObjects.addSeparator()
self.menuObjects.addAction(self.actionClefs)
self.menuObjects.addAction(self.actionTime_Signatures)
self.menuObjects.addAction(self.actionKey_Signatures)
self.menuObjects.addAction(self.actionCustom_Key_Signature)
self.menuObjects.addAction(self.actionPerformance_Signature)
self.menuObjects.addAction(self.actionTempo_Signature)
self.menuObjects.addAction(self.actionUpbeat)
self.menuObjects.addSeparator()
self.menuObjects.addAction(self.actionInstrument_Change)
self.menuObjects.addAction(self.actionFree_Text)
self.menuHelp.addAction(self.actionChat)
self.menuHelp.addAction(self.actionDid_you_know)
self.menuHelp.addAction(self.actionManual)
self.menuHelp.addSeparator()
self.menuHelp.addAction(self.actionAbout)
self.menuCollapse_Tracks.addAction(self.actionToggle_Collapse_Track)
self.menuCollapse_Tracks.addSeparator()
self.menuCollapse_Tracks.addAction(self.actionCollapse_all_Tracks)
self.menuCollapse_Tracks.addAction(self.actionCollapse_empty_Tracks)
self.menuCollapse_Tracks.addAction(self.actionExpand_all_Tracks)
self.menuCollapse_Tracks.addAction(self.actionInvert_Collapsing)
self.menuView.addAction(self.actionSidebar)
self.menuView.addAction(self.actionBarlines)
self.menuView.addAction(self.actionLyrics)
self.menuView.addAction(self.actionMinimap)
self.menuView.addAction(self.actionSmall_Terminal)
self.menuView.addAction(self.actionLilypond_Text)
self.menuView.addSeparator()
self.menuView.addAction(self.actionCenterOnCursor)
self.menuView.addAction(self.actionWiden)
self.menuView.addAction(self.actionShrinken)
self.menuView.addAction(self.actionZoom_In)
self.menuView.addAction(self.actionZoom_Out)
self.menuView.addSeparator()
self.menuView.addAction(self.actionToggle_Extended_Track_View)
self.menuView.addAction(self.menuCollapse_Tracks.menuAction())
self.menu_Grouping_Print.addAction(self.actionPiano_Staff_Start)
self.menu_Grouping_Print.addAction(self.actionGrand_Staff_Start)
self.menu_Grouping_Print.addAction(self.actionOrchestral_Staff_Start)
self.menu_Grouping_Print.addAction(self.actionChoir_Staff_Start)
self.menu_Grouping_Print.addAction(self.actionSquare_Staff_Start)
self.menu_Grouping_Print.addAction(self.actionVoice_and_Figured_Bass_Start)
self.menu_Grouping_Print.addSeparator()
self.menu_Grouping_Print.addAction(self.actionEnd_One_Group)
self.menu_Grouping_Print.addSeparator()
self.menu_Grouping_Print.addAction(self.actionClear_All_Groupings)
self.menuContainer.addAction(self.actionAdd_Track)
self.menuContainer.addAction(self.actionDelete_Current_Track)
self.menuContainer.addAction(self.actionMove_Track_Up)
self.menuContainer.addAction(self.actionMove_Track_Down)
self.menuContainer.addAction(self.menu_Grouping_Print.menuAction())
self.menuContainer.addSeparator()
self.menuContainer.addAction(self.actionInsert_Empty_Container)
self.menuContainer.addAction(self.actionInsert_Existing_Container)
self.menuContainer.addAction(self.actionEdit_Container_Content)
self.menuContainer.addAction(self.actionEdit_Container)
self.menuContainer.addAction(self.actionDelete_Container_Instance)
self.menuMidi.addAction(self.actionEdit_Default_Performance_Signature)
self.menuMidi.addAction(self.actionTempo_Change_Relative)
self.menuMidi.addSeparator()
self.menuMidi.addAction(self.actionChannel_Plus)
self.menuMidi.addAction(self.actionChannel_Minus)
self.menuMidi.addAction(self.actionChannel_Force)
self.menuMidi.addAction(self.actionChannel_Clear)
self.menuMidi.addAction(self.actionChannel_Change_Relative)
self.menuMidi.addAction(self.actionChannel_Change_Absolute)
self.menuMidi.addSeparator()
self.menuMidi.addAction(self.actionProgram_Plus)
self.menuMidi.addAction(self.actionProgram_Minus)
self.menuMidi.addAction(self.actionProgram_Force)
self.menuMidi.addAction(self.actionProgram_Clear)
self.menuMidi.addAction(self.actionProgram_Change_Relative)
self.menuMidi.addAction(self.actionProgram_Change_Absolute)
self.menuMidi.addSeparator()
self.menuMidi.addAction(self.actionChord_Duration_Factor_Plus)
self.menuMidi.addAction(self.actionChord_Duration_Factor_Minus)
self.menuMidi.addAction(self.actionChord_Duration_Factor_Reset)
self.menuMidi.addSeparator()
self.menuMidi.addAction(self.actionChord_Velocity_Factor_Plus)
self.menuMidi.addAction(self.actionChord_Velocity_Factor_Minus)
self.menuMidi.addAction(self.actionChord_Velocity_Factor_Reset)
self.menuLilypond_Directives.addAction(self.actionEdit_Lilypond)
self.menuLilypond_Directives.addSeparator()
self.menuLilypond_Directives.addAction(self.actionInsert_Wait_For_Chord_Lilypond)
self.menuLilypond_Directives.addAction(self.actionEdit_Wait_For_Chord_Lilypond)
self.menuLilypond_Directives.addSeparator()
self.menuLilypond_Directives.addAction(self.actionCreate_Pre_Mid_Post_Directives)
self.menuLilypond_Directives.addAction(self.actionEdit_Pre_Mid_Post_Directives)
self.menuLilypond_Directives.addAction(self.actionClear_Object_Directives)
self.menuLilypond_Directives.addSeparator()
self.menuLilypond_Directives.addAction(self.actionCreate_Notes_Directives)
self.menuLilypond_Directives.addAction(self.actionEdit_Note_Directives)
self.menuLilypond_Directives.addAction(self.actionClear_Notes_Directives)
self.menuLilypond_Directives.addSeparator()
self.menuLilypond_Directives.addAction(self.actionClear_All_Directives)
self.menuTrigger.addAction(self.actionEdit_Trigger)
self.menuTrigger.addAction(self.actionClear_Trigger_from_Item)
self.menuTrigger.addSeparator()
self.menuTrigger.addAction(self.actionTriggerOnlyFirst)
self.menuTrigger.addAction(self.actionTriggerNeverFirst)
self.menuOther_2.addAction(self.actionSplitChordTrackToVoices)
self.menuOther_2.addAction(self.actionAutoChange)
self.menuOther_2.addAction(self.actionSpeedUpPlayback)
self.menuOther_2.addAction(self.actionExtract_and_render_chordsymbols_to_a_new_track_with_real_chords)
self.menuRearrange.addAction(self.actionReverse)
self.menuRearrange.addAction(self.actionReverse_Pitch)
self.menuRearrange.addAction(self.actionReverse_Rythm)
self.menuRearrange.addAction(self.actionShuffle)
self.menuRearrange.addAction(self.actionSort_Ascending)
self.menuRearrange.addAction(self.actionSort_Descending)
self.menuSubstitutions.addAction(self.actionCreate_Substitutions_from_File)
self.menuSubstitutions.addAction(self.actionSave_Substitutions_to_File)
self.menuSubstitutions.addAction(self.actionCreate_Substitution_from_Selection)
self.menuSubstitutions.addAction(self.actionDelete_Score_Substitutions)
self.menuSubstitutions.addAction(self.actionRemove_Substitution)
self.menuSubstitutions.addAction(self.actionUnfold_Substitution_permanently)
self.menuJack_Midi_Mode.addAction(self.actionRebind_external_Jack_Midi_connections)
self.menuLilypond.addAction(self.actionToggleHidden)
self.menuLilypond.addAction(self.actionToggleTransparent)
self.menuLilypond.addAction(self.actionCleanHiddenTransparent)
self.menuDebug_and_Tests.addAction(self.actionReset_and_Redraw_GUI)
self.menuAdvanced.addAction(self.menuMidi.menuAction())
self.menuAdvanced.addAction(self.menuJack_Midi_Mode.menuAction())
self.menuAdvanced.addAction(self.menuLilypond.menuAction())
self.menuAdvanced.addAction(self.menuLilypond_Directives.menuAction())
self.menuAdvanced.addAction(self.menuDebug_and_Tests.menuAction())
self.menuAdvanced.addAction(self.actionInsert_Lilypond)
self.menuAdvanced.addSeparator()
self.menuAdvanced.addAction(self.menuSubstitutions.menuAction())
self.menuAdvanced.addAction(self.menuTrigger.menuAction())
self.menuAdvanced.addAction(self.menuRearrange.menuAction())
self.menuAdvanced.addAction(self.menuOther_2.menuAction())
self.menuPalette.addAction(self.actionPaletteNext)
self.menuPalette.addAction(self.actionPalettePrevious)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuEdit.menuAction())
self.menubar.addAction(self.menuView.menuAction())
self.menubar.addAction(self.menuPalette.menuAction())
self.menubar.addAction(self.menuContainer.menuAction())
self.menubar.addAction(self.menuObjects.menuAction())
self.menubar.addAction(self.menuAdvanced.menuAction())
self.menubar.addAction(self.menuUser_Commands.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.toolBar.addAction(self.actionToolbarPlayStop)
self.toolBar.addAction(self.actionPlaySolo)
self.toolBar.addAction(self.actionPlayGroup)
self.toolBar.addAction(self.actionToolbarPlayFromStart)
self.toolBar.addAction(self.actionToolbarEmergencyPlaybackStop)
self.toolBar.addAction(self.actionToolbarJackModeToggle)
self.toolBar.addAction(self.actionMIDI_Note_Entry)
self.toolBar.addAction(self.actionToolbarJackTransportKeepRolling)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarWhole)
self.toolBar.addAction(self.actionToolbarHalf)
self.toolBar.addAction(self.actionToolbarQuarter)
self.toolBar.addAction(self.actionToolbarEighth)
self.toolBar.addAction(self.actionToolbarSixteenth)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarFullMeasureRest)
self.toolBar.addAction(self.actionToolbarWholeRest)
self.toolBar.addAction(self.actionToolbarHalfRest)
self.toolBar.addAction(self.actionToolbarQuarterRest)
self.toolBar.addAction(self.actionToolbarEighthRest)
self.toolBar.addAction(self.actionToolbarSixteenthRest)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarToggleDot)
self.toolBar.addAction(self.actionToolbarNext_Becomes_Dotted)
self.toolBar.addAction(self.actionToggle_Prevailing_Dot)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarClefTreble)
self.toolBar.addAction(self.actionToolbarClefBass)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarTimeCommon)
self.toolBar.addAction(self.actionToolbarTwoTwo)
self.toolBar.addAction(self.actionToolbarTimeThreeFour)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarKeysig)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionToolbarTrackAdd)
self.toolBar.addAction(self.actionToolbarTrackDelete)
self.toolBar.addSeparator()
self.retranslateUi(MainWindow)
self.Tab.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "Laborejo - Music Notation Workshop", None))
self.Tab.setTabText(self.Tab.indexOf(self.TabScore), _translate("MainWindow", "Score", None))
self.Tab.setTabText(self.Tab.indexOf(self.Lilypond), _translate("MainWindow", "Lilypond", None))
self.smallTerminal.setTitle(_translate("MainWindow", "Execute Command (Ctrl+Enter)", None))
self.virtualPianoGroup.setTitle(_translate("MainWindow", "Virtual Piano", None))
self.menuFile.setTitle(_translate("MainWindow", "File", None))
self.menuExport.setTitle(_translate("MainWindow", "Export", None))
self.menuRecent_2.setTitle(_translate("MainWindow", "Recent", None))
self.menuImport.setTitle(_translate("MainWindow", "Import", None))
self.menuEdit.setTitle(_translate("MainWindow", "Edit", None))
self.menuObjects.setTitle(_translate("MainWindow", "Objects", None))
self.menuOrnaments.setTitle(_translate("MainWindow", "Ornaments", None))
self.menuRhythm_and_Dynamics.setTitle(_translate("MainWindow", "Rhythm and Dynamics", None))
self.menuEmbellishments.setTitle(_translate("MainWindow", "Embellishments", None))
self.menuStrings.setTitle(_translate("MainWindow", "Strings", None))
self.menuOrgan.setTitle(_translate("MainWindow", "Organ", None))
self.menuAncient.setTitle(_translate("MainWindow", "Ancient", None))
self.menuOther.setTitle(_translate("MainWindow", "Other", None))
self.menuNote_Duration.setTitle(_translate("MainWindow", "Note Duration", None))
self.menuRests.setTitle(_translate("MainWindow", "Rests", None))
self.menuDynamics.setTitle(_translate("MainWindow", "Dynamics", None))
self.menuStyles.setTitle(_translate("MainWindow", "Styles", None))
self.menuSlurs.setTitle(_translate("MainWindow", "Slurs", None))
self.menuStyles_2.setTitle(_translate("MainWindow", "Styles", None))
self.menuTies.setTitle(_translate("MainWindow", "Ties", None))
self.menuStyles_3.setTitle(_translate("MainWindow", "Styles", None))
self.menuVoice_Presets.setTitle(_translate("MainWindow", "Voice Presets", None))
self.menuChord_Symbols.setTitle(_translate("MainWindow", "Chord Symbols", None))
self.menuFigured_Bass.setTitle(_translate("MainWindow", "Figured Bass", None))
self.menuBeaming.setTitle(_translate("MainWindow", "Beaming", None))
self.menuFingering.setTitle(_translate("MainWindow", "Fingering", None))
self.menuFingering_Style.setTitle(_translate("MainWindow", "Fingering Style", None))
self.menuString_Number_Style.setTitle(_translate("MainWindow", "String Number Style", None))
self.menuStroke_Finger_Style.setTitle(_translate("MainWindow", "Stroke Finger Style", None))
self.menuBarlines.setTitle(_translate("MainWindow", "Barlines", None))
self.menuAdvanced_2.setTitle(_translate("MainWindow", "Advanced", None))
self.menuNote_Pitch.setTitle(_translate("MainWindow", "Note Pitch", None))
self.menuStyles_4.setTitle(_translate("MainWindow", "Styles", None))
self.menuJumps.setTitle(_translate("MainWindow", "Jumps and Endings", None))
self.menuPedals.setTitle(_translate("MainWindow", "Pedals", None))
self.menuPrint_Lilypond.setTitle(_translate("MainWindow", "Print / Lilypond", None))
self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
self.menuView.setTitle(_translate("MainWindow", "View", None))
self.menuCollapse_Tracks.setTitle(_translate("MainWindow", "Collapse Tracks", None))
self.menuContainer.setTitle(_translate("MainWindow", "Container", None))
self.menu_Grouping_Print.setTitle(_translate("MainWindow", "𝄔 Grouping (Print)", None))
self.menuAdvanced.setTitle(_translate("MainWindow", "Advanced", None))
self.menuMidi.setTitle(_translate("MainWindow", "Midi", None))
self.menuLilypond_Directives.setTitle(_translate("MainWindow", "Lilypond Directives", None))
self.menuTrigger.setTitle(_translate("MainWindow", "Trigger", None))
self.menuOther_2.setTitle(_translate("MainWindow", "Experimental", None))
self.menuRearrange.setTitle(_translate("MainWindow", "Rearrange", None))
self.menuSubstitutions.setTitle(_translate("MainWindow", "Substitutions", None))
self.menuJack_Midi_Mode.setTitle(_translate("MainWindow", "Jack Midi Mode", None))
self.menuLilypond.setTitle(_translate("MainWindow", "Lilypond", None))
self.menuDebug_and_Tests.setTitle(_translate("MainWindow", "Debug and Tests", None))
self.menuUser_Commands.setTitle(_translate("MainWindow", "User Commands", None))
self.menuPalette.setTitle(_translate("MainWindow", "Palette", None))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None))
self.actionOpen.setText(_translate("MainWindow", "Open Score", None))
self.actionNew.setText(_translate("MainWindow", "New", None))
self.actionSave.setText(_translate("MainWindow", "Save", None))
self.actionSave_As.setText(_translate("MainWindow", "Save As", None))
self.actionPdf.setText(_translate("MainWindow", "PDF", None))
self.actionLilypond.setText(_translate("MainWindow", "Lilypond Textfile", None))
self.actionMidi.setText(_translate("MainWindow", "Midi (Internal)", None))
self.actionView_PDF.setText(_translate("MainWindow", "Quick-View PDF", None))
self.actionQuit.setText(_translate("MainWindow", "Quit", None))
self.actionClose.setText(_translate("MainWindow", "Close", None))
self.actionStaccato.setText(_translate("MainWindow", "Staccato", None))
self.actionFermata.setText(_translate("MainWindow", "Fermata", None))
self.actionTrill.setText(_translate("MainWindow", "Trill", None))
self.actionDownbow.setText(_translate("MainWindow", "Downbow", None))
self.actionCopy.setText(_translate("MainWindow", "Copy", None))
self.actionCut.setText(_translate("MainWindow", "Cut", None))
self.actionPaste.setText(_translate("MainWindow", "Paste", None))
self.actionUndo.setText(_translate("MainWindow", "Undo", None))
self.actionRedo.setText(_translate("MainWindow", "Redo", None))
self.actionDelete.setText(_translate("MainWindow", "Delete", None))
self.actionPreferences.setText(_translate("MainWindow", "Laborejo Preferences", None))
self.actionAbout.setText(_translate("MainWindow", "About", None))
self.actionChat.setText(_translate("MainWindow", "Chat", None))
self.actionManual.setText(_translate("MainWindow", "Manual", None))
self.actionMetadata.setText(_translate("MainWindow", "Metadata (Title…)", None))
self.actionClefs.setText(_translate("MainWindow", "𝄞 Clefs", None))
self.actionTime_Signatures.setText(_translate("MainWindow", "¾ Time Signatures", None))
self.actionKey_Signatures.setText(_translate("MainWindow", "♮♯♭ Typical Key Signature", None))
self.actionPaste_As_Link.setText(_translate("MainWindow", "Paste As Link", None))
self.actionDelete_Previous.setText(_translate("MainWindow", "Delete Previous", None))
self.actionDuplicate.setText(_translate("MainWindow", "Duplicate", None))
self.actionLink.setText(_translate("MainWindow", "Link", None))
self.actionSidebar.setText(_translate("MainWindow", "Sidebar", None))
self.actionAdd_Track.setText(_translate("MainWindow", "⊞ Add Track", None))
self.actionDelete_Current_Track.setText(_translate("MainWindow", "⊟ Delete Current Track", None))
self.actionMove_Track_Up.setText(_translate("MainWindow", "⬆ Move Track Up", None))
self.actionMove_Track_Down.setText(_translate("MainWindow", "⬇ Move Track Down", None))
self.actionBarlines.setText(_translate("MainWindow", "Barlines", None))
self.actionEdit_Current_Object.setText(_translate("MainWindow", "Edit Current Object", None))
self.actionTriplet.setText(_translate("MainWindow", "Triplet", None))
self.actionCustom_Tuplet.setText(_translate("MainWindow", "Custom Tuplet", None))
self.actionAugment.setText(_translate("MainWindow", "Augment (×2)", None))
self.actionDiminish.setText(_translate("MainWindow", "Diminish (÷2)", None))
self.actionAdd_Dot.setText(_translate("MainWindow", "Add one Dot", None))
self.actionAdd_Dot.setShortcut(_translate("MainWindow", ".", None))
self.actionRemove_Dot.setText(_translate("MainWindow", "Remove one Dot", None))
self.actionMultiMeasureRest.setText(_translate("MainWindow", "𝄩 Multi Measure Rest", None))
self.actionFullMeasureRest.setText(_translate("MainWindow", "𝄺 Full Measure Rest", None))
self.actionClear_Tuplets.setText(_translate("MainWindow", "Clear Tuplets", None))
self.actionInsert_Lilypond.setText(_translate("MainWindow", "Insert Blank Item", None))
self.actionInsert_Wait_For_Chord_Lilypond.setText(_translate("MainWindow", "Insert Wait-For-Chord Lilypond", None))
self.actionClear_Object_Directives.setText(_translate("MainWindow", "Clear Object Directives", None))
self.actionClear_Notes_Directives.setText(_translate("MainWindow", "Clear Notes Directives", None))
self.actionClear_All_Directives.setText(_translate("MainWindow", "Clear All Directives", None))
self.actionEdit_Lilypond.setText(_translate("MainWindow", "Edit Lilypond", None))
self.actionEdit_Wait_For_Chord_Lilypond.setText(_translate("MainWindow", "Edit Wait-For-Chord Lilypond", None))
self.actionCreate_Pre_Mid_Post_Directives.setText(_translate("MainWindow", "Create Pre/Mid/Post Directives", None))
self.actionEdit_Pre_Mid_Post_Directives.setText(_translate("MainWindow", "Edit Pre/Mid/Post Directives", None))
self.actionEdit_Note_Directives.setText(_translate("MainWindow", "Edit Notes Directives", None))
self.actionCreate_Notes_Directives.setText(_translate("MainWindow", "Create Notes Directives", None))
self.actionCustom_Key_Signature.setText(_translate("MainWindow", "♮♯♭ Custom Key Signature", None))
self.actionPiano.setText(_translate("MainWindow", "𝆏 piano", None))
self.actionForte.setText(_translate("MainWindow", "𝆑 forte", None))
self.actionMezzo_piano.setText(_translate("MainWindow", "𝆐𝆏 mezzo piano", None))
self.actionMezzo_forte.setText(_translate("MainWindow", "𝆐𝆑 mezzo forte", None))
self.actionFortissimo.setText(_translate("MainWindow", "𝆑𝆑 fortissimo", None))
self.actionFortississimo.setText(_translate("MainWindow", "𝆑𝆑𝆑 fortississimo", None))
self.action4xforte.setText(_translate("MainWindow", "𝆑𝆑𝆑𝆑 4× forte", None))
self.actionPianissimo.setText(_translate("MainWindow", "𝆏𝆏 pianissimo", None))
self.actionPianississimo.setText(_translate("MainWindow", "𝆏𝆏𝆏 pianississimo", None))
self.action4xpiano.setText(_translate("MainWindow", "𝆏𝆏𝆏𝆏 4x piano", None))
self.action5xpiano.setText(_translate("MainWindow", "𝆏𝆏𝆏𝆏𝆏 5× piano", None))
self.actionCrescendo.setText(_translate("MainWindow", "𝆒 crescendo", None))
self.actionDecrescendo.setText(_translate("MainWindow", "𝆓 decrescendo", None))
self.actionEnd_cresc_decresc.setText(_translate("MainWindow", "end cresc/decresc", None))
self.actionDynamicStyle_Above_Track.setText(_translate("MainWindow", "Above Track", None))
self.actionDynamicStyle_Below_Track.setText(_translate("MainWindow", "Below Track", None))
self.actionDynamicStyle_Neutral.setText(_translate("MainWindow", "Automatic", None))
self.actionDynamicStyle_Crescendo_as_text.setText(_translate("MainWindow", "Crescendo as \"cresc\"", None))
self.actionDynamicStyle_Crescendo_as_hairpin.setText(_translate("MainWindow", "Crescendo as 𝆓", None))
self.actionDynamicStyle_Decrescendo_as_text.setText(_translate("MainWindow", "Decrescendo as \"decr\"", None))
self.actionDynamicStyle_Decrescendo_as_hairpin.setText(_translate("MainWindow", "Decrescendo as 𝆒 ", None))
self.actionDynamicStyle_Decrescendo_as_Diminuendo.setText(_translate("MainWindow", "Decrescendo as \"dim\"", None))
self.actionDynamicStyle_Decrescendo_as_Decresc.setText(_translate("MainWindow", "Decrescendo as \"decresc\"", None))
self.actionSlur_Start_On_Off.setText(_translate("MainWindow", "Slur Start", None))
self.actionSlur_End_On_Off.setText(_translate("MainWindow", "Slur End", None))
self.actionPhrasing_Slur_Start_On_Off.setText(_translate("MainWindow", "Phrasing Slur Start", None))
self.actionPhrasing_Slur_End_On_Off.setText(_translate("MainWindow", "Phrasing Slur End", None))
self.actionSlurStyleUp.setText(_translate("MainWindow", "Slurs Up", None))
self.actionSlurStyleDown.setText(_translate("MainWindow", "Slurs Down", None))
self.actionSlurStyleNeutral.setText(_translate("MainWindow", "Slurs Automatic", None))
self.actionSlurStyleDashed.setText(_translate("MainWindow", "Dashed Slur", None))
self.actionSlurStyleDotted.setText(_translate("MainWindow", "Dotted Slur", None))
self.actionSlurStyleSolid.setText(_translate("MainWindow", "Solid Slur", None))
self.actionSlurStyleDoubleOn.setText(_translate("MainWindow", "Double Slur On", None))
self.actionSlurStyleDoubleOff.setText(_translate("MainWindow", "Double Slur Off", None))
self.actionPhrasingSlurStyleUp.setText(_translate("MainWindow", "Phrasing Slurs Up", None))
self.actionPhrasingSlurStyleDown.setText(_translate("MainWindow", "Phrasing Slurs Down", None))
self.actionPhrasingSlurStyleNeutral.setText(_translate("MainWindow", "Phrasing Slurs Automatic", None))
self.actionPhrasingSlurStyleDashed.setText(_translate("MainWindow", "Dashed Phrasing Slur", None))
self.actionPhrasingSlurStyleDotted.setText(_translate("MainWindow", "Dotted Phrasing Slur", None))
self.actionPhrasingSlurStyleSolid.setText(_translate("MainWindow", "Solid Phrasing Slur", None))
self.actionTie_On_Off.setText(_translate("MainWindow", "Tie (On/Off)", None))
self.actionLaissez_Vibrer_On_Off.setText(_translate("MainWindow", "Laissez Vibrer (On/Off)", None))
self.actionLaissez_Vibrer_On_Off_Chord.setText(_translate("MainWindow", "Laissez Vibrer (On/Off)", None))
self.actionTie_One_Note_On_Off.setText(_translate("MainWindow", "Tie One Note (On/Off)", None))
self.actionTieStyleUp.setText(_translate("MainWindow", "Up", None))
self.actionTieStyleDown.setText(_translate("MainWindow", "Down", None))
self.actionTieStyleNeutral.setText(_translate("MainWindow", "Automatic", None))
self.actionTieStyleDotted.setText(_translate("MainWindow", "Dotted", None))
self.actionTieStyleDashed.setText(_translate("MainWindow", "Dashed", None))
self.actionTieStyleSolid.setText(_translate("MainWindow", "Solid", None))
self.actionTieStyleWaitForNoteOn.setText(_translate("MainWindow", "Wait for Note On", None))
self.actionTieStyleWaitForNoteOff.setText(_translate("MainWindow", "Wait for Note Off", None))
self.actionPiano_Staff_Start.setText(_translate("MainWindow", "𝄔 Piano Staff Start", None))
self.actionGrand_Staff_Start.setText(_translate("MainWindow", "𝄔 Grand Staff Start", None))
self.actionOrchestral_Staff_Start.setText(_translate("MainWindow", "𝄕 Orchestral Staff Start", None))
self.actionChoir_Staff_Start.setText(_translate("MainWindow", "𝄕 Choir Staff Start", None))
self.actionSquare_Staff_Start.setText(_translate("MainWindow", "𝄕 Square Staff Start", None))
self.actionVoice_and_Figured_Bass_Start.setText(_translate("MainWindow", "𝄔 Voice and Figured Bass Start", None))
self.actionEnd_One_Group.setText(_translate("MainWindow", "End One Group", None))
self.actionClear_All_Groupings.setText(_translate("MainWindow", "Clear All Groupings", None))
self.actionPerformance_Signature.setText(_translate("MainWindow", "✇ Performance Signature", None))
self.actionEdit_Performance_Signature.setText(_translate("MainWindow", "Edit Performance Signature", None))
self.actionDefault_Performance.setText(_translate("MainWindow", "Score Performance", None))
self.actionUser_Dynamic_1.setText(_translate("MainWindow", "User Dynamic 1 (non-print)", None))
self.actionUser_Dynamic_2.setText(_translate("MainWindow", "User Dynamic 2 (non-print)", None))
self.actionUser_Dynamic_3.setText(_translate("MainWindow", "User Dynamic 3 (non-print)", None))
self.actionUpbeat.setText(_translate("MainWindow", "Upbeat", None))
self.actionVoiceAutomatic.setText(_translate("MainWindow", "Automatic / One Voice", None))
self.actionVoiceOne.setText(_translate("MainWindow", "Voice One", None))
self.actionVoiceTwo.setText(_translate("MainWindow", "Voice Two", None))
self.actionVoiceThree.setText(_translate("MainWindow", "Voice Three", None))
self.actionVoiceFour.setText(_translate("MainWindow", "Voice Four", None))
self.actionBeam_Start.setText(_translate("MainWindow", "Beam Start", None))
self.actionBeam_End.setText(_translate("MainWindow", "Beam End", None))
self.actionNo_Beam.setText(_translate("MainWindow", "No Beam", None))
self.actionForce_Beam.setText(_translate("MainWindow", "Force Beam", None))
self.actionExport_Options.setText(_translate("MainWindow", "Export Options", None))
self.actionEdit_Chord_Symbol.setText(_translate("MainWindow", "Edit Chord Symbol", None))
self.actionClear_Chord_Symbol.setText(_translate("MainWindow", "Clear Chord Symbol", None))
self.actionEdit_Figured_Bass.setText(_translate("MainWindow", "Edit Figured Bass", None))
self.actionClear_Figured_Bass.setText(_translate("MainWindow", "Clear Figured Bass", None))
self.actionMass_Insert_Chord_Symbols.setText(_translate("MainWindow", "Mass Insert Chord Symbols", None))
self.actionMass_Insert_Figured_Bass.setText(_translate("MainWindow", "Mass Insert Figured Bass", None))
self.actionLyrics.setText(_translate("MainWindow", "Lyrics", None))
self.actionPaste_as_One_Track_Stream.setText(_translate("MainWindow", "Paste as One-Track Stream", None))
self.actionSplit_in_Two.setText(_translate("MainWindow", "Split in Two", None))
self.actionSplit_in_Three.setText(_translate("MainWindow", "Split in Three", None))
self.actionCustom_Split.setText(_translate("MainWindow", "Custom Split", None))
self.actionTremolo_in_Two.setText(_translate("MainWindow", "Tremolo in Two", None))
self.actionTremolo_in_Four.setText(_translate("MainWindow", "Tremolo in Four", None))
self.actionCustom_Tremolo.setText(_translate("MainWindow", "Custom Tremolo", None))
self.actionEdit_Default_Performance_Signature.setText(_translate("MainWindow", "Edit Default Performance Signature", None))
self.actionInstrument_Change.setText(_translate("MainWindow", "♺ Instrument Change", None))
self.actionChannel_Plus.setText(_translate("MainWindow", "Item Channel +", None))
self.actionChannel_Minus.setText(_translate("MainWindow", "Item Channel -", None))
self.actionChannel_Force.setText(_translate("MainWindow", "Item Force Channel", None))
self.actionWiden.setText(_translate("MainWindow", "Widen", None))
self.actionShrinken.setText(_translate("MainWindow", "Shrinken", None))
self.actionZoom_In.setText(_translate("MainWindow", "Zoom In", None))
self.actionZoom_Out.setText(_translate("MainWindow", "Zoom Out", None))
self.actionScript.setText(_translate("MainWindow", "~/.laborejo/script.py", None))
self.actionPrevailing_Duration.setText(_translate("MainWindow", "Choose Duration", None))
self.actionInsert_Duration.setText(_translate("MainWindow", "Insert Duration", None))
self.actionToggle_Insert_Prevailing.setText(_translate("MainWindow", "Toggle Insert/Prevailing", None))
self.actionMode_Fingerings.setText(_translate("MainWindow", "Fingerings", None))
self.actionMode_String_Numbers.setText(_translate("MainWindow", "String Numbers", None))
self.actionMode_Stroke_Fingering.setText(_translate("MainWindow", "Stroke Fingering", None))
self.actionChannel_Clear.setText(_translate("MainWindow", "Item Clear Channel", None))
self.actionToggle_Prevailing_Dot.setText(_translate("MainWindow", "⟲𝅘𝅥𝅭", None))
self.actionToggle_Prevailing_Dot.setToolTip(_translate("MainWindow", "Toggle prevailing dot (Alt+Dot)", None))
self.actionTempo_Signature.setText(_translate("MainWindow", "⌛ Tempo Signature", None))
self.actionClear_All_Fingerings.setText(_translate("MainWindow", "Clear All Fingerings", None))
self.actionCustom_Finger.setText(_translate("MainWindow", "Custom Finger", None))
self.actionFinger_1.setText(_translate("MainWindow", "Finger 1", None))
self.actionFinger_2.setText(_translate("MainWindow", "Finger 2", None))
self.actionFinger_3.setText(_translate("MainWindow", "Finger 3", None))
self.actionFinger_4.setText(_translate("MainWindow", "Finger 4", None))
self.actionFinger_5.setText(_translate("MainWindow", "Finger 5", None))
self.actionFinger.setText(_translate("MainWindow", "Finger 6 :)", None))
self.actionCustom_String_Number.setText(_translate("MainWindow", "Custom String Number", None))
self.actionString_1.setText(_translate("MainWindow", "String 1", None))
self.actionString_2.setText(_translate("MainWindow", "String 2", None))
self.actionString_3.setText(_translate("MainWindow", "String 3", None))
self.actionString_4.setText(_translate("MainWindow", "String 4", None))
self.actionString_5.setText(_translate("MainWindow", "String 5", None))
self.actionString_6.setText(_translate("MainWindow", "String 6", None))
self.actionString_7.setText(_translate("MainWindow", "String 7", None))
self.actionString_8.setText(_translate("MainWindow", "String 8", None))
self.actionString_9.setText(_translate("MainWindow", "String 9", None))
self.actionString_0.setText(_translate("MainWindow", "String 10/0", None))
self.actionCustom_Right_Hand_Stroke_Finger.setText(_translate("MainWindow", "Custom Right Hand / Stroke Finger", None))
self.actionStroke_1.setText(_translate("MainWindow", "Stroke 1 \'p\'", None))
self.actionStroke_2.setText(_translate("MainWindow", "Stroke 2 \'i\'", None))
self.actionStroke_3.setText(_translate("MainWindow", "Stroke 3 \'m\'", None))
self.actionStroke_4.setText(_translate("MainWindow", "Stroke 4 \'a\'", None))
self.actionStroke_x.setText(_translate("MainWindow", "Stroke \'x\'", None))
self.actionFingering_Direction.setText(_translate("MainWindow", "Fingering Direction", None))
self.actionFingering_Toggle_Allow_in_Staff.setText(_translate("MainWindow", "Toggle Allow in Staff", None))
self.actionFingering_Add_Stem_Support.setText(_translate("MainWindow", "Fingering Add Stem Support", None))
self.actionFingering_Disable_Stem_Support.setText(_translate("MainWindow", "Fingering Disable Stem Support", None))
self.actionString_Toggle_Allow_in_Staff.setText(_translate("MainWindow", "Toggle Allow in Staff", None))
self.actionString_Add_Stem_Support.setText(_translate("MainWindow", "String Add Stem Support", None))
self.actionString_Disable_Stem_Support.setText(_translate("MainWindow", "String Disable Stem Support", None))
self.actionStroke_Directions.setText(_translate("MainWindow", "Stroke Directions", None))
self.actionStroke_Toggle_Allow_in_Staff.setText(_translate("MainWindow", "Toggle Allow in Staff", None))
self.actionStroke_Add_Stem_Support.setText(_translate("MainWindow", "Stroke Add Stem Support", None))
self.actionStroke_Disable_Stem_Support.setText(_translate("MainWindow", "Stroke Disable Stem Support", None))
self.actionFinger_0.setText(_translate("MainWindow", "Finger 0 / Thumb", None))
self.actionDouble.setText(_translate("MainWindow", "𝄁 Double", None))
self.actionBarOpen.setText(_translate("MainWindow", "𝄃 Open", None))
self.actionEnd.setText(_translate("MainWindow", "𝄂 End", None))
self.actionOpen_End.setText(_translate("MainWindow", "Open|End", None))
self.actionEnd_Open.setText(_translate("MainWindow", "𝄂𝄃 End|Open", None))
self.actionDotted.setText(_translate("MainWindow", "Dotted", None))
self.actionDashed.setText(_translate("MainWindow", "Dashed", None))
self.actionHalf.setText(_translate("MainWindow", "Half Size", None))
self.actionRepeat_Open.setText(_translate("MainWindow", "𝄆 Repeat Open", None))
self.actionRepeat_Close.setText(_translate("MainWindow", "𝄇 Repeat Close", None))
self.actionRepeat_Close_Open.setText(_translate("MainWindow", "𝄇𝄆 Repeat Close|Open", None))
self.actionEnd_Repeat_Open.setText(_translate("MainWindow", "End + Repeat Open", None))
self.actionEspressivo.setText(_translate("MainWindow", "Espressivo", None))
self.actionPortato.setText(_translate("MainWindow", "Portato", None))
self.actionStaccatissimo.setText(_translate("MainWindow", "Staccatissimo", None))
self.actionTenuto.setText(_translate("MainWindow", "Tenuto", None))
self.actionPrall.setText(_translate("MainWindow", "Prall", None))
self.actionMordent.setText(_translate("MainWindow", "Mordent", None))
self.actionPrallmordent.setText(_translate("MainWindow", "Prall Mordent", None))
self.actionTurn.setText(_translate("MainWindow", "Turn", None))
self.actionUpprall.setText(_translate("MainWindow", "Upprall", None))
self.actionDownprall.setText(_translate("MainWindow", "Downprall", None))
self.actionUpmordent.setText(_translate("MainWindow", "Upmordent", None))
self.actionLineprall.setText(_translate("MainWindow", "Lineprall", None))
self.actionPrallprall.setText(_translate("MainWindow", "Prallprall", None))
self.actionPrallup.setText(_translate("MainWindow", "Prall Up", None))
self.actionReverseturn.setText(_translate("MainWindow", "Reverse Turn", None))
self.actionShortfermata.setText(_translate("MainWindow", "Short Fermata", None))
self.actionVerylongfermata.setText(_translate("MainWindow", "Very Long Fermata", None))
self.actionOpen_2.setText(_translate("MainWindow", "open", None))
self.actionStopped.setText(_translate("MainWindow", "Stopped String", None))
self.actionOrnament_open.setText(_translate("MainWindow", "Open String", None))
self.actionLeftheel.setText(_translate("MainWindow", "Left Heel", None))
self.actionRightheel.setText(_translate("MainWindow", "Right Heel", None))
self.actionLefttoe.setText(_translate("MainWindow", "Left Toe", None))
self.actionRighttoe.setText(_translate("MainWindow", "Right Toe", None))
self.actionSignum_Congruentia.setText(_translate("MainWindow", "Signum Congruentia", None))
self.actionIctus.setText(_translate("MainWindow", "Ictus", None))
self.actionAccentus.setText(_translate("MainWindow", "Accentus", None))
self.actionCirculus.setText(_translate("MainWindow", "Circulus", None))
self.actionSemi_Circulus.setText(_translate("MainWindow", "Semi Circulus", None))
self.actionAugmentum.setText(_translate("MainWindow", "Augmentum", None))
self.actionPizzicato.setText(_translate("MainWindow", "Pizzicato", None))
self.actionSnap_Piz_Bartok.setText(_translate("MainWindow", "Snap Piz. (\'Bartok\')", None))
self.actionAccent.setText(_translate("MainWindow", "Accent", None))
self.actionMarcato.setText(_translate("MainWindow", "Marcato", None))
self.actionLong_Fermata.setText(_translate("MainWindow", "Long Fermata", None))
self.actionDownmordent.setText(_translate("MainWindow", "Downmordent", None))
self.actionPrall_Down.setText(_translate("MainWindow", "Prall Down", None))
self.actionUpbow.setText(_translate("MainWindow", "Upbow", None))
self.actionToolbarClefTreble.setText(_translate("MainWindow", "𝄞", None))
self.actionToolbarClefTreble.setToolTip(_translate("MainWindow", "Treble Clef", None))
self.actionToolbarClefBass.setText(_translate("MainWindow", "𝄢", None))
self.actionToolbarClefBass.setToolTip(_translate("MainWindow", "Bass Clef", None))
self.actionToolbarTimeThreeFour.setText(_translate("MainWindow", "¾", None))
self.actionToolbarTimeThreeFour.setToolTip(_translate("MainWindow", "3/4 Time Signature", None))
self.actionToolbarTimeCommon.setText(_translate("MainWindow", "𝄴", None))
self.actionToolbarTimeCommon.setToolTip(_translate("MainWindow", "4/4 Time Signature", None))
self.actionToolbarKeysig.setText(_translate("MainWindow", "♮♯♭", None))
self.actionToolbarKeysig.setToolTip(_translate("MainWindow", "Typical Key Signature", None))
self.actionToolbarTrackDelete.setText(_translate("MainWindow", "⊟", None))
self.actionToolbarTrackDelete.setToolTip(_translate("MainWindow", "Delete Track", None))
self.actionToolbarTrackAdd.setText(_translate("MainWindow", "⊞", None))
self.actionToolbarTrackAdd.setToolTip(_translate("MainWindow", "Add Track", None))
self.actionToolbarTwoTwo.setText(_translate("MainWindow", "𝄵", None))
self.actionToolbarTwoTwo.setToolTip(_translate("MainWindow", "2/2 Time Signature", None))
self.actionFree_Text.setText(_translate("MainWindow", "✍ Free Text", None))
self.actionEyeglasses.setText(_translate("MainWindow", "Eyeglasses", None))
self.actionUndress_While_Playing.setText(_translate("MainWindow", "Undress While Playing", None))
self.actionLilyBin.setText(_translate("MainWindow", "to LilyBin.com", None))
self.actionShift_Up.setText(_translate("MainWindow", "Shift Up", None))
self.actionShift_Down.setText(_translate("MainWindow", "Shift Down", None))
self.actionShift_Note_Up.setText(_translate("MainWindow", "Shift Note Up", None))
self.actionShift_Note_Down.setText(_translate("MainWindow", "Shift Note Down", None))
self.actionShift_Octave_Up.setText(_translate("MainWindow", "Shift Octave Up", None))
self.actionShift_Octave_Down.setText(_translate("MainWindow", "Shift Octave Down", None))
self.actionNote_Sharp.setText(_translate("MainWindow", "♯ Sharp Note", None))
self.actionNote_Flat.setText(_translate("MainWindow", "♭ Flat Note", None))
self.actionEnharmonic_Sharp.setText(_translate("MainWindow", "Enharmonic Sharp", None))
self.actionEnharmonic_Flat.setText(_translate("MainWindow", "Enharmonic Flat", None))
self.actionAdd_Note_to_Chord.setText(_translate("MainWindow", "Add Note to Chord", None))
self.actionRemove_Note_from_Chord.setText(_translate("MainWindow", "Remove Note from Chord", None))
self.actionTranspose.setText(_translate("MainWindow", "Transpose", None))
self.actionTranspose_Down.setText(_translate("MainWindow", "Transpose Down", None))
self.actionSelect_Track.setText(_translate("MainWindow", "Select Track", None))
self.actionSelect_All.setText(_translate("MainWindow", "Select All", None))
self.actionToolbarWhole.setText(_translate("MainWindow", "𝅝", None))
self.actionToolbarWhole.setToolTip(_translate("MainWindow", "Whole (1)", None))
self.actionToolbarHalf.setText(_translate("MainWindow", "𝅗𝅥", None))
self.actionToolbarHalf.setToolTip(_translate("MainWindow", "Half (2)", None))
self.actionToolbarQuarter.setText(_translate("MainWindow", "𝅘𝅥", None))
self.actionToolbarQuarter.setToolTip(_translate("MainWindow", "Quarter (3)", None))
self.actionToolbarEighth.setText(_translate("MainWindow", "𝅘𝅥𝅮", None))
self.actionToolbarEighth.setToolTip(_translate("MainWindow", "Eigth (4)", None))
self.actionToolbarSixteenth.setText(_translate("MainWindow", "𝅘𝅥𝅯", None))
self.actionToolbarSixteenth.setToolTip(_translate("MainWindow", "Sixteenth (5)", None))
self.actionClear_Selection.setText(_translate("MainWindow", "Clear Selection", None))
self.actionToolbarFullMeasureRest.setText(_translate("MainWindow", "𝄺", None))
self.actionToolbarFullMeasureRest.setToolTip(_translate("MainWindow", "Full Measure Rest (M)", None))
self.actionToolbarWholeRest.setText(_translate("MainWindow", "𝄻", None))
self.actionToolbarWholeRest.setToolTip(_translate("MainWindow", "Whole Rest (Shift+1)", None))
self.actionToolbarHalfRest.setText(_translate("MainWindow", "𝄼", None))
self.actionToolbarHalfRest.setToolTip(_translate("MainWindow", "Half Rest (Shift+2)", None))
self.actionToolbarQuarterRest.setText(_translate("MainWindow", "𝄽", None))
self.actionToolbarQuarterRest.setToolTip(_translate("MainWindow", "Quarter Rest (Shift+3)", None))
self.actionToolbarEighthRest.setText(_translate("MainWindow", "𝄾", None))
self.actionToolbarEighthRest.setToolTip(_translate("MainWindow", "Eighth Rest (Shift+4)", None))
self.actionToolbarSixteenthRest.setText(_translate("MainWindow", "𝄿", None))
self.actionToolbarSixteenthRest.setToolTip(_translate("MainWindow", "Sixteenth Rest (Shift+5)", None))
self.actionToolbarToggleDot.setText(_translate("MainWindow", "+𝅘𝅥𝅭", None))
self.actionToolbarToggleDot.setToolTip(_translate("MainWindow", "Add Dot (Tab). Shift+Tab removes", None))
self.actionShift_Note_Octave_Up.setText(_translate("MainWindow", "Shift Note Octave Up", None))
self.actionShift_Note_Octave_Down.setText(_translate("MainWindow", "Shift Note Octave Down", None))
self.actionRemove_Substitution.setText(_translate("MainWindow", "Clear Substitution from Item", None))
self.actionLaborejo_Substitutions.setText(_translate("MainWindow", "Laborejo Substitutions", None))
self.actionScore_Substitutions.setText(_translate("MainWindow", "Score Substitutions", None))
self.actionDelete_Score_Substitutions.setText(_translate("MainWindow", "Remove Score Substitution", None))
self.actionCreate_Substitution_from_Selection.setText(_translate("MainWindow", "Create Substitution from Selection", None))
self.actionCreate_Substitutions_from_File.setText(_translate("MainWindow", "Create Substitutions from File", None))
self.actionInsert_Empty_Container.setText(_translate("MainWindow", "Insert Empty Container", None))
self.actionDelete_Container_Instance.setText(_translate("MainWindow", "Delete Container Instance", None))
self.actionConvert_Selection_to_Container.setText(_translate("MainWindow", "Convert Selection to Container", None))
self.actionMinimap.setText(_translate("MainWindow", "Minimap", None))
self.actionToolbarPlayStop.setText(_translate("MainWindow", "▶◼", None))
self.actionToolbarPlayStop.setIconText(_translate("MainWindow", "▶/◼", None))
self.actionToolbarPlayStop.setToolTip(_translate("MainWindow", "Play/Stop (F5)", None))
self.actionToolbarPlayFromStart.setText(_translate("MainWindow", "▮▶", None))
self.actionToolbarPlayFromStart.setIconText(_translate("MainWindow", "▮▶", None))
self.actionToolbarPlayFromStart.setToolTip(_translate("MainWindow", "Play from Start (Ctrl+F5)", None))
self.actionDa_Capo.setText(_translate("MainWindow", "𝄊 Da Capo", None))
self.actionDal_Segno.setText(_translate("MainWindow", "𝄉 Dal Segno", None))
self.actionSegno.setText(_translate("MainWindow", "𝄋 Segno", None))
self.actionCoda.setText(_translate("MainWindow", "𝄌 Coda", None))
self.actionFine.setText(_translate("MainWindow", "𝄂 Fine", None))
self.actionTo_Coda.setText(_translate("MainWindow", "𝄌 to Coda", None))
self.actionClear_Trigger_from_Item.setText(_translate("MainWindow", "Clear Trigger from Item", None))
self.actionTriggerOnlyFirst.setText(_translate("MainWindow", "Only first time", None))
self.actionTriggerNeverFirst.setText(_translate("MainWindow", "Never first time", None))
self.actionEdit_Trigger.setText(_translate("MainWindow", "Edit Trigger", None))
self.actionAdd_Octave_to_Chord.setText(_translate("MainWindow", "Add Octave to Chord", None))
self.actionInvert_Selection.setText(_translate("MainWindow", "Invert Selection", None))
self.actionJoin_to_Chord_prevalent_duration.setText(_translate("MainWindow", "Join to Chord", None))
self.actionJoin_to_Chord_sum_durations.setText(_translate("MainWindow", "Join to Chord (Sum Durations)", None))
self.actionEdit_Container.setText(_translate("MainWindow", "Edit Container Properties", None))
self.actionAlternate_End.setText(_translate("MainWindow", "Alternate End", None))
self.actionAlternate_Ending_1.setText(_translate("MainWindow", "Alternate Ending 1", None))
self.actionAlternate_Ending_2.setText(_translate("MainWindow", "Alternate Ending 2", None))
self.actionCustom_Alternate_Ending.setText(_translate("MainWindow", "Custom Alternate Ending ", None))
self.actionAlternate_Ending_Close.setText(_translate("MainWindow", "Alternate Ending Close", None))
self.actionTie_from_left_side_repeat_Tie.setText(_translate("MainWindow", "Tie from left side (repeat Tie)", None))
self.actionMIDI_Note_Entry.setText(_translate("MainWindow", "MIDI in", None))
self.actionMIDI_Note_Entry.setToolTip(_translate("MainWindow", "MIDI Note Entry (F8)", None))
self.action_Sustain_On.setText(_translate("MainWindow", "𝆮 Sustain On", None))
self.action_Sustain_Off.setText(_translate("MainWindow", "𝆯 Sustain Off", None))
self.actionUna_Corda_Soft_On.setText(_translate("MainWindow", "Una Corda / Soft On", None))
self.actionUna_Corda_Soft_Off.setText(_translate("MainWindow", "Una Corda / Soft Off", None))
self.actionSostenuto_On.setText(_translate("MainWindow", "Sostenuto On", None))
self.actionSostenuto_Off.setText(_translate("MainWindow", "Sostenuto Off", None))
self.actionSustain_Change_non_print.setText(_translate("MainWindow", "Sustain Change (non-print)", None))
self.actionLilypond_Text.setText(_translate("MainWindow", "Lilypond Text", None))
self.actionOpen_as_Template.setText(_translate("MainWindow", "Open as Template", None))
self.actionMidi_Files_per_Track.setText(_translate("MainWindow", "Midi Files per Track (Simple)", None))
self.actionImportLisalo.setText(_translate("MainWindow", "Lisalo (Tracks per Channel)", None))
self.actionArdour.setText(_translate("MainWindow", "Ardour 3", None))
self.actionChannel_Change_Relative.setText(_translate("MainWindow", "insert Channel Change Relative", None))
self.actionChannel_Change_Absolute.setText(_translate("MainWindow", "insert Channel Change Absolute", None))
self.actionToolbarUnsetSoloMute.setText(_translate("MainWindow", "SoloMute", None))
self.actionToolbarUnsetSoloMute.setIconText(_translate("MainWindow", "Reset Solo/Mute", None))
self.actionToolbarUnsetSoloMute.setToolTip(_translate("MainWindow", "Unset all solo and mute", None))
self.actionImportLisaloBus.setText(_translate("MainWindow", "Lisalo (Tracks per Ports)", None))
self.actionTerminal.setText(_translate("MainWindow", "Terminal", None))
self.actionSmall_Terminal.setText(_translate("MainWindow", "Small Terminal", None))
self.actionChord_Duration_Factor_Plus.setText(_translate("MainWindow", "Chord Duration Factor +", None))
self.actionChord_Duration_Factor_Minus.setText(_translate("MainWindow", "Chord Duration Factor -", None))
self.actionChord_Duration_Factor_Reset.setText(_translate("MainWindow", "Chord Duration Factor Reset", None))
self.actionTempo_Change_Relative.setText(_translate("MainWindow", "Tempo Change Relative", None))
self.actionChord_Velocity_Factor_Plus.setText(_translate("MainWindow", "Chord Velocity Factor +", None))
self.actionChord_Velocity_Factor_Minus.setText(_translate("MainWindow", "Chord Velocity Factor -", None))
self.actionChord_Velocity_Factor_Reset.setText(_translate("MainWindow", "Chord Velocity Factor Reset", None))
self.actionToggle_Extended_Track_View.setText(_translate("MainWindow", "Expand to Dual-Staff (Gui only)", None))
self.actionAutoChange.setText(_translate("MainWindow", "Convert Single Voice Track to autochange Piano-Staff", None))
self.actionRemove_lowest_Note_from_Chord.setText(_translate("MainWindow", "Remove lowest Note from Chord", None))
self.actionRemove_highest_Note_from_Chord.setText(_translate("MainWindow", "Remove highest Note from Chord", None))
self.actionToolbarPiano.setText(_translate("MainWindow", "𝆏", None))
self.actionToolbarPiano.setToolTip(_translate("MainWindow", "piano", None))
self.actionToolbarForte.setText(_translate("MainWindow", "𝆑", None))
self.actionToolbarForte.setToolTip(_translate("MainWindow", "forte", None))
self.actionToolbarPianissimo.setText(_translate("MainWindow", "𝆏𝆏\n"
"", None))
self.actionToolbarPianissimo.setToolTip(_translate("MainWindow", "pianissimo", None))
self.actionToolbarMezzoPiano.setText(_translate("MainWindow", "𝆐𝆏\n"
"", None))
self.actionToolbarMezzoPiano.setToolTip(_translate("MainWindow", "mezzo piano", None))
self.actionToolbarMezzoForte.setText(_translate("MainWindow", "𝆐𝆑\n"
"", None))
self.actionToolbarMezzoForte.setToolTip(_translate("MainWindow", "mezzo forte", None))
self.actionToolbarFortissimo.setText(_translate("MainWindow", "𝆑𝆑\n"
"", None))
self.actionToolbarFortissimo.setToolTip(_translate("MainWindow", "fortissimo", None))
self.actionSplitChordTrackToVoices.setText(_translate("MainWindow", "Convert Chordtrack to Single-Voice Tracks", None))
self.actionTacet.setText(_translate("MainWindow", "tacet", None))
self.actionMirror.setText(_translate("MainWindow", "Mirror around Cursor", None))
self.actionReverse.setText(_translate("MainWindow", "Reverse", None))
self.actionShuffle.setText(_translate("MainWindow", "Shuffle", None))
self.actionSort_Ascending.setText(_translate("MainWindow", "Sort Ascending", None))
self.actionSort_Descending.setText(_translate("MainWindow", "Sort Descending", None))
self.actionPaste_replace_Selection.setText(_translate("MainWindow", "Paste, replace Selection", None))
self.actionFull_Dual_Ending_Sequence.setText(_translate("MainWindow", "Full Dual Ending Sequence", None))
self.actionSave_Substitutions_to_File.setText(_translate("MainWindow", "Save Substitutions to File", None))
self.actionUnfold_Substitution_permanently.setText(_translate("MainWindow", "Unfold Substitution permanently", None))
self.actionCautionary.setText(_translate("MainWindow", "(♯) Cautionary", None))
self.actionReminder.setText(_translate("MainWindow", "!♯ Reminder", None))
self.actionSuggestion_Accidentals_On.setText(_translate("MainWindow", "Suggestion Accidentals On", None))
self.actionSuggestion_Accidentals_Off.setText(_translate("MainWindow", "Suggestion Accidentals Off", None))
self.actionFp.setText(_translate("MainWindow", "𝆑𝆏 fp", None))
self.actionSf.setText(_translate("MainWindow", "𝆍𝆑 sf", None))
self.actionSff.setText(_translate("MainWindow", "𝆍𝆑𝆑 sff", None))
self.actionSp.setText(_translate("MainWindow", "𝆍𝆏 sp", None))
self.actionSpp.setText(_translate("MainWindow", "𝆍𝆏𝆏 spp", None))
self.actionSfz.setText(_translate("MainWindow", "𝆍𝆑𝆎 sfz", None))
self.actionRfz.setText(_translate("MainWindow", "𝆌𝆑𝆎 rfz", None))
self.actionCollapse_All.setText(_translate("MainWindow", "Collapse All", None))
self.actionExpand_All.setText(_translate("MainWindow", "Expand All", None))
self.actionCollapse_all_Tracks.setText(_translate("MainWindow", "Collapse all Tracks", None))
self.actionToggle_Collapse_Track.setText(_translate("MainWindow", "Collapse this Track", None))
self.actionExpand_all_Tracks.setText(_translate("MainWindow", "Expand all Tracks", None))
self.actionInvert_Collapsing.setText(_translate("MainWindow", "Invert Collapsing", None))
self.actionCollapse_empty_Tracks.setText(_translate("MainWindow", "Collapse empty Tracks", None))
self.actionReverse_Pitch.setText(_translate("MainWindow", "Reverse Pitch", None))
self.actionReverse_Rythm.setText(_translate("MainWindow", "Reverse Rythm", None))
self.actionVirtual_Piano.setText(_translate("MainWindow", "Virtual Piano", None))
self.actionFocusOnActiveScore.setText(_translate("MainWindow", "focusOnActiveScore", None))
self.actionOpen_Collection.setText(_translate("MainWindow", "Open Collection", None))
self.actionMidi_Jack.setText(_translate("MainWindow", "Midi (JACK)", None))
self.actionMidi_Files_per_Track_Jack.setText(_translate("MainWindow", "Midi Files per Track (Jack)", None))
self.actionMidi_Files_per_Port_Jack.setText(_translate("MainWindow", "Midi Files per Port (Jack)", None))
self.actionEdit_Container_Content.setText(_translate("MainWindow", "Edit Container Content in new tab", None))
self.actionPDF_Parts_by_Group.setText(_translate("MainWindow", "PDFs by Group", None))
self.actionPDF_Parts_by_Instrument_Short.setText(_translate("MainWindow", "PDFs by Instrument (Short)", None))
self.actionPDF_Parts_by_Export_Parts.setText(_translate("MainWindow", "PDFs by Export Parts", None))
self.actionPDFs_by_Track.setText(_translate("MainWindow", "PDFs by Track", None))
self.actionMidi_Files_per_Group_Simple.setText(_translate("MainWindow", "Midi Files per Group (Simple)", None))
self.actionQTractor.setText(_translate("MainWindow", "QTractor", None))
self.actionMidi_Files_per_Export_Parts.setText(_translate("MainWindow", "Midi Files per Export Parts (Simple)", None))
self.actionMidi_Files_per_Instrument_Short.setText(_translate("MainWindow", "Midi Files per Instrument (Short) (Simple)", None))
self.actionMidi_Files_per_Instrument_Short_Jack.setText(_translate("MainWindow", "Midi Files per Instrument (Short) (Jack)", None))
self.actionMidi_Files_per_Group_Jack.setText(_translate("MainWindow", "Midi Files per Group (Jack)", None))
self.actionMidi_Files_per_Export_Parts_Jack.setText(_translate("MainWindow", "Midi Files per Export Parts (Jack)", None))
self.actionCustom_Export.setText(_translate("MainWindow", "Custom Export", None))
self.actionCenterOnCursor.setText(_translate("MainWindow", "Center on Cursor", None))
self.actionToolbarEmergencyPlaybackStop.setText(_translate("MainWindow", "◆", None))
self.actionToolbarEmergencyPlaybackStop.setIconText(_translate("MainWindow", "◆", None))
self.actionToolbarEmergencyPlaybackStop.setToolTip(_translate("MainWindow", "Stop and Midi Panic (F6)", None))
self.actionToolbarJackModeToggle.setText(_translate("MainWindow", "Jack Mode", None))
self.actionToolbarJackModeToggle.setToolTip(_translate("MainWindow", "Jack Mode (F7)", None))
self.actionPlaySolo.setText(_translate("MainWindow", "𝟭▶", None))
self.actionPlaySolo.setIconText(_translate("MainWindow", " 𝟭▶", None))
self.actionPlaySolo.setToolTip(_translate("MainWindow", "Play current track (Shift+F5)", None))
self.actionRebind_external_Jack_Midi_connections.setText(_translate("MainWindow", "Rebind external Jack Midi connections", None))
self.actionDurationInsertMode.setText(_translate("MainWindow", "Don\'t insert notes, choose duration instead", None))
self.actionSpeedUpPlayback.setText(_translate("MainWindow", "Speed up Playback (activate while playback is running)", None))
self.actionNext_becomes_dotted.setText(_translate("MainWindow", "Next becomes dotted", None))
self.actionToolbarNext_Becomes_Dotted.setText(_translate("MainWindow", "↷𝅘𝅥𝅭", None))
self.actionToolbarNext_Becomes_Dotted.setToolTip(_translate("MainWindow", "Next becomes dotted (Dot)", None))
self.actionSharp.setText(_translate("MainWindow", "♯ Sharp", None))
self.actionFlat.setText(_translate("MainWindow", "♭ Flat", None))
self.actionPaletteDynamics.setText(_translate("MainWindow", "Dynamics", None))
self.actionPaletteFingering.setText(_translate("MainWindow", "Fingering", None))
self.actionPaletteBarlines.setText(_translate("MainWindow", "Barlines", None))
self.actionPaletteStringNumbers.setText(_translate("MainWindow", "String Numbers", None))
self.actionPaletteVoicePresets.setText(_translate("MainWindow", "Voice Presets", None))
self.actionPaletteMidiFinetuning.setText(_translate("MainWindow", "Midi Fine Tuning", None))
self.actionPaletteStrokeFinger.setText(_translate("MainWindow", "Stroke Finger", None))
self.actionPaletteNext.setText(_translate("MainWindow", "Next Palette", None))
self.actionPalettePrevious.setText(_translate("MainWindow", "Previous Palette", None))
self.actionNew_to_Session.setText(_translate("MainWindow", "New to Session", None))
self.actionImport_to_Session.setText(_translate("MainWindow", "Import to Session", None))
self.actionExport_from_Session.setText(_translate("MainWindow", "Export from Session", None))
self.actionRemove_from_Session.setText(_translate("MainWindow", "Remove from Session", None))
self.actionImport_to_Session_as_Template.setText(_translate("MainWindow", "Import to Session as Template", None))
self.actionNew_to_Session_2.setText(_translate("MainWindow", "New to Session", None))
self.actionQuick_View_PDF_Export_Group.setText(_translate("MainWindow", "Quick-View PDF Export-Group", None))
self.actionToolbarJackTransportKeepRolling.setText(_translate("MainWindow", "→𝄂", None))
self.actionToolbarJackTransportKeepRolling.setToolTip(_translate("MainWindow", "Playback Jack Transport stops at the end", None))
self.actionExtract_and_render_chordsymbols_to_a_new_track_with_real_chords.setText(_translate("MainWindow", "Extract and render chordsymbols to a new track with real chords", None))
self.actionInsert_Existing_Container.setText(_translate("MainWindow", "Insert Existing Container", None))
self.actionToggleHidden.setText(_translate("MainWindow", "Hide Object (On/Off)", None))
self.actionToggleTransparent.setText(_translate("MainWindow", "Transparent Object (On/Off)", None))
self.actionCleanHiddenTransparent.setText(_translate("MainWindow", "Clean Hidden/Transparent", None))
self.actionHide_Notes_Start.setText(_translate("MainWindow", "Hide Notes Start", None))
self.actionHide_Notes_Stop.setText(_translate("MainWindow", "Hide Notes Stop", None))
self.actionHide_Barlines_Start.setText(_translate("MainWindow", "Hide Barlines Start", None))
self.actionHide_Barlines_Stop.setText(_translate("MainWindow", "Hide Barlines Stop", None))
self.actionDid_you_know.setText(_translate("MainWindow", "Did you know...", None))
self.actionClean_Tremolo.setText(_translate("MainWindow", "Clean Tremolo", None))
self.actionPlayGroup.setText(_translate("MainWindow", "❴▶", None))
self.actionPlayGroup.setIconText(_translate("MainWindow", "❴▶", None))
self.actionPlayGroup.setToolTip(_translate("MainWindow", "Play current group (Alt+F5)", None))
self.actionProgram_Plus.setText(_translate("MainWindow", "Item Program +", None))
self.actionProgram_Minus.setText(_translate("MainWindow", "Item Program -", None))
self.actionProgram_Force.setText(_translate("MainWindow", "Item Force Program", None))
self.actionProgram_Clear.setText(_translate("MainWindow", "Item Clear Program", None))
self.actionProgram_Change_Relative.setText(_translate("MainWindow", "insert Program Change Relative", None))
self.actionProgram_Change_Absolute.setText(_translate("MainWindow", "insert Program Change Absolute", None))
self.actionReset_and_Redraw_GUI.setText(_translate("MainWindow", "Reset and Redraw GUI", None))
laborejo-0.8~ds0.orig/laborejoqt/designer/__init__.py 0000664 0001750 0001750 00000000000 12154405225 023301 0 ustar glowworm glowworm laborejo-0.8~ds0.orig/laborejoqt/designer/gui_stacked_musictab.py 0000664 0001750 0001750 00000125571 12154405225 025740 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_stacked_musictab.ui'
#
# Created: Sun Jun 2 15:13:34 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_stackedMusicTab(object):
def setupUi(self, stackedMusicTab):
stackedMusicTab.setObjectName(_fromUtf8("stackedMusicTab"))
stackedMusicTab.resize(1182, 926)
self.editor = QtGui.QWidget()
self.editor.setObjectName(_fromUtf8("editor"))
self.gridLayout = QtGui.QGridLayout(self.editor)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.lyrics = QtGui.QGroupBox(self.editor)
self.lyrics.setMaximumSize(QtCore.QSize(16777215, 200))
self.lyrics.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.lyrics.setFlat(False)
self.lyrics.setObjectName(_fromUtf8("lyrics"))
self.gridLayout_2 = QtGui.QGridLayout(self.lyrics)
self.gridLayout_2.setSpacing(4)
self.gridLayout_2.setContentsMargins(4, 6, 4, 6)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.lyricTextEdit = QtGui.QPlainTextEdit(self.lyrics)
self.lyricTextEdit.setObjectName(_fromUtf8("lyricTextEdit"))
self.gridLayout_2.addWidget(self.lyricTextEdit, 0, 0, 1, 1)
self.lyricHelp = QtGui.QLabel(self.lyrics)
self.lyricHelp.setAlignment(QtCore.Qt.AlignCenter)
self.lyricHelp.setObjectName(_fromUtf8("lyricHelp"))
self.gridLayout_2.addWidget(self.lyricHelp, 1, 0, 1, 1)
self.gridLayout.addWidget(self.lyrics, 2, 0, 1, 3)
self.doubleView = QtGui.QVBoxLayout()
self.doubleView.setContentsMargins(-1, -1, -1, 0)
self.doubleView.setObjectName(_fromUtf8("doubleView"))
self.complete_score = QtGui.QFrame(self.editor)
self.complete_score.setFrameShape(QtGui.QFrame.StyledPanel)
self.complete_score.setFrameShadow(QtGui.QFrame.Sunken)
self.complete_score.setLineWidth(1)
self.complete_score.setObjectName(_fromUtf8("complete_score"))
self.horizontalLayout_17 = QtGui.QHBoxLayout(self.complete_score)
self.horizontalLayout_17.setSpacing(0)
self.horizontalLayout_17.setMargin(0)
self.horizontalLayout_17.setObjectName(_fromUtf8("horizontalLayout_17"))
self.incipit = QtGui.QGraphicsView(self.complete_score)
self.incipit.setMinimumSize(QtCore.QSize(80, 0))
self.incipit.setMaximumSize(QtCore.QSize(80, 16777215))
self.incipit.setFocusPolicy(QtCore.Qt.NoFocus)
self.incipit.setAcceptDrops(False)
self.incipit.setFrameShape(QtGui.QFrame.NoFrame)
self.incipit.setFrameShadow(QtGui.QFrame.Plain)
self.incipit.setLineWidth(0)
self.incipit.setMidLineWidth(0)
self.incipit.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.incipit.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
self.incipit.setInteractive(False)
self.incipit.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.incipit.setViewportUpdateMode(QtGui.QGraphicsView.FullViewportUpdate)
self.incipit.setObjectName(_fromUtf8("incipit"))
self.horizontalLayout_17.addWidget(self.incipit)
self.score = QtGui.QGraphicsView(self.complete_score)
self.score.setEnabled(True)
self.score.setMinimumSize(QtCore.QSize(0, 0))
self.score.setBaseSize(QtCore.QSize(0, 0))
self.score.setAcceptDrops(False)
self.score.setLayoutDirection(QtCore.Qt.LeftToRight)
self.score.setFrameShape(QtGui.QFrame.NoFrame)
self.score.setFrameShadow(QtGui.QFrame.Plain)
self.score.setLineWidth(0)
self.score.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
self.score.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.NoBrush)
self.score.setBackgroundBrush(brush)
self.score.setInteractive(True)
self.score.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.score.setRenderHints(QtGui.QPainter.Antialiasing|QtGui.QPainter.NonCosmeticDefaultPen|QtGui.QPainter.TextAntialiasing)
self.score.setDragMode(QtGui.QGraphicsView.NoDrag)
self.score.setTransformationAnchor(QtGui.QGraphicsView.NoAnchor)
self.score.setResizeAnchor(QtGui.QGraphicsView.NoAnchor)
self.score.setViewportUpdateMode(QtGui.QGraphicsView.FullViewportUpdate)
self.score.setObjectName(_fromUtf8("score"))
self.horizontalLayout_17.addWidget(self.score)
self.doubleView.addWidget(self.complete_score)
self.minimap = QtGui.QGraphicsView(self.editor)
self.minimap.setMaximumSize(QtCore.QSize(16777215, 100))
self.minimap.setAcceptDrops(False)
self.minimap.setFrameShape(QtGui.QFrame.StyledPanel)
self.minimap.setFrameShadow(QtGui.QFrame.Sunken)
self.minimap.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.minimap.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
brush = QtGui.QBrush(QtGui.QColor(221, 221, 221))
brush.setStyle(QtCore.Qt.NoBrush)
self.minimap.setBackgroundBrush(brush)
self.minimap.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.minimap.setRenderHints(QtGui.QPainter.Antialiasing)
self.minimap.setObjectName(_fromUtf8("minimap"))
self.doubleView.addWidget(self.minimap)
self.gridLayout.addLayout(self.doubleView, 1, 0, 1, 1)
self.sidebar = QtGui.QWidget(self.editor)
self.sidebar.setObjectName(_fromUtf8("sidebar"))
self.verticalLayout_8 = QtGui.QVBoxLayout(self.sidebar)
self.verticalLayout_8.setMargin(0)
self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
self.trackProperties = QtGui.QScrollArea(self.sidebar)
self.trackProperties.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.trackProperties.sizePolicy().hasHeightForWidth())
self.trackProperties.setSizePolicy(sizePolicy)
self.trackProperties.setMinimumSize(QtCore.QSize(180, 0))
self.trackProperties.setMaximumSize(QtCore.QSize(170, 16777215))
self.trackProperties.setFrameShape(QtGui.QFrame.StyledPanel)
self.trackProperties.setFrameShadow(QtGui.QFrame.Raised)
self.trackProperties.setLineWidth(1)
self.trackProperties.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
self.trackProperties.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.trackProperties.setWidgetResizable(True)
self.trackProperties.setAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignTop)
self.trackProperties.setObjectName(_fromUtf8("trackProperties"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 176, 501))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_2.setSpacing(-1)
self.verticalLayout_2.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.verticalLayout_2.setMargin(6)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.trackPropertiesLabel = QtGui.QLabel(self.scrollAreaWidgetContents)
self.trackPropertiesLabel.setObjectName(_fromUtf8("trackPropertiesLabel"))
self.verticalLayout_2.addWidget(self.trackPropertiesLabel)
self.frameSoloMute = QtGui.QFrame(self.scrollAreaWidgetContents)
self.frameSoloMute.setFrameShape(QtGui.QFrame.NoFrame)
self.frameSoloMute.setFrameShadow(QtGui.QFrame.Plain)
self.frameSoloMute.setLineWidth(0)
self.frameSoloMute.setObjectName(_fromUtf8("frameSoloMute"))
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.frameSoloMute)
self.horizontalLayout_4.setSpacing(0)
self.horizontalLayout_4.setContentsMargins(9, 0, 9, 0)
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.trackSolo = QtGui.QCheckBox(self.frameSoloMute)
self.trackSolo.setObjectName(_fromUtf8("trackSolo"))
self.horizontalLayout_4.addWidget(self.trackSolo)
self.trackMute = QtGui.QCheckBox(self.frameSoloMute)
self.trackMute.setObjectName(_fromUtf8("trackMute"))
self.horizontalLayout_4.addWidget(self.trackMute)
self.verticalLayout_2.addWidget(self.frameSoloMute)
self.toolBox = QtGui.QToolBox(self.scrollAreaWidgetContents)
self.toolBox.setMinimumSize(QtCore.QSize(0, 0))
self.toolBox.setLayoutDirection(QtCore.Qt.LeftToRight)
self.toolBox.setFrameShadow(QtGui.QFrame.Sunken)
self.toolBox.setLineWidth(0)
self.toolBox.setObjectName(_fromUtf8("toolBox"))
self.general = QtGui.QWidget()
self.general.setGeometry(QtCore.QRect(0, 0, 164, 251))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.general.sizePolicy().hasHeightForWidth())
self.general.setSizePolicy(sizePolicy)
self.general.setObjectName(_fromUtf8("general"))
self.verticalLayout = QtGui.QVBoxLayout(self.general)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.trackNameLabel = QtGui.QLabel(self.general)
self.trackNameLabel.setObjectName(_fromUtf8("trackNameLabel"))
self.verticalLayout.addWidget(self.trackNameLabel)
self.trackUniqueName = QtGui.QLineEdit(self.general)
self.trackUniqueName.setInputMethodHints(QtCore.Qt.ImhNone)
self.trackUniqueName.setObjectName(_fromUtf8("trackUniqueName"))
self.verticalLayout.addWidget(self.trackUniqueName)
self.trackLongInstrumentNameLabel = QtGui.QLabel(self.general)
self.trackLongInstrumentNameLabel.setObjectName(_fromUtf8("trackLongInstrumentNameLabel"))
self.verticalLayout.addWidget(self.trackLongInstrumentNameLabel)
self.trackLongInstrumentName = QtGui.QLineEdit(self.general)
self.trackLongInstrumentName.setObjectName(_fromUtf8("trackLongInstrumentName"))
self.verticalLayout.addWidget(self.trackLongInstrumentName)
self.trackShortInstrumentNameLabel = QtGui.QLabel(self.general)
self.trackShortInstrumentNameLabel.setObjectName(_fromUtf8("trackShortInstrumentNameLabel"))
self.verticalLayout.addWidget(self.trackShortInstrumentNameLabel)
self.trackShortInstrumentName = QtGui.QLineEdit(self.general)
self.trackShortInstrumentName.setObjectName(_fromUtf8("trackShortInstrumentName"))
self.verticalLayout.addWidget(self.trackShortInstrumentName)
self.trackGroupLabel = QtGui.QLabel(self.general)
self.trackGroupLabel.setObjectName(_fromUtf8("trackGroupLabel"))
self.verticalLayout.addWidget(self.trackGroupLabel)
self.trackGroup = QtGui.QLineEdit(self.general)
self.trackGroup.setObjectName(_fromUtf8("trackGroup"))
self.verticalLayout.addWidget(self.trackGroup)
self.trackExportPartLabel = QtGui.QLabel(self.general)
self.trackExportPartLabel.setObjectName(_fromUtf8("trackExportPartLabel"))
self.verticalLayout.addWidget(self.trackExportPartLabel)
self.trackExportPart = QtGui.QLineEdit(self.general)
self.trackExportPart.setObjectName(_fromUtf8("trackExportPart"))
self.verticalLayout.addWidget(self.trackExportPart)
self.toolBox.addItem(self.general, _fromUtf8(""))
self.print = QtGui.QWidget()
self.print.setGeometry(QtCore.QRect(0, 0, 143, 336))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.print.sizePolicy().hasHeightForWidth())
self.print.setSizePolicy(sizePolicy)
self.print.setObjectName(_fromUtf8("print"))
self.verticalLayout_3 = QtGui.QVBoxLayout(self.print)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.trackVoicePresetLabel = QtGui.QLabel(self.print)
self.trackVoicePresetLabel.setObjectName(_fromUtf8("trackVoicePresetLabel"))
self.verticalLayout_3.addWidget(self.trackVoicePresetLabel)
self.trackVoicePreset = QtGui.QComboBox(self.print)
self.trackVoicePreset.setObjectName(_fromUtf8("trackVoicePreset"))
self.verticalLayout_3.addWidget(self.trackVoicePreset)
self.trackTranspositionLabel = QtGui.QLabel(self.print)
self.trackTranspositionLabel.setObjectName(_fromUtf8("trackTranspositionLabel"))
self.verticalLayout_3.addWidget(self.trackTranspositionLabel)
self.transposeFrame = QtGui.QFrame(self.print)
self.transposeFrame.setMinimumSize(QtCore.QSize(110, 0))
self.transposeFrame.setMaximumSize(QtCore.QSize(110, 16777215))
self.transposeFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.transposeFrame.setFrameShadow(QtGui.QFrame.Plain)
self.transposeFrame.setLineWidth(0)
self.transposeFrame.setObjectName(_fromUtf8("transposeFrame"))
self.horizontalLayout = QtGui.QHBoxLayout(self.transposeFrame)
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.trackTranposeFrom = QtGui.QComboBox(self.transposeFrame)
self.trackTranposeFrom.setMinimumSize(QtCore.QSize(55, 0))
self.trackTranposeFrom.setMaximumSize(QtCore.QSize(55, 16777215))
self.trackTranposeFrom.setObjectName(_fromUtf8("trackTranposeFrom"))
self.horizontalLayout.addWidget(self.trackTranposeFrom)
self.trackTranposeTo = QtGui.QComboBox(self.transposeFrame)
self.trackTranposeTo.setMinimumSize(QtCore.QSize(55, 0))
self.trackTranposeTo.setMaximumSize(QtCore.QSize(55, 16777215))
self.trackTranposeTo.setObjectName(_fromUtf8("trackTranposeTo"))
self.horizontalLayout.addWidget(self.trackTranposeTo)
self.verticalLayout_3.addWidget(self.transposeFrame)
self.trackSizeLabel = QtGui.QLabel(self.print)
self.trackSizeLabel.setObjectName(_fromUtf8("trackSizeLabel"))
self.verticalLayout_3.addWidget(self.trackSizeLabel)
self.trackSize = QtGui.QComboBox(self.print)
self.trackSize.setObjectName(_fromUtf8("trackSize"))
self.verticalLayout_3.addWidget(self.trackSize)
self.trackNrOfLinesLabel = QtGui.QLabel(self.print)
self.trackNrOfLinesLabel.setObjectName(_fromUtf8("trackNrOfLinesLabel"))
self.verticalLayout_3.addWidget(self.trackNrOfLinesLabel)
self.trackNrOfLines = QtGui.QSpinBox(self.print)
self.trackNrOfLines.setSingleStep(1)
self.trackNrOfLines.setProperty("value", 5)
self.trackNrOfLines.setObjectName(_fromUtf8("trackNrOfLines"))
self.verticalLayout_3.addWidget(self.trackNrOfLines)
self.trackLyricsAbove = QtGui.QCheckBox(self.print)
self.trackLyricsAbove.setObjectName(_fromUtf8("trackLyricsAbove"))
self.verticalLayout_3.addWidget(self.trackLyricsAbove)
self.trackVoice = QtGui.QCheckBox(self.print)
self.trackVoice.setObjectName(_fromUtf8("trackVoice"))
self.verticalLayout_3.addWidget(self.trackVoice)
self.trackHideLilypond = QtGui.QCheckBox(self.print)
self.trackHideLilypond.setObjectName(_fromUtf8("trackHideLilypond"))
self.verticalLayout_3.addWidget(self.trackHideLilypond)
self.trackAmbitus = QtGui.QCheckBox(self.print)
self.trackAmbitus.setObjectName(_fromUtf8("trackAmbitus"))
self.verticalLayout_3.addWidget(self.trackAmbitus)
self.trackDirectives = QtGui.QToolButton(self.print)
self.trackDirectives.setObjectName(_fromUtf8("trackDirectives"))
self.verticalLayout_3.addWidget(self.trackDirectives)
self.toolBox.addItem(self.print, _fromUtf8(""))
self.simpleplayback = QtGui.QWidget()
self.simpleplayback.setGeometry(QtCore.QRect(0, 0, 127, 226))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.simpleplayback.sizePolicy().hasHeightForWidth())
self.simpleplayback.setSizePolicy(sizePolicy)
self.simpleplayback.setObjectName(_fromUtf8("simpleplayback"))
self.verticalLayout_4 = QtGui.QVBoxLayout(self.simpleplayback)
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.trackInstrumentLabel = QtGui.QLabel(self.simpleplayback)
self.trackInstrumentLabel.setObjectName(_fromUtf8("trackInstrumentLabel"))
self.verticalLayout_4.addWidget(self.trackInstrumentLabel)
self.simpleInstrumentFrame = QtGui.QFrame(self.simpleplayback)
self.simpleInstrumentFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.simpleInstrumentFrame.setFrameShadow(QtGui.QFrame.Plain)
self.simpleInstrumentFrame.setLineWidth(0)
self.simpleInstrumentFrame.setObjectName(_fromUtf8("simpleInstrumentFrame"))
self.horizontalLayout_19 = QtGui.QHBoxLayout(self.simpleInstrumentFrame)
self.horizontalLayout_19.setMargin(0)
self.horizontalLayout_19.setObjectName(_fromUtf8("horizontalLayout_19"))
self.trackInstrumentNumber = QtGui.QSpinBox(self.simpleInstrumentFrame)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.trackInstrumentNumber.sizePolicy().hasHeightForWidth())
self.trackInstrumentNumber.setSizePolicy(sizePolicy)
self.trackInstrumentNumber.setMinimum(1)
self.trackInstrumentNumber.setMaximum(128)
self.trackInstrumentNumber.setObjectName(_fromUtf8("trackInstrumentNumber"))
self.horizontalLayout_19.addWidget(self.trackInstrumentNumber)
self.trackInstrument = QtGui.QComboBox(self.simpleInstrumentFrame)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.trackInstrument.sizePolicy().hasHeightForWidth())
self.trackInstrument.setSizePolicy(sizePolicy)
self.trackInstrument.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLengthWithIcon)
self.trackInstrument.setMinimumContentsLength(0)
self.trackInstrument.setModelColumn(0)
self.trackInstrument.setObjectName(_fromUtf8("trackInstrument"))
self.horizontalLayout_19.addWidget(self.trackInstrument)
self.verticalLayout_4.addWidget(self.simpleInstrumentFrame)
self.trackChannelFrame = QtGui.QFrame(self.simpleplayback)
self.trackChannelFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.trackChannelFrame.setFrameShadow(QtGui.QFrame.Plain)
self.trackChannelFrame.setLineWidth(0)
self.trackChannelFrame.setObjectName(_fromUtf8("trackChannelFrame"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.trackChannelFrame)
self.horizontalLayout_3.setSpacing(0)
self.horizontalLayout_3.setMargin(0)
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.trackChannelMinLabel = QtGui.QLabel(self.trackChannelFrame)
self.trackChannelMinLabel.setLineWidth(0)
self.trackChannelMinLabel.setObjectName(_fromUtf8("trackChannelMinLabel"))
self.horizontalLayout_3.addWidget(self.trackChannelMinLabel)
self.trackChannelMin = QtGui.QSpinBox(self.trackChannelFrame)
self.trackChannelMin.setMinimum(1)
self.trackChannelMin.setMaximum(16)
self.trackChannelMin.setObjectName(_fromUtf8("trackChannelMin"))
self.horizontalLayout_3.addWidget(self.trackChannelMin)
self.verticalLayout_4.addWidget(self.trackChannelFrame)
self.trackVolumeFrame = QtGui.QFrame(self.simpleplayback)
self.trackVolumeFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.trackVolumeFrame.setFrameShadow(QtGui.QFrame.Plain)
self.trackVolumeFrame.setLineWidth(0)
self.trackVolumeFrame.setObjectName(_fromUtf8("trackVolumeFrame"))
self.horizontalLayout_6 = QtGui.QHBoxLayout(self.trackVolumeFrame)
self.horizontalLayout_6.setSpacing(0)
self.horizontalLayout_6.setMargin(0)
self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
self.trackVolumeLabel = QtGui.QLabel(self.trackVolumeFrame)
self.trackVolumeLabel.setObjectName(_fromUtf8("trackVolumeLabel"))
self.horizontalLayout_6.addWidget(self.trackVolumeLabel)
self.trackVolume = QtGui.QSpinBox(self.trackVolumeFrame)
self.trackVolume.setMinimum(1)
self.trackVolume.setMaximum(128)
self.trackVolume.setObjectName(_fromUtf8("trackVolume"))
self.horizontalLayout_6.addWidget(self.trackVolume)
self.verticalLayout_4.addWidget(self.trackVolumeFrame)
self.trackPanFrame = QtGui.QFrame(self.simpleplayback)
self.trackPanFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.trackPanFrame.setFrameShadow(QtGui.QFrame.Plain)
self.trackPanFrame.setLineWidth(0)
self.trackPanFrame.setObjectName(_fromUtf8("trackPanFrame"))
self.horizontalLayout_7 = QtGui.QHBoxLayout(self.trackPanFrame)
self.horizontalLayout_7.setSpacing(0)
self.horizontalLayout_7.setMargin(0)
self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
self.trackPanLabel = QtGui.QLabel(self.trackPanFrame)
self.trackPanLabel.setObjectName(_fromUtf8("trackPanLabel"))
self.horizontalLayout_7.addWidget(self.trackPanLabel)
self.trackPan = QtGui.QSpinBox(self.trackPanFrame)
self.trackPan.setMinimum(1)
self.trackPan.setMaximum(128)
self.trackPan.setProperty("value", 64)
self.trackPan.setObjectName(_fromUtf8("trackPan"))
self.horizontalLayout_7.addWidget(self.trackPan)
self.verticalLayout_4.addWidget(self.trackPanFrame)
self.trackTransposeFrame = QtGui.QFrame(self.simpleplayback)
self.trackTransposeFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.trackTransposeFrame.setFrameShadow(QtGui.QFrame.Plain)
self.trackTransposeFrame.setLineWidth(0)
self.trackTransposeFrame.setObjectName(_fromUtf8("trackTransposeFrame"))
self.horizontalLayout_8 = QtGui.QHBoxLayout(self.trackTransposeFrame)
self.horizontalLayout_8.setSpacing(0)
self.horizontalLayout_8.setMargin(0)
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.trackMidiTranspositionLabel = QtGui.QLabel(self.trackTransposeFrame)
self.trackMidiTranspositionLabel.setObjectName(_fromUtf8("trackMidiTranspositionLabel"))
self.horizontalLayout_8.addWidget(self.trackMidiTranspositionLabel)
self.trackMidiTransposition = QtGui.QSpinBox(self.trackTransposeFrame)
self.trackMidiTransposition.setAccelerated(True)
self.trackMidiTransposition.setMinimum(-64)
self.trackMidiTransposition.setMaximum(64)
self.trackMidiTransposition.setProperty("value", 0)
self.trackMidiTransposition.setObjectName(_fromUtf8("trackMidiTransposition"))
self.horizontalLayout_8.addWidget(self.trackMidiTransposition)
self.verticalLayout_4.addWidget(self.trackTransposeFrame)
self.trackBankFrame = QtGui.QFrame(self.simpleplayback)
self.trackBankFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.trackBankFrame.setFrameShadow(QtGui.QFrame.Plain)
self.trackBankFrame.setLineWidth(0)
self.trackBankFrame.setObjectName(_fromUtf8("trackBankFrame"))
self.horizontalLayout_9 = QtGui.QHBoxLayout(self.trackBankFrame)
self.horizontalLayout_9.setSpacing(0)
self.horizontalLayout_9.setMargin(0)
self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9"))
self.trackBankLabel = QtGui.QLabel(self.trackBankFrame)
self.trackBankLabel.setObjectName(_fromUtf8("trackBankLabel"))
self.horizontalLayout_9.addWidget(self.trackBankLabel)
self.trackBank = QtGui.QSpinBox(self.trackBankFrame)
self.trackBank.setMinimum(1)
self.trackBank.setMaximum(128)
self.trackBank.setProperty("value", 1)
self.trackBank.setObjectName(_fromUtf8("trackBank"))
self.horizontalLayout_9.addWidget(self.trackBank)
self.verticalLayout_4.addWidget(self.trackBankFrame)
self.toolBox.addItem(self.simpleplayback, _fromUtf8(""))
self.jackplayback = QtGui.QWidget()
self.jackplayback.setGeometry(QtCore.QRect(0, 0, 148, 268))
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.jackplayback.sizePolicy().hasHeightForWidth())
self.jackplayback.setSizePolicy(sizePolicy)
self.jackplayback.setObjectName(_fromUtf8("jackplayback"))
self.verticalLayout_5 = QtGui.QVBoxLayout(self.jackplayback)
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.jackChannelRangeGroup = QtGui.QGroupBox(self.jackplayback)
self.jackChannelRangeGroup.setFlat(True)
self.jackChannelRangeGroup.setObjectName(_fromUtf8("jackChannelRangeGroup"))
self.horizontalLayout_14 = QtGui.QHBoxLayout(self.jackChannelRangeGroup)
self.horizontalLayout_14.setSpacing(0)
self.horizontalLayout_14.setContentsMargins(0, 2, 0, 2)
self.horizontalLayout_14.setObjectName(_fromUtf8("horizontalLayout_14"))
self.jackChannelMin = QtGui.QSpinBox(self.jackChannelRangeGroup)
self.jackChannelMin.setMinimum(1)
self.jackChannelMin.setMaximum(16)
self.jackChannelMin.setObjectName(_fromUtf8("jackChannelMin"))
self.horizontalLayout_14.addWidget(self.jackChannelMin)
self.jackChannelMax = QtGui.QSpinBox(self.jackChannelRangeGroup)
self.jackChannelMax.setMinimum(1)
self.jackChannelMax.setMaximum(16)
self.jackChannelMax.setObjectName(_fromUtf8("jackChannelMax"))
self.horizontalLayout_14.addWidget(self.jackChannelMax)
self.verticalLayout_5.addWidget(self.jackChannelRangeGroup)
self.label_2 = QtGui.QLabel(self.jackplayback)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.verticalLayout_5.addWidget(self.label_2)
self.label_3 = QtGui.QLabel(self.jackplayback)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.verticalLayout_5.addWidget(self.label_3)
self.jackPatchFrame = QtGui.QFrame(self.jackplayback)
self.jackPatchFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.jackPatchFrame.setFrameShadow(QtGui.QFrame.Plain)
self.jackPatchFrame.setLineWidth(0)
self.jackPatchFrame.setObjectName(_fromUtf8("jackPatchFrame"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.jackPatchFrame)
self.horizontalLayout_2.setSpacing(0)
self.horizontalLayout_2.setMargin(0)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.jackPatchLabel = QtGui.QLabel(self.jackPatchFrame)
self.jackPatchLabel.setObjectName(_fromUtf8("jackPatchLabel"))
self.horizontalLayout_2.addWidget(self.jackPatchLabel)
self.jackPatch = QtGui.QSpinBox(self.jackPatchFrame)
self.jackPatch.setMinimum(0)
self.jackPatch.setMaximum(128)
self.jackPatch.setProperty("value", 0)
self.jackPatch.setObjectName(_fromUtf8("jackPatch"))
self.horizontalLayout_2.addWidget(self.jackPatch)
self.verticalLayout_5.addWidget(self.jackPatchFrame)
self.jackVolumeFrame = QtGui.QFrame(self.jackplayback)
self.jackVolumeFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.jackVolumeFrame.setFrameShadow(QtGui.QFrame.Plain)
self.jackVolumeFrame.setObjectName(_fromUtf8("jackVolumeFrame"))
self.horizontalLayout_10 = QtGui.QHBoxLayout(self.jackVolumeFrame)
self.horizontalLayout_10.setSpacing(0)
self.horizontalLayout_10.setMargin(0)
self.horizontalLayout_10.setObjectName(_fromUtf8("horizontalLayout_10"))
self.jackVolumeLabel = QtGui.QLabel(self.jackVolumeFrame)
self.jackVolumeLabel.setObjectName(_fromUtf8("jackVolumeLabel"))
self.horizontalLayout_10.addWidget(self.jackVolumeLabel)
self.jackVolume = QtGui.QSpinBox(self.jackVolumeFrame)
self.jackVolume.setMinimum(0)
self.jackVolume.setMaximum(128)
self.jackVolume.setProperty("value", 0)
self.jackVolume.setObjectName(_fromUtf8("jackVolume"))
self.horizontalLayout_10.addWidget(self.jackVolume)
self.verticalLayout_5.addWidget(self.jackVolumeFrame)
self.jackPanFrame = QtGui.QFrame(self.jackplayback)
self.jackPanFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.jackPanFrame.setFrameShadow(QtGui.QFrame.Plain)
self.jackPanFrame.setLineWidth(0)
self.jackPanFrame.setObjectName(_fromUtf8("jackPanFrame"))
self.horizontalLayout_11 = QtGui.QHBoxLayout(self.jackPanFrame)
self.horizontalLayout_11.setSpacing(0)
self.horizontalLayout_11.setMargin(0)
self.horizontalLayout_11.setObjectName(_fromUtf8("horizontalLayout_11"))
self.jackPanLabel = QtGui.QLabel(self.jackPanFrame)
self.jackPanLabel.setObjectName(_fromUtf8("jackPanLabel"))
self.horizontalLayout_11.addWidget(self.jackPanLabel)
self.jackPan = QtGui.QSpinBox(self.jackPanFrame)
self.jackPan.setMinimum(0)
self.jackPan.setMaximum(128)
self.jackPan.setProperty("value", 0)
self.jackPan.setObjectName(_fromUtf8("jackPan"))
self.horizontalLayout_11.addWidget(self.jackPan)
self.verticalLayout_5.addWidget(self.jackPanFrame)
self.jackTranposeFrame = QtGui.QFrame(self.jackplayback)
self.jackTranposeFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.jackTranposeFrame.setFrameShadow(QtGui.QFrame.Plain)
self.jackTranposeFrame.setObjectName(_fromUtf8("jackTranposeFrame"))
self.horizontalLayout_12 = QtGui.QHBoxLayout(self.jackTranposeFrame)
self.horizontalLayout_12.setSpacing(0)
self.horizontalLayout_12.setMargin(0)
self.horizontalLayout_12.setObjectName(_fromUtf8("horizontalLayout_12"))
self.jackTransposeLabel = QtGui.QLabel(self.jackTranposeFrame)
self.jackTransposeLabel.setLineWidth(0)
self.jackTransposeLabel.setObjectName(_fromUtf8("jackTransposeLabel"))
self.horizontalLayout_12.addWidget(self.jackTransposeLabel)
self.jackTranspose = QtGui.QSpinBox(self.jackTranposeFrame)
self.jackTranspose.setMinimum(-64)
self.jackTranspose.setMaximum(64)
self.jackTranspose.setObjectName(_fromUtf8("jackTranspose"))
self.horizontalLayout_12.addWidget(self.jackTranspose)
self.verticalLayout_5.addWidget(self.jackTranposeFrame)
self.jackBankFrame = QtGui.QFrame(self.jackplayback)
self.jackBankFrame.setFrameShape(QtGui.QFrame.NoFrame)
self.jackBankFrame.setFrameShadow(QtGui.QFrame.Plain)
self.jackBankFrame.setLineWidth(0)
self.jackBankFrame.setObjectName(_fromUtf8("jackBankFrame"))
self.horizontalLayout_13 = QtGui.QHBoxLayout(self.jackBankFrame)
self.horizontalLayout_13.setSpacing(0)
self.horizontalLayout_13.setMargin(0)
self.horizontalLayout_13.setObjectName(_fromUtf8("horizontalLayout_13"))
self.jackBankLabel = QtGui.QLabel(self.jackBankFrame)
self.jackBankLabel.setObjectName(_fromUtf8("jackBankLabel"))
self.horizontalLayout_13.addWidget(self.jackBankLabel)
self.jackBank = QtGui.QSpinBox(self.jackBankFrame)
self.jackBank.setMinimum(0)
self.jackBank.setMaximum(128)
self.jackBank.setProperty("value", 0)
self.jackBank.setObjectName(_fromUtf8("jackBank"))
self.horizontalLayout_13.addWidget(self.jackBank)
self.verticalLayout_5.addWidget(self.jackBankFrame)
self.toolBox.addItem(self.jackplayback, _fromUtf8(""))
self.verticalLayout_2.addWidget(self.toolBox)
self.trackProperties.setWidget(self.scrollAreaWidgetContents)
self.verticalLayout_8.addWidget(self.trackProperties)
self.numPad = QtGui.QGroupBox(self.sidebar)
self.numPad.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.numPad.setFlat(False)
self.numPad.setObjectName(_fromUtf8("numPad"))
self.verticalLayout_7 = QtGui.QVBoxLayout(self.numPad)
self.verticalLayout_7.setSpacing(-1)
self.verticalLayout_7.setContentsMargins(2, 6, 2, 6)
self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7"))
self.gridLayout_5 = QtGui.QGridLayout()
self.gridLayout_5.setContentsMargins(0, -1, -1, -1)
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.numpad4 = QtGui.QToolButton(self.numPad)
self.numpad4.setMinimumSize(QtCore.QSize(32, 32))
self.numpad4.setMaximumSize(QtCore.QSize(32, 32))
self.numpad4.setIconSize(QtCore.QSize(32, 32))
self.numpad4.setObjectName(_fromUtf8("numpad4"))
self.gridLayout_5.addWidget(self.numpad4, 1, 0, 1, 1)
self.numpad1 = QtGui.QToolButton(self.numPad)
self.numpad1.setMinimumSize(QtCore.QSize(32, 32))
self.numpad1.setMaximumSize(QtCore.QSize(32, 32))
self.numpad1.setIconSize(QtCore.QSize(32, 32))
self.numpad1.setObjectName(_fromUtf8("numpad1"))
self.gridLayout_5.addWidget(self.numpad1, 2, 0, 1, 1)
self.numpad2 = QtGui.QToolButton(self.numPad)
self.numpad2.setMinimumSize(QtCore.QSize(32, 32))
self.numpad2.setMaximumSize(QtCore.QSize(32, 32))
self.numpad2.setIconSize(QtCore.QSize(32, 32))
self.numpad2.setObjectName(_fromUtf8("numpad2"))
self.gridLayout_5.addWidget(self.numpad2, 2, 1, 1, 1)
self.numpad7 = QtGui.QToolButton(self.numPad)
self.numpad7.setMinimumSize(QtCore.QSize(32, 32))
self.numpad7.setMaximumSize(QtCore.QSize(32, 32))
self.numpad7.setIconSize(QtCore.QSize(32, 32))
self.numpad7.setAutoRaise(False)
self.numpad7.setArrowType(QtCore.Qt.NoArrow)
self.numpad7.setObjectName(_fromUtf8("numpad7"))
self.gridLayout_5.addWidget(self.numpad7, 0, 0, 1, 1)
self.numpad3 = QtGui.QToolButton(self.numPad)
self.numpad3.setMinimumSize(QtCore.QSize(32, 32))
self.numpad3.setMaximumSize(QtCore.QSize(32, 32))
self.numpad3.setIconSize(QtCore.QSize(32, 32))
self.numpad3.setObjectName(_fromUtf8("numpad3"))
self.gridLayout_5.addWidget(self.numpad3, 2, 2, 1, 1)
self.numpad8 = QtGui.QToolButton(self.numPad)
self.numpad8.setMinimumSize(QtCore.QSize(32, 32))
self.numpad8.setMaximumSize(QtCore.QSize(32, 32))
self.numpad8.setIconSize(QtCore.QSize(32, 32))
self.numpad8.setObjectName(_fromUtf8("numpad8"))
self.gridLayout_5.addWidget(self.numpad8, 0, 1, 1, 1)
self.numpad5 = QtGui.QToolButton(self.numPad)
self.numpad5.setMinimumSize(QtCore.QSize(32, 32))
self.numpad5.setMaximumSize(QtCore.QSize(32, 32))
self.numpad5.setIconSize(QtCore.QSize(32, 32))
self.numpad5.setObjectName(_fromUtf8("numpad5"))
self.gridLayout_5.addWidget(self.numpad5, 1, 1, 1, 1)
self.numpad6 = QtGui.QToolButton(self.numPad)
self.numpad6.setMinimumSize(QtCore.QSize(32, 32))
self.numpad6.setMaximumSize(QtCore.QSize(32, 32))
self.numpad6.setIconSize(QtCore.QSize(32, 32))
self.numpad6.setObjectName(_fromUtf8("numpad6"))
self.gridLayout_5.addWidget(self.numpad6, 1, 2, 1, 1)
self.numpad9 = QtGui.QToolButton(self.numPad)
self.numpad9.setMinimumSize(QtCore.QSize(32, 32))
self.numpad9.setMaximumSize(QtCore.QSize(32, 32))
self.numpad9.setIconSize(QtCore.QSize(32, 32))
self.numpad9.setObjectName(_fromUtf8("numpad9"))
self.gridLayout_5.addWidget(self.numpad9, 0, 2, 1, 1)
self.verticalLayout_7.addLayout(self.gridLayout_5)
self.gridLayout_6 = QtGui.QGridLayout()
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
self.numpad0 = QtGui.QToolButton(self.numPad)
self.numpad0.setMinimumSize(QtCore.QSize(64, 32))
self.numpad0.setMaximumSize(QtCore.QSize(64, 32))
self.numpad0.setIconSize(QtCore.QSize(32, 32))
self.numpad0.setObjectName(_fromUtf8("numpad0"))
self.gridLayout_6.addWidget(self.numpad0, 0, 0, 1, 1)
self.verticalLayout_7.addLayout(self.gridLayout_6)
self.verticalLayout_8.addWidget(self.numPad)
self.gridLayout.addWidget(self.sidebar, 1, 1, 1, 1)
stackedMusicTab.addWidget(self.editor)
self.trackEdit = QtGui.QWidget()
self.trackEdit.setObjectName(_fromUtf8("trackEdit"))
self.horizontalLayout_18 = QtGui.QHBoxLayout(self.trackEdit)
self.horizontalLayout_18.setObjectName(_fromUtf8("horizontalLayout_18"))
self.label = QtGui.QLabel(self.trackEdit)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName(_fromUtf8("label"))
self.horizontalLayout_18.addWidget(self.label)
stackedMusicTab.addWidget(self.trackEdit)
self.retranslateUi(stackedMusicTab)
stackedMusicTab.setCurrentIndex(0)
self.toolBox.setCurrentIndex(0)
self.trackInstrument.setCurrentIndex(-1)
QtCore.QMetaObject.connectSlotsByName(stackedMusicTab)
def retranslateUi(self, stackedMusicTab):
stackedMusicTab.setWindowTitle(_translate("stackedMusicTab", "StackedWidget", None))
self.lyrics.setTitle(_translate("stackedMusicTab", "Lyrics", None))
self.lyricHelp.setText(_translate("stackedMusicTab", "An empty line means a new verse. Shift+Space for \" -- \" syllabe connector. Underscore _ to skip a position.", None))
self.trackPropertiesLabel.setText(_translate("stackedMusicTab", "Track", None))
self.trackSolo.setText(_translate("stackedMusicTab", "Solo", None))
self.trackMute.setText(_translate("stackedMusicTab", "Mute", None))
self.trackNameLabel.setText(_translate("stackedMusicTab", "Track Unique ID", None))
self.trackUniqueName.setToolTip(_translate("stackedMusicTab", "Trackname", None))
self.trackLongInstrumentNameLabel.setText(_translate("stackedMusicTab", "Instrument Name", None))
self.trackShortInstrumentNameLabel.setText(_translate("stackedMusicTab", "Short Name", None))
self.trackGroupLabel.setText(_translate("stackedMusicTab", "Group", None))
self.trackExportPartLabel.setText(_translate("stackedMusicTab", "Export Part", None))
self.toolBox.setItemText(self.toolBox.indexOf(self.general), _translate("stackedMusicTab", "General", None))
self.trackVoicePresetLabel.setText(_translate("stackedMusicTab", "Voice Preset", None))
self.trackTranspositionLabel.setText(_translate("stackedMusicTab", "Transposition", None))
self.trackSizeLabel.setText(_translate("stackedMusicTab", "Size", None))
self.trackNrOfLinesLabel.setText(_translate("stackedMusicTab", "Number of Lines", None))
self.trackLyricsAbove.setText(_translate("stackedMusicTab", "Lyrics Above", None))
self.trackVoice.setText(_translate("stackedMusicTab", "Merge w/ Above", None))
self.trackHideLilypond.setText(_translate("stackedMusicTab", "Don\'t Print", None))
self.trackAmbitus.setText(_translate("stackedMusicTab", "Ambitus", None))
self.trackDirectives.setText(_translate("stackedMusicTab", "Edit Directives", None))
self.toolBox.setItemText(self.toolBox.indexOf(self.print), _translate("stackedMusicTab", "Print && Lilypond", None))
self.trackInstrumentLabel.setText(_translate("stackedMusicTab", "Instrument/Patch", None))
self.trackChannelMinLabel.setText(_translate("stackedMusicTab", "Channel", None))
self.trackChannelMin.setToolTip(_translate("stackedMusicTab", "Midi Channel", None))
self.trackVolumeLabel.setText(_translate("stackedMusicTab", "Volume", None))
self.trackPanLabel.setText(_translate("stackedMusicTab", "Pan", None))
self.trackMidiTranspositionLabel.setText(_translate("stackedMusicTab", "Transp.", None))
self.trackBankLabel.setText(_translate("stackedMusicTab", "Bank", None))
self.toolBox.setItemText(self.toolBox.indexOf(self.simpleplayback), _translate("stackedMusicTab", "Internal Sound", None))
self.jackChannelRangeGroup.setTitle(_translate("stackedMusicTab", "Channel Range", None))
self.label_2.setText(_translate("stackedMusicTab", "Values: 1 to 128", None))
self.label_3.setText(_translate("stackedMusicTab", "0 to disable", None))
self.jackPatchLabel.setText(_translate("stackedMusicTab", "Patch", None))
self.jackVolumeLabel.setText(_translate("stackedMusicTab", "Volume", None))
self.jackPanLabel.setText(_translate("stackedMusicTab", "Pan", None))
self.jackTransposeLabel.setText(_translate("stackedMusicTab", "Transp.", None))
self.jackBankLabel.setText(_translate("stackedMusicTab", "Bank", None))
self.toolBox.setItemText(self.toolBox.indexOf(self.jackplayback), _translate("stackedMusicTab", "JACK Sound", None))
self.numPad.setTitle(_translate("stackedMusicTab", "Numpad Palette", None))
self.numpad4.setText(_translate("stackedMusicTab", " ", None))
self.numpad1.setText(_translate("stackedMusicTab", " ", None))
self.numpad2.setText(_translate("stackedMusicTab", " ", None))
self.numpad7.setText(_translate("stackedMusicTab", " ", None))
self.numpad3.setText(_translate("stackedMusicTab", " ", None))
self.numpad8.setText(_translate("stackedMusicTab", " ", None))
self.numpad5.setText(_translate("stackedMusicTab", " ", None))
self.numpad6.setText(_translate("stackedMusicTab", " ", None))
self.numpad9.setText(_translate("stackedMusicTab", " ", None))
self.numpad0.setText(_translate("stackedMusicTab", " ", None))
self.label.setText(_translate("stackedMusicTab", "File is in Container Edit mode. Close the container tab to continue editing on the whole file.", None))
laborejo-0.8~ds0.orig/laborejoqt/designer/gui_didyouknow.py 0000664 0001750 0001750 00000021567 12154405225 024627 0 ustar glowworm glowworm # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_didyouknow.ui'
#
# Created: Tue May 28 19:21:07 2013
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_DidYouKnow(object):
def setupUi(self, DidYouKnow):
DidYouKnow.setObjectName(_fromUtf8("DidYouKnow"))
DidYouKnow.resize(374, 436)
DidYouKnow.setMinimumSize(QtCore.QSize(374, 436))
DidYouKnow.setMaximumSize(QtCore.QSize(374, 436))
self.verticalLayout = QtGui.QVBoxLayout(DidYouKnow)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.widget = QtGui.QWidget(DidYouKnow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.widget.sizePolicy().hasHeightForWidth())
self.widget.setSizePolicy(sizePolicy)
self.widget.setMinimumSize(QtCore.QSize(0, 151))
self.widget.setMaximumSize(QtCore.QSize(16777215, 151))
self.widget.setObjectName(_fromUtf8("widget"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.widget)
self.horizontalLayout_3.setMargin(0)
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.laborejologo = QtGui.QLabel(self.widget)
self.laborejologo.setMinimumSize(QtCore.QSize(300, 151))
self.laborejologo.setMaximumSize(QtCore.QSize(300, 151))
self.laborejologo.setText(_fromUtf8(""))
self.laborejologo.setAlignment(QtCore.Qt.AlignCenter)
self.laborejologo.setObjectName(_fromUtf8("laborejologo"))
self.horizontalLayout_3.addWidget(self.laborejologo)
self.verticalLayout.addWidget(self.widget)
self.layoutWidget = QtGui.QWidget(DidYouKnow)
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
self.formLayout = QtGui.QFormLayout(self.layoutWidget)
self.formLayout.setContentsMargins(-1, -1, -1, 0)
self.formLayout.setObjectName(_fromUtf8("formLayout"))
self.frame_2 = QtGui.QFrame(self.layoutWidget)
self.frame_2.setMinimumSize(QtCore.QSize(0, 0))
self.frame_2.setFrameShape(QtGui.QFrame.NoFrame)
self.frame_2.setFrameShadow(QtGui.QFrame.Sunken)
self.frame_2.setLineWidth(0)
self.frame_2.setObjectName(_fromUtf8("frame_2"))
self.horizontalLayout = QtGui.QHBoxLayout(self.frame_2)
self.horizontalLayout.setMargin(0)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.numberLabel = QtGui.QLabel(self.frame_2)
self.numberLabel.setObjectName(_fromUtf8("numberLabel"))
self.horizontalLayout.addWidget(self.numberLabel)
self.numberSlider = QtGui.QSlider(self.frame_2)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.numberSlider.sizePolicy().hasHeightForWidth())
self.numberSlider.setSizePolicy(sizePolicy)
self.numberSlider.setFocusPolicy(QtCore.Qt.ClickFocus)
self.numberSlider.setOrientation(QtCore.Qt.Horizontal)
self.numberSlider.setObjectName(_fromUtf8("numberSlider"))
self.horizontalLayout.addWidget(self.numberSlider)
self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.frame_2)
self.groupBox = QtGui.QGroupBox(self.layoutWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
self.groupBox.setSizePolicy(sizePolicy)
self.groupBox.setMinimumSize(QtCore.QSize(0, 150))
self.groupBox.setMaximumSize(QtCore.QSize(16777215, 150))
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.didyouknowLabel = QtGui.QLabel(self.groupBox)
self.didyouknowLabel.setWordWrap(True)
self.didyouknowLabel.setOpenExternalLinks(True)
self.didyouknowLabel.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.didyouknowLabel.setObjectName(_fromUtf8("didyouknowLabel"))
self.verticalLayout_2.addWidget(self.didyouknowLabel)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout_2.addItem(spacerItem)
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.groupBox)
self.verticalLayout.addWidget(self.layoutWidget)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.showOnStartup = QtGui.QCheckBox(DidYouKnow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.showOnStartup.sizePolicy().hasHeightForWidth())
self.showOnStartup.setSizePolicy(sizePolicy)
self.showOnStartup.setFocusPolicy(QtCore.Qt.ClickFocus)
self.showOnStartup.setChecked(True)
self.showOnStartup.setObjectName(_fromUtf8("showOnStartup"))
self.horizontalLayout_2.addWidget(self.showOnStartup)
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.closeButton = QtGui.QDialogButtonBox(DidYouKnow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth())
self.closeButton.setSizePolicy(sizePolicy)
self.closeButton.setFocusPolicy(QtCore.Qt.WheelFocus)
self.closeButton.setOrientation(QtCore.Qt.Horizontal)
self.closeButton.setStandardButtons(QtGui.QDialogButtonBox.Close)
self.closeButton.setCenterButtons(False)
self.closeButton.setObjectName(_fromUtf8("closeButton"))
self.horizontalLayout_2.addWidget(self.closeButton)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.donationLabel = QtGui.QLabel(DidYouKnow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.donationLabel.sizePolicy().hasHeightForWidth())
self.donationLabel.setSizePolicy(sizePolicy)
self.donationLabel.setTextFormat(QtCore.Qt.RichText)
self.donationLabel.setWordWrap(True)
self.donationLabel.setOpenExternalLinks(True)
self.donationLabel.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.donationLabel.setObjectName(_fromUtf8("donationLabel"))
self.verticalLayout.addWidget(self.donationLabel)
self.retranslateUi(DidYouKnow)
QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL(_fromUtf8("accepted()")), DidYouKnow.accept)
QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL(_fromUtf8("rejected()")), DidYouKnow.reject)
QtCore.QMetaObject.connectSlotsByName(DidYouKnow)
def retranslateUi(self, DidYouKnow):
DidYouKnow.setWindowTitle(_translate("DidYouKnow", "Laborejo - Welcome", None))
self.numberLabel.setText(_translate("DidYouKnow", "Trick 0/10", None))
self.groupBox.setTitle(_translate("DidYouKnow", "Did you know…?", None))
self.didyouknowLabel.setText(_translate("DidYouKnow", "This is an example text. If it gets too long you get line breaks.", None))
self.showOnStartup.setText(_translate("DidYouKnow", "show on startup", None))
self.donationLabel.setText(_translate("DidYouKnow", "Support Laborejo by donating: http://www.laborejo.org/Donation
", None))
laborejo-0.8~ds0.orig/laborejoqt/designer/gui_megaman.ui 0000664 0001750 0001750 00000003665 12154405225 024024 0 ustar glowworm glowworm
Form
0
0
761
666
Form
-
recent4
true
-
New
true
-
recent2
true
-
recent1
true
-
Open
true
-
recent3
true
laborejo-0.8~ds0.orig/laborejoqt/designer/gui_main.ui 0000664 0001750 0001750 00000311747 12154405225 023346 0 ustar glowworm glowworm
Nils Gey
MainWindow
0
0
1119
797
0
0
Laborejo - Music Notation Workshop
true
-
true
0
0
QTabWidget::North
0
Qt::ElideNone
false
true
true
Score
Lilypond
0
0
-
QFrame::NoFrame
QFrame::Sunken
0
-
0
150
16777215
150
Execute Command (Ctrl+Enter)
1
-
-
0
100
16777215
100
Virtual Piano
-
Qt::ClickFocus
Qt::PreventContextMenu
false
toolBar
false
24
24
Qt::ToolButtonTextOnly
false
TopToolBarArea
false
Open Score
New
Save
Save As
PDF
Lilypond Textfile
Midi (Internal)
Quick-View PDF
Quit
Close
Staccato
Qt::WindowShortcut
Fermata
Trill
Downbow
Copy
Cut
Paste
Undo
Redo
Delete
Laborejo Preferences
About
Chat
Manual
Metadata (Title…)
𝄞 Clefs
¾ Time Signatures
♮♯♭ Typical Key Signature
Paste As Link
Delete Previous
Duplicate
Link
true
true
Sidebar
⊞ Add Track
⊟ Delete Current Track
⬆ Move Track Up
⬇ Move Track Down
true
true
Barlines
Edit Current Object
Triplet
Custom Tuplet
Augment (×2)
Diminish (÷2)
Add one Dot
.
Remove one Dot
𝄩 Multi Measure Rest
𝄺 Full Measure Rest
Clear Tuplets
Insert Blank Item
Insert Wait-For-Chord Lilypond
Clear Object Directives
Clear Notes Directives
Clear All Directives
Edit Lilypond
Edit Wait-For-Chord Lilypond
Create Pre/Mid/Post Directives
Edit Pre/Mid/Post Directives
Edit Notes Directives
Create Notes Directives
♮♯♭ Custom Key Signature
𝆏 piano
𝆑 forte
𝆐𝆏 mezzo piano
𝆐𝆑 mezzo forte
𝆑𝆑 fortissimo
𝆑𝆑𝆑 fortississimo
𝆑𝆑𝆑𝆑 4× forte
𝆏𝆏 pianissimo
𝆏𝆏𝆏 pianississimo
𝆏𝆏𝆏𝆏 4x piano
𝆏𝆏𝆏𝆏𝆏 5× piano
𝆒 crescendo
𝆓 decrescendo
end cresc/decresc
Above Track
Below Track
Automatic
Crescendo as "cresc"
Crescendo as 𝆓
Decrescendo as "decr"
Decrescendo as 𝆒
Decrescendo as "dim"
Decrescendo as "decresc"
Slur Start
Slur End
Phrasing Slur Start
Phrasing Slur End
Slurs Up
Slurs Down
Slurs Automatic
Dashed Slur
Dotted Slur
Solid Slur
Double Slur On
Double Slur Off
Phrasing Slurs Up
Phrasing Slurs Down
Phrasing Slurs Automatic
Dashed Phrasing Slur
Dotted Phrasing Slur
Solid Phrasing Slur
Tie (On/Off)
Laissez Vibrer (On/Off)
Laissez Vibrer (On/Off)
Tie One Note (On/Off)
Up
Down
Automatic
Dotted
Dashed
Solid
Wait for Note On
Wait for Note Off
𝄔 Piano Staff Start
𝄔 Grand Staff Start
𝄕 Orchestral Staff Start
𝄕 Choir Staff Start
𝄕 Square Staff Start
𝄔 Voice and Figured Bass Start
End One Group
Clear All Groupings
✇ Performance Signature
Edit Performance Signature
Score Performance
User Dynamic 1 (non-print)
User Dynamic 2 (non-print)
User Dynamic 3 (non-print)
Upbeat
Automatic / One Voice
Voice One
Voice Two
Voice Three
Voice Four
Beam Start
Beam End
No Beam
Force Beam
Export Options
Edit Chord Symbol
Clear Chord Symbol
Edit Figured Bass
Clear Figured Bass
Mass Insert Chord Symbols
Mass Insert Figured Bass
true
true
Lyrics
Paste as One-Track Stream
Split in Two
Split in Three
Custom Split
Tremolo in Two
Tremolo in Four
Custom Tremolo
Edit Default Performance Signature
♺ Instrument Change
Item Channel +
Item Channel -
Item Force Channel
Widen
Shrinken
Zoom In
Zoom Out
~/.laborejo/script.py
true
Choose Duration
true
true
Insert Duration
Toggle Insert/Prevailing
Fingerings
String Numbers
Stroke Fingering
Item Clear Channel
true
⟲𝅘𝅥𝅭
Toggle prevailing dot (Alt+Dot)
⌛ Tempo Signature
Clear All Fingerings
Custom Finger
Finger 1
Finger 2
Finger 3
Finger 4
Finger 5
Finger 6 :)
Custom String Number
String 1
String 2
String 3
String 4
String 5
String 6
String 7
String 8
String 9
String 10/0
Custom Right Hand / Stroke Finger
Stroke 1 'p'
Stroke 2 'i'
Stroke 3 'm'
Stroke 4 'a'
Stroke 'x'
Fingering Direction
Toggle Allow in Staff
Fingering Add Stem Support
Fingering Disable Stem Support
Toggle Allow in Staff
String Add Stem Support
String Disable Stem Support
Stroke Directions
Toggle Allow in Staff
Stroke Add Stem Support
Stroke Disable Stem Support
Finger 0 / Thumb
𝄁 Double
𝄃 Open
𝄂 End
Open|End
𝄂𝄃 End|Open
Dotted
Dashed
Half Size
𝄆 Repeat Open
𝄇 Repeat Close
𝄇𝄆 Repeat Close|Open
End + Repeat Open
Espressivo
Portato
Staccatissimo
Tenuto
Prall
Mordent
Prall Mordent
Turn
Upprall
Downprall
Upmordent
Lineprall
Prallprall
Prall Up
Reverse Turn
Short Fermata
Very Long Fermata
open
Stopped String
Open String
Left Heel
Right Heel
Left Toe
Right Toe
Signum Congruentia
Ictus
Accentus
Circulus
Semi Circulus
Augmentum
Pizzicato
Snap Piz. ('Bartok')
Accent
Marcato
Long Fermata
Downmordent
Prall Down
Upbow
𝄞
Treble Clef
𝄢
Bass Clef
¾
3/4 Time Signature
𝄴
4/4 Time Signature
♮♯♭
Typical Key Signature
⊟
Delete Track
⊞
Add Track
𝄵
2/2 Time Signature
✍ Free Text
Eyeglasses
Undress While Playing
to LilyBin.com
Shift Up
Shift Down
Shift Note Up
Shift Note Down
Shift Octave Up
Shift Octave Down
♯ Sharp Note
♭ Flat Note
Enharmonic Sharp
Enharmonic Flat
Add Note to Chord
Remove Note from Chord
Transpose
Transpose Down
Select Track
Select All
true
𝅝
Whole (1)
true
𝅗𝅥
Half (2)
true
𝅘𝅥
Quarter (3)
true
𝅘𝅥𝅮
Eigth (4)
true
𝅘𝅥𝅯
Sixteenth (5)
Clear Selection
𝄺
Full Measure Rest (M)
𝄻
Whole Rest (Shift+1)
𝄼
Half Rest (Shift+2)
𝄽
Quarter Rest (Shift+3)
𝄾
Eighth Rest (Shift+4)
𝄿
Sixteenth Rest (Shift+5)
+𝅘𝅥𝅭
Add Dot (Tab). Shift+Tab removes
Shift Note Octave Up
Shift Note Octave Down
Clear Substitution from Item
Laborejo Substitutions
Score Substitutions
Remove Score Substitution
Create Substitution from Selection
Create Substitutions from File
Insert Empty Container
Delete Container Instance
Convert Selection to Container
true
true
Minimap
▶◼
▶/◼
Play/Stop (F5)
▮▶
▮▶
Play from Start (Ctrl+F5)
𝄊 Da Capo
𝄉 Dal Segno
𝄋 Segno
𝄌 Coda
𝄂 Fine
𝄌 to Coda
Clear Trigger from Item
Only first time
Never first time
Edit Trigger
Add Octave to Chord
Invert Selection
Join to Chord
Join to Chord (Sum Durations)
Edit Container Properties
Alternate End
Alternate Ending 1
Alternate Ending 2
Custom Alternate Ending
Alternate Ending Close
Tie from left side (repeat Tie)
true
false
MIDI in
MIDI Note Entry (F8)
𝆮 Sustain On
𝆯 Sustain Off
Una Corda / Soft On
Una Corda / Soft Off
Sostenuto On
Sostenuto Off
Sustain Change (non-print)
Lilypond Text
Open as Template
Midi Files per Track (Simple)
Lisalo (Tracks per Channel)
Ardour 3
insert Channel Change Relative
insert Channel Change Absolute
SoloMute
Reset Solo/Mute
Unset all solo and mute
Lisalo (Tracks per Ports)
Terminal
true
true
Small Terminal
Chord Duration Factor +
Chord Duration Factor -
Chord Duration Factor Reset
Tempo Change Relative
Chord Velocity Factor +
Chord Velocity Factor -
Chord Velocity Factor Reset
true
Expand to Dual-Staff (Gui only)
Convert Single Voice Track to autochange Piano-Staff
Remove lowest Note from Chord
Remove highest Note from Chord
𝆏
piano
𝆑
forte
𝆏𝆏
pianissimo
𝆐𝆏
mezzo piano
𝆐𝆑
mezzo forte
𝆑𝆑
fortissimo
Convert Chordtrack to Single-Voice Tracks
tacet
Mirror around Cursor
Reverse
Shuffle
Sort Ascending
Sort Descending
Paste, replace Selection
Full Dual Ending Sequence
Save Substitutions to File
Unfold Substitution permanently
(♯) Cautionary
!♯ Reminder
Suggestion Accidentals On
Suggestion Accidentals Off
𝆑𝆏 fp
𝆍𝆑 sf
𝆍𝆑𝆑 sff
𝆍𝆏 sp
𝆍𝆏𝆏 spp
𝆍𝆑𝆎 sfz
𝆌𝆑𝆎 rfz
Collapse All
Expand All
Collapse all Tracks
true
Collapse this Track
Expand all Tracks
Invert Collapsing
Collapse empty Tracks
Reverse Pitch
Reverse Rythm
true
false
Virtual Piano
focusOnActiveScore
Open Collection
Midi (JACK)
Midi Files per Track (Jack)
Midi Files per Port (Jack)
Edit Container Content in new tab
PDFs by Group
PDFs by Instrument (Short)
PDFs by Export Parts
PDFs by Track
Midi Files per Group (Simple)
QTractor
Midi Files per Export Parts (Simple)
Midi Files per Instrument (Short) (Simple)
Midi Files per Instrument (Short) (Jack)
Midi Files per Group (Jack)
Midi Files per Export Parts (Jack)
Custom Export
Center on Cursor
◆
◆
Stop and Midi Panic (F6)
true
false
Jack Mode
Jack Mode (F7)
𝟭▶
𝟭▶
Play current track (Shift+F5)
Rebind external Jack Midi connections
true
Don't insert notes, choose duration instead
Speed up Playback (activate while playback is running)
Next becomes dotted
true
↷𝅘𝅥𝅭
Next becomes dotted (Dot)
♯ Sharp
♭ Flat
false
false
Dynamics
Fingering
Barlines
String Numbers
Voice Presets
Midi Fine Tuning
Stroke Finger
Next Palette
Previous Palette
New to Session
Import to Session
Export from Session
Remove from Session
Import to Session as Template
New to Session
Quick-View PDF Export-Group
true
false
→𝄂
Playback Jack Transport stops at the end
Extract and render chordsymbols to a new track with real chords
Insert Existing Container
Hide Object (On/Off)
Transparent Object (On/Off)
Clean Hidden/Transparent
Hide Notes Start
Hide Notes Stop
Hide Barlines Start
Hide Barlines Stop
Did you know...
Clean Tremolo
❴▶
❴▶
Play current group (Alt+F5)
Item Program +
Item Program -
Item Force Program
Item Clear Program
insert Program Change Relative
insert Program Change Absolute
Reset and Redraw GUI
laborejo-0.8~ds0.orig/laborejoqt/designer/readme.txt 0000664 0001750 0001750 00000000725 12154405225 023204 0 ustar glowworm glowworm 1) Add .ui and .py files to trans_de.pro
2) pypylupdate4 trans_de.pro - creates or updates trans_de.ts and does not delete already translated strings
3) linguist trans_de.ts (qt tool) - A gui to translate.
4) lrelease trans_de.ts - Creates a binary .qm file.
Thats it. the pyqt code is already configured to load that qm file. You don't need pyrcc4, as suggested in the following link.
see also http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/i18n.html
laborejo-0.8~ds0.orig/laborejoqt/designer/gui_export.ui 0000664 0001750 0001750 00000037777 12154405225 023753 0 ustar glowworm glowworm
ExportDialog
0
0
695
703
0
0
Export Files
-
QFrame::Panel
TextLabel
Qt::AlignCenter
-
0
0
Export Options
QFormLayout::ExpandingFieldsGrow
Qt::AlignCenter
9
-
-
Format
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
PDF
true
-
Internal Midi
-
JACK Midi
-
Lilypond Text
-
LilyBin.com
-
Qt::Vertical
20
40
-
Split by
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
None
true
-
Group
-
Export Part
-
Track
-
Qt::Vertical
20
40
-
-
These settings are saved in the lbjs file.
-
0
false
Lilypond Settings
QFormLayout::ExpandingFieldsGrow
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
Template
-
-
Font Size
-
Transposition from
-
3
0
0
0
-
-
to
-
-
1
-
Qt::LeftToRight
active when splitting
false
-
Split-by to header
Midi Settings
-
Transposition in semitones (Internal)
-
Transposition in semitones (JACK)
-
-63
64
-
-63
64
Other Settings
-
Ardour Template
-
-
Qt::Vertical
20
40
-
Export Path
-1
9
9
9
-
true
-
0
0
100
16777215
Open
-
-
Qt::Horizontal
40
20
-
Save Settings
-
false
false
Qt::StrongFocus
Preview
-
Export!
-
Close
-
Export, Preview and Close do not save. Export does not close.
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
Export Log
-
false
QTextEdit::NoWrap
true
false
laborejo-0.8~ds0.orig/laborejoqt/designer/trans_de.qm 0000664 0001750 0001750 00000111545 12154405225 023347 0 ustar glowworm glowworm