Add comments to correct layout

This commit is contained in:
Tim Bentley 2009-09-29 05:58:26 +01:00
parent aeba391642
commit a175216cd5

View File

@ -31,6 +31,9 @@ from PyQt4 import QtGui
from openlp.core.lib import buildIcon
class ServiceType(object):
"""
Defines the type of service item
"""
Text = 1
Image = 2
Command = 3
@ -83,7 +86,7 @@ class ServiceItem(object):
def render(self):
"""
The render method is what renders the frames for the screen.
The render method is what generates the frames for the screen.
"""
log.debug(u'Render called')
self.frames = []
@ -116,6 +119,11 @@ class ServiceItem(object):
log.error(u'Invalid value renderer :%s' % self.service_item_type)
def render_individual(self, row):
"""
Takes an array of text and geneates an Image from the
theme. It assumes the text will fit on the screen as it
has generated by the render method above.
"""
log.debug(u'render individual')
if self.theme is None:
self.RenderManager.set_override_theme(None)
@ -141,7 +149,8 @@ class ServiceItem(object):
"""
self.service_item_type = ServiceType.Image
self.service_item_path = path
self.service_frames.append({u'title': frame_title, u'text':None, u'image': image})
self.service_frames.append(
{u'title': frame_title, u'text':None, u'image': image})
def add_from_text(self, frame_title, raw_slide):
"""
@ -155,8 +164,8 @@ class ServiceItem(object):
"""
self.service_item_type = ServiceType.Text
frame_title = frame_title.split(u'\n')[0]
self.service_frames.append({u'title': frame_title,
u'raw_slide': raw_slide})
self.service_frames.append(
{u'title': frame_title, u'raw_slide': raw_slide})
def add_from_command(self, path, frame_title):
"""
@ -170,7 +179,8 @@ class ServiceItem(object):
"""
self.service_item_type = ServiceType.Command
self.service_item_path = path
self.service_frames.append({u'title': frame_title, u'command': None})
self.service_frames.append(
{u'title': frame_title, u'command': None})
def get_service_repr(self):
"""