本文整理汇总了Python中openlp.core.lib.ServiceItem.footer方法的典型用法代码示例。如果您正苦于以下问题:Python ServiceItem.footer方法的具体用法?Python ServiceItem.footer怎么用?Python ServiceItem.footer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openlp.core.lib.ServiceItem
的用法示例。
在下文中一共展示了ServiceItem.footer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_preview
# 需要导入模块: from openlp.core.lib import ServiceItem [as 别名]
# 或者: from openlp.core.lib.ServiceItem import footer [as 别名]
def generate_preview(self, theme_data, force_page=False):
"""
Generate a preview of a theme.
:param theme_data: The theme to generated a preview for.
:param force_page: Flag to tell message lines per page need to be generated.
"""
# save value for use in format_slide
self.force_page = force_page
# build a service item to generate preview
service_item = ServiceItem()
if self.force_page:
# make big page for theme edit dialog to get line count
service_item.add_from_text(VERSE_FOR_LINE_COUNT)
else:
service_item.add_from_text(VERSE)
service_item.raw_footer = FOOTER
# if No file do not update cache
if theme_data.background_filename:
self.image_manager.add_image(
theme_data.background_filename, ImageSource.Theme, QtGui.QColor(theme_data.background_border_color))
theme_data, main, footer = self.pre_render(theme_data)
service_item.theme_data = theme_data
service_item.main = main
service_item.footer = footer
service_item.render(True)
if not self.force_page:
self.display.build_html(service_item)
raw_html = service_item.get_rendered_frame(0)
self.display.text(raw_html, False)
preview = self.display.preview()
return preview
self.force_page = False