This commit is contained in:
Jon Tibble 2010-05-26 00:07:50 +01:00
parent 871640c374
commit f0c03ad2cb
4 changed files with 13 additions and 4 deletions

View File

@ -132,6 +132,9 @@ def contextMenu(base, icon, text):
return action
def contextMenuSeparator(base):
"""
Add a separator to a context menu
"""
action = QtGui.QAction(u'', base)
action.setSeparator(True)
return action
@ -150,7 +153,8 @@ def resize_image(image, width, height):
realw = preview.width()
realh = preview.height()
# and move it to the centre of the preview space
newImage = QtGui.QImage(width, height, QtGui.QImage.Format_ARGB32_Premultiplied)
newImage = QtGui.QImage(
width, height, QtGui.QImage.Format_ARGB32_Premultiplied)
newImage.fill(QtCore.Qt.black)
painter = QtGui.QPainter(newImage)
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
@ -158,6 +162,9 @@ def resize_image(image, width, height):
class ThemeLevel(object):
"""
Provides an enumeration for the level a theme applies to
"""
Global = 1
Service = 2
Song = 3

View File

@ -23,4 +23,4 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from theme import Theme
from openlp.core.theme.theme import Theme

View File

@ -186,4 +186,5 @@ def add_actions(target, actions):
from languagemanager import LanguageManager
__all__ = [u'AppLocation', u'check_latest_version', u'add_actions', u'LanguageManager']
__all__ = [u'AppLocation', u'check_latest_version', u'add_actions',
u'LanguageManager']

View File

@ -50,7 +50,8 @@ class Book(BaseModel):
Book model
"""
def __repr__(self):
return u'<Book id="%s" name="%s" publisher="%s" />' % (str(self.id), self.name, self.publisher)
return u'<Book id="%s" name="%s" publisher="%s" />' % (
str(self.id), self.name, self.publisher)
class Song(BaseModel):
"""