コード例 #1
0
 def createTempoWidget(self):
     self.tempoLabel = QLabel()
     self.tempo = QLineEdit(clearButtonEnabled=True)
     completionmodel.complete(self.tempo,
                              "scorewiz/completion/scoreproperties/tempo")
     self.tempo.completer().setCaseSensitivity(Qt.CaseInsensitive)
     self.tempoLabel.setBuddy(self.tempo)
コード例 #2
0
 def createTempoWidget(self):
     self.tempoLabel = QLabel()
     self.tempo = widgets.lineedit.LineEdit()
     completionmodel.complete(self.tempo,
                              "scorewiz/completion/scoreproperties/tempo")
     self.tempo.completer().setCaseSensitivity(Qt.CaseInsensitive)
     self.tempoLabel.setBuddy(self.tempo)
コード例 #3
0
ファイル: header.py プロジェクト: taasan/frescobaldi
    def __init__(self, parent):
        super(HeaderWidget, self).__init__(parent)

        layout = QHBoxLayout()
        self.setLayout(layout)

        # The html view with the score layout example
        t = self.htmlView = QTextBrowser()
        t.setOpenLinks(False)
        t.setOpenExternalLinks(False)
        t.setSearchPaths(__path__)
        t.setTextInteractionFlags(Qt.LinksAccessibleByMouse)
        t.setFocusPolicy(Qt.NoFocus)

        # ensure that the full HTML example page is displayed
        t.setContentsMargins(2, 2, 2, 2)
        t.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        t.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        t.setMinimumSize(QSize(350, 350))
        layout.addWidget(t)

        t.anchorClicked.connect(self.slotAnchorClicked)

        grid = QGridLayout()
        layout.addLayout(grid)

        grid.setVerticalSpacing(1)
        grid.setColumnMinimumWidth(1, 200)

        self.labels = {}
        self.edits = {}
        for row, (name, desc) in enumerate(headers()):
            l = QLabel()
            e = QLineEdit()
            l.setBuddy(e)
            grid.addWidget(l, row, 0)
            grid.addWidget(e, row, 1)
            self.labels[name] = l
            self.edits[name] = e
            completionmodel.complete(e, "scorewiz/completion/header/"+name)
            e.completer().setCaseSensitivity(Qt.CaseInsensitive)
            e.textChanged.connect(self.setPreviewTexts)

        app.settingsChanged.connect(self.readSettings)
        self.readSettings()
        app.translateUI(self)
コード例 #4
0
ファイル: header.py プロジェクト: AlexSchr/frescobaldi
 def __init__(self, parent):
     super(HeaderWidget, self).__init__(parent)
     
     layout = QHBoxLayout()
     self.setLayout(layout)
     
     # The html view with the score layout example
     t = self.htmlView = QTextBrowser()
     t.setOpenLinks(False)
     t.setOpenExternalLinks(False)
     t.setSearchPaths(__path__)
     t.setTextInteractionFlags(Qt.LinksAccessibleByMouse)
     t.setFocusPolicy(Qt.NoFocus)
     
     # ensure that the full HTML example page is displayed
     t.setContentsMargins(2, 2, 2, 2)
     t.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     t.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
     t.setMinimumSize(QSize(350, 350))
     layout.addWidget(t)
     
     t.anchorClicked.connect(self.slotAnchorClicked)
     
     grid = QGridLayout()
     layout.addLayout(grid)
     
     grid.setVerticalSpacing(1)
     grid.setColumnMinimumWidth(1, 200)
     
     self.labels = {}
     self.edits = {}
     for row, (name, desc) in enumerate(headers()):
         l = QLabel()
         e = QLineEdit()
         l.setBuddy(e)
         grid.addWidget(l, row, 0)
         grid.addWidget(e, row, 1)
         self.labels[name] = l
         self.edits[name] = e
         completionmodel.complete(e, "scorewiz/completion/header/"+name)
         e.completer().setCaseSensitivity(Qt.CaseInsensitive)
     
     app.settingsChanged.connect(self.readSettings)
     self.readSettings()
     app.translateUI(self)
コード例 #5
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)
コード例 #6
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)
コード例 #7
0
ファイル: scoreproperties.py プロジェクト: proski/frescobaldi
 def createTempoWidget(self):
     self.tempoLabel = QLabel()
     self.tempo = widgets.lineedit.LineEdit()
     completionmodel.complete(self.tempo, "scorewiz/completion/scoreproperties/tempo")
     self.tempo.completer().setCaseSensitivity(Qt.CaseInsensitive)
     self.tempoLabel.setBuddy(self.tempo)