forked from openlp/openlp
Clean up slide controllers so they display right
Fix screen hight. Fix renderer so the footer is not line width adjusted. Various other cleanups bzr-revno: 818
This commit is contained in:
commit
9240c797eb
@ -533,7 +533,10 @@ class Renderer(object):
|
||||
font = self.mainFont
|
||||
metrics = QtGui.QFontMetrics(font)
|
||||
w = metrics.width(line)
|
||||
h = metrics.height() + int(self._theme.font_main_line_adjustment)
|
||||
if footer:
|
||||
h = metrics.height()
|
||||
else:
|
||||
h = metrics.height() + int(self._theme.font_main_line_adjustment)
|
||||
if draw:
|
||||
self.painter.setFont(font)
|
||||
if color is None:
|
||||
@ -581,4 +584,4 @@ class Renderer(object):
|
||||
"""
|
||||
image.save(u'renderer.png', u'png')
|
||||
if image2:
|
||||
image2.save(u'renderer2.png', u'png')
|
||||
image2.save(u'renderer2.png', u'png')
|
||||
|
@ -184,6 +184,7 @@ class Ui_AmendThemeDialog(object):
|
||||
self.MainFontLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontMainWrapLineAdjustmentLabel)
|
||||
self.FontMainLineAdjustmentSpinBox = QtGui.QSpinBox(self.FontMainGroupBox)
|
||||
self.FontMainLineAdjustmentSpinBox.setObjectName("FontMainLineAdjustmentSpinBox")
|
||||
self.FontMainLineAdjustmentSpinBox.setMinimum(-99)
|
||||
self.MainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontMainLineAdjustmentSpinBox)
|
||||
self.FontMainWrapIndentationLabel = QtGui.QLabel(self.FontMainGroupBox)
|
||||
self.FontMainWrapIndentationLabel.setObjectName("FontMainWrapIndentationLabel")
|
||||
|
@ -42,139 +42,139 @@ class DisplayTab(SettingsTab):
|
||||
self.tabTitleVisible = self.trUtf8('Displays')
|
||||
self.layoutWidget = QtGui.QWidget(self)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
|
||||
self.layoutWidget.setObjectName("layoutWidget")
|
||||
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.CurrentGroupBox = QtGui.QGroupBox(self.layoutWidget)
|
||||
self.CurrentGroupBox.setObjectName("CurrentGroupBox")
|
||||
self.CurrentGroupBox.setObjectName(u'CurrentGroupBox')
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.CurrentGroupBox)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||
self.verticalLayout_6 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_6.setObjectName("verticalLayout_6")
|
||||
self.verticalLayout_6.setObjectName(u'verticalLayout_6')
|
||||
self.XLabel = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.XLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.XLabel.setObjectName("XLabel")
|
||||
self.XLabel.setObjectName(u'XLabel')
|
||||
self.verticalLayout_6.addWidget(self.XLabel)
|
||||
self.Xpos = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.Xpos.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.Xpos.setObjectName("Xpos")
|
||||
self.Xpos.setObjectName(u'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.verticalLayout_7.setObjectName(u'verticalLayout_7')
|
||||
self.YLabel = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.YLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.YLabel.setObjectName("YLabel")
|
||||
self.YLabel.setObjectName(u'YLabel')
|
||||
self.verticalLayout_7.addWidget(self.YLabel)
|
||||
self.Ypos = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.Ypos.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.Ypos.setObjectName("Ypos")
|
||||
self.Ypos.setObjectName(u'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.verticalLayout_9.setObjectName(u'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.HeightLabel.setObjectName(u'HeightLabel')
|
||||
self.verticalLayout_9.addWidget(self.HeightLabel)
|
||||
self.Height = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.Height.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.Height.setObjectName("Height")
|
||||
self.Height.setObjectName(u'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.verticalLayout_8.setObjectName(u'verticalLayout_8')
|
||||
self.WidthLabel = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.WidthLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.WidthLabel.setObjectName("WidthLabel")
|
||||
self.WidthLabel.setObjectName(u'WidthLabel')
|
||||
self.verticalLayout_8.addWidget(self.WidthLabel)
|
||||
self.Width = QtGui.QLabel(self.CurrentGroupBox)
|
||||
self.Width.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.Width.setObjectName("Width")
|
||||
self.Width.setObjectName(u'Width')
|
||||
self.verticalLayout_8.addWidget(self.Width)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_8)
|
||||
self.verticalLayout.addWidget(self.CurrentGroupBox)
|
||||
self.CurrentGroupBox_2 = QtGui.QGroupBox(self)
|
||||
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.CurrentGroupBox_2.setObjectName(u'CurrentGroupBox_2')
|
||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.CurrentGroupBox_2)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
||||
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
||||
self.XAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
|
||||
self.XAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.XAmendLabel.setObjectName("XAmendLabel")
|
||||
self.XAmendLabel.setObjectName(u'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.XposEdit.setObjectName(u'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.verticalLayout_3.setObjectName(u'verticalLayout_3')
|
||||
self.YAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
|
||||
self.YAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.YAmendLabel.setObjectName("YAmendLabel")
|
||||
self.YAmendLabel.setObjectName(u'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.YposEdit.setObjectName(u'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.verticalLayout_4.setObjectName(u'verticalLayout_4')
|
||||
self.HeightAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
|
||||
self.HeightAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.HeightAmendLabel.setObjectName("HeightAmendLabel")
|
||||
self.HeightAmendLabel.setObjectName(u'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.HeightEdit.setObjectName(u'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.verticalLayout_5.setObjectName(u'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.WidthAmendLabel.setObjectName(u'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.WidthEdit.setObjectName(u'WidthEdit')
|
||||
self.verticalLayout_5.addWidget(self.WidthEdit)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_5)
|
||||
self.OverrideCheckBox = QtGui.QCheckBox(self)
|
||||
self.OverrideCheckBox.setGeometry(QtCore.QRect(0, 10, 191, 23))
|
||||
self.OverrideCheckBox.setObjectName("OverrideCheckBox")
|
||||
self.OverrideCheckBox.setObjectName(u'OverrideCheckBox')
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
QtCore.QObject.connect(self.OverrideCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onOverrideCheckBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle(QtGui.QApplication.translate("self", "Amend Display Settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.CurrentGroupBox.setTitle(QtGui.QApplication.translate("self", "Default Settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.XLabel.setText(QtGui.QApplication.translate("self", "X", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.Xpos.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.YLabel.setText(QtGui.QApplication.translate("self", "Y", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.Ypos.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.HeightLabel.setText(QtGui.QApplication.translate("self", "Height", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.Height.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.WidthLabel.setText(QtGui.QApplication.translate("self", "Width", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.Width.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.CurrentGroupBox_2.setTitle(QtGui.QApplication.translate("self", "Amend Settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.XAmendLabel.setText(QtGui.QApplication.translate("self", "X", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.YAmendLabel.setText(QtGui.QApplication.translate("self", "Y", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.HeightAmendLabel.setText(QtGui.QApplication.translate("self", "Height", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.WidthAmendLabel.setText(QtGui.QApplication.translate("self", "Width", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.OverrideCheckBox.setText(QtGui.QApplication.translate("self", "Override Output Display", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.setWindowTitle( self.trUtf8(u'Amend Display Settings'))
|
||||
self.CurrentGroupBox.setTitle( self.trUtf8(u'Default Settings'))
|
||||
self.XLabel.setText(self.trUtf8(u'X'))
|
||||
self.Xpos.setText(u'0')
|
||||
self.YLabel.setText( self.trUtf8(u'Y'))
|
||||
self.Ypos.setText(u'0')
|
||||
self.HeightLabel.setText( self.trUtf8(u'Height'))
|
||||
self.Height.setText(u'0')
|
||||
self.WidthLabel.setText( self.trUtf8(u'Width'))
|
||||
self.Width.setText(u'0')
|
||||
self.CurrentGroupBox_2.setTitle( self.trUtf8(u'Amend Settings'))
|
||||
self.XAmendLabel.setText( self.trUtf8(u'X'))
|
||||
self.YAmendLabel.setText( self.trUtf8(u'Y'))
|
||||
self.HeightAmendLabel.setText( self.trUtf8(u'Height'))
|
||||
self.WidthAmendLabel.setText( self.trUtf8(u'Width'))
|
||||
self.OverrideCheckBox.setText( self.trUtf8(u'Override Output Display'))
|
||||
|
||||
def load(self):
|
||||
settings = QtCore.QSettings()
|
||||
|
@ -116,10 +116,12 @@ class MainDisplay(DisplayWidget):
|
||||
"""
|
||||
log.debug(u'Initialisation started')
|
||||
DisplayWidget.__init__(self, parent)
|
||||
self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
||||
self.setWindowState(QtCore.Qt.WindowFullScreen)
|
||||
self.parent = parent
|
||||
self.setWindowTitle(u'OpenLP Display')
|
||||
# WA_TranslucentBackground is not available in QT4.4
|
||||
try:
|
||||
try:
|
||||
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
||||
except AttributeError:
|
||||
pass
|
||||
@ -346,12 +348,12 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
Phonon.createPath(self.mediaObject, self.audioObject)
|
||||
flags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog
|
||||
# WindowsStaysOnBottomHint is not available in QT4.4
|
||||
try:
|
||||
try:
|
||||
flags = flags | QtCore.Qt.WindowStaysOnBottomHint
|
||||
except AttributeError:
|
||||
pass
|
||||
self.setWindowFlags(flags)
|
||||
|
||||
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'maindisplay_hide'), self.mediaHide)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
|
@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
|
@ -114,10 +114,6 @@ class SlideController(QtGui.QWidget):
|
||||
self.songEditList = [
|
||||
u'Edit Song',
|
||||
]
|
||||
if isLive:
|
||||
self.labelWidth = 20
|
||||
else:
|
||||
self.labelWidth = 0
|
||||
self.timer_id = 0
|
||||
self.songEdit = False
|
||||
self.selectedRow = 0
|
||||
@ -157,12 +153,11 @@ class SlideController(QtGui.QWidget):
|
||||
self.ControllerLayout.setMargin(0)
|
||||
# Controller list view
|
||||
self.PreviewListWidget = SlideList(self)
|
||||
self.PreviewListWidget.setColumnCount(2)
|
||||
self.PreviewListWidget.setColumnCount(1)
|
||||
self.PreviewListWidget.horizontalHeader().setVisible(False)
|
||||
self.PreviewListWidget.verticalHeader().setVisible(False)
|
||||
self.PreviewListWidget.setColumnWidth(1, self.labelWidth)
|
||||
#self.PreviewListWidget.verticalHeader().setVisible(False)
|
||||
self.PreviewListWidget.setColumnWidth(
|
||||
1, self.Controller.width() - self.labelWidth)
|
||||
0, self.Controller.width())
|
||||
self.PreviewListWidget.isLive = self.isLive
|
||||
self.PreviewListWidget.setObjectName(u'PreviewListWidget')
|
||||
self.PreviewListWidget.setSelectionBehavior(1)
|
||||
@ -382,8 +377,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
width = self.parent.ControlSplitter.sizes()[self.split]
|
||||
height = width * self.parent.RenderManager.screen_ratio
|
||||
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
|
||||
self.PreviewListWidget.setColumnWidth(1, width - self.labelWidth)
|
||||
self.PreviewListWidget.setColumnWidth(0, width)
|
||||
#Sort out image hights (Songs , bibles excluded)
|
||||
if self.serviceItem and not self.serviceItem.is_text():
|
||||
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
|
||||
@ -526,20 +520,19 @@ class SlideController(QtGui.QWidget):
|
||||
self.serviceItem = serviceItem
|
||||
self.PreviewListWidget.clear()
|
||||
self.PreviewListWidget.setRowCount(0)
|
||||
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
|
||||
self.PreviewListWidget.setColumnWidth(1, width - self.labelWidth)
|
||||
self.PreviewListWidget.setColumnWidth(0, width)
|
||||
if self.isLive:
|
||||
self.SongMenu.menu().clear()
|
||||
row = 0
|
||||
text = []
|
||||
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
|
||||
self.PreviewListWidget.setRowCount(
|
||||
self.PreviewListWidget.rowCount() + 1)
|
||||
rowitem = QtGui.QTableWidgetItem()
|
||||
item = QtGui.QTableWidgetItem()
|
||||
slide_height = 0
|
||||
slideHeight = 0
|
||||
#It is a based Text Render
|
||||
if self.serviceItem.is_text():
|
||||
if self.isLive and frame[u'verseTag'] is not None:
|
||||
if frame[u'verseTag'] is not None:
|
||||
#only load the slot once
|
||||
bits = frame[u'verseTag'].split(u':')
|
||||
tag = None
|
||||
@ -553,10 +546,11 @@ class SlideController(QtGui.QWidget):
|
||||
tag = bits[0]
|
||||
tag1 = tag
|
||||
row = bits[0][0:1]
|
||||
if tag1 not in self.slideList:
|
||||
self.slideList[tag1] = framenumber
|
||||
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag1),
|
||||
self.onSongBarHandler)
|
||||
if self.isLive:
|
||||
if tag1 not in self.slideList:
|
||||
self.slideList[tag1] = framenumber
|
||||
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag1),
|
||||
self.onSongBarHandler)
|
||||
else:
|
||||
row += 1
|
||||
item.setText(frame[u'text'])
|
||||
@ -568,20 +562,18 @@ class SlideController(QtGui.QWidget):
|
||||
self.parent.RenderManager.height)
|
||||
label.setScaledContents(True)
|
||||
label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
|
||||
self.PreviewListWidget.setCellWidget(framenumber, 1, label)
|
||||
slide_height = width * self.parent.RenderManager.screen_ratio
|
||||
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
|
||||
slideHeight = width * self.parent.RenderManager.screen_ratio
|
||||
row += 1
|
||||
rowitem.setText(unicode(row))
|
||||
rowitem.setTextAlignment(QtCore.Qt.AlignVCenter)
|
||||
self.PreviewListWidget.setItem(framenumber, 0, rowitem)
|
||||
self.PreviewListWidget.setItem(framenumber, 1, item)
|
||||
if slide_height != 0:
|
||||
self.PreviewListWidget.setRowHeight(framenumber, slide_height)
|
||||
text.append(unicode(row))
|
||||
self.PreviewListWidget.setItem(framenumber, 0, item)
|
||||
if slideHeight != 0:
|
||||
self.PreviewListWidget.setRowHeight(framenumber, slideHeight)
|
||||
self.PreviewListWidget.setVerticalHeaderLabels(text)
|
||||
if self.serviceItem.is_text():
|
||||
self.PreviewListWidget.resizeRowsToContents()
|
||||
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
|
||||
self.PreviewListWidget.setColumnWidth(1,
|
||||
self.PreviewListWidget.viewport().size().width() - self.labelWidth)
|
||||
self.PreviewListWidget.setColumnWidth(0,
|
||||
self.PreviewListWidget.viewport().size().width())
|
||||
if slideno > self.PreviewListWidget.rowCount():
|
||||
self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount())
|
||||
else:
|
||||
@ -604,16 +596,16 @@ class SlideController(QtGui.QWidget):
|
||||
data = []
|
||||
if self.serviceItem:
|
||||
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
|
||||
data_item = {}
|
||||
dataItem = {}
|
||||
if self.serviceItem.is_text():
|
||||
data_item[u'tag'] = unicode(frame[u'verseTag'])
|
||||
data_item[u'text'] = unicode(frame[u'text'])
|
||||
dataItem[u'tag'] = unicode(frame[u'verseTag'])
|
||||
dataItem[u'text'] = unicode(frame[u'text'])
|
||||
else:
|
||||
data_item[u'tag'] = unicode(framenumber)
|
||||
data_item[u'text'] = u''
|
||||
data_item[u'selected'] = \
|
||||
dataItem[u'tag'] = unicode(framenumber)
|
||||
dataItem[u'text'] = u''
|
||||
dataItem[u'selected'] = \
|
||||
(self.PreviewListWidget.currentRow() == framenumber)
|
||||
data.append(data_item)
|
||||
data.append(dataItem)
|
||||
Receiver.send_message(u'slidecontroller_%s_text_response'
|
||||
% self.typePrefix, data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user