Esempio n. 1
0
    def createWidgets(self, layout):
        self.label = QLabel(wordWrap=True)
        self.voicingLabel = QLabel()
        self.voicing = QComboBox(editable=True)
        self.voicingLabel.setBuddy(self.voicing)
        self.voicing.setCompleter(None)
        self.voicing.setValidator(
            QRegExpValidator(QRegExp("[SATB]+(-[SATB]+)*", Qt.CaseInsensitive),
                             self.voicing))
        self.voicing.addItems((
            'SA-TB',
            'S-A-T-B',
            'SA',
            'S-A',
            'SS-A',
            'S-S-A',
            'TB',
            'T-B',
            'TT-B',
            'T-T-B',
            'SS-A-T-B',
            'S-A-TT-B',
            'SS-A-TT-B',
            'S-S-A-T-T-B',
            'S-S-A-A-T-T-B-B',
        ))
        self.lyricsLabel = QLabel()
        self.lyrics = QComboBox()
        self.lyricsLabel.setBuddy(self.lyrics)
        self.lyrics.setModel(
            listmodel.ListModel(lyricStyles,
                                self.lyrics,
                                display=listmodel.translate_index(0),
                                tooltip=listmodel.translate_index(1)))
        self.lyrics.setCurrentIndex(0)
        self.pianoReduction = QCheckBox()
        self.rehearsalMidi = QCheckBox()

        layout.addWidget(self.label)
        box = QHBoxLayout()
        layout.addLayout(box)
        box.addWidget(self.voicingLabel)
        box.addWidget(self.voicing)
        self.createStanzaWidget(layout)
        box = QHBoxLayout()
        layout.addLayout(box)
        box.addWidget(self.lyricsLabel)
        box.addWidget(self.lyrics)
        self.createAmbitusWidget(layout)
        layout.addWidget(self.pianoReduction)
        layout.addWidget(self.rehearsalMidi)
Esempio n. 2
0
 def createKeySignatureWidget(self):
     self.keySignatureLabel = QLabel()
     self.keyNote = QComboBox()
     self.keyNote.setModel(listmodel.ListModel(keyNames["nederlands"], self.keyNote))
     self.keyMode = QComboBox()
     self.keyMode.setModel(listmodel.ListModel(modes, self.keyMode, display=listmodel.translate_index(1)))
     self.keySignatureLabel.setBuddy(self.keyNote)
Esempio n. 3
0
    def createWidgets(self, layout):
        self.systemStartLabel = QLabel()
        self.systemStart = QComboBox()
        self.systemStartLabel.setBuddy(self.systemStart)
        self.systemStart.setModel(
            listmodel.ListModel(
                (
                    # L10N: Brace like a piano staff
                    (lambda: _("Brace"), "system_start_brace"),
                    # L10N: Bracket like a choir staff
                    (lambda: _("Bracket"), "system_start_bracket"),
                    # L10N: Square bracket like a sub-group
                    (lambda: _("Square"), "system_start_square"),
                ),
                self.systemStart,
                display=listmodel.translate_index(0),
                icon=lambda item: symbols.icon(item[1]),
            )
        )
        self.systemStart.setIconSize(QSize(64, 64))
        self.connectBarLines = QCheckBox(checked=True)

        box = QHBoxLayout()
        box.addWidget(self.systemStartLabel)
        box.addWidget(self.systemStart)
        layout.addLayout(box)
        layout.addWidget(self.connectBarLines)
Esempio n. 4
0
    def createWidgets(self, layout):
        self.systemStartLabel = QLabel()
        self.systemStart = QComboBox()
        self.systemStartLabel.setBuddy(self.systemStart)
        self.systemStart.setModel(
            listmodel.ListModel(
                (
                    # L10N: Brace like a piano staff
                    (lambda: _("Brace"), 'system_start_brace'),
                    # L10N: Bracket like a choir staff
                    (lambda: _("Bracket"), 'system_start_bracket'),
                    # L10N: Square bracket like a sub-group
                    (lambda: _("Square"), 'system_start_square'),
                ),
                self.systemStart,
                display=listmodel.translate_index(0),
                icon=lambda item: symbols.icon(item[1])))
        self.systemStart.setIconSize(QSize(64, 64))
        self.connectBarLines = QCheckBox(checked=True)

        box = QHBoxLayout()
        box.addWidget(self.systemStartLabel)
        box.addWidget(self.systemStart)
        layout.addLayout(box)
        layout.addWidget(self.connectBarLines)
Esempio n. 5
0
 def createKeySignatureWidget(self):
     self.keySignatureLabel = QLabel()
     self.keyNote = QComboBox()
     self.keyNote.setModel(listmodel.ListModel(keyNames['nederlands'], self.keyNote))
     self.keyMode = QComboBox()
     self.keyMode.setModel(listmodel.ListModel(modes, self.keyMode, display=listmodel.translate_index(1)))
     self.keySignatureLabel.setBuddy(self.keyNote)
Esempio n. 6
0
 def createTuningWidgets(self, layout):
     self.tuningLabel = QLabel()
     self.tuning = QComboBox()
     self.tuningLabel.setBuddy(self.tuning)
     tunings = [("", lambda: _("Default"))]
     tunings.extend(self.tunings)
     self.tuning.setModel(listmodel.ListModel(tunings, self.tuning, display=listmodel.translate_index(1)))
     self.tuning.setCurrentIndex(1)
     box = QHBoxLayout()
     layout.addLayout(box)
     box.addWidget(self.tuningLabel)
     box.addWidget(self.tuning)
Esempio n. 7
0
    def createWidgets(self, layout):
        self.label = QLabel(wordWrap=True)
        self.voicingLabel = QLabel()
        self.voicing = QComboBox(editable=True)
        self.voicingLabel.setBuddy(self.voicing)
        self.voicing.setCompleter(None)
        self.voicing.setValidator(QRegExpValidator(QRegExp("[SATB]+(-[SATB]+)*", Qt.CaseInsensitive), self.voicing))
        self.voicing.addItems(
            (
                "SA-TB",
                "S-A-T-B",
                "SA",
                "S-A",
                "SS-A",
                "S-S-A",
                "TB",
                "T-B",
                "TT-B",
                "T-T-B",
                "SS-A-T-B",
                "S-A-TT-B",
                "SS-A-TT-B",
                "S-S-A-T-T-B",
                "S-S-A-A-T-T-B-B",
            )
        )
        self.lyricsLabel = QLabel()
        self.lyrics = QComboBox()
        self.lyricsLabel.setBuddy(self.lyrics)
        self.lyrics.setModel(
            listmodel.ListModel(
                lyricStyles, self.lyrics, display=listmodel.translate_index(0), tooltip=listmodel.translate_index(1)
            )
        )
        self.lyrics.setCurrentIndex(0)
        self.pianoReduction = QCheckBox()
        self.rehearsalMidi = QCheckBox()

        layout.addWidget(self.label)
        box = QHBoxLayout()
        layout.addLayout(box)
        box.addWidget(self.voicingLabel)
        box.addWidget(self.voicing)
        self.createStanzaWidget(layout)
        box = QHBoxLayout()
        layout.addLayout(box)
        box.addWidget(self.lyricsLabel)
        box.addWidget(self.lyrics)
        self.createAmbitusWidget(layout)
        layout.addWidget(self.pianoReduction)
        layout.addWidget(self.rehearsalMidi)
Esempio n. 8
0
 def createTuningWidgets(self, layout):
     self.tuningLabel = QLabel()
     self.tuning = QComboBox()
     self.tuningLabel.setBuddy(self.tuning)
     tunings = [('', lambda: _("Default"))]
     tunings.extend(self.tunings)
     tunings.append(('', lambda: _("Custom tuning")))
     self.tuning.setModel(listmodel.ListModel(tunings, self.tuning,
         display=listmodel.translate_index(1)))
     self.tuning.setCurrentIndex(1)
     self.customTuning = QLineEdit(enabled=False)
     completionmodel.complete(self.customTuning,
         "scorewiz/completion/plucked_strings/custom_tuning")
     self.tuning.currentIndexChanged.connect(self.slotCustomTuningEnable)
     box = QHBoxLayout()
     layout.addLayout(box)
     box.addWidget(self.tuningLabel)
     box.addWidget(self.tuning)
     layout.addWidget(self.customTuning)
Esempio n. 9
0
 def createTuningWidgets(self, layout):
     self.tuningLabel = QLabel()
     self.tuning = QComboBox()
     self.tuningLabel.setBuddy(self.tuning)
     tunings = [('', lambda: _("Default"))]
     tunings.extend(self.tunings)
     tunings.append(('', lambda: _("Custom tuning")))
     self.tuning.setModel(
         listmodel.ListModel(tunings,
                             self.tuning,
                             display=listmodel.translate_index(1)))
     self.tuning.setCurrentIndex(1)
     self.customTuning = QLineEdit(enabled=False)
     completionmodel.complete(
         self.customTuning,
         "scorewiz/completion/plucked_strings/custom_tuning")
     self.tuning.currentIndexChanged.connect(self.slotCustomTuningEnable)
     box = QHBoxLayout()
     layout.addLayout(box)
     box.addWidget(self.tuningLabel)
     box.addWidget(self.tuning)
     layout.addWidget(self.customTuning)