Fix up review comments

This commit is contained in:
Tim Bentley 2011-10-29 20:13:11 +01:00
parent ea4cb7f7ed
commit c8e9496db1
3 changed files with 8 additions and 8 deletions

View File

@ -52,10 +52,10 @@ class HideMode(object):
Theme = 2
Screen = 3
class Location(object):
class AlertLocation(object):
"""
This is an enumeration class which specifies the different modes of hiding
the display.
This is an enumeration class which controls where Alerts are placed on the
screen.
``Top``
Place the text at the top of the screen.

View File

@ -37,7 +37,7 @@ from PyQt4.phonon import Phonon
from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
translate, PluginManager
from openlp.core.ui import HideMode, ScreenList, Location
from openlp.core.ui import HideMode, ScreenList, AlertLocation
log = logging.getLogger(__name__)
@ -241,10 +241,10 @@ class MainDisplay(QtGui.QGraphicsView):
alert_height = int(height.toString())
shrinkItem.resize(self.width(), alert_height)
shrinkItem.setVisible(True)
if location == Location.Middle:
if location == AlertLocation.Middle:
shrinkItem.move(self.screen[u'size'].left(),
(self.screen[u'size'].height() - alert_height) / 2)
elif location == Location.Bottom:
elif location == AlertLocation.Bottom:
shrinkItem.move(self.screen[u'size'].left(),
self.screen[u'size'].height() - alert_height)
else:

View File

@ -28,7 +28,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab, translate, Receiver
from openlp.core.ui import Location
from openlp.core.ui import AlertLocation
from openlp.core.lib.ui import UiStrings, create_valign_combo
class AlertsTab(SettingsTab):
@ -160,7 +160,7 @@ class AlertsTab(SettingsTab):
self.font_face = unicode(settings.value(
u'font face', QtCore.QVariant(QtGui.QFont().family())).toString())
self.location = settings.value(
u'location', QtCore.QVariant(Location.Bottom)).toInt()[0]
u'location', QtCore.QVariant(AlertLocation.Bottom)).toInt()[0]
settings.endGroup()
self.fontSizeSpinBox.setValue(self.font_size)
self.timeoutSpinBox.setValue(self.timeout)