forked from openlp/openlp
commit
3570c5f95f
|
@ -201,4 +201,4 @@ if __name__ == u'__main__':
|
||||||
"""
|
"""
|
||||||
Instantiate and run the application.
|
Instantiate and run the application.
|
||||||
"""
|
"""
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
"""
|
"""
|
||||||
The :mod:`openlp` module contains all the project produced OpenLP functionality
|
The :mod:`openlp` module contains all the project produced OpenLP functionality
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -28,4 +28,4 @@ The :mod:`core` module provides all core application functions
|
||||||
|
|
||||||
All the core functions of the OpenLP application including the GUI, settings,
|
All the core functions of the OpenLP application including the GUI, settings,
|
||||||
logging and a plugin framework are contained within the openlp.core module.
|
logging and a plugin framework are contained within the openlp.core module.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -219,4 +219,4 @@ from theme import ThemeLevel, ThemeXML
|
||||||
from renderer import Renderer
|
from renderer import Renderer
|
||||||
from rendermanager import RenderManager
|
from rendermanager import RenderManager
|
||||||
from mediamanageritem import MediaManagerItem
|
from mediamanageritem import MediaManagerItem
|
||||||
from baselistwithdnd import BaseListWithDnD
|
from baselistwithdnd import BaseListWithDnD
|
||||||
|
|
|
@ -52,4 +52,4 @@ class BaseListWithDnD(QtGui.QListWidget):
|
||||||
mimeData = QtCore.QMimeData()
|
mimeData = QtCore.QMimeData()
|
||||||
drag.setMimeData(mimeData)
|
drag.setMimeData(mimeData)
|
||||||
mimeData.setText(self.PluginName)
|
mimeData.setText(self.PluginName)
|
||||||
drag.start(QtCore.Qt.CopyAction)
|
drag.start(QtCore.Qt.CopyAction)
|
||||||
|
|
|
@ -245,4 +245,4 @@ class Manager(object):
|
||||||
except InvalidRequestError:
|
except InvalidRequestError:
|
||||||
self.session.rollback()
|
self.session.rollback()
|
||||||
log.exception(u'Failed to delete %s records', object_class.__name__)
|
log.exception(u'Failed to delete %s records', object_class.__name__)
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -46,4 +46,4 @@ class OpenLPDockWidget(QtGui.QDockWidget):
|
||||||
if name:
|
if name:
|
||||||
self.setObjectName(name)
|
self.setObjectName(name)
|
||||||
self.setFloating(False)
|
self.setFloating(False)
|
||||||
log.debug(u'Init done')
|
log.debug(u'Init done')
|
||||||
|
|
|
@ -270,4 +270,4 @@ class Receiver(object):
|
||||||
"""
|
"""
|
||||||
Get the global ``eventreceiver`` instance.
|
Get the global ``eventreceiver`` instance.
|
||||||
"""
|
"""
|
||||||
return Receiver.eventreceiver
|
return Receiver.eventreceiver
|
||||||
|
|
|
@ -288,4 +288,4 @@ class Plugin(QtCore.QObject):
|
||||||
``newTheme``
|
``newTheme``
|
||||||
The new name the plugin should now use.
|
The new name the plugin should now use.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -219,4 +219,4 @@ class PluginManager(object):
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.isActive():
|
if plugin.isActive():
|
||||||
plugin.finalise()
|
plugin.finalise()
|
||||||
log.info(u'Finalisation Complete for %s ' % plugin.name)
|
log.info(u'Finalisation Complete for %s ' % plugin.name)
|
||||||
|
|
|
@ -593,4 +593,4 @@ class Renderer(object):
|
||||||
"""
|
"""
|
||||||
image.save(u'renderer.png', u'png')
|
image.save(u'renderer.png', u'png')
|
||||||
if image2:
|
if image2:
|
||||||
image2.save(u'renderer2.png', u'png')
|
image2.save(u'renderer2.png', u'png')
|
||||||
|
|
|
@ -224,4 +224,4 @@ class RenderManager(object):
|
||||||
log.debug(u'calculate default %d, %d, %f',
|
log.debug(u'calculate default %d, %d, %f',
|
||||||
self.width, self.height, self.screen_ratio )
|
self.width, self.height, self.screen_ratio )
|
||||||
# 90% is start of footer
|
# 90% is start of footer
|
||||||
self.footer_start = int(self.height * 0.90)
|
self.footer_start = int(self.height * 0.90)
|
||||||
|
|
|
@ -389,4 +389,4 @@ class ServiceItem(object):
|
||||||
"""
|
"""
|
||||||
Clear's the service item's cache.
|
Clear's the service item's cache.
|
||||||
"""
|
"""
|
||||||
self.cache = {}
|
self.cache = {}
|
||||||
|
|
|
@ -88,4 +88,4 @@ class SettingsTab(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
Changes which need to be made after setup of application
|
Changes which need to be made after setup of application
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -415,4 +415,4 @@ class ThemeXML(object):
|
||||||
for key in dir(self):
|
for key in dir(self):
|
||||||
if key[0:1] != u'_':
|
if key[0:1] != u'_':
|
||||||
theme_strings.append(u'%30s: %s' % (key, getattr(self, key)))
|
theme_strings.append(u'%30s: %s' % (key, getattr(self, key)))
|
||||||
return u'\n'.join(theme_strings)
|
return u'\n'.join(theme_strings)
|
||||||
|
|
|
@ -154,4 +154,4 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||||
push_button.setCheckable(True)
|
push_button.setCheckable(True)
|
||||||
push_button.setFlat(True)
|
push_button.setFlat(True)
|
||||||
self.addWidget(push_button)
|
self.addWidget(push_button)
|
||||||
return push_button
|
return push_button
|
||||||
|
|
|
@ -24,4 +24,4 @@
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from openlp.core.theme.theme import Theme
|
from openlp.core.theme.theme import Theme
|
||||||
|
|
|
@ -222,4 +222,4 @@ class Theme(object):
|
||||||
for key in dir(self):
|
for key in dir(self):
|
||||||
if key[0:1] != u'_':
|
if key[0:1] != u'_':
|
||||||
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
||||||
return u'\n'.join(theme_strings)
|
return u'\n'.join(theme_strings)
|
||||||
|
|
|
@ -60,4 +60,4 @@ from mainwindow import MainWindow
|
||||||
|
|
||||||
__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainWindow',
|
__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainWindow',
|
||||||
'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeManager',
|
'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeManager',
|
||||||
'AmendThemeForm', 'MediaDockManager', 'ServiceItemEditForm']
|
'AmendThemeForm', 'MediaDockManager', 'ServiceItemEditForm']
|
||||||
|
|
|
@ -61,4 +61,4 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
||||||
import webbrowser
|
import webbrowser
|
||||||
url = u'http://www.openlp.org/en/documentation/introduction/' \
|
url = u'http://www.openlp.org/en/documentation/introduction/' \
|
||||||
+ u'contributing.html'
|
+ u'contributing.html'
|
||||||
webbrowser.open_new(url)
|
webbrowser.open_new(url)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -52,102 +52,102 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# define signals
|
# define signals
|
||||||
# Buttons
|
# Buttons
|
||||||
QtCore.QObject.connect(self.Color1PushButton,
|
QtCore.QObject.connect(self.color1PushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onColor1PushButtonClicked)
|
QtCore.SIGNAL(u'pressed()'), self.onColor1PushButtonClicked)
|
||||||
QtCore.QObject.connect(self.Color2PushButton,
|
QtCore.QObject.connect(self.color2PushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onColor2PushButtonClicked)
|
QtCore.SIGNAL(u'pressed()'), self.onColor2PushButtonClicked)
|
||||||
QtCore.QObject.connect(self.FontMainColorPushButton,
|
QtCore.QObject.connect(self.fontMainColorPushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onFontMainColorPushButtonClicked)
|
QtCore.SIGNAL(u'pressed()'), self.onFontMainColorPushButtonClicked)
|
||||||
QtCore.QObject.connect(self.FontFooterColorPushButton,
|
QtCore.QObject.connect(self.fontFooterColorPushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'),
|
QtCore.SIGNAL(u'pressed()'),
|
||||||
self.onFontFooterColorPushButtonClicked)
|
self.onFontFooterColorPushButtonClicked)
|
||||||
QtCore.QObject.connect(self.OutlineColorPushButton,
|
QtCore.QObject.connect(self.outlineColorPushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onOutlineColorPushButtonClicked)
|
QtCore.SIGNAL(u'pressed()'), self.onOutlineColorPushButtonClicked)
|
||||||
QtCore.QObject.connect(self.ShadowColorPushButton,
|
QtCore.QObject.connect(self.shadowColorPushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onShadowColorPushButtonClicked)
|
QtCore.SIGNAL(u'pressed()'), self.onShadowColorPushButtonClicked)
|
||||||
QtCore.QObject.connect(self.ImageToolButton,
|
QtCore.QObject.connect(self.imageToolButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.onImageToolButtonClicked)
|
QtCore.SIGNAL(u'clicked()'), self.onImageToolButtonClicked)
|
||||||
# Combo boxes
|
# Combo boxes
|
||||||
QtCore.QObject.connect(self.BackgroundComboBox,
|
QtCore.QObject.connect(self.backgroundComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onBackgroundComboBoxSelected)
|
QtCore.SIGNAL(u'activated(int)'), self.onBackgroundComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.BackgroundTypeComboBox,
|
QtCore.QObject.connect(self.backgroundTypeComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'),
|
QtCore.SIGNAL(u'activated(int)'),
|
||||||
self.onBackgroundTypeComboBoxSelected)
|
self.onBackgroundTypeComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.GradientComboBox,
|
QtCore.QObject.connect(self.gradientComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onGradientComboBoxSelected)
|
QtCore.SIGNAL(u'activated(int)'), self.onGradientComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.FontMainComboBox,
|
QtCore.QObject.connect(self.fontMainComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onFontMainComboBoxSelected)
|
QtCore.SIGNAL(u'activated(int)'), self.onFontMainComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.FontMainWeightComboBox,
|
QtCore.QObject.connect(self.fontMainWeightComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'),
|
QtCore.SIGNAL(u'activated(int)'),
|
||||||
self.onFontMainWeightComboBoxSelected)
|
self.onFontMainWeightComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.FontFooterComboBox,
|
QtCore.QObject.connect(self.fontFooterComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onFontFooterComboBoxSelected)
|
QtCore.SIGNAL(u'activated(int)'), self.onFontFooterComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.FontFooterWeightComboBox,
|
QtCore.QObject.connect(self.fontFooterWeightComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'),
|
QtCore.SIGNAL(u'activated(int)'),
|
||||||
self.onFontFooterWeightComboBoxSelected)
|
self.onFontFooterWeightComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.HorizontalComboBox,
|
QtCore.QObject.connect(self.horizontalComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onHorizontalComboBoxSelected)
|
QtCore.SIGNAL(u'activated(int)'), self.onHorizontalComboBoxSelected)
|
||||||
QtCore.QObject.connect(self.VerticalComboBox,
|
QtCore.QObject.connect(self.verticalComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onVerticalComboBoxSelected)
|
QtCore.SIGNAL(u'activated(int)'), self.onVerticalComboBoxSelected)
|
||||||
# Spin boxes
|
# Spin boxes
|
||||||
QtCore.QObject.connect(self.FontMainSizeSpinBox,
|
QtCore.QObject.connect(self.fontMainSizeSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainSizeSpinBoxChanged)
|
self.onFontMainSizeSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontFooterSizeSpinBox,
|
QtCore.QObject.connect(self.fontFooterSizeSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontFooterSizeSpinBoxChanged)
|
self.onFontFooterSizeSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontMainXSpinBox,
|
QtCore.QObject.connect(self.fontMainXSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainXSpinBoxChanged)
|
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainXSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontMainYSpinBox,
|
QtCore.QObject.connect(self.fontMainYSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainYSpinBoxChanged)
|
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainYSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontMainWidthSpinBox,
|
QtCore.QObject.connect(self.fontMainWidthSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainWidthSpinBoxChanged)
|
self.onFontMainWidthSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontMainHeightSpinBox,
|
QtCore.QObject.connect(self.fontMainHeightSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainHeightSpinBoxChanged)
|
self.onFontMainHeightSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontMainLineAdjustmentSpinBox,
|
QtCore.QObject.connect(self.fontMainLineAdjustmentSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainLineAdjustmentSpinBoxChanged)
|
self.onFontMainLineAdjustmentSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontMainLineSpacingSpinBox,
|
QtCore.QObject.connect(self.fontMainLineSpacingSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontMainLineSpacingSpinBoxChanged)
|
self.onFontMainLineSpacingSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontFooterXSpinBox,
|
QtCore.QObject.connect(self.fontFooterXSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontFooterXSpinBoxChanged)
|
self.onFontFooterXSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontFooterYSpinBox,
|
QtCore.QObject.connect(self.fontFooterYSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontFooterYSpinBoxChanged)
|
self.onFontFooterYSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontFooterWidthSpinBox,
|
QtCore.QObject.connect(self.fontFooterWidthSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontFooterWidthSpinBoxChanged)
|
self.onFontFooterWidthSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontFooterHeightSpinBox,
|
QtCore.QObject.connect(self.fontFooterHeightSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onFontFooterHeightSpinBoxChanged)
|
self.onFontFooterHeightSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.ShadowSpinBox,
|
QtCore.QObject.connect(self.shadowSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onShadowSpinBoxChanged)
|
self.onShadowSpinBoxChanged)
|
||||||
QtCore.QObject.connect(self.OutlineSpinBox,
|
QtCore.QObject.connect(self.outlineSpinBox,
|
||||||
QtCore.SIGNAL(u'editingFinished()'),
|
QtCore.SIGNAL(u'editingFinished()'),
|
||||||
self.onOutlineSpinBoxChanged)
|
self.onOutlineSpinBoxChanged)
|
||||||
# CheckBoxes
|
# CheckBoxes
|
||||||
QtCore.QObject.connect(self.FontMainDefaultCheckBox,
|
QtCore.QObject.connect(self.fontMainDefaultCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onFontMainDefaultCheckBoxChanged)
|
self.onFontMainDefaultCheckBoxChanged)
|
||||||
QtCore.QObject.connect(self.FontFooterDefaultCheckBox,
|
QtCore.QObject.connect(self.fontFooterDefaultCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onFontFooterDefaultCheckBoxChanged)
|
self.onFontFooterDefaultCheckBoxChanged)
|
||||||
QtCore.QObject.connect(self.OutlineCheckBox,
|
QtCore.QObject.connect(self.outlineCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'), self.onOutlineCheckBoxChanged)
|
QtCore.SIGNAL(u'stateChanged(int)'), self.onOutlineCheckBoxChanged)
|
||||||
QtCore.QObject.connect(self.ShadowCheckBox,
|
QtCore.QObject.connect(self.shadowCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'), self.onShadowCheckBoxChanged)
|
QtCore.SIGNAL(u'stateChanged(int)'), self.onShadowCheckBoxChanged)
|
||||||
QtCore.QObject.connect(self.SlideTransitionCheckBox,
|
QtCore.QObject.connect(self.slideTransitionCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onSlideTransitionCheckBoxChanged)
|
self.onSlideTransitionCheckBoxChanged)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
new_theme = ThemeXML()
|
new_theme = ThemeXML()
|
||||||
theme_name = unicode(self.ThemeNameEdit.text())
|
theme_name = unicode(self.themeNameEdit.text())
|
||||||
new_theme.new_document(theme_name)
|
new_theme.new_document(theme_name)
|
||||||
save_from = None
|
save_from = None
|
||||||
save_to = None
|
save_to = None
|
||||||
|
@ -225,7 +225,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
translate('OpenLP.AmendThemeForm', 'Select Image'), u'',
|
translate('OpenLP.AmendThemeForm', 'Select Image'), u'',
|
||||||
images_filter)
|
images_filter)
|
||||||
if filename:
|
if filename:
|
||||||
self.ImageLineEdit.setText(filename)
|
self.imageLineEdit.setText(filename)
|
||||||
self.theme.background_filename = filename
|
self.theme.background_filename = filename
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
#Main Font Tab
|
#Main Font Tab
|
||||||
#
|
#
|
||||||
def onFontMainComboBoxSelected(self):
|
def onFontMainComboBoxSelected(self):
|
||||||
self.theme.font_main_name = self.FontMainComboBox.currentFont().family()
|
self.theme.font_main_name = self.fontMainComboBox.currentFont().family()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainWeightComboBoxSelected(self, value):
|
def onFontMainWeightComboBoxSelected(self, value):
|
||||||
|
@ -256,13 +256,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
QtGui.QColor(self.theme.font_main_color), self)
|
QtGui.QColor(self.theme.font_main_color), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.font_main_color = new_color.name()
|
self.theme.font_main_color = new_color.name()
|
||||||
self.FontMainColorPushButton.setStyleSheet(
|
self.fontMainColorPushButton.setStyleSheet(
|
||||||
u'background-color: %s' % unicode(self.theme.font_main_color))
|
u'background-color: %s' % unicode(self.theme.font_main_color))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainSizeSpinBoxChanged(self):
|
def onFontMainSizeSpinBoxChanged(self):
|
||||||
if self.theme.font_main_proportion != self.FontMainSizeSpinBox.value():
|
if self.theme.font_main_proportion != self.fontMainSizeSpinBox.value():
|
||||||
self.theme.font_main_proportion = self.FontMainSizeSpinBox.value()
|
self.theme.font_main_proportion = self.fontMainSizeSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainDefaultCheckBoxChanged(self, value):
|
def onFontMainDefaultCheckBoxChanged(self, value):
|
||||||
|
@ -277,49 +277,49 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
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(self.theme.font_main_x)
|
self.fontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||||
self.FontMainYSpinBox.setValue(self.theme.font_main_y)
|
self.fontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||||
self.FontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||||
self.FontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
self.fontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
||||||
self.FontMainLineAdjustmentSpinBox.setValue(
|
self.fontMainLineAdjustmentSpinBox.setValue(
|
||||||
self.theme.font_main_line_adjustment)
|
self.theme.font_main_line_adjustment)
|
||||||
self.FontMainLineSpacingSpinBox.setValue(
|
self.fontMainLineSpacingSpinBox.setValue(
|
||||||
self.theme.font_main_indentation)
|
self.theme.font_main_indentation)
|
||||||
self.stateChanging(self.theme)
|
self.stateChanging(self.theme)
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainXSpinBoxChanged(self):
|
def onFontMainXSpinBoxChanged(self):
|
||||||
if self.theme.font_main_x != self.FontMainXSpinBox.value():
|
if self.theme.font_main_x != self.fontMainXSpinBox.value():
|
||||||
self.theme.font_main_x = self.FontMainXSpinBox.value()
|
self.theme.font_main_x = self.fontMainXSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainYSpinBoxChanged(self):
|
def onFontMainYSpinBoxChanged(self):
|
||||||
if self.theme.font_main_y != self.FontMainYSpinBox.value():
|
if self.theme.font_main_y != self.fontMainYSpinBox.value():
|
||||||
self.theme.font_main_y = self.FontMainYSpinBox.value()
|
self.theme.font_main_y = self.fontMainYSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainWidthSpinBoxChanged(self):
|
def onFontMainWidthSpinBoxChanged(self):
|
||||||
if self.theme.font_main_width != self.FontMainWidthSpinBox.value():
|
if self.theme.font_main_width != self.fontMainWidthSpinBox.value():
|
||||||
self.theme.font_main_width = self.FontMainWidthSpinBox.value()
|
self.theme.font_main_width = self.fontMainWidthSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainLineAdjustmentSpinBoxChanged(self):
|
def onFontMainLineAdjustmentSpinBoxChanged(self):
|
||||||
if self.theme.font_main_line_adjustment != \
|
if self.theme.font_main_line_adjustment != \
|
||||||
self.FontMainLineAdjustmentSpinBox.value():
|
self.fontMainLineAdjustmentSpinBox.value():
|
||||||
self.theme.font_main_line_adjustment = \
|
self.theme.font_main_line_adjustment = \
|
||||||
self.FontMainLineAdjustmentSpinBox.value()
|
self.fontMainLineAdjustmentSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainLineSpacingSpinBoxChanged(self):
|
def onFontMainLineSpacingSpinBoxChanged(self):
|
||||||
if self.theme.font_main_indentation != \
|
if self.theme.font_main_indentation != \
|
||||||
self.FontMainLineSpacingSpinBox.value():
|
self.fontMainLineSpacingSpinBox.value():
|
||||||
self.theme.font_main_indentation = \
|
self.theme.font_main_indentation = \
|
||||||
self.FontMainLineSpacingSpinBox.value()
|
self.fontMainLineSpacingSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainHeightSpinBoxChanged(self):
|
def onFontMainHeightSpinBoxChanged(self):
|
||||||
if self.theme.font_main_height != self.FontMainHeightSpinBox.value():
|
if self.theme.font_main_height != self.fontMainHeightSpinBox.value():
|
||||||
self.theme.font_main_height = self.FontMainHeightSpinBox.value()
|
self.theme.font_main_height = self.fontMainHeightSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -327,7 +327,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
#
|
#
|
||||||
def onFontFooterComboBoxSelected(self):
|
def onFontFooterComboBoxSelected(self):
|
||||||
self.theme.font_footer_name = \
|
self.theme.font_footer_name = \
|
||||||
self.FontFooterComboBox.currentFont().family()
|
self.fontFooterComboBox.currentFont().family()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterWeightComboBoxSelected(self, value):
|
def onFontFooterWeightComboBoxSelected(self, value):
|
||||||
|
@ -350,15 +350,15 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
QtGui.QColor(self.theme.font_footer_color), self)
|
QtGui.QColor(self.theme.font_footer_color), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.font_footer_color = new_color.name()
|
self.theme.font_footer_color = new_color.name()
|
||||||
self.FontFooterColorPushButton.setStyleSheet(
|
self.fontFooterColorPushButton.setStyleSheet(
|
||||||
u'background-color: %s' % unicode(self.theme.font_footer_color))
|
u'background-color: %s' % unicode(self.theme.font_footer_color))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterSizeSpinBoxChanged(self):
|
def onFontFooterSizeSpinBoxChanged(self):
|
||||||
if self.theme.font_footer_proportion != \
|
if self.theme.font_footer_proportion != \
|
||||||
self.FontFooterSizeSpinBox.value():
|
self.fontFooterSizeSpinBox.value():
|
||||||
self.theme.font_footer_proportion = \
|
self.theme.font_footer_proportion = \
|
||||||
self.FontFooterSizeSpinBox.value()
|
self.fontFooterSizeSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterDefaultCheckBoxChanged(self, value):
|
def onFontFooterDefaultCheckBoxChanged(self, value):
|
||||||
|
@ -373,41 +373,41 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
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(self.theme.font_footer_x)
|
||||||
self.FontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
self.fontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
||||||
self.FontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
self.fontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
||||||
self.FontFooterHeightSpinBox.setValue(
|
self.fontFooterHeightSpinBox.setValue(
|
||||||
self.theme.font_footer_height)
|
self.theme.font_footer_height)
|
||||||
self.stateChanging(self.theme)
|
self.stateChanging(self.theme)
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterXSpinBoxChanged(self):
|
def onFontFooterXSpinBoxChanged(self):
|
||||||
if self.theme.font_footer_x != self.FontFooterXSpinBox.value():
|
if self.theme.font_footer_x != self.fontFooterXSpinBox.value():
|
||||||
self.theme.font_footer_x = self.FontFooterXSpinBox.value()
|
self.theme.font_footer_x = self.fontFooterXSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterYSpinBoxChanged(self):
|
def onFontFooterYSpinBoxChanged(self):
|
||||||
if self.theme.font_footer_y != self.FontFooterYSpinBox.value():
|
if self.theme.font_footer_y != self.fontFooterYSpinBox.value():
|
||||||
self.theme.font_footer_y = self.FontFooterYSpinBox.value()
|
self.theme.font_footer_y = self.fontFooterYSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterWidthSpinBoxChanged(self):
|
def onFontFooterWidthSpinBoxChanged(self):
|
||||||
if self.theme.font_footer_width != self.FontFooterWidthSpinBox.value():
|
if self.theme.font_footer_width != self.fontFooterWidthSpinBox.value():
|
||||||
self.theme.font_footer_width = self.FontFooterWidthSpinBox.value()
|
self.theme.font_footer_width = self.fontFooterWidthSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
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.theme.font_footer_height = \
|
||||||
self.FontFooterHeightSpinBox.value()
|
self.fontFooterHeightSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
#
|
#
|
||||||
#Background Tab
|
#Background Tab
|
||||||
#
|
#
|
||||||
def onGradientComboBoxSelected(self, currentIndex):
|
def onGradientComboBoxSelected(self, currentIndex):
|
||||||
self.setBackground(self.BackgroundTypeComboBox.currentIndex(),
|
self.setBackground(self.backgroundTypeComboBox.currentIndex(),
|
||||||
currentIndex)
|
currentIndex)
|
||||||
|
|
||||||
def onBackgroundComboBoxSelected(self, currentIndex):
|
def onBackgroundComboBoxSelected(self, currentIndex):
|
||||||
|
@ -419,14 +419,14 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onBackgroundTypeComboBoxSelected(self, currentIndex):
|
def onBackgroundTypeComboBoxSelected(self, currentIndex):
|
||||||
self.setBackground(currentIndex, self.GradientComboBox.currentIndex())
|
self.setBackground(currentIndex, self.gradientComboBox.currentIndex())
|
||||||
|
|
||||||
def setBackground(self, background, gradient):
|
def setBackground(self, background, gradient):
|
||||||
if background == 0: # Solid
|
if background == 0: # Solid
|
||||||
self.theme.background_type = u'solid'
|
self.theme.background_type = u'solid'
|
||||||
if self.theme.background_color is None:
|
if self.theme.background_color is None:
|
||||||
self.theme.background_color = u'#000000'
|
self.theme.background_color = u'#000000'
|
||||||
self.ImageLineEdit.setText(u'')
|
self.imageLineEdit.setText(u'')
|
||||||
elif background == 1: # Gradient
|
elif background == 1: # Gradient
|
||||||
self.theme.background_type = u'gradient'
|
self.theme.background_type = u'gradient'
|
||||||
if gradient == 0: # Horizontal
|
if gradient == 0: # Horizontal
|
||||||
|
@ -439,7 +439,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
self.theme.background_startColor = u'#000000'
|
self.theme.background_startColor = u'#000000'
|
||||||
if self.theme.background_endColor is None:
|
if self.theme.background_endColor is None:
|
||||||
self.theme.background_endColor = u'#ff0000'
|
self.theme.background_endColor = u'#ff0000'
|
||||||
self.ImageLineEdit.setText(u'')
|
self.imageLineEdit.setText(u'')
|
||||||
else:
|
else:
|
||||||
self.theme.background_type = u'image'
|
self.theme.background_type = u'image'
|
||||||
self.stateChanging(self.theme)
|
self.stateChanging(self.theme)
|
||||||
|
@ -451,14 +451,14 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
QtGui.QColor(self.theme.background_color), self)
|
QtGui.QColor(self.theme.background_color), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.background_color = new_color.name()
|
self.theme.background_color = new_color.name()
|
||||||
self.Color1PushButton.setStyleSheet(u'background-color: %s' %
|
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||||
unicode(self.theme.background_color))
|
unicode(self.theme.background_color))
|
||||||
else:
|
else:
|
||||||
new_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.background_startColor), self)
|
QtGui.QColor(self.theme.background_startColor), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.background_startColor = new_color.name()
|
self.theme.background_startColor = new_color.name()
|
||||||
self.Color1PushButton.setStyleSheet(u'background-color: %s' %
|
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||||
unicode(self.theme.background_startColor))
|
unicode(self.theme.background_startColor))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
QtGui.QColor(self.theme.background_endColor), self)
|
QtGui.QColor(self.theme.background_endColor), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.background_endColor = new_color.name()
|
self.theme.background_endColor = new_color.name()
|
||||||
self.Color2PushButton.setStyleSheet(u'background-color: %s' %
|
self.color2PushButton.setStyleSheet(u'background-color: %s' %
|
||||||
unicode(self.theme.background_endColor))
|
unicode(self.theme.background_endColor))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
|
@ -483,13 +483,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onOutlineSpinBoxChanged(self):
|
def onOutlineSpinBoxChanged(self):
|
||||||
if self.theme.display_outline_size != self.OutlineSpinBox.value():
|
if self.theme.display_outline_size != self.outlineSpinBox.value():
|
||||||
self.theme.display_outline_size = self.OutlineSpinBox.value()
|
self.theme.display_outline_size = self.outlineSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onShadowSpinBoxChanged(self):
|
def onShadowSpinBoxChanged(self):
|
||||||
if self.theme.display_shadow_size != self.ShadowSpinBox.value():
|
if self.theme.display_shadow_size != self.shadowSpinBox.value():
|
||||||
self.theme.display_shadow_size = self.ShadowSpinBox.value()
|
self.theme.display_shadow_size = self.shadowSpinBox.value()
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onOutlineColorPushButtonClicked(self):
|
def onOutlineColorPushButtonClicked(self):
|
||||||
|
@ -497,7 +497,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
QtGui.QColor(self.theme.display_outline_color), self)
|
QtGui.QColor(self.theme.display_outline_color), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.display_outline_color = new_color.name()
|
self.theme.display_outline_color = new_color.name()
|
||||||
self.OutlineColorPushButton.setStyleSheet(u'background-color: %s' %
|
self.outlineColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||||
unicode(self.theme.display_outline_color))
|
unicode(self.theme.display_outline_color))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
|
@ -522,7 +522,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
QtGui.QColor(self.theme.display_shadow_color), self)
|
QtGui.QColor(self.theme.display_shadow_color), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
self.theme.display_shadow_color = new_color.name()
|
self.theme.display_shadow_color = new_color.name()
|
||||||
self.ShadowColorPushButton.setStyleSheet(u'background-color: %s' %
|
self.shadowColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||||
unicode(self.theme.display_shadow_color))
|
unicode(self.theme.display_shadow_color))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
|
@ -541,194 +541,194 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
#
|
#
|
||||||
def paintUi(self, theme):
|
def paintUi(self, theme):
|
||||||
self.stateChanging(theme)
|
self.stateChanging(theme)
|
||||||
self.ThemeNameEdit.setText(self.theme.theme_name)
|
self.themeNameEdit.setText(self.theme.theme_name)
|
||||||
# Background Tab
|
# Background Tab
|
||||||
if self.theme.background_mode == u'opaque':
|
if self.theme.background_mode == u'opaque':
|
||||||
self.BackgroundComboBox.setCurrentIndex(0)
|
self.backgroundComboBox.setCurrentIndex(0)
|
||||||
else:
|
else:
|
||||||
self.BackgroundComboBox.setCurrentIndex(1)
|
self.backgroundComboBox.setCurrentIndex(1)
|
||||||
self.ImageLineEdit.setText(u'')
|
self.imageLineEdit.setText(u'')
|
||||||
if theme.background_type == u'solid':
|
if theme.background_type == u'solid':
|
||||||
self.BackgroundTypeComboBox.setCurrentIndex(0)
|
self.backgroundTypeComboBox.setCurrentIndex(0)
|
||||||
elif theme.background_type == u'gradient':
|
elif theme.background_type == u'gradient':
|
||||||
self.BackgroundTypeComboBox.setCurrentIndex(1)
|
self.backgroundTypeComboBox.setCurrentIndex(1)
|
||||||
else:
|
else:
|
||||||
self.BackgroundTypeComboBox.setCurrentIndex(2)
|
self.backgroundTypeComboBox.setCurrentIndex(2)
|
||||||
self.ImageLineEdit.setText(self.theme.background_filename)
|
self.imageLineEdit.setText(self.theme.background_filename)
|
||||||
if self.theme.background_direction == u'horizontal':
|
if self.theme.background_direction == u'horizontal':
|
||||||
self.GradientComboBox.setCurrentIndex(0)
|
self.gradientComboBox.setCurrentIndex(0)
|
||||||
elif self.theme.background_direction == u'vertical':
|
elif self.theme.background_direction == u'vertical':
|
||||||
self.GradientComboBox.setCurrentIndex(1)
|
self.gradientComboBox.setCurrentIndex(1)
|
||||||
else:
|
else:
|
||||||
self.GradientComboBox.setCurrentIndex(2)
|
self.gradientComboBox.setCurrentIndex(2)
|
||||||
# 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(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)
|
||||||
elif not self.theme.font_main_italics and \
|
elif not self.theme.font_main_italics and \
|
||||||
self.theme.font_main_weight == u'Bold':
|
self.theme.font_main_weight == u'Bold':
|
||||||
self.FontMainWeightComboBox.setCurrentIndex(1)
|
self.fontMainWeightComboBox.setCurrentIndex(1)
|
||||||
elif self.theme.font_main_italics and \
|
elif self.theme.font_main_italics and \
|
||||||
self.theme.font_main_weight == u'Normal':
|
self.theme.font_main_weight == u'Normal':
|
||||||
self.FontMainWeightComboBox.setCurrentIndex(2)
|
self.fontMainWeightComboBox.setCurrentIndex(2)
|
||||||
else:
|
else:
|
||||||
self.FontMainWeightComboBox.setCurrentIndex(3)
|
self.fontMainWeightComboBox.setCurrentIndex(3)
|
||||||
self.FontMainLineSpacingSpinBox.setValue(
|
self.fontMainLineSpacingSpinBox.setValue(
|
||||||
self.theme.font_main_indentation)
|
self.theme.font_main_indentation)
|
||||||
self.FontMainXSpinBox.setValue(self.theme.font_main_x)
|
self.fontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||||
self.FontMainYSpinBox.setValue(self.theme.font_main_y)
|
self.fontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||||
self.FontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||||
self.FontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
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(
|
||||||
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)
|
||||||
elif not self.theme.font_footer_italics and \
|
elif not self.theme.font_footer_italics and \
|
||||||
self.theme.font_footer_weight == u'Bold':
|
self.theme.font_footer_weight == u'Bold':
|
||||||
self.FontFooterWeightComboBox.setCurrentIndex(1)
|
self.fontFooterWeightComboBox.setCurrentIndex(1)
|
||||||
elif self.theme.font_footer_italics and \
|
elif self.theme.font_footer_italics and \
|
||||||
self.theme.font_footer_weight == u'Normal':
|
self.theme.font_footer_weight == u'Normal':
|
||||||
self.FontFooterWeightComboBox.setCurrentIndex(2)
|
self.fontFooterWeightComboBox.setCurrentIndex(2)
|
||||||
else:
|
else:
|
||||||
self.FontFooterWeightComboBox.setCurrentIndex(3)
|
self.fontFooterWeightComboBox.setCurrentIndex(3)
|
||||||
self.FontFooterXSpinBox.setValue(self.theme.font_footer_x)
|
self.fontFooterXSpinBox.setValue(self.theme.font_footer_x)
|
||||||
self.FontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
self.fontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
||||||
self.FontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
self.fontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
||||||
self.FontFooterHeightSpinBox.setValue(self.theme.font_footer_height)
|
self.fontFooterHeightSpinBox.setValue(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(
|
||||||
u'background-color: %s' % unicode(theme.font_footer_color))
|
u'background-color: %s' % unicode(theme.font_footer_color))
|
||||||
if not self.theme.font_main_override:
|
if not self.theme.font_main_override:
|
||||||
self.FontMainDefaultCheckBox.setChecked(True)
|
self.fontMainDefaultCheckBox.setChecked(True)
|
||||||
else:
|
else:
|
||||||
self.FontMainDefaultCheckBox.setChecked(False)
|
self.fontMainDefaultCheckBox.setChecked(False)
|
||||||
if not self.theme.font_footer_override:
|
if not self.theme.font_footer_override:
|
||||||
self.FontFooterDefaultCheckBox.setChecked(True)
|
self.fontFooterDefaultCheckBox.setChecked(True)
|
||||||
else:
|
else:
|
||||||
self.FontFooterDefaultCheckBox.setChecked(False)
|
self.fontFooterDefaultCheckBox.setChecked(False)
|
||||||
self.OutlineColorPushButton.setStyleSheet(
|
self.outlineColorPushButton.setStyleSheet(
|
||||||
u'background-color: %s' % unicode(theme.display_outline_color))
|
u'background-color: %s' % unicode(theme.display_outline_color))
|
||||||
self.ShadowColorPushButton.setStyleSheet(
|
self.shadowColorPushButton.setStyleSheet(
|
||||||
u'background-color: %s' % unicode(theme.display_shadow_color))
|
u'background-color: %s' % unicode(theme.display_shadow_color))
|
||||||
if self.theme.display_outline:
|
if self.theme.display_outline:
|
||||||
self.OutlineCheckBox.setChecked(True)
|
self.outlineCheckBox.setChecked(True)
|
||||||
self.OutlineColorPushButton.setEnabled(True)
|
self.outlineColorPushButton.setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.OutlineCheckBox.setChecked(False)
|
self.outlineCheckBox.setChecked(False)
|
||||||
self.OutlineColorPushButton.setEnabled(False)
|
self.outlineColorPushButton.setEnabled(False)
|
||||||
self.OutlineSpinBox.setValue(int(self.theme.display_outline_size))
|
self.outlineSpinBox.setValue(int(self.theme.display_outline_size))
|
||||||
if self.theme.display_shadow:
|
if self.theme.display_shadow:
|
||||||
self.ShadowCheckBox.setChecked(True)
|
self.shadowCheckBox.setChecked(True)
|
||||||
self.ShadowColorPushButton.setEnabled(True)
|
self.shadowColorPushButton.setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.ShadowCheckBox.setChecked(False)
|
self.shadowCheckBox.setChecked(False)
|
||||||
self.ShadowColorPushButton.setEnabled(False)
|
self.shadowColorPushButton.setEnabled(False)
|
||||||
self.ShadowSpinBox.setValue(int(self.theme.display_shadow_size))
|
self.shadowSpinBox.setValue(int(self.theme.display_shadow_size))
|
||||||
if self.theme.display_slideTransition:
|
if self.theme.display_slideTransition:
|
||||||
self.SlideTransitionCheckBox.setCheckState(QtCore.Qt.Checked)
|
self.slideTransitionCheckBox.setCheckState(QtCore.Qt.Checked)
|
||||||
else:
|
else:
|
||||||
self.SlideTransitionCheckBox.setCheckState(QtCore.Qt.Unchecked)
|
self.slideTransitionCheckBox.setCheckState(QtCore.Qt.Unchecked)
|
||||||
self.HorizontalComboBox.setCurrentIndex(
|
self.horizontalComboBox.setCurrentIndex(
|
||||||
self.theme.display_horizontalAlign)
|
self.theme.display_horizontalAlign)
|
||||||
self.VerticalComboBox.setCurrentIndex(self.theme.display_verticalAlign)
|
self.verticalComboBox.setCurrentIndex(self.theme.display_verticalAlign)
|
||||||
|
|
||||||
def stateChanging(self, theme):
|
def stateChanging(self, theme):
|
||||||
if theme.background_mode == u'transparent':
|
if theme.background_mode == u'transparent':
|
||||||
self.Color1Label.setVisible(False)
|
self.color1Label.setVisible(False)
|
||||||
self.Color1PushButton.setVisible(False)
|
self.color1PushButton.setVisible(False)
|
||||||
self.Color2Label.setVisible(False)
|
self.color2Label.setVisible(False)
|
||||||
self.Color2PushButton.setVisible(False)
|
self.color2PushButton.setVisible(False)
|
||||||
self.ImageLabel.setVisible(False)
|
self.imageLabel.setVisible(False)
|
||||||
self.ImageLineEdit.setVisible(False)
|
self.imageLineEdit.setVisible(False)
|
||||||
self.ImageFilenameWidget.setVisible(False)
|
self.imageFilenameWidget.setVisible(False)
|
||||||
self.GradientLabel.setVisible(False)
|
self.gradientLabel.setVisible(False)
|
||||||
self.GradientComboBox.setVisible(False)
|
self.gradientComboBox.setVisible(False)
|
||||||
self.BackgroundTypeComboBox.setVisible(False)
|
self.backgroundTypeComboBox.setVisible(False)
|
||||||
self.BackgroundTypeLabel.setVisible(False)
|
self.backgroundTypeLabel.setVisible(False)
|
||||||
else:
|
else:
|
||||||
self.BackgroundTypeComboBox.setVisible(True)
|
self.backgroundTypeComboBox.setVisible(True)
|
||||||
self.BackgroundTypeLabel.setVisible(True)
|
self.backgroundTypeLabel.setVisible(True)
|
||||||
if theme.background_type == u'solid':
|
if theme.background_type == u'solid':
|
||||||
self.Color1PushButton.setStyleSheet(
|
self.color1PushButton.setStyleSheet(
|
||||||
u'background-color: %s' % unicode(theme.background_color))
|
u'background-color: %s' % unicode(theme.background_color))
|
||||||
self.Color1Label.setText(
|
self.color1Label.setText(
|
||||||
translate('OpenLP.AmendThemeForm', 'Color:'))
|
translate('OpenLP.AmendThemeForm', 'Color:'))
|
||||||
self.Color1Label.setVisible(True)
|
self.color1Label.setVisible(True)
|
||||||
self.Color1PushButton.setVisible(True)
|
self.color1PushButton.setVisible(True)
|
||||||
self.Color2Label.setVisible(False)
|
self.color2Label.setVisible(False)
|
||||||
self.Color2PushButton.setVisible(False)
|
self.color2PushButton.setVisible(False)
|
||||||
self.ImageLabel.setVisible(False)
|
self.imageLabel.setVisible(False)
|
||||||
self.ImageLineEdit.setVisible(False)
|
self.imageLineEdit.setVisible(False)
|
||||||
self.ImageFilenameWidget.setVisible(False)
|
self.imageFilenameWidget.setVisible(False)
|
||||||
self.GradientLabel.setVisible(False)
|
self.gradientLabel.setVisible(False)
|
||||||
self.GradientComboBox.setVisible(False)
|
self.gradientComboBox.setVisible(False)
|
||||||
elif theme.background_type == u'gradient':
|
elif theme.background_type == u'gradient':
|
||||||
self.Color1PushButton.setStyleSheet(u'background-color: %s' \
|
self.color1PushButton.setStyleSheet(u'background-color: %s' \
|
||||||
% unicode(theme.background_startColor))
|
% unicode(theme.background_startColor))
|
||||||
self.Color2PushButton.setStyleSheet(u'background-color: %s' \
|
self.color2PushButton.setStyleSheet(u'background-color: %s' \
|
||||||
% unicode(theme.background_endColor))
|
% unicode(theme.background_endColor))
|
||||||
self.Color1Label.setText(
|
self.color1Label.setText(
|
||||||
translate('OpenLP.AmendThemeForm', 'First color:'))
|
translate('OpenLP.AmendThemeForm', 'First color:'))
|
||||||
self.Color2Label.setText(
|
self.color2Label.setText(
|
||||||
translate('OpenLP.AmendThemeForm', 'Second color:'))
|
translate('OpenLP.AmendThemeForm', 'Second color:'))
|
||||||
self.Color1Label.setVisible(True)
|
self.color1Label.setVisible(True)
|
||||||
self.Color1PushButton.setVisible(True)
|
self.color1PushButton.setVisible(True)
|
||||||
self.Color2Label.setVisible(True)
|
self.color2Label.setVisible(True)
|
||||||
self.Color2PushButton.setVisible(True)
|
self.color2PushButton.setVisible(True)
|
||||||
self.ImageLabel.setVisible(False)
|
self.imageLabel.setVisible(False)
|
||||||
self.ImageLineEdit.setVisible(False)
|
self.imageLineEdit.setVisible(False)
|
||||||
self.ImageFilenameWidget.setVisible(False)
|
self.imageFilenameWidget.setVisible(False)
|
||||||
self.GradientLabel.setVisible(True)
|
self.gradientLabel.setVisible(True)
|
||||||
self.GradientComboBox.setVisible(True)
|
self.gradientComboBox.setVisible(True)
|
||||||
else: # must be image
|
else: # must be image
|
||||||
self.Color1Label.setVisible(False)
|
self.color1Label.setVisible(False)
|
||||||
self.Color1PushButton.setVisible(False)
|
self.color1PushButton.setVisible(False)
|
||||||
self.Color2Label.setVisible(False)
|
self.color2Label.setVisible(False)
|
||||||
self.Color2PushButton.setVisible(False)
|
self.color2PushButton.setVisible(False)
|
||||||
self.ImageLabel.setVisible(True)
|
self.imageLabel.setVisible(True)
|
||||||
self.ImageLineEdit.setVisible(True)
|
self.imageLineEdit.setVisible(True)
|
||||||
self.ImageFilenameWidget.setVisible(True)
|
self.imageFilenameWidget.setVisible(True)
|
||||||
self.GradientLabel.setVisible(False)
|
self.gradientLabel.setVisible(False)
|
||||||
self.GradientComboBox.setVisible(False)
|
self.gradientComboBox.setVisible(False)
|
||||||
if not theme.font_main_override:
|
if not theme.font_main_override:
|
||||||
self.FontMainXSpinBox.setEnabled(False)
|
self.fontMainXSpinBox.setEnabled(False)
|
||||||
self.FontMainYSpinBox.setEnabled(False)
|
self.fontMainYSpinBox.setEnabled(False)
|
||||||
self.FontMainWidthSpinBox.setEnabled(False)
|
self.fontMainWidthSpinBox.setEnabled(False)
|
||||||
self.FontMainHeightSpinBox.setEnabled(False)
|
self.fontMainHeightSpinBox.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
self.FontMainXSpinBox.setEnabled(True)
|
self.fontMainXSpinBox.setEnabled(True)
|
||||||
self.FontMainYSpinBox.setEnabled(True)
|
self.fontMainYSpinBox.setEnabled(True)
|
||||||
self.FontMainWidthSpinBox.setEnabled(True)
|
self.fontMainWidthSpinBox.setEnabled(True)
|
||||||
self.FontMainHeightSpinBox.setEnabled(True)
|
self.fontMainHeightSpinBox.setEnabled(True)
|
||||||
|
|
||||||
if not theme.font_footer_override:
|
if not theme.font_footer_override:
|
||||||
self.FontFooterXSpinBox.setEnabled(False)
|
self.fontFooterXSpinBox.setEnabled(False)
|
||||||
self.FontFooterYSpinBox.setEnabled(False)
|
self.fontFooterYSpinBox.setEnabled(False)
|
||||||
self.FontFooterWidthSpinBox.setEnabled(False)
|
self.fontFooterWidthSpinBox.setEnabled(False)
|
||||||
self.FontFooterHeightSpinBox.setEnabled(False)
|
self.fontFooterHeightSpinBox.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
self.FontFooterXSpinBox.setEnabled(True)
|
self.fontFooterXSpinBox.setEnabled(True)
|
||||||
self.FontFooterYSpinBox.setEnabled(True)
|
self.fontFooterYSpinBox.setEnabled(True)
|
||||||
self.FontFooterWidthSpinBox.setEnabled(True)
|
self.fontFooterWidthSpinBox.setEnabled(True)
|
||||||
self.FontFooterHeightSpinBox.setEnabled(True)
|
self.fontFooterHeightSpinBox.setEnabled(True)
|
||||||
|
|
||||||
if self.theme.display_outline:
|
if self.theme.display_outline:
|
||||||
self.OutlineColorPushButton.setEnabled(True)
|
self.outlineColorPushButton.setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.OutlineColorPushButton.setEnabled(False)
|
self.outlineColorPushButton.setEnabled(False)
|
||||||
|
|
||||||
if self.theme.display_shadow:
|
if self.theme.display_shadow:
|
||||||
self.ShadowColorPushButton.setEnabled(True)
|
self.shadowColorPushButton.setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.ShadowColorPushButton.setEnabled(False)
|
self.shadowColorPushButton.setEnabled(False)
|
||||||
|
|
||||||
def previewTheme(self):
|
def previewTheme(self):
|
||||||
if self.allowPreview:
|
if self.allowPreview:
|
||||||
|
@ -742,15 +742,15 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
# pixels top/bottom
|
# pixels top/bottom
|
||||||
line_height += 2 * int(self.theme.display_outline_size)
|
line_height += 2 * int(self.theme.display_outline_size)
|
||||||
page_length = \
|
page_length = \
|
||||||
((self.FontMainHeightSpinBox.value()) / line_height )
|
((self.fontMainHeightSpinBox.value()) / line_height )
|
||||||
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
|
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
|
||||||
(self.FontMainHeightSpinBox.value(), metrics.height(),
|
(self.fontMainHeightSpinBox.value(), metrics.height(),
|
||||||
page_length))
|
page_length))
|
||||||
page_length_text = unicode(
|
page_length_text = unicode(
|
||||||
translate('OpenLP.AmendThemeForm', 'Slide height is %s rows.'))
|
translate('OpenLP.AmendThemeForm', '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(self.theme)
|
frame = self.thememanager.generateImage(self.theme)
|
||||||
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
self.themePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||||
|
|
||||||
def _getThemeMetrics(self):
|
def _getThemeMetrics(self):
|
||||||
main_weight = 50
|
main_weight = 50
|
||||||
|
@ -765,5 +765,5 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||||
# Validate that the screen width is big enough to display the text
|
# Validate that the screen width is big enough to display the text
|
||||||
if self.theme.font_main_width < metrics.maxWidth() * 2 + 64:
|
if self.theme.font_main_width < metrics.maxWidth() * 2 + 64:
|
||||||
self.theme.font_main_width = metrics.maxWidth() * 2 + 64
|
self.theme.font_main_width = metrics.maxWidth() * 2 + 64
|
||||||
self.FontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||||
return metrics
|
return metrics
|
||||||
|
|
|
@ -61,96 +61,95 @@ class GeneralTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
self.setObjectName(u'GeneralTab')
|
self.setObjectName(u'GeneralTab')
|
||||||
self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General')
|
self.tabTitleVisible = translate('OpenLP.GeneralTab', 'General')
|
||||||
self.GeneralLayout = QtGui.QHBoxLayout(self)
|
self.generalLayout = QtGui.QHBoxLayout(self)
|
||||||
self.GeneralLayout.setSpacing(8)
|
self.generalLayout.setSpacing(8)
|
||||||
self.GeneralLayout.setMargin(8)
|
self.generalLayout.setMargin(8)
|
||||||
self.GeneralLayout.setObjectName(u'GeneralLayout')
|
self.generalLayout.setObjectName(u'generalLayout')
|
||||||
self.GeneralLeftLayout = QtGui.QVBoxLayout()
|
self.generalLeftLayout = QtGui.QVBoxLayout()
|
||||||
self.GeneralLeftLayout.setObjectName(u'GeneralLeftLayout')
|
self.generalLeftLayout.setObjectName(u'generalLeftLayout')
|
||||||
self.GeneralLeftLayout.setSpacing(8)
|
self.generalLeftLayout.setSpacing(8)
|
||||||
self.GeneralLeftLayout.setMargin(0)
|
self.generalLeftLayout.setMargin(0)
|
||||||
self.GeneralLayout.addLayout(self.GeneralLeftLayout)
|
self.generalLayout.addLayout(self.generalLeftLayout)
|
||||||
self.MonitorGroupBox = QtGui.QGroupBox(self)
|
self.monitorGroupBox = QtGui.QGroupBox(self)
|
||||||
self.MonitorGroupBox.setObjectName(u'MonitorGroupBox')
|
self.monitorGroupBox.setObjectName(u'monitorGroupBox')
|
||||||
self.MonitorLayout = QtGui.QVBoxLayout(self.MonitorGroupBox)
|
self.monitorLayout = QtGui.QVBoxLayout(self.monitorGroupBox)
|
||||||
self.MonitorLayout.setSpacing(8)
|
self.monitorLayout.setSpacing(8)
|
||||||
self.MonitorLayout.setMargin(8)
|
self.monitorLayout.setMargin(8)
|
||||||
self.MonitorLayout.setObjectName(u'MonitorLayout')
|
self.monitorLayout.setObjectName(u'monitorLayout')
|
||||||
self.MonitorLabel = QtGui.QLabel(self.MonitorGroupBox)
|
self.monitorLabel = QtGui.QLabel(self.monitorGroupBox)
|
||||||
self.MonitorLabel.setObjectName(u'MonitorLabel')
|
self.monitorLabel.setObjectName(u'monitorLabel')
|
||||||
self.MonitorLayout.addWidget(self.MonitorLabel)
|
self.monitorLayout.addWidget(self.monitorLabel)
|
||||||
self.MonitorComboBox = QtGui.QComboBox(self.MonitorGroupBox)
|
self.monitorComboBox = QtGui.QComboBox(self.monitorGroupBox)
|
||||||
self.MonitorComboBox.setObjectName(u'MonitorComboBox')
|
self.monitorComboBox.setObjectName(u'monitorComboBox')
|
||||||
self.MonitorLayout.addWidget(self.MonitorComboBox)
|
self.monitorLayout.addWidget(self.monitorComboBox)
|
||||||
self.MonitorLayout.addWidget(self.MonitorComboBox)
|
self.displayOnMonitorCheck = QtGui.QCheckBox(self.monitorGroupBox)
|
||||||
self.DisplayOnMonitorCheck = QtGui.QCheckBox(self.MonitorGroupBox)
|
self.displayOnMonitorCheck.setObjectName(u'monitorComboBox')
|
||||||
self.DisplayOnMonitorCheck.setObjectName(u'MonitorComboBox')
|
self.monitorLayout.addWidget(self.displayOnMonitorCheck)
|
||||||
self.MonitorLayout.addWidget(self.DisplayOnMonitorCheck)
|
self.generalLeftLayout.addWidget(self.monitorGroupBox)
|
||||||
self.GeneralLeftLayout.addWidget(self.MonitorGroupBox)
|
self.startupGroupBox = QtGui.QGroupBox(self)
|
||||||
self.StartupGroupBox = QtGui.QGroupBox(self)
|
self.startupGroupBox.setObjectName(u'startupGroupBox')
|
||||||
self.StartupGroupBox.setObjectName(u'StartupGroupBox')
|
self.startupLayout = QtGui.QVBoxLayout(self.startupGroupBox)
|
||||||
self.StartupLayout = QtGui.QVBoxLayout(self.StartupGroupBox)
|
self.startupLayout.setSpacing(8)
|
||||||
self.StartupLayout.setSpacing(8)
|
self.startupLayout.setMargin(8)
|
||||||
self.StartupLayout.setMargin(8)
|
self.startupLayout.setObjectName(u'startupLayout')
|
||||||
self.StartupLayout.setObjectName(u'StartupLayout')
|
self.warningCheckBox = QtGui.QCheckBox(self.startupGroupBox)
|
||||||
self.WarningCheckBox = QtGui.QCheckBox(self.StartupGroupBox)
|
self.warningCheckBox.setObjectName(u'warningCheckBox')
|
||||||
self.WarningCheckBox.setObjectName(u'WarningCheckBox')
|
self.startupLayout.addWidget(self.warningCheckBox)
|
||||||
self.StartupLayout.addWidget(self.WarningCheckBox)
|
self.autoOpenCheckBox = QtGui.QCheckBox(self.startupGroupBox)
|
||||||
self.AutoOpenCheckBox = QtGui.QCheckBox(self.StartupGroupBox)
|
self.autoOpenCheckBox.setObjectName(u'autoOpenCheckBox')
|
||||||
self.AutoOpenCheckBox.setObjectName(u'AutoOpenCheckBox')
|
self.startupLayout.addWidget(self.autoOpenCheckBox)
|
||||||
self.StartupLayout.addWidget(self.AutoOpenCheckBox)
|
self.showSplashCheckBox = QtGui.QCheckBox(self.startupGroupBox)
|
||||||
self.ShowSplashCheckBox = QtGui.QCheckBox(self.StartupGroupBox)
|
self.showSplashCheckBox.setObjectName(u'showSplashCheckBox')
|
||||||
self.ShowSplashCheckBox.setObjectName(u'ShowSplashCheckBox')
|
self.startupLayout.addWidget(self.showSplashCheckBox)
|
||||||
self.StartupLayout.addWidget(self.ShowSplashCheckBox)
|
self.generalLeftLayout.addWidget(self.startupGroupBox)
|
||||||
self.GeneralLeftLayout.addWidget(self.StartupGroupBox)
|
self.settingsGroupBox = QtGui.QGroupBox(self)
|
||||||
self.SettingsGroupBox = QtGui.QGroupBox(self)
|
self.settingsGroupBox.setObjectName(u'settingsGroupBox')
|
||||||
self.SettingsGroupBox.setObjectName(u'SettingsGroupBox')
|
self.settingsLayout = QtGui.QVBoxLayout(self.settingsGroupBox)
|
||||||
self.SettingsLayout = QtGui.QVBoxLayout(self.SettingsGroupBox)
|
self.settingsLayout.setSpacing(8)
|
||||||
self.SettingsLayout.setSpacing(8)
|
self.settingsLayout.setMargin(8)
|
||||||
self.SettingsLayout.setMargin(8)
|
self.settingsLayout.setObjectName(u'settingsLayout')
|
||||||
self.SettingsLayout.setObjectName(u'SettingsLayout')
|
self.saveCheckServiceCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||||
self.SaveCheckServiceCheckBox = QtGui.QCheckBox(self.SettingsGroupBox)
|
self.saveCheckServiceCheckBox.setObjectName(u'saveCheckServiceCheckBox')
|
||||||
self.SaveCheckServiceCheckBox.setObjectName(u'SaveCheckServiceCheckBox')
|
self.settingsLayout.addWidget(self.saveCheckServiceCheckBox)
|
||||||
self.SettingsLayout.addWidget(self.SaveCheckServiceCheckBox)
|
self.generalLeftLayout.addWidget(self.settingsGroupBox)
|
||||||
self.GeneralLeftLayout.addWidget(self.SettingsGroupBox)
|
self.autoPreviewCheckBox = QtGui.QCheckBox(self.settingsGroupBox)
|
||||||
self.AutoPreviewCheckBox = QtGui.QCheckBox(self.SettingsGroupBox)
|
self.autoPreviewCheckBox.setObjectName(u'autoPreviewCheckBox')
|
||||||
self.AutoPreviewCheckBox.setObjectName(u'AutoPreviewCheckBox')
|
self.settingsLayout.addWidget(self.autoPreviewCheckBox)
|
||||||
self.SettingsLayout.addWidget(self.AutoPreviewCheckBox)
|
self.generalLeftLayout.addWidget(self.settingsGroupBox)
|
||||||
self.GeneralLeftLayout.addWidget(self.SettingsGroupBox)
|
self.generalLeftSpacer = QtGui.QSpacerItem(20, 40,
|
||||||
self.GeneralLeftSpacer = QtGui.QSpacerItem(20, 40,
|
|
||||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||||
self.GeneralLeftLayout.addItem(self.GeneralLeftSpacer)
|
self.generalLeftLayout.addItem(self.generalLeftSpacer)
|
||||||
self.GeneralRightLayout = QtGui.QVBoxLayout()
|
self.generalRightLayout = QtGui.QVBoxLayout()
|
||||||
self.GeneralRightLayout.setSpacing(8)
|
self.generalRightLayout.setSpacing(8)
|
||||||
self.GeneralRightLayout.setMargin(0)
|
self.generalRightLayout.setMargin(0)
|
||||||
self.GeneralRightLayout.setObjectName(u'GeneralRightLayout')
|
self.generalRightLayout.setObjectName(u'generalRightLayout')
|
||||||
self.GeneralLayout.addLayout(self.GeneralRightLayout)
|
self.generalLayout.addLayout(self.generalRightLayout)
|
||||||
self.CCLIGroupBox = QtGui.QGroupBox(self)
|
self.ccliGroupBox = QtGui.QGroupBox(self)
|
||||||
self.CCLIGroupBox.setObjectName(u'CCLIGroupBox')
|
self.ccliGroupBox.setObjectName(u'ccliGroupBox')
|
||||||
self.CCLILayout = QtGui.QGridLayout(self.CCLIGroupBox)
|
self.ccliLayout = QtGui.QGridLayout(self.ccliGroupBox)
|
||||||
self.CCLILayout.setMargin(8)
|
self.ccliLayout.setMargin(8)
|
||||||
self.CCLILayout.setSpacing(8)
|
self.ccliLayout.setSpacing(8)
|
||||||
self.CCLILayout.setObjectName(u'CCLILayout')
|
self.ccliLayout.setObjectName(u'ccliLayout')
|
||||||
self.NumberLabel = QtGui.QLabel(self.CCLIGroupBox)
|
self.numberLabel = QtGui.QLabel(self.ccliGroupBox)
|
||||||
self.NumberLabel.setObjectName(u'NumberLabel')
|
self.numberLabel.setObjectName(u'numberLabel')
|
||||||
self.CCLILayout.addWidget(self.NumberLabel, 0, 0, 1, 1)
|
self.ccliLayout.addWidget(self.numberLabel, 0, 0, 1, 1)
|
||||||
self.NumberEdit = QtGui.QLineEdit(self.CCLIGroupBox)
|
self.numberEdit = QtGui.QLineEdit(self.ccliGroupBox)
|
||||||
self.NumberEdit.setObjectName(u'NumberEdit')
|
self.numberEdit.setObjectName(u'numberEdit')
|
||||||
self.CCLILayout.addWidget(self.NumberEdit, 0, 1, 1, 1)
|
self.ccliLayout.addWidget(self.numberEdit, 0, 1, 1, 1)
|
||||||
self.UsernameLabel = QtGui.QLabel(self.CCLIGroupBox)
|
self.usernameLabel = QtGui.QLabel(self.ccliGroupBox)
|
||||||
self.UsernameLabel.setObjectName(u'UsernameLabel')
|
self.usernameLabel.setObjectName(u'usernameLabel')
|
||||||
self.CCLILayout.addWidget(self.UsernameLabel, 1, 0, 1, 1)
|
self.ccliLayout.addWidget(self.usernameLabel, 1, 0, 1, 1)
|
||||||
self.UsernameEdit = QtGui.QLineEdit(self.CCLIGroupBox)
|
self.usernameEdit = QtGui.QLineEdit(self.ccliGroupBox)
|
||||||
self.UsernameEdit.setObjectName(u'UsernameEdit')
|
self.usernameEdit.setObjectName(u'usernameEdit')
|
||||||
self.CCLILayout.addWidget(self.UsernameEdit, 1, 1, 1, 1)
|
self.ccliLayout.addWidget(self.usernameEdit, 1, 1, 1, 1)
|
||||||
self.PasswordLabel = QtGui.QLabel(self.CCLIGroupBox)
|
self.passwordLabel = QtGui.QLabel(self.ccliGroupBox)
|
||||||
self.PasswordLabel.setObjectName(u'PasswordLabel')
|
self.passwordLabel.setObjectName(u'passwordLabel')
|
||||||
self.CCLILayout.addWidget(self.PasswordLabel, 2, 0, 1, 1)
|
self.ccliLayout.addWidget(self.passwordLabel, 2, 0, 1, 1)
|
||||||
self.PasswordEdit = QtGui.QLineEdit(self.CCLIGroupBox)
|
self.passwordEdit = QtGui.QLineEdit(self.ccliGroupBox)
|
||||||
self.PasswordEdit.setEchoMode(QtGui.QLineEdit.Password)
|
self.passwordEdit.setEchoMode(QtGui.QLineEdit.Password)
|
||||||
self.PasswordEdit.setObjectName(u'PasswordEdit')
|
self.passwordEdit.setObjectName(u'passwordEdit')
|
||||||
self.CCLILayout.addWidget(self.PasswordEdit, 2, 1, 1, 1)
|
self.ccliLayout.addWidget(self.passwordEdit, 2, 1, 1, 1)
|
||||||
self.GeneralRightLayout.addWidget(self.CCLIGroupBox)
|
self.generalRightLayout.addWidget(self.ccliGroupBox)
|
||||||
# Moved here from display tab
|
# Moved here from display tab
|
||||||
self.displayGroupBox = QtGui.QGroupBox(self)
|
self.displayGroupBox = QtGui.QGroupBox(self)
|
||||||
self.displayGroupBox.setObjectName(u'displayGroupBox')
|
self.displayGroupBox.setObjectName(u'displayGroupBox')
|
||||||
|
@ -219,7 +218,7 @@ class GeneralTab(SettingsTab):
|
||||||
self.overrideCheckBox = QtGui.QCheckBox(self.displayGroupBox)
|
self.overrideCheckBox = QtGui.QCheckBox(self.displayGroupBox)
|
||||||
self.overrideCheckBox.setObjectName(u'overrideCheckBox')
|
self.overrideCheckBox.setObjectName(u'overrideCheckBox')
|
||||||
self.displayLayout.addWidget(self.overrideCheckBox)
|
self.displayLayout.addWidget(self.overrideCheckBox)
|
||||||
self.GeneralRightLayout.addWidget(self.displayGroupBox)
|
self.generalRightLayout.addWidget(self.displayGroupBox)
|
||||||
# Custom position
|
# Custom position
|
||||||
self.customLayout = QtGui.QHBoxLayout()
|
self.customLayout = QtGui.QHBoxLayout()
|
||||||
self.customLayout.setSpacing(8)
|
self.customLayout.setSpacing(8)
|
||||||
|
@ -276,9 +275,9 @@ class GeneralTab(SettingsTab):
|
||||||
self.customLayout.addLayout(self.customWidthLayout)
|
self.customLayout.addLayout(self.customWidthLayout)
|
||||||
self.displayLayout.addLayout(self.customLayout)
|
self.displayLayout.addLayout(self.customLayout)
|
||||||
# Bottom spacer
|
# Bottom spacer
|
||||||
self.GeneralRightSpacer = QtGui.QSpacerItem(20, 40,
|
self.generalRightSpacer = QtGui.QSpacerItem(20, 40,
|
||||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||||
self.GeneralRightLayout.addItem(self.GeneralRightSpacer)
|
self.generalRightLayout.addItem(self.generalRightSpacer)
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(self.overrideCheckBox,
|
QtCore.QObject.connect(self.overrideCheckBox,
|
||||||
QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled)
|
QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled)
|
||||||
|
@ -287,33 +286,33 @@ class GeneralTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
Translate the general settings tab to the currently selected language
|
Translate the general settings tab to the currently selected language
|
||||||
"""
|
"""
|
||||||
self.MonitorGroupBox.setTitle(translate('OpenLP.GeneralTab',
|
self.monitorGroupBox.setTitle(translate('OpenLP.GeneralTab',
|
||||||
'Monitors'))
|
'Monitors'))
|
||||||
self.MonitorLabel.setText(translate('OpenLP.GeneralTab',
|
self.monitorLabel.setText(translate('OpenLP.GeneralTab',
|
||||||
'Select monitor for output display:'))
|
'Select monitor for output display:'))
|
||||||
self.DisplayOnMonitorCheck.setText(
|
self.displayOnMonitorCheck.setText(
|
||||||
translate('OpenLP.GeneralTab', 'Display if a single screen'))
|
translate('OpenLP.GeneralTab', 'Display if a single screen'))
|
||||||
self.StartupGroupBox.setTitle(
|
self.startupGroupBox.setTitle(
|
||||||
translate('OpenLP.GeneralTab', 'Application Startup'))
|
translate('OpenLP.GeneralTab', 'Application Startup'))
|
||||||
self.WarningCheckBox.setText(
|
self.warningCheckBox.setText(
|
||||||
translate('OpenLP.GeneralTab', 'Show blank screen warning'))
|
translate('OpenLP.GeneralTab', 'Show blank screen warning'))
|
||||||
self.AutoOpenCheckBox.setText(translate('OpenLP.GeneralTab',
|
self.autoOpenCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||||
'Automatically open the last service'))
|
'Automatically open the last service'))
|
||||||
self.ShowSplashCheckBox.setText(
|
self.showSplashCheckBox.setText(
|
||||||
translate('OpenLP.GeneralTab', 'Show the splash screen'))
|
translate('OpenLP.GeneralTab', 'Show the splash screen'))
|
||||||
self.SettingsGroupBox.setTitle(
|
self.settingsGroupBox.setTitle(
|
||||||
translate('OpenLP.GeneralTab', 'Application Settings'))
|
translate('OpenLP.GeneralTab', 'Application Settings'))
|
||||||
self.SaveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab',
|
self.saveCheckServiceCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||||
'Prompt to save before starting a new service'))
|
'Prompt to save before starting a new service'))
|
||||||
self.AutoPreviewCheckBox.setText(translate('OpenLP.GeneralTab',
|
self.autoPreviewCheckBox.setText(translate('OpenLP.GeneralTab',
|
||||||
'Automatically preview next item in service'))
|
'Automatically preview next item in service'))
|
||||||
self.CCLIGroupBox.setTitle(
|
self.ccliGroupBox.setTitle(
|
||||||
translate('OpenLP.GeneralTab', 'CCLI Details'))
|
translate('OpenLP.GeneralTab', 'CCLI Details'))
|
||||||
self.NumberLabel.setText(
|
self.numberLabel.setText(
|
||||||
translate('OpenLP.GeneralTab', 'CCLI number:'))
|
translate('OpenLP.GeneralTab', 'CCLI number:'))
|
||||||
self.UsernameLabel.setText(
|
self.usernameLabel.setText(
|
||||||
translate('OpenLP.GeneralTab', 'SongSelect username:'))
|
translate('OpenLP.GeneralTab', 'SongSelect username:'))
|
||||||
self.PasswordLabel.setText(
|
self.passwordLabel.setText(
|
||||||
translate('OpenLP.GeneralTab', 'SongSelect password:'))
|
translate('OpenLP.GeneralTab', 'SongSelect password:'))
|
||||||
# Moved from display tab
|
# Moved from display tab
|
||||||
self.displayGroupBox.setTitle(
|
self.displayGroupBox.setTitle(
|
||||||
|
@ -348,24 +347,24 @@ class GeneralTab(SettingsTab):
|
||||||
if screen[u'primary']:
|
if screen[u'primary']:
|
||||||
screen_name = u'%s (%s)' % (screen_name,
|
screen_name = u'%s (%s)' % (screen_name,
|
||||||
translate('OpenLP.GeneralTab', 'primary'))
|
translate('OpenLP.GeneralTab', 'primary'))
|
||||||
self.MonitorComboBox.addItem(screen_name)
|
self.monitorComboBox.addItem(screen_name)
|
||||||
self.NumberEdit.setText(unicode(settings.value(
|
self.numberEdit.setText(unicode(settings.value(
|
||||||
u'ccli number', QtCore.QVariant(u'')).toString()))
|
u'ccli number', QtCore.QVariant(u'')).toString()))
|
||||||
self.UsernameEdit.setText(unicode(settings.value(
|
self.usernameEdit.setText(unicode(settings.value(
|
||||||
u'songselect username', QtCore.QVariant(u'')).toString()))
|
u'songselect username', QtCore.QVariant(u'')).toString()))
|
||||||
self.PasswordEdit.setText(unicode(settings.value(
|
self.passwordEdit.setText(unicode(settings.value(
|
||||||
u'songselect password', QtCore.QVariant(u'')).toString()))
|
u'songselect password', QtCore.QVariant(u'')).toString()))
|
||||||
self.SaveCheckServiceCheckBox.setChecked(settings.value(u'save prompt',
|
self.saveCheckServiceCheckBox.setChecked(settings.value(u'save prompt',
|
||||||
QtCore.QVariant(False)).toBool())
|
QtCore.QVariant(False)).toBool())
|
||||||
self.MonitorComboBox.setCurrentIndex(self.monitorNumber)
|
self.monitorComboBox.setCurrentIndex(self.monitorNumber)
|
||||||
self.DisplayOnMonitorCheck.setChecked(self.screens.display)
|
self.displayOnMonitorCheck.setChecked(self.screens.display)
|
||||||
self.WarningCheckBox.setChecked(settings.value(u'blank warning',
|
self.warningCheckBox.setChecked(settings.value(u'blank warning',
|
||||||
QtCore.QVariant(False)).toBool())
|
QtCore.QVariant(False)).toBool())
|
||||||
self.AutoOpenCheckBox.setChecked(settings.value(u'auto open',
|
self.autoOpenCheckBox.setChecked(settings.value(u'auto open',
|
||||||
QtCore.QVariant(False)).toBool())
|
QtCore.QVariant(False)).toBool())
|
||||||
self.ShowSplashCheckBox.setChecked(settings.value(u'show splash',
|
self.showSplashCheckBox.setChecked(settings.value(u'show splash',
|
||||||
QtCore.QVariant(True)).toBool())
|
QtCore.QVariant(True)).toBool())
|
||||||
self.AutoPreviewCheckBox.setChecked(settings.value(u'auto preview',
|
self.autoPreviewCheckBox.setChecked(settings.value(u'auto preview',
|
||||||
QtCore.QVariant(False)).toBool())
|
QtCore.QVariant(False)).toBool())
|
||||||
self.currentXValueLabel.setText(
|
self.currentXValueLabel.setText(
|
||||||
unicode(self.screens.current[u'size'].x()))
|
unicode(self.screens.current[u'size'].x()))
|
||||||
|
@ -402,34 +401,34 @@ class GeneralTab(SettingsTab):
|
||||||
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.customHeightValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customHeightValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.customWidthValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customWidthValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.override_changed = False
|
self.overrideChanged = False
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
"""
|
"""
|
||||||
Save the settings from the form
|
Save the settings from the form
|
||||||
"""
|
"""
|
||||||
self.monitorNumber = self.MonitorComboBox.currentIndex()
|
self.monitorNumber = self.monitorComboBox.currentIndex()
|
||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
settings.beginGroup(self.settingsSection)
|
settings.beginGroup(self.settingsSection)
|
||||||
settings.setValue(u'monitor', QtCore.QVariant(self.monitorNumber))
|
settings.setValue(u'monitor', QtCore.QVariant(self.monitorNumber))
|
||||||
settings.setValue(u'display on monitor',
|
settings.setValue(u'display on monitor',
|
||||||
QtCore.QVariant(self.DisplayOnMonitorCheck.isChecked()))
|
QtCore.QVariant(self.displayOnMonitorCheck.isChecked()))
|
||||||
settings.setValue(u'blank warning',
|
settings.setValue(u'blank warning',
|
||||||
QtCore.QVariant(self.WarningCheckBox.isChecked()))
|
QtCore.QVariant(self.warningCheckBox.isChecked()))
|
||||||
settings.setValue(u'auto open',
|
settings.setValue(u'auto open',
|
||||||
QtCore.QVariant(self.AutoOpenCheckBox.isChecked()))
|
QtCore.QVariant(self.autoOpenCheckBox.isChecked()))
|
||||||
settings.setValue(u'show splash',
|
settings.setValue(u'show splash',
|
||||||
QtCore.QVariant(self.ShowSplashCheckBox.isChecked()))
|
QtCore.QVariant(self.showSplashCheckBox.isChecked()))
|
||||||
settings.setValue(u'save prompt',
|
settings.setValue(u'save prompt',
|
||||||
QtCore.QVariant(self.SaveCheckServiceCheckBox.isChecked()))
|
QtCore.QVariant(self.saveCheckServiceCheckBox.isChecked()))
|
||||||
settings.setValue(u'auto preview',
|
settings.setValue(u'auto preview',
|
||||||
QtCore.QVariant(self.AutoPreviewCheckBox.isChecked()))
|
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
|
||||||
settings.setValue(u'ccli number',
|
settings.setValue(u'ccli number',
|
||||||
QtCore.QVariant(self.NumberEdit.displayText()))
|
QtCore.QVariant(self.numberEdit.displayText()))
|
||||||
settings.setValue(u'songselect username',
|
settings.setValue(u'songselect username',
|
||||||
QtCore.QVariant(self.UsernameEdit.displayText()))
|
QtCore.QVariant(self.usernameEdit.displayText()))
|
||||||
settings.setValue(u'songselect password',
|
settings.setValue(u'songselect password',
|
||||||
QtCore.QVariant(self.PasswordEdit.displayText()))
|
QtCore.QVariant(self.passwordEdit.displayText()))
|
||||||
settings.setValue(u'x position',
|
settings.setValue(u'x position',
|
||||||
QtCore.QVariant(self.customXValueEdit.text()))
|
QtCore.QVariant(self.customXValueEdit.text()))
|
||||||
settings.setValue(u'y position',
|
settings.setValue(u'y position',
|
||||||
|
@ -441,7 +440,7 @@ class GeneralTab(SettingsTab):
|
||||||
settings.setValue(u'override position',
|
settings.setValue(u'override position',
|
||||||
QtCore.QVariant(self.overrideCheckBox.isChecked()))
|
QtCore.QVariant(self.overrideCheckBox.isChecked()))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.screens.display = self.DisplayOnMonitorCheck.isChecked()
|
self.screens.display = self.displayOnMonitorCheck.isChecked()
|
||||||
#Monitor Number has changed.
|
#Monitor Number has changed.
|
||||||
if self.screens.monitor_number != self.monitorNumber:
|
if self.screens.monitor_number != self.monitorNumber:
|
||||||
self.screens.monitor_number = self.monitorNumber
|
self.screens.monitor_number = self.monitorNumber
|
||||||
|
@ -474,4 +473,4 @@ class GeneralTab(SettingsTab):
|
||||||
self.customYValueEdit.setEnabled(checked)
|
self.customYValueEdit.setEnabled(checked)
|
||||||
self.customHeightValueEdit.setEnabled(checked)
|
self.customHeightValueEdit.setEnabled(checked)
|
||||||
self.customWidthValueEdit.setEnabled(checked)
|
self.customWidthValueEdit.setEnabled(checked)
|
||||||
self.override_changed = True
|
self.overrideChanged = True
|
||||||
|
|
|
@ -708,4 +708,4 @@ class AudioPlayer(QtCore.QObject):
|
||||||
Clean up the Object queue
|
Clean up the Object queue
|
||||||
"""
|
"""
|
||||||
log.debug(u'AudioPlayer Reached end of media playlist')
|
log.debug(u'AudioPlayer Reached end of media playlist')
|
||||||
self.mediaObject.clearQueue()
|
self.mediaObject.clearQueue()
|
||||||
|
|
|
@ -80,4 +80,4 @@ class MediaDockManager(object):
|
||||||
if self.media_dock.widget(dock_index).settingsSection == \
|
if self.media_dock.widget(dock_index).settingsSection == \
|
||||||
name.lower():
|
name.lower():
|
||||||
self.media_dock.widget(dock_index).hide()
|
self.media_dock.widget(dock_index).hide()
|
||||||
self.media_dock.removeItem(dock_index)
|
self.media_dock.removeItem(dock_index)
|
||||||
|
|
|
@ -28,91 +28,91 @@ from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
|
|
||||||
class Ui_PluginViewDialog(object):
|
class Ui_PluginViewDialog(object):
|
||||||
def setupUi(self, PluginViewDialog):
|
def setupUi(self, pluginViewDialog):
|
||||||
PluginViewDialog.setObjectName(u'PluginViewDialog')
|
pluginViewDialog.setObjectName(u'pluginViewDialog')
|
||||||
PluginViewDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
pluginViewDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||||
PluginViewDialog.resize(554, 344)
|
pluginViewDialog.resize(554, 344)
|
||||||
self.PluginLayout = QtGui.QVBoxLayout(PluginViewDialog)
|
self.pluginLayout = QtGui.QVBoxLayout(pluginViewDialog)
|
||||||
self.PluginLayout.setSpacing(8)
|
self.pluginLayout.setSpacing(8)
|
||||||
self.PluginLayout.setMargin(8)
|
self.pluginLayout.setMargin(8)
|
||||||
self.PluginLayout.setObjectName(u'PluginLayout')
|
self.pluginLayout.setObjectName(u'pluginLayout')
|
||||||
self.ListLayout = QtGui.QHBoxLayout()
|
self.listLayout = QtGui.QHBoxLayout()
|
||||||
self.ListLayout.setSpacing(8)
|
self.listLayout.setSpacing(8)
|
||||||
self.ListLayout.setObjectName(u'ListLayout')
|
self.listLayout.setObjectName(u'listLayout')
|
||||||
self.PluginListWidget = QtGui.QListWidget(PluginViewDialog)
|
self.pluginListWidget = QtGui.QListWidget(pluginViewDialog)
|
||||||
sizePolicy = QtGui.QSizePolicy(
|
sizePolicy = QtGui.QSizePolicy(
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(
|
||||||
self.PluginListWidget.sizePolicy().hasHeightForWidth())
|
self.pluginListWidget.sizePolicy().hasHeightForWidth())
|
||||||
self.PluginListWidget.setSizePolicy(sizePolicy)
|
self.pluginListWidget.setSizePolicy(sizePolicy)
|
||||||
self.PluginListWidget.setMaximumSize(QtCore.QSize(192, 16777215))
|
self.pluginListWidget.setMaximumSize(QtCore.QSize(192, 16777215))
|
||||||
self.PluginListWidget.setObjectName(u'PluginListWidget')
|
self.pluginListWidget.setObjectName(u'pluginListWidget')
|
||||||
self.ListLayout.addWidget(self.PluginListWidget)
|
self.listLayout.addWidget(self.pluginListWidget)
|
||||||
self.PluginInfoGroupBox = QtGui.QGroupBox(PluginViewDialog)
|
self.pluginInfoGroupBox = QtGui.QGroupBox(pluginViewDialog)
|
||||||
self.PluginInfoGroupBox.setAlignment(
|
self.pluginInfoGroupBox.setAlignment(
|
||||||
QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||||
self.PluginInfoGroupBox.setFlat(False)
|
self.pluginInfoGroupBox.setFlat(False)
|
||||||
self.PluginInfoGroupBox.setObjectName(u'PluginInfoGroupBox')
|
self.pluginInfoGroupBox.setObjectName(u'pluginInfoGroupBox')
|
||||||
self.PluginInfoLayout = QtGui.QFormLayout(self.PluginInfoGroupBox)
|
self.pluginInfoLayout = QtGui.QFormLayout(self.pluginInfoGroupBox)
|
||||||
self.PluginInfoLayout.setMargin(8)
|
self.pluginInfoLayout.setMargin(8)
|
||||||
self.PluginInfoLayout.setSpacing(8)
|
self.pluginInfoLayout.setSpacing(8)
|
||||||
self.PluginInfoLayout.setObjectName(u'PluginInfoLayout')
|
self.pluginInfoLayout.setObjectName(u'pluginInfoLayout')
|
||||||
self.VersionLabel = QtGui.QLabel(self.PluginInfoGroupBox)
|
self.versionLabel = QtGui.QLabel(self.pluginInfoGroupBox)
|
||||||
self.VersionLabel.setObjectName(u'VersionLabel')
|
self.versionLabel.setObjectName(u'versionLabel')
|
||||||
self.PluginInfoLayout.setWidget(
|
self.pluginInfoLayout.setWidget(
|
||||||
1, QtGui.QFormLayout.LabelRole, self.VersionLabel)
|
1, QtGui.QFormLayout.LabelRole, self.versionLabel)
|
||||||
self.VersionNumberLabel = QtGui.QLabel(self.PluginInfoGroupBox)
|
self.versionNumberLabel = QtGui.QLabel(self.pluginInfoGroupBox)
|
||||||
self.VersionNumberLabel.setObjectName(u'VersionNumberLabel')
|
self.versionNumberLabel.setObjectName(u'versionNumberLabel')
|
||||||
self.PluginInfoLayout.setWidget(
|
self.pluginInfoLayout.setWidget(
|
||||||
1, QtGui.QFormLayout.FieldRole, self.VersionNumberLabel)
|
1, QtGui.QFormLayout.FieldRole, self.versionNumberLabel)
|
||||||
self.AboutLabel = QtGui.QLabel(self.PluginInfoGroupBox)
|
self.aboutLabel = QtGui.QLabel(self.pluginInfoGroupBox)
|
||||||
self.AboutLabel.setObjectName(u'AboutLabel')
|
self.aboutLabel.setObjectName(u'aboutLabel')
|
||||||
self.PluginInfoLayout.setWidget(
|
self.pluginInfoLayout.setWidget(
|
||||||
2, QtGui.QFormLayout.LabelRole, self.AboutLabel)
|
2, QtGui.QFormLayout.LabelRole, self.aboutLabel)
|
||||||
self.StatusLabel = QtGui.QLabel(self.PluginInfoGroupBox)
|
self.statusLabel = QtGui.QLabel(self.pluginInfoGroupBox)
|
||||||
self.StatusLabel.setObjectName(u'StatusLabel')
|
self.statusLabel.setObjectName(u'statusLabel')
|
||||||
self.PluginInfoLayout.setWidget(
|
self.pluginInfoLayout.setWidget(
|
||||||
0, QtGui.QFormLayout.LabelRole, self.StatusLabel)
|
0, QtGui.QFormLayout.LabelRole, self.statusLabel)
|
||||||
self.StatusComboBox = QtGui.QComboBox(self.PluginInfoGroupBox)
|
self.statusComboBox = QtGui.QComboBox(self.pluginInfoGroupBox)
|
||||||
self.StatusComboBox.setObjectName(u'StatusComboBox')
|
self.statusComboBox.setObjectName(u'statusComboBox')
|
||||||
self.StatusComboBox.addItem(QtCore.QString())
|
self.statusComboBox.addItem(QtCore.QString())
|
||||||
self.StatusComboBox.addItem(QtCore.QString())
|
self.statusComboBox.addItem(QtCore.QString())
|
||||||
self.PluginInfoLayout.setWidget(
|
self.pluginInfoLayout.setWidget(
|
||||||
0, QtGui.QFormLayout.FieldRole, self.StatusComboBox)
|
0, QtGui.QFormLayout.FieldRole, self.statusComboBox)
|
||||||
self.AboutTextBrowser = QtGui.QTextBrowser(self.PluginInfoGroupBox)
|
self.aboutTextBrowser = QtGui.QTextBrowser(self.pluginInfoGroupBox)
|
||||||
self.AboutTextBrowser.setTextInteractionFlags(
|
self.aboutTextBrowser.setTextInteractionFlags(
|
||||||
QtCore.Qt.LinksAccessibleByMouse)
|
QtCore.Qt.LinksAccessibleByMouse)
|
||||||
self.AboutTextBrowser.setObjectName(u'AboutTextBrowser')
|
self.aboutTextBrowser.setObjectName(u'aboutTextBrowser')
|
||||||
self.PluginInfoLayout.setWidget(
|
self.pluginInfoLayout.setWidget(
|
||||||
2, QtGui.QFormLayout.FieldRole, self.AboutTextBrowser)
|
2, QtGui.QFormLayout.FieldRole, self.aboutTextBrowser)
|
||||||
self.ListLayout.addWidget(self.PluginInfoGroupBox)
|
self.listLayout.addWidget(self.pluginInfoGroupBox)
|
||||||
self.PluginLayout.addLayout(self.ListLayout)
|
self.pluginLayout.addLayout(self.listLayout)
|
||||||
self.PluginListButtonBox = QtGui.QDialogButtonBox(PluginViewDialog)
|
self.pluginListButtonBox = QtGui.QDialogButtonBox(pluginViewDialog)
|
||||||
self.PluginListButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
|
self.pluginListButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
|
||||||
self.PluginListButtonBox.setObjectName(u'PluginListButtonBox')
|
self.pluginListButtonBox.setObjectName(u'pluginListButtonBox')
|
||||||
self.PluginLayout.addWidget(self.PluginListButtonBox)
|
self.pluginLayout.addWidget(self.pluginListButtonBox)
|
||||||
|
|
||||||
self.retranslateUi(PluginViewDialog)
|
self.retranslateUi(pluginViewDialog)
|
||||||
QtCore.QObject.connect(self.PluginListButtonBox,
|
QtCore.QObject.connect(self.pluginListButtonBox,
|
||||||
QtCore.SIGNAL(u'accepted()'), PluginViewDialog.close)
|
QtCore.SIGNAL(u'accepted()'), pluginViewDialog.close)
|
||||||
QtCore.QMetaObject.connectSlotsByName(PluginViewDialog)
|
QtCore.QMetaObject.connectSlotsByName(pluginViewDialog)
|
||||||
|
|
||||||
def retranslateUi(self, PluginViewDialog):
|
def retranslateUi(self, pluginViewDialog):
|
||||||
PluginViewDialog.setWindowTitle(
|
pluginViewDialog.setWindowTitle(
|
||||||
translate('OpenLP.PluginForm', 'Plugin List'))
|
translate('OpenLP.PluginForm', 'Plugin List'))
|
||||||
self.PluginInfoGroupBox.setTitle(
|
self.pluginInfoGroupBox.setTitle(
|
||||||
translate('OpenLP.PluginForm', 'Plugin Details'))
|
translate('OpenLP.PluginForm', 'Plugin Details'))
|
||||||
self.VersionLabel.setText(
|
self.versionLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'Version:'))
|
translate('OpenLP.PluginForm', 'Version:'))
|
||||||
self.VersionNumberLabel.setText(
|
self.versionNumberLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'TextLabel'))
|
translate('OpenLP.PluginForm', 'TextLabel'))
|
||||||
self.AboutLabel.setText(
|
self.aboutLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'About:'))
|
translate('OpenLP.PluginForm', 'About:'))
|
||||||
self.StatusLabel.setText(
|
self.statusLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'Status:'))
|
translate('OpenLP.PluginForm', 'Status:'))
|
||||||
self.StatusComboBox.setItemText(0,
|
self.statusComboBox.setItemText(0,
|
||||||
translate('OpenLP.PluginForm', 'Active'))
|
translate('OpenLP.PluginForm', 'Active'))
|
||||||
self.StatusComboBox.setItemText(1,
|
self.statusComboBox.setItemText(1,
|
||||||
translate('OpenLP.PluginForm', 'Inactive'))
|
translate('OpenLP.PluginForm', 'Inactive'))
|
||||||
|
|
|
@ -45,11 +45,11 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
self._clearDetails()
|
self._clearDetails()
|
||||||
# Right, now let's put some signals and slots together!
|
# Right, now let's put some signals and slots together!
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
self.PluginListWidget,
|
self.pluginListWidget,
|
||||||
QtCore.SIGNAL(u'itemSelectionChanged()'),
|
QtCore.SIGNAL(u'itemSelectionChanged()'),
|
||||||
self.onPluginListWidgetSelectionChanged)
|
self.onPluginListWidgetSelectionChanged)
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
self.StatusComboBox,
|
self.statusComboBox,
|
||||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||||
self.onStatusComboBoxChanged)
|
self.onStatusComboBoxChanged)
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
"""
|
"""
|
||||||
Load the plugin details into the screen
|
Load the plugin details into the screen
|
||||||
"""
|
"""
|
||||||
self.PluginListWidget.clear()
|
self.pluginListWidget.clear()
|
||||||
for plugin in self.parent.plugin_manager.plugins:
|
for plugin in self.parent.plugin_manager.plugins:
|
||||||
item = QtGui.QListWidgetItem(self.PluginListWidget)
|
item = QtGui.QListWidgetItem(self.pluginListWidget)
|
||||||
# We do this just to make 100% sure the status is an integer as
|
# We do this just to make 100% sure the status is an integer as
|
||||||
# sometimes when it's loaded from the config, it isn't cast to int.
|
# sometimes when it's loaded from the config, it isn't cast to int.
|
||||||
plugin.status = int(plugin.status)
|
plugin.status = int(plugin.status)
|
||||||
|
@ -79,31 +79,31 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
# If the plugin has an icon, set it!
|
# If the plugin has an icon, set it!
|
||||||
if plugin.icon:
|
if plugin.icon:
|
||||||
item.setIcon(plugin.icon)
|
item.setIcon(plugin.icon)
|
||||||
self.PluginListWidget.addItem(item)
|
self.pluginListWidget.addItem(item)
|
||||||
|
|
||||||
def _clearDetails(self):
|
def _clearDetails(self):
|
||||||
self.StatusComboBox.setCurrentIndex(-1)
|
self.statusComboBox.setCurrentIndex(-1)
|
||||||
self.VersionNumberLabel.setText(u'')
|
self.versionNumberLabel.setText(u'')
|
||||||
self.AboutTextBrowser.setHtml(u'')
|
self.aboutTextBrowser.setHtml(u'')
|
||||||
self.StatusComboBox.setEnabled(False)
|
self.statusComboBox.setEnabled(False)
|
||||||
|
|
||||||
def _setDetails(self):
|
def _setDetails(self):
|
||||||
log.debug('PluginStatus: %s', str(self.activePlugin.status))
|
log.debug('PluginStatus: %s', str(self.activePlugin.status))
|
||||||
self.VersionNumberLabel.setText(self.activePlugin.version)
|
self.versionNumberLabel.setText(self.activePlugin.version)
|
||||||
self.AboutTextBrowser.setHtml(self.activePlugin.about())
|
self.aboutTextBrowser.setHtml(self.activePlugin.about())
|
||||||
self.programaticChange = True
|
self.programaticChange = True
|
||||||
status = 1
|
status = 1
|
||||||
if self.activePlugin.status == PluginStatus.Active:
|
if self.activePlugin.status == PluginStatus.Active:
|
||||||
status = 0
|
status = 0
|
||||||
self.StatusComboBox.setCurrentIndex(status)
|
self.statusComboBox.setCurrentIndex(status)
|
||||||
self.StatusComboBox.setEnabled(True)
|
self.statusComboBox.setEnabled(True)
|
||||||
self.programaticChange = False
|
self.programaticChange = False
|
||||||
|
|
||||||
def onPluginListWidgetSelectionChanged(self):
|
def onPluginListWidgetSelectionChanged(self):
|
||||||
if self.PluginListWidget.currentItem() is None:
|
if self.pluginListWidget.currentItem() is None:
|
||||||
self._clearDetails()
|
self._clearDetails()
|
||||||
return
|
return
|
||||||
plugin_name = self.PluginListWidget.currentItem().text().split(u' ')[0]
|
plugin_name = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||||
self.activePlugin = None
|
self.activePlugin = None
|
||||||
for plugin in self.parent.plugin_manager.plugins:
|
for plugin in self.parent.plugin_manager.plugins:
|
||||||
if plugin.name == plugin_name:
|
if plugin.name == plugin_name:
|
||||||
|
@ -134,5 +134,5 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||||
elif self.activePlugin.status == PluginStatus.Disabled:
|
elif self.activePlugin.status == PluginStatus.Disabled:
|
||||||
status_text = unicode(
|
status_text = unicode(
|
||||||
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
||||||
self.PluginListWidget.currentItem().setText(
|
self.pluginListWidget.currentItem().setText(
|
||||||
status_text % self.activePlugin.name)
|
status_text % self.activePlugin.name)
|
||||||
|
|
|
@ -99,4 +99,4 @@ class ScreenList(object):
|
||||||
user wants to use the correct screen attributes
|
user wants to use the correct screen attributes
|
||||||
"""
|
"""
|
||||||
log.debug(u'reset_current_display')
|
log.debug(u'reset_current_display')
|
||||||
self.set_current_display(self.current_display)
|
self.set_current_display(self.current_display)
|
||||||
|
|
|
@ -28,10 +28,10 @@ from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
|
|
||||||
class Ui_ServiceItemEditDialog(object):
|
class Ui_ServiceItemEditDialog(object):
|
||||||
def setupUi(self, ServiceItemEditDialog):
|
def setupUi(self, serviceItemEditDialog):
|
||||||
ServiceItemEditDialog.setObjectName(u'ServiceItemEditDialog')
|
serviceItemEditDialog.setObjectName(u'serviceItemEditDialog')
|
||||||
ServiceItemEditDialog.resize(386, 272)
|
serviceItemEditDialog.resize(386, 272)
|
||||||
self.layoutWidget = QtGui.QWidget(ServiceItemEditDialog)
|
self.layoutWidget = QtGui.QWidget(serviceItemEditDialog)
|
||||||
self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 351, 241))
|
self.layoutWidget.setGeometry(QtCore.QRect(20, 20, 351, 241))
|
||||||
self.layoutWidget.setObjectName(u'layoutWidget')
|
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||||
self.outerLayout = QtGui.QVBoxLayout(self.layoutWidget)
|
self.outerLayout = QtGui.QVBoxLayout(self.layoutWidget)
|
||||||
|
@ -47,8 +47,8 @@ class Ui_ServiceItemEditDialog(object):
|
||||||
self.upButton = QtGui.QPushButton(self.layoutWidget)
|
self.upButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.upButton.setObjectName(u'upButton')
|
self.upButton.setObjectName(u'upButton')
|
||||||
self.buttonLayout.addWidget(self.upButton)
|
self.buttonLayout.addWidget(self.upButton)
|
||||||
spacerItem = QtGui.QSpacerItem(20, 40,
|
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
self.buttonLayout.addItem(spacerItem)
|
self.buttonLayout.addItem(spacerItem)
|
||||||
self.deleteButton = QtGui.QPushButton(self.layoutWidget)
|
self.deleteButton = QtGui.QPushButton(self.layoutWidget)
|
||||||
self.deleteButton.setObjectName(u'deleteButton')
|
self.deleteButton.setObjectName(u'deleteButton')
|
||||||
|
@ -59,16 +59,16 @@ class Ui_ServiceItemEditDialog(object):
|
||||||
self.topLayout.addLayout(self.buttonLayout)
|
self.topLayout.addLayout(self.buttonLayout)
|
||||||
self.outerLayout.addLayout(self.topLayout)
|
self.outerLayout.addLayout(self.topLayout)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(self.layoutWidget)
|
self.buttonBox = QtGui.QDialogButtonBox(self.layoutWidget)
|
||||||
self.buttonBox.setStandardButtons(
|
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
||||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
|
QtGui.QDialogButtonBox.Save)
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
self.buttonBox.setObjectName(u'buttonBox')
|
||||||
self.outerLayout.addWidget(self.buttonBox)
|
self.outerLayout.addWidget(self.buttonBox)
|
||||||
|
|
||||||
self.retranslateUi(ServiceItemEditDialog)
|
self.retranslateUi(serviceItemEditDialog)
|
||||||
QtCore.QMetaObject.connectSlotsByName(ServiceItemEditDialog)
|
QtCore.QMetaObject.connectSlotsByName(serviceItemEditDialog)
|
||||||
|
|
||||||
def retranslateUi(self, ServiceItemEditDialog):
|
def retranslateUi(self, serviceItemEditDialog):
|
||||||
ServiceItemEditDialog.setWindowTitle(
|
serviceItemEditDialog.setWindowTitle(
|
||||||
translate('OpenLP.ServiceItemEditForm', 'Reorder Service Item'))
|
translate('OpenLP.ServiceItemEditForm', 'Reorder Service Item'))
|
||||||
self.upButton.setText(translate('OpenLP.ServiceItemEditForm', 'Up'))
|
self.upButton.setText(translate('OpenLP.ServiceItemEditForm', 'Up'))
|
||||||
self.deleteButton.setText(translate('OpenLP.ServiceItemEditForm',
|
self.deleteButton.setText(translate('OpenLP.ServiceItemEditForm',
|
||||||
|
|
|
@ -123,4 +123,4 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
|
||||||
self.itemList.remove(self.itemList[row])
|
self.itemList.remove(self.itemList[row])
|
||||||
self.itemList.insert(row + 1, temp)
|
self.itemList.insert(row + 1, temp)
|
||||||
self.loadData()
|
self.loadData()
|
||||||
self.listWidget.setCurrentRow(row + 1)
|
self.listWidget.setCurrentRow(row + 1)
|
||||||
|
|
|
@ -28,10 +28,10 @@ from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
|
|
||||||
class Ui_ServiceNoteEdit(object):
|
class Ui_ServiceNoteEdit(object):
|
||||||
def setupUi(self, ServiceNoteEdit):
|
def setupUi(self, serviceNoteEdit):
|
||||||
ServiceNoteEdit.setObjectName(u'ServiceNoteEdit')
|
serviceNoteEdit.setObjectName(u'serviceNoteEdit')
|
||||||
ServiceNoteEdit.resize(400, 243)
|
serviceNoteEdit.resize(400, 243)
|
||||||
self.widget = QtGui.QWidget(ServiceNoteEdit)
|
self.widget = QtGui.QWidget(serviceNoteEdit)
|
||||||
self.widget.setGeometry(QtCore.QRect(20, 10, 361, 223))
|
self.widget.setGeometry(QtCore.QRect(20, 10, 361, 223))
|
||||||
self.widget.setObjectName(u'widget')
|
self.widget.setObjectName(u'widget')
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(self.widget)
|
self.verticalLayout = QtGui.QVBoxLayout(self.widget)
|
||||||
|
@ -45,9 +45,9 @@ class Ui_ServiceNoteEdit(object):
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
self.buttonBox.setObjectName(u'buttonBox')
|
||||||
self.verticalLayout.addWidget(self.buttonBox)
|
self.verticalLayout.addWidget(self.buttonBox)
|
||||||
|
|
||||||
self.retranslateUi(ServiceNoteEdit)
|
self.retranslateUi(serviceNoteEdit)
|
||||||
QtCore.QMetaObject.connectSlotsByName(ServiceNoteEdit)
|
QtCore.QMetaObject.connectSlotsByName(serviceNoteEdit)
|
||||||
|
|
||||||
def retranslateUi(self, ServiceNoteEdit):
|
def retranslateUi(self, serviceNoteEdit):
|
||||||
ServiceNoteEdit.setWindowTitle(
|
serviceNoteEdit.setWindowTitle(
|
||||||
translate('OpenLP.ServiceNoteForm', 'Service Item Notes'))
|
translate('OpenLP.ServiceNoteForm', 'Service Item Notes'))
|
||||||
|
|
|
@ -41,4 +41,4 @@ class ServiceNoteForm(QtGui.QDialog, Ui_ServiceNoteEdit):
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
||||||
self.accept)
|
self.accept)
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
||||||
self.reject)
|
self.reject)
|
||||||
|
|
|
@ -29,19 +29,19 @@ from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import translate, build_icon
|
from openlp.core.lib import translate, build_icon
|
||||||
|
|
||||||
class Ui_SettingsDialog(object):
|
class Ui_SettingsDialog(object):
|
||||||
def setupUi(self, SettingsDialog):
|
def setupUi(self, settingsDialog):
|
||||||
SettingsDialog.setObjectName(u'SettingsDialog')
|
settingsDialog.setObjectName(u'settingsDialog')
|
||||||
SettingsDialog.resize(724, 502)
|
settingsDialog.resize(724, 502)
|
||||||
SettingsDialog.setWindowIcon(
|
settingsDialog.setWindowIcon(
|
||||||
build_icon(u':/system/system_settings.png'))
|
build_icon(u':/system/system_settings.png'))
|
||||||
self.settingsLayout = QtGui.QVBoxLayout(SettingsDialog)
|
self.settingsLayout = QtGui.QVBoxLayout(settingsDialog)
|
||||||
self.settingsLayout.setSpacing(8)
|
self.settingsLayout.setSpacing(8)
|
||||||
self.settingsLayout.setMargin(8)
|
self.settingsLayout.setMargin(8)
|
||||||
self.settingsLayout.setObjectName(u'settingsLayout')
|
self.settingsLayout.setObjectName(u'settingsLayout')
|
||||||
self.settingsTabWidget = QtGui.QTabWidget(SettingsDialog)
|
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
|
||||||
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
||||||
self.settingsLayout.addWidget(self.settingsTabWidget)
|
self.settingsLayout.addWidget(self.settingsTabWidget)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(SettingsDialog)
|
self.buttonBox = QtGui.QDialogButtonBox(settingsDialog)
|
||||||
sizePolicy = QtGui.QSizePolicy(
|
sizePolicy = QtGui.QSizePolicy(
|
||||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
@ -55,14 +55,14 @@ class Ui_SettingsDialog(object):
|
||||||
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
|
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
self.buttonBox.setObjectName(u'buttonBox')
|
||||||
self.settingsLayout.addWidget(self.buttonBox)
|
self.settingsLayout.addWidget(self.buttonBox)
|
||||||
self.retranslateUi(SettingsDialog)
|
self.retranslateUi(settingsDialog)
|
||||||
self.settingsTabWidget.setCurrentIndex(0)
|
self.settingsTabWidget.setCurrentIndex(0)
|
||||||
QtCore.QObject.connect(self.buttonBox,
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
QtCore.SIGNAL(u'accepted()'), SettingsDialog.accept)
|
QtCore.SIGNAL(u'accepted()'), settingsDialog.accept)
|
||||||
QtCore.QObject.connect(self.buttonBox,
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
QtCore.SIGNAL(u'rejected()'), SettingsDialog.reject)
|
QtCore.SIGNAL(u'rejected()'), settingsDialog.reject)
|
||||||
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
||||||
|
|
||||||
def retranslateUi(self, SettingsDialog):
|
def retranslateUi(self, settingsDialog):
|
||||||
SettingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',
|
settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',
|
||||||
'Configure OpenLP'))
|
'Configure OpenLP'))
|
||||||
|
|
|
@ -94,4 +94,4 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||||
Run any post-setup code for the tabs on the form
|
Run any post-setup code for the tabs on the form
|
||||||
"""
|
"""
|
||||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
for tabIndex in range(0, self.settingsTabWidget.count()):
|
||||||
self.settingsTabWidget.widget(tabIndex).postSetUp()
|
self.settingsTabWidget.widget(tabIndex).postSetUp()
|
||||||
|
|
|
@ -984,4 +984,4 @@ class SlideController(QtGui.QWidget):
|
||||||
self.mediaObject.stop()
|
self.mediaObject.stop()
|
||||||
self.video.hide()
|
self.video.hide()
|
||||||
self.SlidePreview.clear()
|
self.SlidePreview.clear()
|
||||||
self.SlidePreview.show()
|
self.SlidePreview.show()
|
||||||
|
|
|
@ -55,4 +55,4 @@ class SplashScreen(object):
|
||||||
self.splash_screen.show()
|
self.splash_screen.show()
|
||||||
|
|
||||||
def finish(self, widget):
|
def finish(self, widget):
|
||||||
self.splash_screen.finish(widget)
|
self.splash_screen.finish(widget)
|
||||||
|
|
|
@ -50,70 +50,70 @@ class ThemeManager(QtGui.QWidget):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.settingsSection = u'themes'
|
self.settingsSection = u'themes'
|
||||||
self.serviceComboBox = self.parent.ServiceManagerContents.ThemeComboBox
|
self.serviceComboBox = self.parent.ServiceManagerContents.ThemeComboBox
|
||||||
self.Layout = QtGui.QVBoxLayout(self)
|
self.layout = QtGui.QVBoxLayout(self)
|
||||||
self.Layout.setSpacing(0)
|
self.layout.setSpacing(0)
|
||||||
self.Layout.setMargin(0)
|
self.layout.setMargin(0)
|
||||||
self.amendThemeForm = AmendThemeForm(self)
|
self.amendThemeForm = AmendThemeForm(self)
|
||||||
self.Toolbar = OpenLPToolbar(self)
|
self.toolbar = OpenLPToolbar(self)
|
||||||
self.Toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
translate('OpenLP.ThemeManager', 'New Theme'),
|
translate('OpenLP.ThemeManager', 'New Theme'),
|
||||||
u':/themes/theme_new.png',
|
u':/themes/theme_new.png',
|
||||||
translate('OpenLP.ThemeManager', 'Create a new theme.'),
|
translate('OpenLP.ThemeManager', 'Create a new theme.'),
|
||||||
self.onAddTheme)
|
self.onAddTheme)
|
||||||
self.Toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
translate('OpenLP.ThemeManager', 'Edit Theme'),
|
translate('OpenLP.ThemeManager', 'Edit Theme'),
|
||||||
u':/themes/theme_edit.png',
|
u':/themes/theme_edit.png',
|
||||||
translate('OpenLP.ThemeManager', 'Edit a theme.'),
|
translate('OpenLP.ThemeManager', 'Edit a theme.'),
|
||||||
self.onEditTheme)
|
self.onEditTheme)
|
||||||
self.Toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
translate('OpenLP.ThemeManager', 'Delete Theme'),
|
translate('OpenLP.ThemeManager', 'Delete Theme'),
|
||||||
u':/general/general_delete.png',
|
u':/general/general_delete.png',
|
||||||
translate('OpenLP.ThemeManager', 'Delete a theme.'),
|
translate('OpenLP.ThemeManager', 'Delete a theme.'),
|
||||||
self.onDeleteTheme)
|
self.onDeleteTheme)
|
||||||
self.Toolbar.addSeparator()
|
self.toolbar.addSeparator()
|
||||||
self.Toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
translate('OpenLP.ThemeManager', 'Import Theme'),
|
translate('OpenLP.ThemeManager', 'Import Theme'),
|
||||||
u':/general/general_import.png',
|
u':/general/general_import.png',
|
||||||
translate('OpenLP.ThemeManager', 'Import a theme.'),
|
translate('OpenLP.ThemeManager', 'Import a theme.'),
|
||||||
self.onImportTheme)
|
self.onImportTheme)
|
||||||
self.Toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
translate('OpenLP.ThemeManager', 'Export Theme'),
|
translate('OpenLP.ThemeManager', 'Export Theme'),
|
||||||
u':/general/general_export.png',
|
u':/general/general_export.png',
|
||||||
translate('OpenLP.ThemeManager', 'Export a theme.'),
|
translate('OpenLP.ThemeManager', 'Export a theme.'),
|
||||||
self.onExportTheme)
|
self.onExportTheme)
|
||||||
self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar)
|
self.themeWidget = QtGui.QWidgetAction(self.toolbar)
|
||||||
self.Layout.addWidget(self.Toolbar)
|
self.layout.addWidget(self.toolbar)
|
||||||
self.ThemeListWidget = QtGui.QListWidget(self)
|
self.themeListWidget = QtGui.QListWidget(self)
|
||||||
self.ThemeListWidget.setAlternatingRowColors(True)
|
self.themeListWidget.setAlternatingRowColors(True)
|
||||||
self.ThemeListWidget.setIconSize(QtCore.QSize(88, 50))
|
self.themeListWidget.setIconSize(QtCore.QSize(88, 50))
|
||||||
self.Layout.addWidget(self.ThemeListWidget)
|
self.layout.addWidget(self.themeListWidget)
|
||||||
self.ThemeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.themeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
self.ThemeListWidget.addAction(
|
self.themeListWidget.addAction(
|
||||||
context_menu_action(self.ThemeListWidget,
|
context_menu_action(self.themeListWidget,
|
||||||
u':/themes/theme_edit.png',
|
u':/themes/theme_edit.png',
|
||||||
translate('OpenLP.ThemeManager', '&Edit Theme'),
|
translate('OpenLP.ThemeManager', '&Edit Theme'),
|
||||||
self.onEditTheme))
|
self.onEditTheme))
|
||||||
self.ThemeListWidget.addAction(
|
self.themeListWidget.addAction(
|
||||||
context_menu_separator(self.ThemeListWidget))
|
context_menu_separator(self.themeListWidget))
|
||||||
self.ThemeListWidget.addAction(
|
self.themeListWidget.addAction(
|
||||||
context_menu_action(self.ThemeListWidget,
|
context_menu_action(self.themeListWidget,
|
||||||
u':/general/general_delete.png',
|
u':/general/general_delete.png',
|
||||||
translate('OpenLP.ThemeManager', '&Delete Theme'),
|
translate('OpenLP.ThemeManager', '&Delete Theme'),
|
||||||
self.onDeleteTheme))
|
self.onDeleteTheme))
|
||||||
self.ThemeListWidget.addAction(
|
self.themeListWidget.addAction(
|
||||||
context_menu_action(self.ThemeListWidget,
|
context_menu_action(self.themeListWidget,
|
||||||
u':/general/general_export.png',
|
u':/general/general_export.png',
|
||||||
translate('OpenLP.ThemeManager', 'Set As &Global Default'),
|
translate('OpenLP.ThemeManager', 'Set As &Global Default'),
|
||||||
self.changeGlobalFromScreen))
|
self.changeGlobalFromScreen))
|
||||||
self.ThemeListWidget.addAction(
|
self.themeListWidget.addAction(
|
||||||
context_menu_action(self.ThemeListWidget,
|
context_menu_action(self.themeListWidget,
|
||||||
u':/general/general_export.png',
|
u':/general/general_export.png',
|
||||||
translate('OpenLP.ThemeManager', 'E&xport Theme'),
|
translate('OpenLP.ThemeManager', 'E&xport Theme'),
|
||||||
self.onExportTheme))
|
self.onExportTheme))
|
||||||
self.ThemeListWidget.addAction(
|
self.themeListWidget.addAction(
|
||||||
context_menu_separator(self.ThemeListWidget))
|
context_menu_separator(self.themeListWidget))
|
||||||
#Signals
|
#Signals
|
||||||
QtCore.QObject.connect(self.ThemeListWidget,
|
QtCore.QObject.connect(self.themeListWidget,
|
||||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||||
self.changeGlobalFromScreen)
|
self.changeGlobalFromScreen)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
@ -138,18 +138,18 @@ class ThemeManager(QtGui.QWidget):
|
||||||
tab
|
tab
|
||||||
"""
|
"""
|
||||||
log.debug(u'changeGlobalFromTab %s', themeName)
|
log.debug(u'changeGlobalFromTab %s', themeName)
|
||||||
for count in range (0, self.ThemeListWidget.count()):
|
for count in range (0, self.themeListWidget.count()):
|
||||||
#reset the old name
|
#reset the old name
|
||||||
item = self.ThemeListWidget.item(count)
|
item = self.themeListWidget.item(count)
|
||||||
oldName = item.text()
|
oldName = item.text()
|
||||||
newName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
newName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||||
if oldName != newName:
|
if oldName != newName:
|
||||||
self.ThemeListWidget.item(count).setText(newName)
|
self.themeListWidget.item(count).setText(newName)
|
||||||
#Set the new name
|
#Set the new name
|
||||||
if themeName == newName:
|
if themeName == newName:
|
||||||
name = unicode(translate('OpenLP.ThemeManager',
|
name = unicode(translate('OpenLP.ThemeManager',
|
||||||
'%s (default)')) % newName
|
'%s (default)')) % newName
|
||||||
self.ThemeListWidget.item(count).setText(name)
|
self.themeListWidget.item(count).setText(name)
|
||||||
|
|
||||||
def changeGlobalFromScreen(self, index = -1):
|
def changeGlobalFromScreen(self, index = -1):
|
||||||
"""
|
"""
|
||||||
|
@ -157,21 +157,21 @@ class ThemeManager(QtGui.QWidget):
|
||||||
Theme Manager list
|
Theme Manager list
|
||||||
"""
|
"""
|
||||||
log.debug(u'changeGlobalFromScreen %s', index)
|
log.debug(u'changeGlobalFromScreen %s', index)
|
||||||
selected_row = self.ThemeListWidget.currentRow()
|
selected_row = self.themeListWidget.currentRow()
|
||||||
for count in range (0, self.ThemeListWidget.count()):
|
for count in range (0, self.themeListWidget.count()):
|
||||||
item = self.ThemeListWidget.item(count)
|
item = self.themeListWidget.item(count)
|
||||||
oldName = item.text()
|
oldName = item.text()
|
||||||
#reset the old name
|
#reset the old name
|
||||||
if oldName != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
if oldName != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
||||||
self.ThemeListWidget.item(count).setText(
|
self.themeListWidget.item(count).setText(
|
||||||
unicode(item.data(QtCore.Qt.UserRole).toString()))
|
unicode(item.data(QtCore.Qt.UserRole).toString()))
|
||||||
#Set the new name
|
#Set the new name
|
||||||
if count == selected_row:
|
if count == selected_row:
|
||||||
self.global_theme = unicode(
|
self.global_theme = unicode(
|
||||||
self.ThemeListWidget.item(count).text())
|
self.themeListWidget.item(count).text())
|
||||||
name = unicode(translate('OpenLP.ThemeManager',
|
name = unicode(translate('OpenLP.ThemeManager',
|
||||||
'%s (default)')) % self.global_theme
|
'%s (default)')) % self.global_theme
|
||||||
self.ThemeListWidget.item(count).setText(name)
|
self.themeListWidget.item(count).setText(name)
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.settingsSection + u'/global theme',
|
self.settingsSection + u'/global theme',
|
||||||
QtCore.QVariant(self.global_theme))
|
QtCore.QVariant(self.global_theme))
|
||||||
|
@ -194,10 +194,10 @@ class ThemeManager(QtGui.QWidget):
|
||||||
Loads the settings for the theme that is to be edited and launches the
|
Loads the settings for the theme that is to be edited and launches the
|
||||||
theme editing form so the user can make their changes.
|
theme editing form so the user can make their changes.
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.ThemeListWidget,
|
if check_item_selected(self.themeListWidget,
|
||||||
translate('OpenLP.ThemeManager',
|
translate('OpenLP.ThemeManager',
|
||||||
'You must select a theme to edit.')):
|
'You must select a theme to edit.')):
|
||||||
item = self.ThemeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
themeName = unicode(item.text())
|
themeName = unicode(item.text())
|
||||||
if themeName != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
if themeName != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
||||||
self.editingDefault = True
|
self.editingDefault = True
|
||||||
|
@ -217,10 +217,10 @@ class ThemeManager(QtGui.QWidget):
|
||||||
self.global_theme = unicode(QtCore.QSettings().value(
|
self.global_theme = unicode(QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/global theme',
|
self.settingsSection + u'/global theme',
|
||||||
QtCore.QVariant(u'')).toString())
|
QtCore.QVariant(u'')).toString())
|
||||||
if check_item_selected(self.ThemeListWidget,
|
if check_item_selected(self.themeListWidget,
|
||||||
translate('OpenLP.ThemeManager',
|
translate('OpenLP.ThemeManager',
|
||||||
'You must select a theme to delete.')):
|
'You must select a theme to delete.')):
|
||||||
item = self.ThemeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
theme = unicode(item.text())
|
theme = unicode(item.text())
|
||||||
# confirm deletion
|
# confirm deletion
|
||||||
answer = QtGui.QMessageBox.question(self,
|
answer = QtGui.QMessageBox.question(self,
|
||||||
|
@ -252,8 +252,8 @@ class ThemeManager(QtGui.QWidget):
|
||||||
unicode(translate('OpenLP.ThemeManager',
|
unicode(translate('OpenLP.ThemeManager',
|
||||||
'Theme %s is use by the service manager.')) % theme)
|
'Theme %s is use by the service manager.')) % theme)
|
||||||
return
|
return
|
||||||
row = self.ThemeListWidget.row(item)
|
row = self.themeListWidget.row(item)
|
||||||
self.ThemeListWidget.takeItem(row)
|
self.themeListWidget.takeItem(row)
|
||||||
self.deleteTheme(theme)
|
self.deleteTheme(theme)
|
||||||
|
|
||||||
def deleteTheme(self, theme):
|
def deleteTheme(self, theme):
|
||||||
|
@ -281,7 +281,7 @@ class ThemeManager(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
Save the theme in a zip file
|
Save the theme in a zip file
|
||||||
"""
|
"""
|
||||||
item = self.ThemeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
if item is None:
|
if item is None:
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('OpenLP.ThemeManager', 'Error'),
|
translate('OpenLP.ThemeManager', 'Error'),
|
||||||
|
@ -346,7 +346,7 @@ class ThemeManager(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
log.debug(u'Load themes from dir')
|
log.debug(u'Load themes from dir')
|
||||||
self.themelist = []
|
self.themelist = []
|
||||||
self.ThemeListWidget.clear()
|
self.themeListWidget.clear()
|
||||||
#root, dirs, files = os.walk(self.path)
|
#root, dirs, files = os.walk(self.path)
|
||||||
dirList = os.listdir(self.path)
|
dirList = os.listdir(self.path)
|
||||||
for name in dirList:
|
for name in dirList:
|
||||||
|
@ -371,7 +371,7 @@ class ThemeManager(QtGui.QWidget):
|
||||||
item_name.setIcon(icon)
|
item_name.setIcon(icon)
|
||||||
item_name.setData(QtCore.Qt.UserRole,
|
item_name.setData(QtCore.Qt.UserRole,
|
||||||
QtCore.QVariant(textName))
|
QtCore.QVariant(textName))
|
||||||
self.ThemeListWidget.addItem(item_name)
|
self.themeListWidget.addItem(item_name)
|
||||||
self.themelist.append(textName)
|
self.themelist.append(textName)
|
||||||
self.pushThemes()
|
self.pushThemes()
|
||||||
|
|
||||||
|
@ -622,15 +622,15 @@ class ThemeManager(QtGui.QWidget):
|
||||||
self.serviceComboBox.setCurrentIndex(newThemeIndex)
|
self.serviceComboBox.setCurrentIndex(newThemeIndex)
|
||||||
if self.editingDefault:
|
if self.editingDefault:
|
||||||
if self.saveThemeName != name:
|
if self.saveThemeName != name:
|
||||||
newThemeItem = self.ThemeListWidget.findItems(name,
|
newThemeItem = self.themeListWidget.findItems(name,
|
||||||
QtCore.Qt.MatchExactly)[0]
|
QtCore.Qt.MatchExactly)[0]
|
||||||
newThemeIndex = self.ThemeListWidget.indexFromItem(
|
newThemeIndex = self.themeListWidget.indexFromItem(
|
||||||
newThemeItem).row()
|
newThemeItem).row()
|
||||||
self.global_theme = unicode(
|
self.global_theme = unicode(
|
||||||
self.ThemeListWidget.item(newThemeIndex).text())
|
self.themeListWidget.item(newThemeIndex).text())
|
||||||
newName = unicode(translate('OpenLP.ThemeManager',
|
newName = unicode(translate('OpenLP.ThemeManager',
|
||||||
'%s (default)')) % self.global_theme
|
'%s (default)')) % self.global_theme
|
||||||
self.ThemeListWidget.item(newThemeIndex).setText(newName)
|
self.themeListWidget.item(newThemeIndex).setText(newName)
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.settingsSection + u'/global theme',
|
self.settingsSection + u'/global theme',
|
||||||
QtCore.QVariant(self.global_theme))
|
QtCore.QVariant(self.global_theme))
|
||||||
|
|
|
@ -207,4 +207,4 @@ class ThemesTab(SettingsTab):
|
||||||
if not preview.isNull():
|
if not preview.isNull():
|
||||||
preview = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
|
preview = preview.scaled(300, 255, QtCore.Qt.KeepAspectRatio,
|
||||||
QtCore.Qt.SmoothTransformation)
|
QtCore.Qt.SmoothTransformation)
|
||||||
self.DefaultListView.setPixmap(preview)
|
self.DefaultListView.setPixmap(preview)
|
||||||
|
|
|
@ -213,4 +213,4 @@ def get_images_filter():
|
||||||
from languagemanager import LanguageManager
|
from languagemanager import LanguageManager
|
||||||
|
|
||||||
__all__ = [u'AppLocation', u'check_latest_version', u'add_actions',
|
__all__ = [u'AppLocation', u'check_latest_version', u'add_actions',
|
||||||
u'get_filesystem_encoding', u'LanguageManager']
|
u'get_filesystem_encoding', u'LanguageManager']
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
"""
|
"""
|
||||||
The :mod:`plugins` module provides all the project produced plugins
|
The :mod:`plugins` module provides all the project produced plugins
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
"""
|
"""
|
||||||
The :mod:`alerts` module provides the Alerts plugin for producing impromptu
|
The :mod:`alerts` module provides the Alerts plugin for producing impromptu
|
||||||
on-screen announcements during a service.
|
on-screen announcements during a service.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -103,4 +103,4 @@ class AlertsPlugin(Plugin):
|
||||||
about_text = translate('AlertsPlugin', '<strong>Alerts Plugin</strong>'
|
about_text = translate('AlertsPlugin', '<strong>Alerts Plugin</strong>'
|
||||||
'<br />The alert plugin controls the displaying of nursery alerts '
|
'<br />The alert plugin controls the displaying of nursery alerts '
|
||||||
'on the display screen')
|
'on the display screen')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -24,4 +24,4 @@
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from alertform import AlertForm
|
from alertform import AlertForm
|
||||||
|
|
|
@ -140,4 +140,4 @@ class Ui_AlertDialog(object):
|
||||||
self.DisplayCloseButton.setText(
|
self.DisplayCloseButton.setText(
|
||||||
translate('AlertsPlugin.AlertForm', 'Display && Cl&ose'))
|
translate('AlertsPlugin.AlertForm', 'Display && Cl&ose'))
|
||||||
self.CloseButton.setText(
|
self.CloseButton.setText(
|
||||||
translate('AlertsPlugin.AlertForm', '&Close'))
|
translate('AlertsPlugin.AlertForm', '&Close'))
|
||||||
|
|
|
@ -155,4 +155,4 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||||
text = text.replace(u'<>', unicode(self.ParameterEdit.text()))
|
text = text.replace(u'<>', unicode(self.ParameterEdit.text()))
|
||||||
self.parent.alertsmanager.displayAlert(text)
|
self.parent.alertsmanager.displayAlert(text)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from alertsmanager import AlertsManager
|
from alertsmanager import AlertsManager
|
||||||
from alertstab import AlertsTab
|
from alertstab import AlertsTab
|
||||||
|
|
|
@ -117,4 +117,4 @@ class AlertsManager(QtCore.QObject):
|
||||||
alertTab.location)
|
alertTab.location)
|
||||||
self.killTimer(self.timer_id)
|
self.killTimer(self.timer_id)
|
||||||
self.timer_id = 0
|
self.timer_id = 0
|
||||||
self.generateAlert()
|
self.generateAlert()
|
||||||
|
|
|
@ -295,4 +295,4 @@ class AlertsTab(SettingsTab):
|
||||||
font.setPointSize(self.font_size)
|
font.setPointSize(self.font_size)
|
||||||
self.FontPreview.setFont(font)
|
self.FontPreview.setFont(font)
|
||||||
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
||||||
(self.bg_color, self.font_color))
|
(self.bg_color, self.font_color))
|
||||||
|
|
|
@ -55,4 +55,4 @@ def init_schema(url):
|
||||||
mapper(AlertItem, alerts_table)
|
mapper(AlertItem, alerts_table)
|
||||||
|
|
||||||
metadata.create_all(checkfirst=True)
|
metadata.create_all(checkfirst=True)
|
||||||
return session
|
return session
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
"""
|
"""
|
||||||
The :mod:`bibles' module provides the Bible plugin to enable OpenLP to display
|
The :mod:`bibles' module provides the Bible plugin to enable OpenLP to display
|
||||||
scripture.
|
scripture.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -117,4 +117,4 @@ class BiblePlugin(Plugin):
|
||||||
``newTheme``
|
``newTheme``
|
||||||
The new name the plugin should now use.
|
The new name the plugin should now use.
|
||||||
"""
|
"""
|
||||||
self.settings_tab.bible_theme = newTheme
|
self.settings_tab.bible_theme = newTheme
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
|
|
||||||
from importwizardform import ImportWizardForm
|
from importwizardform import ImportWizardForm
|
||||||
|
|
||||||
__all__ = ['ImportWizardForm']
|
__all__ = ['ImportWizardForm']
|
||||||
|
|
|
@ -381,4 +381,4 @@ class Ui_BibleImportWizard(object):
|
||||||
'Please wait while your Bible is imported.'))
|
'Please wait while your Bible is imported.'))
|
||||||
self.ImportProgressLabel.setText(
|
self.ImportProgressLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Ready.'))
|
translate('BiblesPlugin.ImportWizardForm', 'Ready.'))
|
||||||
self.ImportProgressBar.setFormat(u'%p%')
|
self.ImportProgressBar.setFormat(u'%p%')
|
||||||
|
|
|
@ -457,4 +457,4 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||||
self.ImportProgressBar.setValue(self.ImportProgressBar.maximum())
|
self.ImportProgressBar.setValue(self.ImportProgressBar.maximum())
|
||||||
self.finishButton.setVisible(True)
|
self.finishButton.setVisible(True)
|
||||||
self.cancelButton.setVisible(False)
|
self.cancelButton.setVisible(False)
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
|
|
@ -27,4 +27,4 @@
|
||||||
from common import BibleCommon
|
from common import BibleCommon
|
||||||
from manager import BibleManager
|
from manager import BibleManager
|
||||||
from biblestab import BiblesTab
|
from biblestab import BiblesTab
|
||||||
from mediaitem import BibleMediaItem
|
from mediaitem import BibleMediaItem
|
||||||
|
|
|
@ -247,4 +247,4 @@ class BiblesTab(SettingsTab):
|
||||||
# Not Found
|
# Not Found
|
||||||
id = 0
|
id = 0
|
||||||
self.bible_theme = u''
|
self.bible_theme = u''
|
||||||
self.BibleThemeComboBox.setCurrentIndex(id)
|
self.BibleThemeComboBox.setCurrentIndex(id)
|
||||||
|
|
|
@ -113,4 +113,4 @@ class CSVBible(BibleDB):
|
||||||
self.wizard.incrementProgressBar(u'Import canceled!')
|
self.wizard.incrementProgressBar(u'Import canceled!')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return success
|
return success
|
||||||
|
|
|
@ -431,4 +431,4 @@ class BibleDB(QtCore.QObject, Manager):
|
||||||
log.debug(books)
|
log.debug(books)
|
||||||
log.debug(u'...............................Verses ')
|
log.debug(u'...............................Verses ')
|
||||||
verses = self.session.query(Verse).all()
|
verses = self.session.query(Verse).all()
|
||||||
log.debug(verses)
|
log.debug(verses)
|
||||||
|
|
|
@ -266,4 +266,4 @@ class BibleManager(object):
|
||||||
bible = unicode(bible)
|
bible = unicode(bible)
|
||||||
if bible == name:
|
if bible == name:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -102,4 +102,4 @@ class OpenSongBible(BibleDB):
|
||||||
self.wizard.incrementProgressBar(u'Import canceled!')
|
self.wizard.incrementProgressBar(u'Import canceled!')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return success
|
return success
|
||||||
|
|
|
@ -184,4 +184,4 @@ class OSISBible(BibleDB):
|
||||||
self.wizard.incrementProgressBar(u'Import canceled!')
|
self.wizard.incrementProgressBar(u'Import canceled!')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return success
|
return success
|
||||||
|
|
|
@ -27,4 +27,4 @@
|
||||||
The :mod:`custom` module provides the Custom plugin which allows custom,
|
The :mod:`custom` module provides the Custom plugin which allows custom,
|
||||||
themed, text based items to be displayed without having to misuse another item
|
themed, text based items to be displayed without having to misuse another item
|
||||||
type.
|
type.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -96,4 +96,4 @@ class CustomPlugin(Plugin):
|
||||||
CustomSlide.theme_name == oldTheme)
|
CustomSlide.theme_name == oldTheme)
|
||||||
for custom in customsUsingTheme:
|
for custom in customsUsingTheme:
|
||||||
custom.theme_name = newTheme
|
custom.theme_name = newTheme
|
||||||
self.custommanager.save_object(custom)
|
self.custommanager.save_object(custom)
|
||||||
|
|
|
@ -24,4 +24,4 @@
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from editcustomform import EditCustomForm
|
from editcustomform import EditCustomForm
|
||||||
|
|
|
@ -28,7 +28,7 @@ from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import build_icon, translate
|
from openlp.core.lib import build_icon, translate
|
||||||
|
|
||||||
class Ui_customEditDialog(object):
|
class Ui_CustomEditDialog(object):
|
||||||
def setupUi(self, customEditDialog):
|
def setupUi(self, customEditDialog):
|
||||||
customEditDialog.setObjectName(u'customEditDialog')
|
customEditDialog.setObjectName(u'customEditDialog')
|
||||||
customEditDialog.resize(590, 541)
|
customEditDialog.resize(590, 541)
|
||||||
|
@ -38,94 +38,94 @@ class Ui_customEditDialog(object):
|
||||||
self.gridLayout.setObjectName(u'gridLayout')
|
self.gridLayout.setObjectName(u'gridLayout')
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||||
self.TitleLabel = QtGui.QLabel(customEditDialog)
|
self.titleLabel = QtGui.QLabel(customEditDialog)
|
||||||
self.TitleLabel.setObjectName(u'TitleLabel')
|
self.titleLabel.setObjectName(u'titleLabel')
|
||||||
self.horizontalLayout.addWidget(self.TitleLabel)
|
self.horizontalLayout.addWidget(self.titleLabel)
|
||||||
self.TitleEdit = QtGui.QLineEdit(customEditDialog)
|
self.titleEdit = QtGui.QLineEdit(customEditDialog)
|
||||||
self.TitleLabel.setBuddy(self.TitleEdit)
|
self.titleLabel.setBuddy(self.titleEdit)
|
||||||
self.TitleEdit.setObjectName(u'TitleEdit')
|
self.titleEdit.setObjectName(u'titleEdit')
|
||||||
self.horizontalLayout.addWidget(self.TitleEdit)
|
self.horizontalLayout.addWidget(self.titleEdit)
|
||||||
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
|
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
|
||||||
self.horizontalLayout_4 = QtGui.QHBoxLayout()
|
self.horizontalLayout4 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_4.setObjectName(u'horizontalLayout_4')
|
self.horizontalLayout4.setObjectName(u'horizontalLayout4')
|
||||||
self.VerseListView = QtGui.QListWidget(customEditDialog)
|
self.verseListView = QtGui.QListWidget(customEditDialog)
|
||||||
self.VerseListView.setAlternatingRowColors(True)
|
self.verseListView.setAlternatingRowColors(True)
|
||||||
self.VerseListView.setObjectName(u'VerseListView')
|
self.verseListView.setObjectName(u'verseListView')
|
||||||
self.horizontalLayout_4.addWidget(self.VerseListView)
|
self.horizontalLayout4.addWidget(self.verseListView)
|
||||||
self.verticalLayout = QtGui.QVBoxLayout()
|
self.verticalLayout = QtGui.QVBoxLayout()
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||||
self.UpButton = QtGui.QPushButton(customEditDialog)
|
self.upButton = QtGui.QPushButton(customEditDialog)
|
||||||
self.UpButton.setIcon(build_icon(u':/services/service_up.png'))
|
self.upButton.setIcon(build_icon(u':/services/service_up.png'))
|
||||||
self.UpButton.setObjectName(u'UpButton')
|
self.upButton.setObjectName(u'upButton')
|
||||||
self.verticalLayout.addWidget(self.UpButton)
|
self.verticalLayout.addWidget(self.upButton)
|
||||||
spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum,
|
spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
self.verticalLayout.addItem(spacerItem)
|
self.verticalLayout.addItem(spacerItem)
|
||||||
self.DownButton = QtGui.QPushButton(customEditDialog)
|
self.downButton = QtGui.QPushButton(customEditDialog)
|
||||||
self.DownButton.setIcon(build_icon(u':/services/service_down.png'))
|
self.downButton.setIcon(build_icon(u':/services/service_down.png'))
|
||||||
self.DownButton.setObjectName(u'DownButton')
|
self.downButton.setObjectName(u'downButton')
|
||||||
self.verticalLayout.addWidget(self.DownButton)
|
self.verticalLayout.addWidget(self.downButton)
|
||||||
self.horizontalLayout_4.addLayout(self.verticalLayout)
|
self.horizontalLayout4.addLayout(self.verticalLayout)
|
||||||
self.gridLayout.addLayout(self.horizontalLayout_4, 1, 0, 1, 1)
|
self.gridLayout.addLayout(self.horizontalLayout4, 1, 0, 1, 1)
|
||||||
self.EditWidget = QtGui.QWidget(customEditDialog)
|
self.editWidget = QtGui.QWidget(customEditDialog)
|
||||||
self.EditWidget.setObjectName(u'EditWidget')
|
self.editWidget.setObjectName(u'editWidget')
|
||||||
self.EditLayout_3 = QtGui.QHBoxLayout(self.EditWidget)
|
self.editLayout3 = QtGui.QHBoxLayout(self.editWidget)
|
||||||
self.EditLayout_3.setSpacing(8)
|
self.editLayout3.setSpacing(8)
|
||||||
self.EditLayout_3.setMargin(0)
|
self.editLayout3.setMargin(0)
|
||||||
self.EditLayout_3.setObjectName(u'EditLayout_3')
|
self.editLayout3.setObjectName(u'editLayout3')
|
||||||
self.VerseTextEdit = QtGui.QTextEdit(self.EditWidget)
|
self.verseTextEdit = QtGui.QTextEdit(self.editWidget)
|
||||||
self.VerseTextEdit.setObjectName(u'VerseTextEdit')
|
self.verseTextEdit.setObjectName(u'verseTextEdit')
|
||||||
self.EditLayout_3.addWidget(self.VerseTextEdit)
|
self.editLayout3.addWidget(self.verseTextEdit)
|
||||||
self.ButtonWidge = QtGui.QWidget(self.EditWidget)
|
self.buttonWidget = QtGui.QWidget(self.editWidget)
|
||||||
self.ButtonWidge.setObjectName(u'ButtonWidge')
|
self.buttonWidget.setObjectName(u'buttonWidget')
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.ButtonWidge)
|
self.verticalLayout2 = QtGui.QVBoxLayout(self.buttonWidget)
|
||||||
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
self.verticalLayout2.setObjectName(u'verticalLayout2')
|
||||||
self.AddButton = QtGui.QPushButton(self.ButtonWidge)
|
self.addButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.AddButton.setObjectName(u'AddButton')
|
self.addButton.setObjectName(u'addButton')
|
||||||
self.verticalLayout_2.addWidget(self.AddButton)
|
self.verticalLayout2.addWidget(self.addButton)
|
||||||
self.EditButton = QtGui.QPushButton(self.ButtonWidge)
|
self.editButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.EditButton.setObjectName(u'EditButton')
|
self.editButton.setObjectName(u'editButton')
|
||||||
self.verticalLayout_2.addWidget(self.EditButton)
|
self.verticalLayout2.addWidget(self.editButton)
|
||||||
self.EditAllButton = QtGui.QPushButton(self.ButtonWidge)
|
self.editAllButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.EditAllButton.setObjectName(u'EditAllButton')
|
self.editAllButton.setObjectName(u'editAllButton')
|
||||||
self.verticalLayout_2.addWidget(self.EditAllButton)
|
self.verticalLayout2.addWidget(self.editAllButton)
|
||||||
self.SaveButton = QtGui.QPushButton(self.ButtonWidge)
|
self.saveButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.SaveButton.setObjectName(u'SaveButton')
|
self.saveButton.setObjectName(u'saveButton')
|
||||||
self.verticalLayout_2.addWidget(self.SaveButton)
|
self.verticalLayout2.addWidget(self.saveButton)
|
||||||
self.DeleteButton = QtGui.QPushButton(self.ButtonWidge)
|
self.deleteButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.DeleteButton.setObjectName(u'DeleteButton')
|
self.deleteButton.setObjectName(u'deleteButton')
|
||||||
self.verticalLayout_2.addWidget(self.DeleteButton)
|
self.verticalLayout2.addWidget(self.deleteButton)
|
||||||
self.ClearButton = QtGui.QPushButton(self.ButtonWidge)
|
self.clearButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.ClearButton.setObjectName(u'ClearButton')
|
self.clearButton.setObjectName(u'clearButton')
|
||||||
self.verticalLayout_2.addWidget(self.ClearButton)
|
self.verticalLayout2.addWidget(self.clearButton)
|
||||||
self.SplitButton = QtGui.QPushButton(self.ButtonWidge)
|
self.splitButton = QtGui.QPushButton(self.buttonWidget)
|
||||||
self.SplitButton.setObjectName(u'SplitButton')
|
self.splitButton.setObjectName(u'splitButton')
|
||||||
self.verticalLayout_2.addWidget(self.SplitButton)
|
self.verticalLayout2.addWidget(self.splitButton)
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
self.verticalLayout_2.addItem(spacerItem1)
|
self.verticalLayout2.addItem(spacerItem1)
|
||||||
self.EditLayout_3.addWidget(self.ButtonWidge)
|
self.editLayout3.addWidget(self.buttonWidget)
|
||||||
self.gridLayout.addWidget(self.EditWidget, 2, 0, 1, 1)
|
self.gridLayout.addWidget(self.editWidget, 2, 0, 1, 1)
|
||||||
self.horizontalLayout_3 = QtGui.QHBoxLayout()
|
self.horizontalLayout3 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_3.setObjectName(u'horizontalLayout_3')
|
self.horizontalLayout3.setObjectName(u'horizontalLayout3')
|
||||||
self.ThemeLabel = QtGui.QLabel(customEditDialog)
|
self.themeLabel = QtGui.QLabel(customEditDialog)
|
||||||
self.ThemeLabel.setObjectName(u'ThemeLabel')
|
self.themeLabel.setObjectName(u'themeLabel')
|
||||||
self.horizontalLayout_3.addWidget(self.ThemeLabel)
|
self.horizontalLayout3.addWidget(self.themeLabel)
|
||||||
self.ThemeComboBox = QtGui.QComboBox(customEditDialog)
|
self.themeComboBox = QtGui.QComboBox(customEditDialog)
|
||||||
self.ThemeLabel.setBuddy(self.ThemeComboBox)
|
self.themeLabel.setBuddy(self.themeComboBox)
|
||||||
self.ThemeComboBox.setObjectName(u'ThemeComboBox')
|
self.themeComboBox.setObjectName(u'themeComboBox')
|
||||||
self.horizontalLayout_3.addWidget(self.ThemeComboBox)
|
self.horizontalLayout3.addWidget(self.themeComboBox)
|
||||||
self.gridLayout.addLayout(self.horizontalLayout_3, 3, 0, 1, 1)
|
self.gridLayout.addLayout(self.horizontalLayout3, 3, 0, 1, 1)
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout()
|
self.horizontalLayout2 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
self.horizontalLayout2.setObjectName(u'horizontalLayout2')
|
||||||
self.CreditLabel = QtGui.QLabel(customEditDialog)
|
self.creditLabel = QtGui.QLabel(customEditDialog)
|
||||||
self.CreditLabel.setObjectName(u'CreditLabel')
|
self.creditLabel.setObjectName(u'creditLabel')
|
||||||
self.horizontalLayout_2.addWidget(self.CreditLabel)
|
self.horizontalLayout2.addWidget(self.creditLabel)
|
||||||
self.CreditEdit = QtGui.QLineEdit(customEditDialog)
|
self.creditEdit = QtGui.QLineEdit(customEditDialog)
|
||||||
self.CreditLabel.setBuddy(self.CreditEdit)
|
self.creditLabel.setBuddy(self.creditEdit)
|
||||||
self.CreditEdit.setObjectName(u'CreditEdit')
|
self.creditEdit.setObjectName(u'creditEdit')
|
||||||
self.horizontalLayout_2.addWidget(self.CreditEdit)
|
self.horizontalLayout2.addWidget(self.creditEdit)
|
||||||
self.gridLayout.addLayout(self.horizontalLayout_2, 4, 0, 1, 1)
|
self.gridLayout.addLayout(self.horizontalLayout2, 4, 0, 1, 1)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(customEditDialog)
|
self.buttonBox = QtGui.QDialogButtonBox(customEditDialog)
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
||||||
QtGui.QDialogButtonBox.Save)
|
QtGui.QDialogButtonBox.Save)
|
||||||
|
@ -141,49 +141,49 @@ class Ui_customEditDialog(object):
|
||||||
def retranslateUi(self, customEditDialog):
|
def retranslateUi(self, customEditDialog):
|
||||||
customEditDialog.setWindowTitle(
|
customEditDialog.setWindowTitle(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Edit Custom Slides'))
|
translate('CustomPlugin.EditCustomForm', 'Edit Custom Slides'))
|
||||||
self.UpButton.setToolTip(
|
self.upButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Move slide up once '
|
translate('CustomPlugin.EditCustomForm', 'Move slide up once '
|
||||||
'position.'))
|
'position.'))
|
||||||
self.DownButton.setToolTip(
|
self.downButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Move slide down one '
|
translate('CustomPlugin.EditCustomForm', 'Move slide down one '
|
||||||
'position.'))
|
'position.'))
|
||||||
self.TitleLabel.setText(
|
self.titleLabel.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', '&Title:'))
|
translate('CustomPlugin.EditCustomForm', '&Title:'))
|
||||||
self.AddButton.setText(
|
self.addButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Add New'))
|
translate('CustomPlugin.EditCustomForm', 'Add New'))
|
||||||
self.AddButton.setToolTip(
|
self.addButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Add a new slide at '
|
translate('CustomPlugin.EditCustomForm', 'Add a new slide at '
|
||||||
'bottom.'))
|
'bottom.'))
|
||||||
self.EditButton.setText(
|
self.editButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Edit'))
|
translate('CustomPlugin.EditCustomForm', 'Edit'))
|
||||||
self.EditButton.setToolTip(
|
self.editButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Edit the selected '
|
translate('CustomPlugin.EditCustomForm', 'Edit the selected '
|
||||||
'slide.'))
|
'slide.'))
|
||||||
self.EditAllButton.setText(
|
self.editAllButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Edit All'))
|
translate('CustomPlugin.EditCustomForm', 'Edit All'))
|
||||||
self.EditAllButton.setToolTip(
|
self.editAllButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Edit all the slides at '
|
translate('CustomPlugin.EditCustomForm', 'Edit all the slides at '
|
||||||
'once.'))
|
'once.'))
|
||||||
self.SaveButton.setText(
|
self.saveButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Save'))
|
translate('CustomPlugin.EditCustomForm', 'Save'))
|
||||||
self.SaveButton.setToolTip(
|
self.saveButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Save the slide currently '
|
translate('CustomPlugin.EditCustomForm', 'Save the slide currently '
|
||||||
'being edited.'))
|
'being edited.'))
|
||||||
self.DeleteButton.setText(
|
self.deleteButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Delete'))
|
translate('CustomPlugin.EditCustomForm', 'Delete'))
|
||||||
self.DeleteButton.setToolTip(
|
self.deleteButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Delete the selected '
|
translate('CustomPlugin.EditCustomForm', 'Delete the selected '
|
||||||
'slide.'))
|
'slide.'))
|
||||||
self.ClearButton.setText(
|
self.clearButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Clear'))
|
translate('CustomPlugin.EditCustomForm', 'Clear'))
|
||||||
self.ClearButton.setToolTip(
|
self.clearButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Clear edit area'))
|
translate('CustomPlugin.EditCustomForm', 'Clear edit area'))
|
||||||
self.SplitButton.setText(
|
self.splitButton.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Split Slide'))
|
translate('CustomPlugin.EditCustomForm', 'Split Slide'))
|
||||||
self.SplitButton.setToolTip(
|
self.splitButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Split a slide into two '
|
translate('CustomPlugin.EditCustomForm', 'Split a slide into two '
|
||||||
'by inserting a slide splitter.'))
|
'by inserting a slide splitter.'))
|
||||||
self.ThemeLabel.setText(
|
self.themeLabel.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', 'The&me:'))
|
translate('CustomPlugin.EditCustomForm', 'The&me:'))
|
||||||
self.CreditLabel.setText(
|
self.creditLabel.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', '&Credits:'))
|
translate('CustomPlugin.EditCustomForm', '&Credits:'))
|
||||||
|
|
|
@ -28,14 +28,14 @@ import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from editcustomdialog import Ui_customEditDialog
|
|
||||||
from openlp.core.lib import Receiver, translate
|
from openlp.core.lib import Receiver, translate
|
||||||
from openlp.plugins.custom.lib import CustomXMLBuilder, CustomXMLParser
|
from openlp.plugins.custom.lib import CustomXMLBuilder, CustomXMLParser
|
||||||
from openlp.plugins.custom.lib.db import CustomSlide
|
from openlp.plugins.custom.lib.db import CustomSlide
|
||||||
|
from editcustomdialog import Ui_CustomEditDialog
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
||||||
"""
|
"""
|
||||||
Class documentation goes here.
|
Class documentation goes here.
|
||||||
"""
|
"""
|
||||||
|
@ -55,28 +55,28 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||||
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
||||||
QtCore.QObject.connect(self.buttonBox,
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
QtCore.SIGNAL(u'clicked(QAbstractButton*)'), self.onPreview)
|
QtCore.SIGNAL(u'clicked(QAbstractButton*)'), self.onPreview)
|
||||||
QtCore.QObject.connect(self.AddButton,
|
QtCore.QObject.connect(self.addButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onAddButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onAddButtonPressed)
|
||||||
QtCore.QObject.connect(self.EditButton,
|
QtCore.QObject.connect(self.editButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onEditButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onEditButtonPressed)
|
||||||
QtCore.QObject.connect(self.EditAllButton,
|
QtCore.QObject.connect(self.editAllButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onEditAllButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onEditAllButtonPressed)
|
||||||
QtCore.QObject.connect(self.SaveButton,
|
QtCore.QObject.connect(self.saveButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onSaveButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onSaveButtonPressed)
|
||||||
QtCore.QObject.connect(self.DeleteButton,
|
QtCore.QObject.connect(self.deleteButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onDeleteButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onDeleteButtonPressed)
|
||||||
QtCore.QObject.connect(self.ClearButton,
|
QtCore.QObject.connect(self.clearButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onClearButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onClearButtonPressed)
|
||||||
QtCore.QObject.connect(self.UpButton,
|
QtCore.QObject.connect(self.upButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onUpButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onUpButtonPressed)
|
||||||
QtCore.QObject.connect(self.DownButton,
|
QtCore.QObject.connect(self.downButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onDownButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onDownButtonPressed)
|
||||||
QtCore.QObject.connect(self.SplitButton,
|
QtCore.QObject.connect(self.splitButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onSplitButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onSplitButtonPressed)
|
||||||
QtCore.QObject.connect(self.VerseListView,
|
QtCore.QObject.connect(self.verseListView,
|
||||||
QtCore.SIGNAL(u'itemDoubleClicked(QListWidgetItem*)'),
|
QtCore.SIGNAL(u'itemDoubleClicked(QListWidgetItem*)'),
|
||||||
self.onVerseListViewSelected)
|
self.onVerseListViewSelected)
|
||||||
QtCore.QObject.connect(self.VerseListView,
|
QtCore.QObject.connect(self.verseListView,
|
||||||
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'),
|
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'),
|
||||||
self.onVerseListViewPressed)
|
self.onVerseListViewPressed)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
@ -93,45 +93,45 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
self.editAll = False
|
self.editAll = False
|
||||||
self.AddButton.setEnabled(True)
|
self.addButton.setEnabled(True)
|
||||||
self.DeleteButton.setEnabled(False)
|
self.deleteButton.setEnabled(False)
|
||||||
self.EditButton.setEnabled(False)
|
self.editButton.setEnabled(False)
|
||||||
self.EditAllButton.setEnabled(True)
|
self.editAllButton.setEnabled(True)
|
||||||
self.SaveButton.setEnabled(False)
|
self.saveButton.setEnabled(False)
|
||||||
self.ClearButton.setEnabled(False)
|
self.clearButton.setEnabled(False)
|
||||||
self.SplitButton.setEnabled(False)
|
self.splitButton.setEnabled(False)
|
||||||
self.TitleEdit.setText(u'')
|
self.titleEdit.setText(u'')
|
||||||
self.CreditEdit.setText(u'')
|
self.creditEdit.setText(u'')
|
||||||
self.VerseTextEdit.clear()
|
self.verseTextEdit.clear()
|
||||||
self.VerseListView.clear()
|
self.verseListView.clear()
|
||||||
#make sure we have a new item
|
#make sure we have a new item
|
||||||
self.customSlide = CustomSlide()
|
self.customSlide = CustomSlide()
|
||||||
self.ThemeComboBox.addItem(u'')
|
self.themeComboBox.addItem(u'')
|
||||||
|
|
||||||
def loadThemes(self, themelist):
|
def loadThemes(self, themelist):
|
||||||
self.ThemeComboBox.clear()
|
self.themeComboBox.clear()
|
||||||
self.ThemeComboBox.addItem(u'')
|
self.themeComboBox.addItem(u'')
|
||||||
for themename in themelist:
|
for themename in themelist:
|
||||||
self.ThemeComboBox.addItem(themename)
|
self.themeComboBox.addItem(themename)
|
||||||
|
|
||||||
def loadCustom(self, id, preview=False):
|
def loadCustom(self, id, preview=False):
|
||||||
self.customSlide = CustomSlide()
|
self.customSlide = CustomSlide()
|
||||||
self.initialise()
|
self.initialise()
|
||||||
if id != 0:
|
if id != 0:
|
||||||
self.customSlide = self.custommanager.get_object(CustomSlide, id)
|
self.customSlide = self.custommanager.get_object(CustomSlide, id)
|
||||||
self.TitleEdit.setText(self.customSlide.title)
|
self.titleEdit.setText(self.customSlide.title)
|
||||||
self.CreditEdit.setText(self.customSlide.credits)
|
self.creditEdit.setText(self.customSlide.credits)
|
||||||
customXML = CustomXMLParser(self.customSlide.text)
|
customXML = CustomXMLParser(self.customSlide.text)
|
||||||
verseList = customXML.get_verses()
|
verseList = customXML.get_verses()
|
||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
self.VerseListView.addItem(verse[1])
|
self.verseListView.addItem(verse[1])
|
||||||
theme = self.customSlide.theme_name
|
theme = self.customSlide.theme_name
|
||||||
id = self.ThemeComboBox.findText(theme, QtCore.Qt.MatchExactly)
|
id = self.themeComboBox.findText(theme, QtCore.Qt.MatchExactly)
|
||||||
if id == -1:
|
if id == -1:
|
||||||
id = 0 # Not Found
|
id = 0 # Not Found
|
||||||
self.ThemeComboBox.setCurrentIndex(id)
|
self.themeComboBox.setCurrentIndex(id)
|
||||||
else:
|
else:
|
||||||
self.ThemeComboBox.setCurrentIndex(0)
|
self.themeComboBox.setCurrentIndex(0)
|
||||||
#if not preview hide the preview button
|
#if not preview hide the preview button
|
||||||
self.previewButton.setVisible(False)
|
self.previewButton.setVisible(False)
|
||||||
if preview:
|
if preview:
|
||||||
|
@ -158,127 +158,127 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||||
sxml.new_document()
|
sxml.new_document()
|
||||||
sxml.add_lyrics_to_song()
|
sxml.add_lyrics_to_song()
|
||||||
count = 1
|
count = 1
|
||||||
for i in range (0, self.VerseListView.count()):
|
for i in range (0, self.verseListView.count()):
|
||||||
sxml.add_verse_to_lyrics(u'custom', unicode(count),
|
sxml.add_verse_to_lyrics(u'custom', unicode(count),
|
||||||
unicode(self.VerseListView.item(i).text()))
|
unicode(self.verseListView.item(i).text()))
|
||||||
count += 1
|
count += 1
|
||||||
self.customSlide.title = unicode(self.TitleEdit.displayText(), u'utf-8')
|
self.customSlide.title = unicode(self.titleEdit.displayText(), u'utf-8')
|
||||||
self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8')
|
self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8')
|
||||||
self.customSlide.credits = unicode(self.CreditEdit.displayText(),
|
self.customSlide.credits = unicode(self.creditEdit.displayText(),
|
||||||
u'utf-8')
|
u'utf-8')
|
||||||
self.customSlide.theme_name = unicode(self.ThemeComboBox.currentText(),
|
self.customSlide.theme_name = unicode(self.themeComboBox.currentText(),
|
||||||
u'utf-8')
|
u'utf-8')
|
||||||
return self.custommanager.save_object(self.customSlide)
|
return self.custommanager.save_object(self.customSlide)
|
||||||
|
|
||||||
def onUpButtonPressed(self):
|
def onUpButtonPressed(self):
|
||||||
selectedRow = self.VerseListView.currentRow()
|
selectedRow = self.verseListView.currentRow()
|
||||||
if selectedRow != 0:
|
if selectedRow != 0:
|
||||||
qw = self.VerseListView.takeItem(selectedRow)
|
qw = self.verseListView.takeItem(selectedRow)
|
||||||
self.VerseListView.insertItem(selectedRow - 1, qw)
|
self.verseListView.insertItem(selectedRow - 1, qw)
|
||||||
self.VerseListView.setCurrentRow(selectedRow - 1)
|
self.verseListView.setCurrentRow(selectedRow - 1)
|
||||||
|
|
||||||
def onDownButtonPressed(self):
|
def onDownButtonPressed(self):
|
||||||
selectedRow = self.VerseListView.currentRow()
|
selectedRow = self.verseListView.currentRow()
|
||||||
# zero base arrays
|
# zero base arrays
|
||||||
if selectedRow != self.VerseListView.count() - 1:
|
if selectedRow != self.verseListView.count() - 1:
|
||||||
qw = self.VerseListView.takeItem(selectedRow)
|
qw = self.verseListView.takeItem(selectedRow)
|
||||||
self.VerseListView.insertItem(selectedRow + 1, qw)
|
self.verseListView.insertItem(selectedRow + 1, qw)
|
||||||
self.VerseListView.setCurrentRow(selectedRow + 1)
|
self.verseListView.setCurrentRow(selectedRow + 1)
|
||||||
|
|
||||||
def onClearButtonPressed(self):
|
def onClearButtonPressed(self):
|
||||||
self.VerseTextEdit.clear()
|
self.verseTextEdit.clear()
|
||||||
self.editAll = False
|
self.editAll = False
|
||||||
self.AddButton.setEnabled(True)
|
self.addButton.setEnabled(True)
|
||||||
self.EditAllButton.setEnabled(True)
|
self.editAllButton.setEnabled(True)
|
||||||
self.SaveButton.setEnabled(False)
|
self.saveButton.setEnabled(False)
|
||||||
|
|
||||||
def onVerseListViewPressed(self, item):
|
def onVerseListViewPressed(self, item):
|
||||||
self.DeleteButton.setEnabled(True)
|
self.deleteButton.setEnabled(True)
|
||||||
self.EditButton.setEnabled(True)
|
self.editButton.setEnabled(True)
|
||||||
|
|
||||||
def onVerseListViewSelected(self, item):
|
def onVerseListViewSelected(self, item):
|
||||||
self.editText(item.text())
|
self.editText(item.text())
|
||||||
|
|
||||||
def onAddButtonPressed(self):
|
def onAddButtonPressed(self):
|
||||||
self.VerseListView.addItem(self.VerseTextEdit.toPlainText())
|
self.verseListView.addItem(self.verseTextEdit.toPlainText())
|
||||||
self.DeleteButton.setEnabled(False)
|
self.deleteButton.setEnabled(False)
|
||||||
self.VerseTextEdit.clear()
|
self.verseTextEdit.clear()
|
||||||
|
|
||||||
def onEditButtonPressed(self):
|
def onEditButtonPressed(self):
|
||||||
self.editText(self.VerseListView.currentItem().text())
|
self.editText(self.verseListView.currentItem().text())
|
||||||
|
|
||||||
def onEditAllButtonPressed(self):
|
def onEditAllButtonPressed(self):
|
||||||
self.editAll = True
|
self.editAll = True
|
||||||
self.AddButton.setEnabled(False)
|
self.addButton.setEnabled(False)
|
||||||
self.SplitButton.setEnabled(True)
|
self.splitButton.setEnabled(True)
|
||||||
if self.VerseListView.count() > 0:
|
if self.verseListView.count() > 0:
|
||||||
verse_list = u''
|
verse_list = u''
|
||||||
for row in range(0, self.VerseListView.count()):
|
for row in range(0, self.verseListView.count()):
|
||||||
item = self.VerseListView.item(row)
|
item = self.verseListView.item(row)
|
||||||
verse_list += item.text()
|
verse_list += item.text()
|
||||||
if row != self.VerseListView.count() - 1:
|
if row != self.verseListView.count() - 1:
|
||||||
verse_list += u'\n[---]\n'
|
verse_list += u'\n[---]\n'
|
||||||
self.editText(verse_list)
|
self.editText(verse_list)
|
||||||
|
|
||||||
def editText(self, text):
|
def editText(self, text):
|
||||||
self.beforeText = text
|
self.beforeText = text
|
||||||
self.VerseTextEdit.setPlainText(text)
|
self.verseTextEdit.setPlainText(text)
|
||||||
self.DeleteButton.setEnabled(False)
|
self.deleteButton.setEnabled(False)
|
||||||
self.EditButton.setEnabled(False)
|
self.editButton.setEnabled(False)
|
||||||
self.EditAllButton.setEnabled(False)
|
self.editAllButton.setEnabled(False)
|
||||||
self.SaveButton.setEnabled(True)
|
self.saveButton.setEnabled(True)
|
||||||
self.ClearButton.setEnabled(True)
|
self.clearButton.setEnabled(True)
|
||||||
|
|
||||||
def onSaveButtonPressed(self):
|
def onSaveButtonPressed(self):
|
||||||
if self.editAll:
|
if self.editAll:
|
||||||
self.VerseListView.clear()
|
self.verseListView.clear()
|
||||||
for row in unicode(self.VerseTextEdit.toPlainText()).split(
|
for row in unicode(self.verseTextEdit.toPlainText()).split(
|
||||||
u'\n[---]\n'):
|
u'\n[---]\n'):
|
||||||
self.VerseListView.addItem(row)
|
self.verseListView.addItem(row)
|
||||||
else:
|
else:
|
||||||
self.VerseListView.currentItem().setText(
|
self.verseListView.currentItem().setText(
|
||||||
self.VerseTextEdit.toPlainText())
|
self.verseTextEdit.toPlainText())
|
||||||
#number of lines has change
|
#number of lines has change
|
||||||
if len(self.beforeText.split(u'\n')) != \
|
if len(self.beforeText.split(u'\n')) != \
|
||||||
len(self.VerseTextEdit.toPlainText().split(u'\n')):
|
len(self.verseTextEdit.toPlainText().split(u'\n')):
|
||||||
tempList = {}
|
tempList = {}
|
||||||
for row in range(0, self.VerseListView.count()):
|
for row in range(0, self.verseListView.count()):
|
||||||
tempList[row] = self.VerseListView.item(row).text()
|
tempList[row] = self.verseListView.item(row).text()
|
||||||
self.VerseListView.clear()
|
self.verseListView.clear()
|
||||||
for row in range (0, len(tempList)):
|
for row in range (0, len(tempList)):
|
||||||
self.VerseListView.addItem(tempList[row])
|
self.verseListView.addItem(tempList[row])
|
||||||
self.VerseListView.repaint()
|
self.verseListView.repaint()
|
||||||
self.AddButton.setEnabled(True)
|
self.addButton.setEnabled(True)
|
||||||
self.SaveButton.setEnabled(False)
|
self.saveButton.setEnabled(False)
|
||||||
self.EditButton.setEnabled(False)
|
self.editButton.setEnabled(False)
|
||||||
self.EditAllButton.setEnabled(True)
|
self.editAllButton.setEnabled(True)
|
||||||
self.SplitButton.setEnabled(False)
|
self.splitButton.setEnabled(False)
|
||||||
self.VerseTextEdit.clear()
|
self.verseTextEdit.clear()
|
||||||
|
|
||||||
def onSplitButtonPressed(self):
|
def onSplitButtonPressed(self):
|
||||||
if self.VerseTextEdit.textCursor().columnNumber() != 0:
|
if self.verseTextEdit.textCursor().columnNumber() != 0:
|
||||||
self.VerseTextEdit.insertPlainText(u'\n')
|
self.verseTextEdit.insertPlainText(u'\n')
|
||||||
self.VerseTextEdit.insertPlainText(u'[---]\n' )
|
self.verseTextEdit.insertPlainText(u'[---]\n' )
|
||||||
self.VerseTextEdit.setFocus()
|
self.verseTextEdit.setFocus()
|
||||||
|
|
||||||
def onDeleteButtonPressed(self):
|
def onDeleteButtonPressed(self):
|
||||||
self.VerseListView.takeItem(self.VerseListView.currentRow())
|
self.verseListView.takeItem(self.verseListView.currentRow())
|
||||||
self.EditButton.setEnabled(False)
|
self.editButton.setEnabled(False)
|
||||||
self.EditAllButton.setEnabled(True)
|
self.editAllButton.setEnabled(True)
|
||||||
|
|
||||||
def _validate(self):
|
def _validate(self):
|
||||||
if len(self.TitleEdit.displayText()) == 0:
|
if len(self.titleEdit.displayText()) == 0:
|
||||||
self.TitleEdit.setFocus()
|
self.titleEdit.setFocus()
|
||||||
return False, translate('CustomPlugin.EditCustomForm',
|
return False, translate('CustomPlugin.EditCustomForm',
|
||||||
'You need to type in a title.')
|
'You need to type in a title.')
|
||||||
# must have 1 slide
|
# must have 1 slide
|
||||||
if self.VerseListView.count() == 0:
|
if self.verseListView.count() == 0:
|
||||||
self.VerseTextEdit.setFocus()
|
self.verseTextEdit.setFocus()
|
||||||
return False, translate('CustomPlugin.EditCustomForm',
|
return False, translate('CustomPlugin.EditCustomForm',
|
||||||
'You need to add at least one slide')
|
'You need to add at least one slide')
|
||||||
if self.VerseTextEdit.toPlainText():
|
if self.verseTextEdit.toPlainText():
|
||||||
self.VerseTextEdit.setFocus()
|
self.verseTextEdit.setFocus()
|
||||||
return False, translate('CustomPlugin.EditCustomForm',
|
return False, translate('CustomPlugin.EditCustomForm',
|
||||||
'You have one or more unsaved slides, please either save your '
|
'You have one or more unsaved slides, please either save your '
|
||||||
'slide(s) or clear your changes.')
|
'slide(s) or clear your changes.')
|
||||||
return True, u''
|
return True, u''
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
|
|
||||||
from customxmlhandler import CustomXMLBuilder, CustomXMLParser
|
from customxmlhandler import CustomXMLBuilder, CustomXMLParser
|
||||||
from mediaitem import CustomMediaItem
|
from mediaitem import CustomMediaItem
|
||||||
from customtab import CustomTab
|
from customtab import CustomTab
|
||||||
|
|
|
@ -77,4 +77,4 @@ class CustomTab(SettingsTab):
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
QtCore.QSettings().setValue(self.settingsSection + u'/display footer',
|
QtCore.QSettings().setValue(self.settingsSection + u'/display footer',
|
||||||
QtCore.QVariant(self.displayFooter))
|
QtCore.QVariant(self.displayFooter))
|
||||||
|
|
|
@ -154,4 +154,4 @@ class CustomXMLParser(object):
|
||||||
"""
|
"""
|
||||||
Debugging aid to dump XML so that we can see what we have.
|
Debugging aid to dump XML so that we can see what we have.
|
||||||
"""
|
"""
|
||||||
return dump(self.custom_xml)
|
return dump(self.custom_xml)
|
||||||
|
|
|
@ -59,4 +59,4 @@ def init_schema(url):
|
||||||
mapper(CustomSlide, custom_slide_table)
|
mapper(CustomSlide, custom_slide_table)
|
||||||
|
|
||||||
metadata.create_all(checkfirst=True)
|
metadata.create_all(checkfirst=True)
|
||||||
return session
|
return session
|
||||||
|
|
|
@ -183,4 +183,4 @@ class CustomMediaItem(MediaManagerItem):
|
||||||
else:
|
else:
|
||||||
raw_footer.append(u'')
|
raw_footer.append(u'')
|
||||||
service_item.raw_footer = raw_footer
|
service_item.raw_footer = raw_footer
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
"""
|
"""
|
||||||
The :mod:`images` module provides the Images plugin. The Images plugin
|
The :mod:`images` module provides the Images plugin. The Images plugin
|
||||||
provides the facility to display images from OpenLP.
|
provides the facility to display images from OpenLP.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -60,4 +60,4 @@ class ImagePlugin(Plugin):
|
||||||
'background, which renders text-based items like songs with the '
|
'background, which renders text-based items like songs with the '
|
||||||
'selected image as a background instead of the background '
|
'selected image as a background instead of the background '
|
||||||
'provided by the theme.')
|
'provided by the theme.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from mediaitem import ImageMediaItem
|
from mediaitem import ImageMediaItem
|
||||||
from imagetab import ImageTab
|
from imagetab import ImageTab
|
||||||
|
|
|
@ -90,4 +90,4 @@ class ImageTab(SettingsTab):
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self):
|
||||||
Receiver.send_message(u'slidecontroller_live_spin_delay',
|
Receiver.send_message(u'slidecontroller_live_spin_delay',
|
||||||
self.loop_delay)
|
self.loop_delay)
|
||||||
|
|
|
@ -181,4 +181,4 @@ class ImageMediaItem(MediaManagerItem):
|
||||||
self.parent.displayManager.displayImageWithText(frame)
|
self.parent.displayManager.displayImageWithText(frame)
|
||||||
|
|
||||||
def onPreviewClick(self):
|
def onPreviewClick(self):
|
||||||
MediaManagerItem.onPreviewClick(self)
|
MediaManagerItem.onPreviewClick(self)
|
||||||
|
|
|
@ -28,4 +28,4 @@ The :mod:`media` module provides the Media plugin which allows OpenLP to
|
||||||
display videos. The media supported depends not only on the Python support
|
display videos. The media supported depends not only on the Python support
|
||||||
but also extensively on the codecs installed on the underlying operating system
|
but also extensively on the codecs installed on the underlying operating system
|
||||||
being picked up and usable by Python.
|
being picked up and usable by Python.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
|
|
||||||
from mediaitem import MediaMediaItem
|
from mediaitem import MediaMediaItem
|
||||||
|
|
||||||
__all__ = ['MediaMediaItem']
|
__all__ = ['MediaMediaItem']
|
||||||
|
|
|
@ -149,4 +149,4 @@ class MediaMediaItem(MediaManagerItem):
|
||||||
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
|
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
|
||||||
item_name.setIcon(build_icon(img))
|
item_name.setIcon(build_icon(img))
|
||||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
||||||
self.listView.addItem(item_name)
|
self.listView.addItem(item_name)
|
||||||
|
|
|
@ -76,4 +76,4 @@ class MediaPlugin(Plugin):
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||||
'<br />The media plugin provides playback of audio and video.')
|
'<br />The media plugin provides playback of audio and video.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
"""
|
"""
|
||||||
The :mod:`presentations` module provides the Presentations plugin which allows
|
The :mod:`presentations` module provides the Presentations plugin which allows
|
||||||
OpenLP to show presentations from most popular presentation packages.
|
OpenLP to show presentations from most popular presentation packages.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -27,4 +27,4 @@
|
||||||
from presentationcontroller import PresentationController
|
from presentationcontroller import PresentationController
|
||||||
from messagelistener import MessageListener
|
from messagelistener import MessageListener
|
||||||
from mediaitem import PresentationMediaItem
|
from mediaitem import PresentationMediaItem
|
||||||
from presentationtab import PresentationTab
|
from presentationtab import PresentationTab
|
||||||
|
|
|
@ -463,4 +463,4 @@ class ImpressDocument(PresentationDocument):
|
||||||
shape = notes.getByIndex(idx)
|
shape = notes.getByIndex(idx)
|
||||||
if shape.supportsService("com.sun.star.drawing.Text"):
|
if shape.supportsService("com.sun.star.drawing.Text"):
|
||||||
text += shape.getString() + '\n'
|
text += shape.getString() + '\n'
|
||||||
return text
|
return text
|
||||||
|
|
|
@ -367,4 +367,4 @@ class MessageListener(object):
|
||||||
to check which slide is currently displayed so the slidecontroller
|
to check which slide is currently displayed so the slidecontroller
|
||||||
view can be updated
|
view can be updated
|
||||||
"""
|
"""
|
||||||
self.live_handler.poll()
|
self.live_handler.poll()
|
||||||
|
|
|
@ -310,4 +310,4 @@ class PowerpointDocument(PresentationDocument):
|
||||||
shape = shapes(idx + 1)
|
shape = shapes(idx + 1)
|
||||||
if shape.HasTextFrame:
|
if shape.HasTextFrame:
|
||||||
text += shape.TextFrame.TextRange.Text + '\n'
|
text += shape.TextFrame.TextRange.Text + '\n'
|
||||||
return text
|
return text
|
||||||
|
|
|
@ -435,4 +435,4 @@ class PresentationDocument(object):
|
||||||
``slide_no``
|
``slide_no``
|
||||||
The slide the notes are required for, starting at 1
|
The slide the notes are required for, starting at 1
|
||||||
"""
|
"""
|
||||||
return ''
|
return ''
|
||||||
|
|
|
@ -162,4 +162,4 @@ class PresentationTab(SettingsTab):
|
||||||
QtCore.QVariant(self.OverrideAppCheckBox.checkState()))
|
QtCore.QVariant(self.OverrideAppCheckBox.checkState()))
|
||||||
changed = True
|
changed = True
|
||||||
if changed:
|
if changed:
|
||||||
Receiver.send_message(u'mediaitem_presentation_rebuild')
|
Receiver.send_message(u'mediaitem_presentation_rebuild')
|
||||||
|
|
|
@ -142,4 +142,4 @@ class PresentationPlugin(Plugin):
|
||||||
'ability to show presentations using a number of different '
|
'ability to show presentations using a number of different '
|
||||||
'programs. The choice of available presentation programs is '
|
'programs. The choice of available presentation programs is '
|
||||||
'available to the user in a drop down box.')
|
'available to the user in a drop down box.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
"""
|
"""
|
||||||
The :mod:`remotes` plugin allows OpenLP to be controlled from another machine
|
The :mod:`remotes` plugin allows OpenLP to be controlled from another machine
|
||||||
over a network connection.
|
over a network connection.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from remotetab import RemoteTab
|
from remotetab import RemoteTab
|
||||||
from httpserver import HttpServer
|
from httpserver import HttpServer
|
||||||
|
|
|
@ -337,4 +337,4 @@ class HttpConnection(object):
|
||||||
log.debug(u'close socket')
|
log.debug(u'close socket')
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
self.socket = None
|
self.socket = None
|
||||||
self.parent.close_connection(self)
|
self.parent.close_connection(self)
|
||||||
|
|
|
@ -75,4 +75,4 @@ class RemotesPlugin(Plugin):
|
||||||
'<br/ >The remote plugin provides the ability to send messages to '
|
'<br/ >The remote plugin provides the ability to send messages to '
|
||||||
'a running version of OpenLP on a different computer via a web '
|
'a running version of OpenLP on a different computer via a web '
|
||||||
'browser or through the remote API.')
|
'browser or through the remote API.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
|
@ -26,4 +26,4 @@
|
||||||
"""
|
"""
|
||||||
The :mod:`songs` module provides the Songs plugin. The Songs plugin provides
|
The :mod:`songs` module provides the Songs plugin. The Songs plugin provides
|
||||||
the main lyric projection function of OpenLP.
|
the main lyric projection function of OpenLP.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -30,4 +30,4 @@ from songbookform import SongBookForm
|
||||||
from editverseform import EditVerseForm
|
from editverseform import EditVerseForm
|
||||||
from editsongform import EditSongForm
|
from editsongform import EditSongForm
|
||||||
from songmaintenanceform import SongMaintenanceForm
|
from songmaintenanceform import SongMaintenanceForm
|
||||||
from songimportform import ImportWizardForm
|
from songimportform import ImportWizardForm
|
||||||
|
|
|
@ -83,4 +83,4 @@ class Ui_AuthorsDialog(object):
|
||||||
self.FirstNameLabel.setText(
|
self.FirstNameLabel.setText(
|
||||||
translate('SongsPlugin.AuthorsForm', 'First name:'))
|
translate('SongsPlugin.AuthorsForm', 'First name:'))
|
||||||
self.LastNameLabel.setText(
|
self.LastNameLabel.setText(
|
||||||
translate('SongsPlugin.AuthorsForm', 'Last name:'))
|
translate('SongsPlugin.AuthorsForm', 'Last name:'))
|
||||||
|
|
|
@ -111,4 +111,4 @@ class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
|
||||||
self.DisplayEdit.setFocus()
|
self.DisplayEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
|
@ -459,4 +459,4 @@ class Ui_EditSongDialog(object):
|
||||||
self.SongTabWidget.setTabText(
|
self.SongTabWidget.setTabText(
|
||||||
self.SongTabWidget.indexOf(self.ThemeTab),
|
self.SongTabWidget.indexOf(self.ThemeTab),
|
||||||
translate('SongsPlugin.EditSongForm',
|
translate('SongsPlugin.EditSongForm',
|
||||||
'Theme, Copyright Info && Comments'))
|
'Theme, Copyright Info && Comments'))
|
||||||
|
|
|
@ -685,4 +685,4 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||||
def processTitle(self):
|
def processTitle(self):
|
||||||
log.debug(u'processTitle')
|
log.debug(u'processTitle')
|
||||||
self.song.search_title = \
|
self.song.search_title = \
|
||||||
re.sub(r'[\'"`,;:(){}?]+', u'', unicode(self.song.search_title))
|
re.sub(r'[\'"`,;:(){}?]+', u'', unicode(self.song.search_title))
|
||||||
|
|
|
@ -103,4 +103,4 @@ class Ui_EditVerseDialog(object):
|
||||||
self.VerseTypeComboBox.setItemText(6,
|
self.VerseTypeComboBox.setItemText(6,
|
||||||
VerseType.to_string(VerseType.Other))
|
VerseType.to_string(VerseType.Other))
|
||||||
self.InsertButton.setText(
|
self.InsertButton.setText(
|
||||||
translate('SongsPlugin.EditVerseForm', '&Insert'))
|
translate('SongsPlugin.EditVerseForm', '&Insert'))
|
||||||
|
|
|
@ -138,4 +138,4 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
||||||
if not text.startsWith(u'---['):
|
if not text.startsWith(u'---['):
|
||||||
text = u'---[%s:1]---\n%s' % (VerseType.to_string(VerseType.Verse),
|
text = u'---[%s:1]---\n%s' % (VerseType.to_string(VerseType.Verse),
|
||||||
text)
|
text)
|
||||||
return text
|
return text
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue