Fix up bugs from last merge

This commit is contained in:
Tim Bentley 2010-04-30 16:41:48 +01:00
parent 932560e81d
commit 387e281da0
2 changed files with 21 additions and 152 deletions

View File

@ -589,10 +589,10 @@ class SlideController(QtGui.QWidget):
QtCore.QVariant(checked))
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Blank)
Receiver.send_message(u'presentation_blank')
self.blankPlugin(True)
else:
Receiver.send_message(u'maindisplay_show')
Receiver.send_message(u'presentation_unblank')
self.blankPlugin(False)
def onThemeDisplay(self, checked):
"""
@ -603,8 +603,10 @@ class SlideController(QtGui.QWidget):
self.hideButton.setChecked(False)
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Theme)
self.blankPlugin(True)
else:
Receiver.send_message(u'maindisplay_show')
self.blankPlugin(False)
def onHideDisplay(self, checked):
"""
@ -615,8 +617,25 @@ class SlideController(QtGui.QWidget):
self.themeButton.setChecked(False)
if checked:
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
self.blankPlugin(True)
else:
Receiver.send_message(u'maindisplay_show')
self.blankPlugin(False)
def blankPlugin(self, blank):
"""
Blank the display screen.
"""
if self.serviceItem is not None:
if blank:
Receiver.send_message(u'%s_blank'
% self.serviceItem.name.lower(),
[self.serviceItem, self.isLive])
else:
Receiver.send_message(u'%s_unblank'
% self.serviceItem.name.lower(),
[self.serviceItem, self.isLive])
def onSlideSelected(self):
"""

View File

@ -1,150 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'displaytab.ui'
#
# Created: Tue Apr 27 06:10:08 2010
# by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_DisplaysDialog(object):
def setupUi(self, DisplaysDialog):
DisplaysDialog.setObjectName("DisplaysDialog")
DisplaysDialog.resize(620, 716)
self.layoutWidget = QtGui.QWidget(DisplaysDialog)
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
self.layoutWidget.setObjectName("layoutWidget")
self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
self.verticalLayout.setObjectName("verticalLayout")
self.CurrentGroupBox = QtGui.QGroupBox(self.layoutWidget)
self.CurrentGroupBox.setObjectName("CurrentGroupBox")
self.horizontalLayout = QtGui.QHBoxLayout(self.CurrentGroupBox)
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout_6 = QtGui.QVBoxLayout()
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.XLabel = QtGui.QLabel(self.CurrentGroupBox)
self.XLabel.setAlignment(QtCore.Qt.AlignCenter)
self.XLabel.setObjectName("XLabel")
self.verticalLayout_6.addWidget(self.XLabel)
self.Xpos = QtGui.QLabel(self.CurrentGroupBox)
self.Xpos.setAlignment(QtCore.Qt.AlignCenter)
self.Xpos.setObjectName("Xpos")
self.verticalLayout_6.addWidget(self.Xpos)
self.horizontalLayout.addLayout(self.verticalLayout_6)
self.verticalLayout_7 = QtGui.QVBoxLayout()
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.YLabel = QtGui.QLabel(self.CurrentGroupBox)
self.YLabel.setAlignment(QtCore.Qt.AlignCenter)
self.YLabel.setObjectName("YLabel")
self.verticalLayout_7.addWidget(self.YLabel)
self.Ypos = QtGui.QLabel(self.CurrentGroupBox)
self.Ypos.setAlignment(QtCore.Qt.AlignCenter)
self.Ypos.setObjectName("Ypos")
self.verticalLayout_7.addWidget(self.Ypos)
self.horizontalLayout.addLayout(self.verticalLayout_7)
self.verticalLayout_9 = QtGui.QVBoxLayout()
self.verticalLayout_9.setObjectName("verticalLayout_9")
self.HeightLabel = QtGui.QLabel(self.CurrentGroupBox)
self.HeightLabel.setMaximumSize(QtCore.QSize(100, 16777215))
self.HeightLabel.setAlignment(QtCore.Qt.AlignCenter)
self.HeightLabel.setObjectName("HeightLabel")
self.verticalLayout_9.addWidget(self.HeightLabel)
self.Height = QtGui.QLabel(self.CurrentGroupBox)
self.Height.setAlignment(QtCore.Qt.AlignCenter)
self.Height.setObjectName("Height")
self.verticalLayout_9.addWidget(self.Height)
self.horizontalLayout.addLayout(self.verticalLayout_9)
self.verticalLayout_8 = QtGui.QVBoxLayout()
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.WidthLabel = QtGui.QLabel(self.CurrentGroupBox)
self.WidthLabel.setAlignment(QtCore.Qt.AlignCenter)
self.WidthLabel.setObjectName("WidthLabel")
self.verticalLayout_8.addWidget(self.WidthLabel)
self.Width = QtGui.QLabel(self.CurrentGroupBox)
self.Width.setAlignment(QtCore.Qt.AlignCenter)
self.Width.setObjectName("Width")
self.verticalLayout_8.addWidget(self.Width)
self.horizontalLayout.addLayout(self.verticalLayout_8)
self.verticalLayout.addWidget(self.CurrentGroupBox)
self.CurrentGroupBox_2 = QtGui.QGroupBox(DisplaysDialog)
self.CurrentGroupBox_2.setGeometry(QtCore.QRect(0, 130, 248, 87))
self.CurrentGroupBox_2.setMaximumSize(QtCore.QSize(500, 16777215))
self.CurrentGroupBox_2.setObjectName("CurrentGroupBox_2")
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.CurrentGroupBox_2)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.XAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.XAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.XAmendLabel.setObjectName("XAmendLabel")
self.verticalLayout_2.addWidget(self.XAmendLabel)
self.XposEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.XposEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.XposEdit.setMaxLength(4)
self.XposEdit.setObjectName("XposEdit")
self.verticalLayout_2.addWidget(self.XposEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_2)
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.YAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.YAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.YAmendLabel.setObjectName("YAmendLabel")
self.verticalLayout_3.addWidget(self.YAmendLabel)
self.YposEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.YposEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.YposEdit.setMaxLength(4)
self.YposEdit.setObjectName("YposEdit")
self.verticalLayout_3.addWidget(self.YposEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_3)
self.verticalLayout_4 = QtGui.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.HeightAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.HeightAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.HeightAmendLabel.setObjectName("HeightAmendLabel")
self.verticalLayout_4.addWidget(self.HeightAmendLabel)
self.HeightEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.HeightEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.HeightEdit.setMaxLength(4)
self.HeightEdit.setObjectName("HeightEdit")
self.verticalLayout_4.addWidget(self.HeightEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_4)
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.WidthAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.WidthAmendLabel.setMaximumSize(QtCore.QSize(100, 16777215))
self.WidthAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.WidthAmendLabel.setObjectName("WidthAmendLabel")
self.verticalLayout_5.addWidget(self.WidthAmendLabel)
self.WidthEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.WidthEdit.setMaximumSize(QtCore.QSize(60, 16777215))
self.WidthEdit.setObjectName("WidthEdit")
self.verticalLayout_5.addWidget(self.WidthEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_5)
self.OverrideCheckBox = QtGui.QCheckBox(DisplaysDialog)
self.OverrideCheckBox.setGeometry(QtCore.QRect(0, 10, 191, 23))
self.OverrideCheckBox.setObjectName("OverrideCheckBox")
self.retranslateUi(DisplaysDialog)
QtCore.QMetaObject.connectSlotsByName(DisplaysDialog)
def retranslateUi(self, DisplaysDialog):
DisplaysDialog.setWindowTitle(QtGui.QApplication.translate("DisplaysDialog", "Amend Display Settings", None, QtGui.QApplication.UnicodeUTF8))
self.CurrentGroupBox.setTitle(QtGui.QApplication.translate("DisplaysDialog", "Default Settings", None, QtGui.QApplication.UnicodeUTF8))
self.XLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "X", None, QtGui.QApplication.UnicodeUTF8))
self.Xpos.setText(QtGui.QApplication.translate("DisplaysDialog", "0", None, QtGui.QApplication.UnicodeUTF8))
self.YLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "Y", None, QtGui.QApplication.UnicodeUTF8))
self.Ypos.setText(QtGui.QApplication.translate("DisplaysDialog", "0", None, QtGui.QApplication.UnicodeUTF8))
self.HeightLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "Height", None, QtGui.QApplication.UnicodeUTF8))
self.Height.setText(QtGui.QApplication.translate("DisplaysDialog", "0", None, QtGui.QApplication.UnicodeUTF8))
self.WidthLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "Width", None, QtGui.QApplication.UnicodeUTF8))
self.Width.setText(QtGui.QApplication.translate("DisplaysDialog", "0", None, QtGui.QApplication.UnicodeUTF8))
self.CurrentGroupBox_2.setTitle(QtGui.QApplication.translate("DisplaysDialog", "Amend Settings", None, QtGui.QApplication.UnicodeUTF8))
self.XAmendLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "X", None, QtGui.QApplication.UnicodeUTF8))
self.YAmendLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "Y", None, QtGui.QApplication.UnicodeUTF8))
self.HeightAmendLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "Height", None, QtGui.QApplication.UnicodeUTF8))
self.WidthAmendLabel.setText(QtGui.QApplication.translate("DisplaysDialog", "Width", None, QtGui.QApplication.UnicodeUTF8))
self.OverrideCheckBox.setText(QtGui.QApplication.translate("DisplaysDialog", "Override Output Display", None, QtGui.QApplication.UnicodeUTF8))