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 Theme = 2
Screen = 3 Screen = 3
class Location(object): class AlertLocation(object):
""" """
This is an enumeration class which specifies the different modes of hiding This is an enumeration class which controls where Alerts are placed on the
the display. screen.
``Top`` ``Top``
Place the text at the top of the screen. 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, \ from openlp.core.lib import Receiver, build_html, ServiceItem, image_to_byte, \
translate, PluginManager translate, PluginManager
from openlp.core.ui import HideMode, ScreenList, Location from openlp.core.ui import HideMode, ScreenList, AlertLocation
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -241,10 +241,10 @@ class MainDisplay(QtGui.QGraphicsView):
alert_height = int(height.toString()) alert_height = int(height.toString())
shrinkItem.resize(self.width(), alert_height) shrinkItem.resize(self.width(), alert_height)
shrinkItem.setVisible(True) shrinkItem.setVisible(True)
if location == Location.Middle: if location == AlertLocation.Middle:
shrinkItem.move(self.screen[u'size'].left(), shrinkItem.move(self.screen[u'size'].left(),
(self.screen[u'size'].height() - alert_height) / 2) (self.screen[u'size'].height() - alert_height) / 2)
elif location == Location.Bottom: elif location == AlertLocation.Bottom:
shrinkItem.move(self.screen[u'size'].left(), shrinkItem.move(self.screen[u'size'].left(),
self.screen[u'size'].height() - alert_height) self.screen[u'size'].height() - alert_height)
else: else:

View File

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