forked from openlp/openlp
Fix theme loading and song editing
This commit is contained in:
parent
5b4ce8124d
commit
2136155f48
@ -403,7 +403,6 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
service_item.addIcon(
|
service_item.addIcon(
|
||||||
u':/media/media_' + self.PluginNameShort.lower() + u'.png')
|
u':/media/media_' + self.PluginNameShort.lower() + u'.png')
|
||||||
if self.generateSlideData(service_item):
|
if self.generateSlideData(service_item):
|
||||||
self.ListView.clearSelection()
|
|
||||||
return service_item
|
return service_item
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
@ -410,7 +410,7 @@ class Renderer(object):
|
|||||||
align = 0
|
align = 0
|
||||||
shadow_offset = self._shadow_offset_footer
|
shadow_offset = self._shadow_offset_footer
|
||||||
else:
|
else:
|
||||||
align = int(self._theme .display_horizontalAlign)
|
align = self._theme.display_horizontalAlign
|
||||||
shadow_offset = self._shadow_offset
|
shadow_offset = self._shadow_offset
|
||||||
for linenum in range(len(lines)):
|
for linenum in range(len(lines)):
|
||||||
line = lines[linenum]
|
line = lines[linenum]
|
||||||
@ -501,18 +501,18 @@ class Renderer(object):
|
|||||||
if self._theme.font_footer_weight == u'Bold':
|
if self._theme.font_footer_weight == u'Bold':
|
||||||
footer_weight = 75
|
footer_weight = 75
|
||||||
self.footerFont = QtGui.QFont(self._theme.font_footer_name,
|
self.footerFont = QtGui.QFont(self._theme.font_footer_name,
|
||||||
int(self._theme.font_footer_proportion), # size
|
self._theme.font_footer_proportion, # size
|
||||||
int(footer_weight), # weight
|
footer_weight, # weight
|
||||||
self._theme.font_footer_italics) # italic
|
self._theme.font_footer_italics) # italic
|
||||||
self.footerFont.setPixelSize(int(self._theme.font_footer_proportion))
|
self.footerFont.setPixelSize(self._theme.font_footer_proportion)
|
||||||
main_weight = 50
|
main_weight = 50
|
||||||
if self._theme.font_main_weight == u'Bold':
|
if self._theme.font_main_weight == u'Bold':
|
||||||
main_weight = 75
|
main_weight = 75
|
||||||
self.mainFont = QtGui.QFont(self._theme.font_main_name,
|
self.mainFont = QtGui.QFont(self._theme.font_main_name,
|
||||||
int(self._theme.font_main_proportion), # size
|
self._theme.font_main_proportion, # size
|
||||||
int(main_weight), # weight
|
main_weight, # weight
|
||||||
self._theme.font_main_italics)# italic
|
self._theme.font_main_italics)# italic
|
||||||
self.mainFont.setPixelSize(int(self._theme.font_main_proportion))
|
self.mainFont.setPixelSize(self._theme.font_main_proportion)
|
||||||
|
|
||||||
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False,
|
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False,
|
||||||
color=None):
|
color=None):
|
||||||
|
@ -170,16 +170,15 @@ class RenderManager(object):
|
|||||||
main_rect = QtCore.QRect(10, 0, self.width - 1,
|
main_rect = QtCore.QRect(10, 0, self.width - 1,
|
||||||
self.footer_start - 20)
|
self.footer_start - 20)
|
||||||
else:
|
else:
|
||||||
main_rect = QtCore.QRect(int(theme.font_main_x),
|
main_rect = QtCore.QRect(theme.font_main_x, theme.font_main_y,
|
||||||
int(theme.font_main_y), int(theme.font_main_width)-1,
|
theme.font_main_width - 1, theme.font_main_height - 1)
|
||||||
int(theme.font_main_height) - 1)
|
|
||||||
if not theme.font_footer_override:
|
if not theme.font_footer_override:
|
||||||
footer_rect = QtCore.QRect(10,self.footer_start, self.width - 1,
|
footer_rect = QtCore.QRect(10, self.footer_start, self.width - 1,
|
||||||
self.height-self.footer_start)
|
self.height-self.footer_start)
|
||||||
else:
|
else:
|
||||||
footer_rect = QtCore.QRect(int(theme.font_footer_x),
|
footer_rect = QtCore.QRect(theme.font_footer_x,
|
||||||
int(theme.font_footer_y), int(theme.font_footer_width)-1,
|
theme.font_footer_y, theme.font_footer_width - 1,
|
||||||
int(theme.font_footer_height) - 1)
|
theme.font_footer_height - 1)
|
||||||
self.renderer.set_text_rectangle(main_rect, footer_rect)
|
self.renderer.set_text_rectangle(main_rect, footer_rect)
|
||||||
|
|
||||||
def generate_preview(self, themedata):
|
def generate_preview(self, themedata):
|
||||||
|
@ -246,21 +246,18 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
else:
|
else:
|
||||||
self.theme.font_main_override = True
|
self.theme.font_main_override = True
|
||||||
|
|
||||||
if int(self.theme.font_main_x) == 0 and \
|
if not self.theme.font_main_x and not self.theme.font_main_y and \
|
||||||
int(self.theme.font_main_y) == 0 and \
|
not self.theme.font_main_width and not self.theme.font_main_height:
|
||||||
int(self.theme.font_main_width) == 0 and \
|
|
||||||
int(self.theme.font_main_height) == 0:
|
|
||||||
self.theme.font_main_x = u'10'
|
self.theme.font_main_x = u'10'
|
||||||
self.theme.font_main_y = u'10'
|
self.theme.font_main_y = u'10'
|
||||||
self.theme.font_main_width = u'1024'
|
self.theme.font_main_width = u'1024'
|
||||||
self.theme.font_main_height = u'730'
|
self.theme.font_main_height = u'730'
|
||||||
self.FontMainXSpinBox.setValue(int(self.theme.font_main_x))
|
self.FontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||||
self.FontMainYSpinBox.setValue(int(self.theme.font_main_y))
|
self.FontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||||
self.FontMainWidthSpinBox.setValue(int(self.theme.font_main_width))
|
self.FontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||||
self.FontMainHeightSpinBox.setValue(int( \
|
self.FontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
||||||
self.theme.font_main_height))
|
self.FontMainLineSpacingSpinBox.setValue(
|
||||||
self.FontMainLineSpacingSpinBox.setValue(int( \
|
self.theme.font_main_indentation)
|
||||||
self.theme.font_main_indentation))
|
|
||||||
self.stateChanging(self.theme)
|
self.stateChanging(self.theme)
|
||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
@ -280,8 +277,10 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
def onFontMainLineSpacingSpinBoxChanged(self):
|
def onFontMainLineSpacingSpinBoxChanged(self):
|
||||||
if self.theme.font_main_indentation != self.FontMainLineSpacingSpinBox.value():
|
if self.theme.font_main_indentation != \
|
||||||
self.theme.font_main_indentation = self.FontMainLineSpacingSpinBox.value()
|
self.FontMainLineSpacingSpinBox.value():
|
||||||
|
self.theme.font_main_indentation = \
|
||||||
|
self.FontMainLineSpacingSpinBox.value()
|
||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
def onFontMainHeightSpinBoxChanged(self):
|
def onFontMainHeightSpinBoxChanged(self):
|
||||||
@ -331,23 +330,18 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.theme.font_footer_override = False
|
self.theme.font_footer_override = False
|
||||||
else:
|
else:
|
||||||
self.theme.font_footer_override = True
|
self.theme.font_footer_override = True
|
||||||
|
if not self.theme.font_footer_x and not self.theme.font_footer_y and \
|
||||||
if int(self.theme.font_footer_x) == 0 and \
|
not self.theme.font_footer_width and \
|
||||||
int(self.theme.font_footer_y) == 0 and \
|
not self.theme.font_footer_height:
|
||||||
int(self.theme.font_footer_width) == 0 and \
|
|
||||||
int(self.theme.font_footer_height) == 0:
|
|
||||||
self.theme.font_footer_x = u'10'
|
self.theme.font_footer_x = u'10'
|
||||||
self.theme.font_footer_y = u'730'
|
self.theme.font_footer_y = u'730'
|
||||||
self.theme.font_footer_width = u'1024'
|
self.theme.font_footer_width = u'1024'
|
||||||
self.theme.font_footer_height = u'38'
|
self.theme.font_footer_height = u'38'
|
||||||
|
self.FontFooterXSpinBox.setValue(self.theme.font_footer_x)
|
||||||
self.FontFooterXSpinBox.setValue(int(self.theme.font_footer_x))
|
self.FontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
||||||
self.FontFooterYSpinBox.setValue(int(self.theme.font_footer_y))
|
self.FontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
||||||
self.FontFooterWidthSpinBox.setValue(int( \
|
self.FontFooterHeightSpinBox.setValue(
|
||||||
self.theme.font_footer_width))
|
self.theme.font_footer_height)
|
||||||
self.FontFooterHeightSpinBox.setValue(int( \
|
|
||||||
self.theme.font_footer_height))
|
|
||||||
|
|
||||||
self.stateChanging(self.theme)
|
self.stateChanging(self.theme)
|
||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
|
|
||||||
@ -369,7 +363,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
def onFontFooterHeightSpinBoxChanged(self):
|
def onFontFooterHeightSpinBoxChanged(self):
|
||||||
if self.theme.font_footer_height != \
|
if self.theme.font_footer_height != \
|
||||||
self.FontFooterHeightSpinBox.value():
|
self.FontFooterHeightSpinBox.value():
|
||||||
self.theme.font_footer_height = self.FontFooterHeightSpinBox.value()
|
self.theme.font_footer_height = \
|
||||||
|
self.FontFooterHeightSpinBox.value()
|
||||||
self.previewTheme(self.theme)
|
self.previewTheme(self.theme)
|
||||||
#
|
#
|
||||||
#Background Tab
|
#Background Tab
|
||||||
@ -502,7 +497,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
# Font Main Tab
|
# Font Main Tab
|
||||||
self.FontMainComboBox.setCurrentFont(
|
self.FontMainComboBox.setCurrentFont(
|
||||||
QtGui.QFont(self.theme.font_main_name))
|
QtGui.QFont(self.theme.font_main_name))
|
||||||
self.FontMainSizeSpinBox.setValue(int(self.theme.font_main_proportion))
|
self.FontMainSizeSpinBox.setValue(self.theme.font_main_proportion)
|
||||||
if not self.theme.font_main_italics and \
|
if not self.theme.font_main_italics and \
|
||||||
self.theme.font_main_weight == u'Normal':
|
self.theme.font_main_weight == u'Normal':
|
||||||
self.FontMainWeightComboBox.setCurrentIndex(0)
|
self.FontMainWeightComboBox.setCurrentIndex(0)
|
||||||
@ -514,16 +509,17 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.FontMainWeightComboBox.setCurrentIndex(2)
|
self.FontMainWeightComboBox.setCurrentIndex(2)
|
||||||
else:
|
else:
|
||||||
self.FontMainWeightComboBox.setCurrentIndex(3)
|
self.FontMainWeightComboBox.setCurrentIndex(3)
|
||||||
self.FontMainLineSpacingSpinBox.setValue(int(self.theme.font_main_indentation))
|
self.FontMainLineSpacingSpinBox.setValue(
|
||||||
self.FontMainXSpinBox.setValue(int(self.theme.font_main_x))
|
self.theme.font_main_indentation)
|
||||||
self.FontMainYSpinBox.setValue(int(self.theme.font_main_y))
|
self.FontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||||
self.FontMainWidthSpinBox.setValue(int(self.theme.font_main_width))
|
self.FontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||||
self.FontMainHeightSpinBox.setValue(int(self.theme.font_main_height))
|
self.FontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||||
|
self.FontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
||||||
# Font Footer Tab
|
# Font Footer Tab
|
||||||
self.FontFooterComboBox.setCurrentFont(
|
self.FontFooterComboBox.setCurrentFont(
|
||||||
QtGui.QFont(self.theme.font_footer_name))
|
QtGui.QFont(self.theme.font_footer_name))
|
||||||
self.FontFooterSizeSpinBox.setValue(
|
self.FontFooterSizeSpinBox.setValue(
|
||||||
int(self.theme.font_footer_proportion))
|
self.theme.font_footer_proportion)
|
||||||
if not self.theme.font_footer_italics and \
|
if not self.theme.font_footer_italics and \
|
||||||
self.theme.font_footer_weight == u'Normal':
|
self.theme.font_footer_weight == u'Normal':
|
||||||
self.FontFooterWeightComboBox.setCurrentIndex(0)
|
self.FontFooterWeightComboBox.setCurrentIndex(0)
|
||||||
@ -535,11 +531,10 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.FontFooterWeightComboBox.setCurrentIndex(2)
|
self.FontFooterWeightComboBox.setCurrentIndex(2)
|
||||||
else:
|
else:
|
||||||
self.FontFooterWeightComboBox.setCurrentIndex(3)
|
self.FontFooterWeightComboBox.setCurrentIndex(3)
|
||||||
self.FontFooterXSpinBox.setValue(int(self.theme.font_footer_x))
|
self.FontFooterXSpinBox.setValue(self.theme.font_footer_x)
|
||||||
self.FontFooterYSpinBox.setValue(int(self.theme.font_footer_y))
|
self.FontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
||||||
self.FontFooterWidthSpinBox.setValue(int(self.theme.font_footer_width))
|
self.FontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
||||||
self.FontFooterHeightSpinBox.setValue(
|
self.FontFooterHeightSpinBox.setValue(self.theme.font_footer_height)
|
||||||
int(self.theme.font_footer_height))
|
|
||||||
self.FontMainColorPushButton.setStyleSheet(
|
self.FontMainColorPushButton.setStyleSheet(
|
||||||
u'background-color: %s' % unicode(theme.font_main_color))
|
u'background-color: %s' % unicode(theme.font_main_color))
|
||||||
self.FontFooterColorPushButton.setStyleSheet(
|
self.FontFooterColorPushButton.setStyleSheet(
|
||||||
@ -575,9 +570,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.ShadowColorPushButton.setEnabled(False)
|
self.ShadowColorPushButton.setEnabled(False)
|
||||||
|
|
||||||
self.HorizontalComboBox.setCurrentIndex(
|
self.HorizontalComboBox.setCurrentIndex(
|
||||||
int(self.theme.display_horizontalAlign))
|
self.theme.display_horizontalAlign)
|
||||||
self.VerticalComboBox.setCurrentIndex(
|
self.VerticalComboBox.setCurrentIndex(self.theme.display_verticalAlign)
|
||||||
int(self.theme.display_verticalAlign))
|
|
||||||
|
|
||||||
def stateChanging(self, theme):
|
def stateChanging(self, theme):
|
||||||
if theme.background_mode == u'transparent':
|
if theme.background_mode == u'transparent':
|
||||||
@ -674,15 +668,18 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
if self.theme.font_main_weight == u'Bold':
|
if self.theme.font_main_weight == u'Bold':
|
||||||
main_weight = 75
|
main_weight = 75
|
||||||
mainFont = QtGui.QFont(self.theme.font_main_name,
|
mainFont = QtGui.QFont(self.theme.font_main_name,
|
||||||
int(self.theme.font_main_proportion), # size
|
self.theme.font_main_proportion, # size
|
||||||
int(main_weight), # weight
|
main_weight, # weight
|
||||||
self.theme.font_main_italics)# italic
|
self.theme.font_main_italics)# italic
|
||||||
mainFont.setPixelSize(int(self.theme.font_main_proportion))
|
mainFont.setPixelSize(self.theme.font_main_proportion)
|
||||||
metrics = QtGui.QFontMetrics(mainFont)
|
metrics = QtGui.QFontMetrics(mainFont)
|
||||||
page_length = (int(self.FontMainHeightSpinBox.value()) / metrics.height() - 2) - 1
|
page_length = \
|
||||||
|
(self.FontMainHeightSpinBox.value() / metrics.height() - 2) - 1
|
||||||
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
|
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
|
||||||
(int(self.FontMainHeightSpinBox.value()), metrics.height(), page_length))
|
(self.FontMainHeightSpinBox.value(), metrics.height(),
|
||||||
|
page_length))
|
||||||
page_length_text = unicode(self.trUtf8(u'Slide Height is %s rows'))
|
page_length_text = unicode(self.trUtf8(u'Slide Height is %s rows'))
|
||||||
self.FontMainLinesPageLabel.setText(page_length_text % page_length)
|
self.FontMainLinesPageLabel.setText(page_length_text % page_length)
|
||||||
frame = self.thememanager.generateImage(theme)
|
frame = self.thememanager.generateImage(theme)
|
||||||
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||||
|
|
||||||
|
@ -100,9 +100,11 @@ class SlideController(QtGui.QWidget):
|
|||||||
# Type label for the top of the slide controller
|
# Type label for the top of the slide controller
|
||||||
self.TypeLabel = QtGui.QLabel(self.Panel)
|
self.TypeLabel = QtGui.QLabel(self.Panel)
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.TypeLabel.setText(u'<strong>%s</strong>' % self.trUtf8(u'Live'))
|
self.TypeLabel.setText(u'<strong>%s</strong>' %
|
||||||
|
self.trUtf8(u'Live'))
|
||||||
else:
|
else:
|
||||||
self.TypeLabel.setText(u'<strong>%s</strong>' % self.trUtf8(u'Preview'))
|
self.TypeLabel.setText(u'<strong>%s</strong>' %
|
||||||
|
self.trUtf8(u'Preview'))
|
||||||
self.TypeLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.TypeLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.PanelLayout.addWidget(self.TypeLabel)
|
self.PanelLayout.addWidget(self.TypeLabel)
|
||||||
# Splitter
|
# Splitter
|
||||||
@ -126,7 +128,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.PreviewListWidget.setColumnWidth(1, self.Controller.width())
|
self.PreviewListWidget.setColumnWidth(1, self.Controller.width())
|
||||||
self.PreviewListWidget.isLive = self.isLive
|
self.PreviewListWidget.isLive = self.isLive
|
||||||
self.PreviewListWidget.setObjectName(u'PreviewListWidget')
|
self.PreviewListWidget.setObjectName(u'PreviewListWidget')
|
||||||
self.PreviewListWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
|
self.PreviewListWidget.setEditTriggers(
|
||||||
|
QtGui.QAbstractItemView.NoEditTriggers)
|
||||||
self.ControllerLayout.addWidget(self.PreviewListWidget)
|
self.ControllerLayout.addWidget(self.PreviewListWidget)
|
||||||
# Build the full toolbar
|
# Build the full toolbar
|
||||||
self.Toolbar = OpenLPToolbar(self)
|
self.Toolbar = OpenLPToolbar(self)
|
||||||
|
@ -475,7 +475,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
#theme.background_type
|
#theme.background_type
|
||||||
if theme.display_display:
|
if theme.display_display:
|
||||||
theme.display_display = theme.display_display.strip()
|
theme.display_display = theme.display_display.strip()
|
||||||
theme.display_horizontalAlign = theme.display_horizontalAlign.strip()
|
theme.display_horizontalAlign = \
|
||||||
|
int(theme.display_horizontalAlign.strip())
|
||||||
theme.display_outline = str_to_bool(theme.display_outline)
|
theme.display_outline = str_to_bool(theme.display_outline)
|
||||||
#theme.display_outline_color
|
#theme.display_outline_color
|
||||||
theme.display_shadow = str_to_bool(theme.display_shadow)
|
theme.display_shadow = str_to_bool(theme.display_shadow)
|
||||||
@ -483,25 +484,27 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
theme.display_verticalAlign = int(theme.display_verticalAlign.strip())
|
theme.display_verticalAlign = int(theme.display_verticalAlign.strip())
|
||||||
theme.display_wrapStyle = theme.display_wrapStyle.strip()
|
theme.display_wrapStyle = theme.display_wrapStyle.strip()
|
||||||
theme.font_footer_color = theme.font_footer_color.strip()
|
theme.font_footer_color = theme.font_footer_color.strip()
|
||||||
theme.font_footer_height = theme.font_footer_height.strip()
|
theme.font_footer_height = int(theme.font_footer_height.strip())
|
||||||
theme.font_footer_italics = str_to_bool(theme.font_footer_italics)
|
theme.font_footer_italics = str_to_bool(theme.font_footer_italics)
|
||||||
theme.font_footer_name = theme.font_footer_name.strip()
|
theme.font_footer_name = theme.font_footer_name.strip()
|
||||||
#theme.font_footer_override
|
#theme.font_footer_override
|
||||||
theme.font_footer_proportion = theme.font_footer_proportion.strip()
|
theme.font_footer_proportion = \
|
||||||
|
int(theme.font_footer_proportion.strip())
|
||||||
theme.font_footer_weight = theme.font_footer_weight.strip()
|
theme.font_footer_weight = theme.font_footer_weight.strip()
|
||||||
theme.font_footer_width = theme.font_footer_width.strip()
|
theme.font_footer_width = int(theme.font_footer_width.strip())
|
||||||
theme.font_footer_x = theme.font_footer_x.strip()
|
theme.font_footer_x = int(theme.font_footer_x.strip())
|
||||||
theme.font_footer_y = theme.font_footer_y.strip()
|
theme.font_footer_y = int(theme.font_footer_y.strip())
|
||||||
theme.font_main_color = theme.font_main_color.strip()
|
theme.font_main_color = theme.font_main_color.strip()
|
||||||
theme.font_main_height = theme.font_main_height.strip()
|
theme.font_main_height = int(theme.font_main_height.strip())
|
||||||
theme.font_main_italics = str_to_bool(theme.font_main_italics)
|
theme.font_main_italics = str_to_bool(theme.font_main_italics)
|
||||||
theme.font_main_indentation = int(theme.font_main_indentation)
|
theme.font_main_indentation = int(theme.font_main_indentation)
|
||||||
theme.font_main_name = theme.font_main_name.strip()
|
theme.font_main_name = theme.font_main_name.strip()
|
||||||
#theme.font_main_override
|
#theme.font_main_override
|
||||||
theme.font_main_proportion = theme.font_main_proportion.strip()
|
theme.font_main_proportion = int(theme.font_main_proportion.strip())
|
||||||
theme.font_main_weight = theme.font_main_weight.strip()
|
theme.font_main_weight = theme.font_main_weight.strip()
|
||||||
theme.font_main_x = theme.font_main_x.strip()
|
theme.font_main_width = int(theme.font_main_width.strip())
|
||||||
theme.font_main_y = theme.font_main_y.strip()
|
theme.font_main_x = int(theme.font_main_x.strip())
|
||||||
|
theme.font_main_y = int(theme.font_main_y.strip())
|
||||||
#theme.theme_mode
|
#theme.theme_mode
|
||||||
theme.theme_name = theme.theme_name.strip()
|
theme.theme_name = theme.theme_name.strip()
|
||||||
#theme.theme_version
|
#theme.theme_version
|
||||||
|
@ -66,7 +66,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
QtCore.QObject.connect(self.VerseAddButton,
|
QtCore.QObject.connect(self.VerseAddButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onVerseAddButtonClicked)
|
QtCore.SIGNAL(u'clicked()'), self.onVerseAddButtonClicked)
|
||||||
QtCore.QObject.connect(self.VerseListWidget,
|
QtCore.QObject.connect(self.VerseListWidget,
|
||||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onVerseEditButtonClicked)
|
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||||
|
self.onVerseEditButtonClicked)
|
||||||
QtCore.QObject.connect(self.VerseEditButton,
|
QtCore.QObject.connect(self.VerseEditButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onVerseEditButtonClicked)
|
QtCore.SIGNAL(u'clicked()'), self.onVerseEditButtonClicked)
|
||||||
QtCore.QObject.connect(self.VerseEditAllButton,
|
QtCore.QObject.connect(self.VerseEditAllButton,
|
||||||
@ -463,7 +464,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.song.search_lyrics = unicode(text)
|
self.song.search_lyrics = unicode(text)
|
||||||
self.song.lyrics = unicode(sxml.extract_xml())
|
self.song.lyrics = unicode(sxml.extract_xml())
|
||||||
except:
|
except:
|
||||||
log.exception(u'Problem processing song Lyrics \n%s', sxml.dump_xml())
|
log.exception(u'Problem processing song Lyrics \n%s',
|
||||||
|
sxml.dump_xml())
|
||||||
|
|
||||||
def processTitle(self):
|
def processTitle(self):
|
||||||
log.debug(u'processTitle')
|
log.debug(u'processTitle')
|
||||||
|
@ -131,7 +131,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'%s_edit' % self.parent.name), self.onRemoteEdit)
|
QtCore.SIGNAL(u'%s_edit' % self.parent.name), self.onRemoteEdit)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'remote_edit_clear' ), self.onRemoteEditClear)
|
QtCore.SIGNAL(u'remote_edit_clear'), self.onRemoteEditClear)
|
||||||
|
|
||||||
def configUpdated(self):
|
def configUpdated(self):
|
||||||
self.searchAsYouType = str_to_bool(
|
self.searchAsYouType = str_to_bool(
|
||||||
@ -322,3 +322,35 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
song.title, author_audit, song.copyright, song.ccli_number
|
song.title, author_audit, song.copyright, song.ccli_number
|
||||||
]
|
]
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def onPreviewClick(self):
|
||||||
|
if not self.remoteTriggered:
|
||||||
|
MediaManagerItem.onPreviewClick(self)
|
||||||
|
else:
|
||||||
|
log.debug(self.PluginNameShort + u' Preview Requested')
|
||||||
|
service_item = self.buildServiceItem()
|
||||||
|
if service_item:
|
||||||
|
service_item.fromPlugin = True
|
||||||
|
self.parent.preview_controller.addServiceItem(service_item)
|
||||||
|
|
||||||
|
def onLiveClick(self):
|
||||||
|
if not self.remoteTriggered:
|
||||||
|
MediaManagerItem.onLiveClick(self)
|
||||||
|
else:
|
||||||
|
log.debug(self.PluginNameShort + u' Live Requested')
|
||||||
|
service_item = self.buildServiceItem()
|
||||||
|
if service_item:
|
||||||
|
service_item.fromPlugin = True
|
||||||
|
service_item.uuid = unicode(uuid.uuid1())
|
||||||
|
self.parent.live_controller.addServiceItem(service_item)
|
||||||
|
|
||||||
|
def onAddClick(self):
|
||||||
|
if not self.remoteTriggered:
|
||||||
|
MediaManagerItem.onAddClick(self)
|
||||||
|
else:
|
||||||
|
log.debug(self.PluginNameShort + u' Add Requested')
|
||||||
|
service_item = self.buildServiceItem()
|
||||||
|
if service_item:
|
||||||
|
service_item.fromPlugin = False
|
||||||
|
service_item.uuid = unicode(uuid.uuid1())
|
||||||
|
self.parent.service_manager.addServiceItem(service_item)
|
||||||
|
Loading…
Reference in New Issue
Block a user