本文整理汇总了Python中symbols.icon函数的典型用法代码示例。如果您正苦于以下问题:Python icon函数的具体用法?Python icon怎么用?Python icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了icon函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: createTimeSignatureWidget
def createTimeSignatureWidget(self):
self.timeSignatureLabel = QLabel()
self.timeSignature = QComboBox(editable=True)
icons = {"(4/4)": symbols.icon("time_c44"), "(2/2)": symbols.icon("time_c22")}
self.timeSignature.setModel(listmodel.ListModel(timeSignaturePresets, self.timeSignature, icon=icons.get))
self.timeSignature.setCompleter(None)
self.timeSignatureLabel.setBuddy(self.timeSignature)
开发者ID:sehe,项目名称:frescobaldi,代码行数:7,代码来源:scoreproperties.py
示例2: icon
def icon(name):
"""Returns an icon if defined."""
d = get(name).variables
icon = d.get('icon')
if icon:
return icons.get(icon)
icon = d.get('symbol')
if icon:
return symbols.icon(icon)
开发者ID:AlexSchr,项目名称:frescobaldi,代码行数:9,代码来源:snippets.py
示例3: createPickupWidget
def createPickupWidget(self):
self.pickupLabel = QLabel()
self.pickup = QComboBox()
pickups = ['']
pickups.extend(durations)
self.pickup.setModel(listmodel.ListModel(pickups, self.pickup,
display = lambda item: item or _("None"),
icon = lambda item: symbols.icon('note_{0}'.format(item.replace('.', 'd'))) if item else None))
self.pickup.view().setIconSize(QSize(22, 22))
self.pickupLabel.setBuddy(self.pickup)
开发者ID:proski,项目名称:frescobaldi,代码行数:10,代码来源:scoreproperties.py
示例4: createMetronomeWidget
def createMetronomeWidget(self):
self.metronomeLabel = QLabel()
self.metronomeNote = QComboBox()
self.metronomeNote.setModel(listmodel.ListModel(durations, display=None,
icon = lambda item: symbols.icon('note_{0}'.format(item.replace('.', 'd')))))
self.metronomeNote.setCurrentIndex(durations.index('4'))
self.metronomeNote.view().setIconSize(QSize(22, 22))
self.metronomeEqualSign = QLabel('=')
self.metronomeEqualSign.setFixedWidth(self.metronomeEqualSign.minimumSizeHint().width())
self.metronomeValue = QComboBox(editable=True)
self.metronomeValue.setModel(listmodel.ListModel(metronomeValues, self.metronomeValue,
display=format))
self.metronomeValue.setCompleter(None)
self.metronomeValue.setValidator(QIntValidator(0, 999, self.metronomeValue))
self.metronomeValue.setCurrentIndex(metronomeValues.index(100))
self.metronomeTempo = widgets.tempobutton.TempoButton()
self.metronomeTempo.tempo.connect(self.setMetronomeValue)
self.metronomeLabel.setBuddy(self.metronomeNote)
开发者ID:proski,项目名称:frescobaldi,代码行数:18,代码来源:scoreproperties.py
示例5: actionData
def actionData(self):
"""Should yield name, icon, function (may be None) for every action."""
for name, title in self.actionTexts():
yield name, symbols.icon(name), None
开发者ID:jan-warchol,项目名称:frescobaldi,代码行数:4,代码来源:spanners.py
示例6: icon
def icon(self):
"""Should return an icon for our tab."""
return symbols.icon("spanner_phrasingslur")
开发者ID:jan-warchol,项目名称:frescobaldi,代码行数:3,代码来源:spanners.py
示例7: actionData
def actionData(self):
self._barlines = {}
for name, ly_text, title in self.barlines():
yield name, symbols.icon(name), None
self._barlines[name] = ly_text
开发者ID:WedgeLeft,项目名称:frescobaldi,代码行数:5,代码来源:barlines.py
示例8: actionData
def actionData(self):
"""Should yield name, icon, function (may be None) for every action."""
for m in dynamic_marks:
name = 'dynamic_' + m
yield name, symbols.icon(name), None
开发者ID:EdwardBetts,项目名称:frescobaldi,代码行数:5,代码来源:dynamics.py
注:本文中的symbols.icon函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论