This commit is contained in:
Ken Roberts 2014-10-16 11:16:08 -07:00
parent 645f92e7d4
commit ec59abdc85
3 changed files with 6 additions and 5 deletions

View File

@ -566,7 +566,7 @@ class PJLink1(QTcpSocket):
fill = {'Hours': int(data_dict[0]), 'On': False if data_dict[1] == '0' else True}
except ValueError:
# In case of invalid entry
log.warn('(%s) process_lamp(): Invalid data "%s"' %( self.ip, data))
log.warn('(%s) process_lamp(): Invalid data "%s"' % (self.ip, data))
return
lamps.append(fill)
data_dict.pop(0) # Remove lamp hours

View File

@ -46,6 +46,7 @@ from openlp.core.lib import build_icon
from openlp.core.lib.projector.db import Projector
from openlp.core.lib.projector.constants import PJLINK_PORT
class Ui_ProjectorEditForm(object):
"""
The :class:`~opelp.core.lib.ui.projector.editform.Ui_ProjectorEdiForm` class defines
@ -63,7 +64,7 @@ class Ui_ProjectorEditForm(object):
self.dialog_layout = QGridLayout(edit_projector_dialog)
self.dialog_layout.setObjectName('dialog_layout')
self.dialog_layout.setSpacing(8)
self.dialog_layout.setContentsMargins(8,8,8,8)
self.dialog_layout.setContentsMargins(8, 8, 8, 8)
# IP Address
self.ip_label = QLabel(edit_projector_dialog)
self.ip_label.setObjectName('projector_edit_ip_label')
@ -108,8 +109,8 @@ class Ui_ProjectorEditForm(object):
self.dialog_layout.addWidget(self.notes_text, 5, 1)
# Time for the buttons
self.button_box = QDialogButtonBox(QDialogButtonBox.Help |
QDialogButtonBox.Save |
QDialogButtonBox.Cancel)
QDialogButtonBox.Save |
QDialogButtonBox.Cancel)
self.dialog_layout.addWidget(self.button_box, 8, 0, 1, 2)
def retranslateUi(self, edit_projector_dialog):
@ -134,6 +135,7 @@ class Ui_ProjectorEditForm(object):
self.notes_label.setText(translate('OpenLP.ProjectorEditForm', 'Notes'))
self.notes_text.insertPlainText(self.projector.notes)
class ProjectorEditForm(QDialog, Ui_ProjectorEditForm):
"""
Class to add or edit a projector entry in the database.

View File

@ -45,7 +45,6 @@ from openlp.core.lib.ui import create_widget_action
from openlp.core.lib.projector.constants import *
from openlp.core.lib.projector.db import ProjectorDB
from openlp.core.lib.projector.pjlink1 import PJLink1
#from openlp.core.ui.projector.wizard import ProjectorWizard
from openlp.core.ui.projector.editform import ProjectorEditForm
# Dict for matching projector status to display icon