forked from openlp/openlp
Cleanups
This commit is contained in:
parent
871640c374
commit
f0c03ad2cb
|
@ -132,6 +132,9 @@ def contextMenu(base, icon, text):
|
||||||
return action
|
return action
|
||||||
|
|
||||||
def contextMenuSeparator(base):
|
def contextMenuSeparator(base):
|
||||||
|
"""
|
||||||
|
Add a separator to a context menu
|
||||||
|
"""
|
||||||
action = QtGui.QAction(u'', base)
|
action = QtGui.QAction(u'', base)
|
||||||
action.setSeparator(True)
|
action.setSeparator(True)
|
||||||
return action
|
return action
|
||||||
|
@ -150,7 +153,8 @@ def resize_image(image, width, height):
|
||||||
realw = preview.width()
|
realw = preview.width()
|
||||||
realh = preview.height()
|
realh = preview.height()
|
||||||
# and move it to the centre of the preview space
|
# 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)
|
newImage.fill(QtCore.Qt.black)
|
||||||
painter = QtGui.QPainter(newImage)
|
painter = QtGui.QPainter(newImage)
|
||||||
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
||||||
|
@ -158,6 +162,9 @@ def resize_image(image, width, height):
|
||||||
|
|
||||||
|
|
||||||
class ThemeLevel(object):
|
class ThemeLevel(object):
|
||||||
|
"""
|
||||||
|
Provides an enumeration for the level a theme applies to
|
||||||
|
"""
|
||||||
Global = 1
|
Global = 1
|
||||||
Service = 2
|
Service = 2
|
||||||
Song = 3
|
Song = 3
|
||||||
|
|
|
@ -23,4 +23,4 @@
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from theme import Theme
|
from openlp.core.theme.theme import Theme
|
||||||
|
|
|
@ -186,4 +186,5 @@ def add_actions(target, actions):
|
||||||
|
|
||||||
from languagemanager import LanguageManager
|
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']
|
||||||
|
|
|
@ -50,7 +50,8 @@ class Book(BaseModel):
|
||||||
Book model
|
Book model
|
||||||
"""
|
"""
|
||||||
def __repr__(self):
|
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):
|
class Song(BaseModel):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue