forked from openlp/openlp
HEAD
This commit is contained in:
commit
873eb59a89
@ -22,3 +22,6 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`openlp` module contains all the project produced OpenLP functionality
|
||||||
|
"""
|
||||||
|
@ -22,3 +22,9 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`core` module provides all core application functions
|
||||||
|
|
||||||
|
All the core functions of the OpenLP application including the GUI, settings,
|
||||||
|
logging and a plugin framework are contained within the openlp.core module.
|
||||||
|
"""
|
||||||
|
@ -95,24 +95,24 @@ def build_icon(icon):
|
|||||||
The icon to build. This can be a QIcon, a resource string in the form
|
The icon to build. This can be a QIcon, a resource string in the form
|
||||||
``:/resource/file.png``, or a file location like ``/path/to/file.png``.
|
``:/resource/file.png``, or a file location like ``/path/to/file.png``.
|
||||||
"""
|
"""
|
||||||
ButtonIcon = None
|
button_icon = None
|
||||||
if isinstance(icon, QtGui.QIcon):
|
if isinstance(icon, QtGui.QIcon):
|
||||||
ButtonIcon = icon
|
button_icon = icon
|
||||||
elif isinstance(icon, basestring):
|
elif isinstance(icon, basestring):
|
||||||
ButtonIcon = QtGui.QIcon()
|
button_icon = QtGui.QIcon()
|
||||||
if icon.startswith(u':/'):
|
if icon.startswith(u':/'):
|
||||||
ButtonIcon.addPixmap(
|
button_icon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
|
||||||
QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Off)
|
||||||
else:
|
else:
|
||||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
button_icon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
elif isinstance(icon, QtGui.QImage):
|
elif isinstance(icon, QtGui.QImage):
|
||||||
ButtonIcon = QtGui.QIcon()
|
button_icon = QtGui.QIcon()
|
||||||
ButtonIcon.addPixmap(
|
button_icon.addPixmap(QtGui.QPixmap.fromImage(icon),
|
||||||
QtGui.QPixmap.fromImage(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
return ButtonIcon
|
return button_icon
|
||||||
|
|
||||||
def contextMenuAction(base, icon, text, slot):
|
def context_menu_action(base, icon, text, slot):
|
||||||
"""
|
"""
|
||||||
Utility method to help build context menus for plugins
|
Utility method to help build context menus for plugins
|
||||||
"""
|
"""
|
||||||
@ -122,7 +122,7 @@ def contextMenuAction(base, icon, text, slot):
|
|||||||
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
|
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
|
||||||
return action
|
return action
|
||||||
|
|
||||||
def contextMenu(base, icon, text):
|
def context_menu(base, icon, text):
|
||||||
"""
|
"""
|
||||||
Utility method to help build context menus for plugins
|
Utility method to help build context menus for plugins
|
||||||
"""
|
"""
|
||||||
@ -130,7 +130,7 @@ def contextMenu(base, icon, text):
|
|||||||
action.setIcon(build_icon(icon))
|
action.setIcon(build_icon(icon))
|
||||||
return action
|
return action
|
||||||
|
|
||||||
def contextMenuSeparator(base):
|
def context_menu_separator(base):
|
||||||
"""
|
"""
|
||||||
Add a separator to a context menu
|
Add a separator to a context menu
|
||||||
"""
|
"""
|
||||||
@ -152,12 +152,12 @@ def resize_image(image, width, height):
|
|||||||
realw = preview.width()
|
realw = preview.width()
|
||||||
realh = preview.height()
|
realh = preview.height()
|
||||||
# and move it to the centre of the preview space
|
# and move it to the centre of the preview space
|
||||||
newImage = QtGui.QImage(width, height,
|
new_image = QtGui.QImage(width, height,
|
||||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||||
newImage.fill(QtCore.Qt.black)
|
new_image.fill(QtCore.Qt.black)
|
||||||
painter = QtGui.QPainter(newImage)
|
painter = QtGui.QPainter(new_image)
|
||||||
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
painter.drawImage((width - realw) / 2, (height - realh) / 2, preview)
|
||||||
return newImage
|
return new_image
|
||||||
|
|
||||||
|
|
||||||
class ThemeLevel(object):
|
class ThemeLevel(object):
|
||||||
|
@ -28,8 +28,8 @@ import os
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import contextMenuAction, contextMenuSeparator, \
|
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
||||||
SettingsManager, OpenLPToolbar, ServiceItem, build_icon
|
SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -110,7 +110,6 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.remoteTriggered = None
|
self.remoteTriggered = None
|
||||||
self.ServiceItemIconName = None
|
self.ServiceItemIconName = None
|
||||||
self.singleServiceItem = True
|
self.singleServiceItem = True
|
||||||
self.addToServiceItem = False
|
|
||||||
self.PageLayout = QtGui.QVBoxLayout(self)
|
self.PageLayout = QtGui.QVBoxLayout(self)
|
||||||
self.PageLayout.setSpacing(0)
|
self.PageLayout.setSpacing(0)
|
||||||
self.PageLayout.setContentsMargins(4, 0, 4, 0)
|
self.PageLayout.setContentsMargins(4, 0, 4, 0)
|
||||||
@ -133,6 +132,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.hasEditIcon = True
|
self.hasEditIcon = True
|
||||||
self.hasFileIcon = False
|
self.hasFileIcon = False
|
||||||
self.hasDeleteIcon = True
|
self.hasDeleteIcon = True
|
||||||
|
self.addToServiceItem = False
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
"""
|
"""
|
||||||
@ -208,50 +208,62 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
## Import Button ##
|
## Import Button ##
|
||||||
if self.hasImportIcon:
|
if self.hasImportIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Import %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Import %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Import a'), self.PluginNameVisible),
|
self.PluginNameShort,
|
||||||
|
unicode(translate(u'MediaManagerItem', u'Import a %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_import.png', self.onImportClick)
|
u':/general/general_import.png', self.onImportClick)
|
||||||
## File Button ##
|
## File Button ##
|
||||||
if self.hasFileIcon:
|
if self.hasFileIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Load %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Load %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Load a new'), self.PluginNameVisible),
|
self.PluginNameShort,
|
||||||
|
unicode(translate(u'MediaManagerItem', u'Load a new %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_open.png', self.onFileClick)
|
u':/general/general_open.png', self.onFileClick)
|
||||||
## New Button ##
|
## New Button ##
|
||||||
if self.hasNewIcon:
|
if self.hasNewIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'New %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'New %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Add a new'), self.PluginNameVisible),
|
self.PluginNameShort,
|
||||||
|
unicode(translate(u'MediaManagerItem', u'Add a new %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_new.png', self.onNewClick)
|
u':/general/general_new.png', self.onNewClick)
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Edit %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Edit %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Edit the selected'),
|
self.PluginNameShort,
|
||||||
self.PluginNameVisible),
|
unicode(translate(
|
||||||
|
u'MediaManagerItem', u'Edit the selected %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_edit.png', self.onEditClick)
|
u':/general/general_edit.png', self.onEditClick)
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
if self.hasDeleteIcon:
|
if self.hasDeleteIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Delete %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Delete %s')) % \
|
||||||
self.trUtf8('Delete the selected item'),
|
self.PluginNameShort,
|
||||||
|
translate(u'MediaManagerItem', u'Delete the selected item'),
|
||||||
u':/general/general_delete.png', self.onDeleteClick)
|
u':/general/general_delete.png', self.onDeleteClick)
|
||||||
## Separator Line ##
|
## Separator Line ##
|
||||||
self.addToolbarSeparator()
|
self.addToolbarSeparator()
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Preview %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Preview %s')) % \
|
||||||
self.trUtf8('Preview the selected item'),
|
self.PluginNameShort,
|
||||||
|
translate(u'MediaManagerItem', u'Preview the selected item'),
|
||||||
u':/general/general_preview.png', self.onPreviewClick)
|
u':/general/general_preview.png', self.onPreviewClick)
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Go Live',
|
u'Go Live',
|
||||||
self.trUtf8('Send the selected item live'),
|
translate(u'MediaManagerItem', u'Send the selected item live'),
|
||||||
u':/general/general_live.png', self.onLiveClick)
|
u':/general/general_live.png', self.onLiveClick)
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Add %s to Service' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Add %s to Service')) % \
|
||||||
self.trUtf8('Add the selected item(s) to the service'),
|
self.PluginNameShort,
|
||||||
|
translate(u'MediaManagerItem',
|
||||||
|
u'Add the selected item(s) to the service'),
|
||||||
u':/general/general_add.png', self.onAddClick)
|
u':/general/general_add.png', self.onAddClick)
|
||||||
|
|
||||||
def addListViewToToolBar(self):
|
def addListViewToToolBar(self):
|
||||||
@ -271,36 +283,42 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_edit.png',
|
self.ListView, u':/general/general_edit.png',
|
||||||
u'%s %s' % (self.trUtf8('&Edit'), self.PluginNameVisible),
|
unicode(translate(u'MediaManagerItem', u'&Edit %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
self.onEditClick))
|
self.onEditClick))
|
||||||
self.ListView.addAction(contextMenuSeparator(self.ListView))
|
self.ListView.addAction(context_menu_separator(self.ListView))
|
||||||
if self.hasDeleteIcon:
|
if self.hasDeleteIcon:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_delete.png',
|
self.ListView, u':/general/general_delete.png',
|
||||||
u'%s %s' % (self.trUtf8('&Delete'), self.PluginNameVisible),
|
unicode(translate(u'MediaManagerItem', u'&Delete %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
self.onDeleteClick))
|
self.onDeleteClick))
|
||||||
self.ListView.addAction(contextMenuSeparator(self.ListView))
|
self.ListView.addAction(context_menu_separator(self.ListView))
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_preview.png',
|
self.ListView, u':/general/general_preview.png',
|
||||||
u'%s %s' % (self.trUtf8('&Preview'), self.PluginNameVisible),
|
unicode(translate(u'MediaManagerItem', u'&Preview %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
self.onPreviewClick))
|
self.onPreviewClick))
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_live.png',
|
self.ListView, u':/general/general_live.png',
|
||||||
self.trUtf8('&Show Live'), self.onLiveClick))
|
translate(u'MediaManagerItem', u'&Show Live'),
|
||||||
|
self.onLiveClick))
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_add.png',
|
self.ListView, u':/general/general_add.png',
|
||||||
self.trUtf8('&Add to Service'), self.onAddClick))
|
translate(u'MediaManagerItem', u'&Add to Service'),
|
||||||
|
self.onAddClick))
|
||||||
if self.addToServiceItem:
|
if self.addToServiceItem:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_add.png',
|
self.ListView, u':/general/general_add.png',
|
||||||
self.trUtf8('&Add to selected Service Item'),
|
translate(u'MediaManagerItem',
|
||||||
|
u'&Add to selected Service Item'),
|
||||||
self.onAddEditClick))
|
self.onAddEditClick))
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
self.ListView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
self.ListView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||||
@ -309,8 +327,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def initialise(self):
|
def initialise(self):
|
||||||
"""
|
"""
|
||||||
Implement this method in your descendent media manager item to
|
Implement this method in your descendent media manager item to
|
||||||
do any UI or other initialisation. This method is called
|
do any UI or other initialisation. This method is called automatically.
|
||||||
automatically.
|
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -326,6 +343,19 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def checkItemSelected(self, message):
|
||||||
|
"""
|
||||||
|
Check if a list item is selected so an action may be performed on it
|
||||||
|
|
||||||
|
``message``
|
||||||
|
The message to give the user if no item is selected
|
||||||
|
"""
|
||||||
|
if not self.ListView.selectedIndexes():
|
||||||
|
QtGui.QMessageBox.information(self,
|
||||||
|
translate(u'MediaManagerItem', u'No Items Selected'), message)
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def onFileClick(self):
|
def onFileClick(self):
|
||||||
files = QtGui.QFileDialog.getOpenFileNames(
|
files = QtGui.QFileDialog.getOpenFileNames(
|
||||||
self, self.OnNewPrompt,
|
self, self.OnNewPrompt,
|
||||||
@ -351,8 +381,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
|
|
||||||
def validate(self, file, thumb):
|
def validate(self, file, thumb):
|
||||||
"""
|
"""
|
||||||
Validates to see if the file still exists or
|
Validates to see if the file still exists or thumbnail is up to date
|
||||||
thumbnail is up to date
|
|
||||||
"""
|
"""
|
||||||
if os.path.exists(file):
|
if os.path.exists(file):
|
||||||
filedate = os.stat(file).st_mtime
|
filedate = os.stat(file).st_mtime
|
||||||
@ -393,8 +422,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onPreviewClick(self):
|
def onPreviewClick(self):
|
||||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Items Selected'),
|
translate(u'MediaManagerItem', u'No Items Selected'),
|
||||||
self.trUtf8('You must select one or more items.'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items to preview.'))
|
||||||
else:
|
else:
|
||||||
log.debug(self.PluginNameShort + u' Preview requested')
|
log.debug(self.PluginNameShort + u' Preview requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
@ -405,8 +435,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onLiveClick(self):
|
def onLiveClick(self):
|
||||||
if not self.ListView.selectedIndexes():
|
if not self.ListView.selectedIndexes():
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Items Selected'),
|
translate(u'MediaManagerItem', u'No Items Selected'),
|
||||||
self.trUtf8('You must select one or more items.'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items to send live.'))
|
||||||
else:
|
else:
|
||||||
log.debug(self.PluginNameShort + u' Live requested')
|
log.debug(self.PluginNameShort + u' Live requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
@ -417,8 +448,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onAddClick(self):
|
def onAddClick(self):
|
||||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Items Selected'),
|
translate(u'MediaManagerItem', u'No Items Selected'),
|
||||||
self.trUtf8('You must select one or more items.'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items.'))
|
||||||
else:
|
else:
|
||||||
#Is it posssible to process multiple list items to generate multiple
|
#Is it posssible to process multiple list items to generate multiple
|
||||||
#service items?
|
#service items?
|
||||||
@ -440,16 +472,17 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onAddEditClick(self):
|
def onAddEditClick(self):
|
||||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No items selected'),
|
translate(u'MediaManagerItem', u'No items selected'),
|
||||||
self.trUtf8('You must select one or more items'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items'))
|
||||||
else:
|
else:
|
||||||
log.debug(self.PluginNameShort + u' Add requested')
|
log.debug(self.PluginNameShort + u' Add requested')
|
||||||
service_item = self.parent.service_manager.getServiceItem()
|
service_item = self.parent.service_manager.getServiceItem()
|
||||||
if not service_item:
|
if not service_item:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Service Item Selected'),
|
translate(u'MediaManagerItem', u'No Service Item Selected'),
|
||||||
self.trUtf8(
|
translate(u'MediaManagerItem',
|
||||||
'You must select an existing service item to add to.'))
|
u'You must select an existing service item to add to.'))
|
||||||
elif self.title.lower() == service_item.name.lower():
|
elif self.title.lower() == service_item.name.lower():
|
||||||
self.generateSlideData(service_item)
|
self.generateSlideData(service_item)
|
||||||
self.parent.service_manager.addServiceItem(service_item,
|
self.parent.service_manager.addServiceItem(service_item,
|
||||||
@ -457,9 +490,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
#Turn off the remote edit update message indicator
|
#Turn off the remote edit update message indicator
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('Invalid Service Item'),
|
translate(u'MediaManagerItem', u'Invalid Service Item'),
|
||||||
self.trUtf8(unicode(
|
translate(unicode(u'MediaManagerItem',
|
||||||
'You must select a %s service item.' % self.title)))
|
u'You must select a %s service item.')) % self.title)
|
||||||
|
|
||||||
def buildServiceItem(self, item=None):
|
def buildServiceItem(self, item=None):
|
||||||
"""
|
"""
|
||||||
@ -467,9 +500,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
service_item = ServiceItem(self.parent)
|
service_item = ServiceItem(self.parent)
|
||||||
if self.ServiceItemIconName:
|
if self.ServiceItemIconName:
|
||||||
service_item.addIcon(self.ServiceItemIconName)
|
service_item.add_icon(self.ServiceItemIconName)
|
||||||
else:
|
else:
|
||||||
service_item.addIcon(
|
service_item.add_icon(
|
||||||
u':/media/media_' + self.PluginNameShort.lower() + u'.png')
|
u':/media/media_' + self.PluginNameShort.lower() + u'.png')
|
||||||
if self.generateSlideData(service_item, item):
|
if self.generateSlideData(service_item, item):
|
||||||
return service_item
|
return service_item
|
||||||
|
@ -231,7 +231,8 @@ class Plugin(QtCore.QObject):
|
|||||||
Show a dialog when the user clicks on the 'About' button in the plugin
|
Show a dialog when the user clicks on the 'About' button in the plugin
|
||||||
manager.
|
manager.
|
||||||
"""
|
"""
|
||||||
pass
|
raise NotImplementedError(
|
||||||
|
u'Plugin.about needs to be defined by the plugin')
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
"""
|
"""
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
Provide plugin management
|
||||||
|
"""
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
|
@ -22,6 +22,10 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`serviceitem` provides the service item functionality including the
|
||||||
|
type and capability of an item.
|
||||||
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@ -43,6 +47,9 @@ class ServiceItemType(object):
|
|||||||
Command = 3
|
Command = 3
|
||||||
|
|
||||||
class ItemCapabilities(object):
|
class ItemCapabilities(object):
|
||||||
|
"""
|
||||||
|
Provides an enumeration of a serviceitem's capabilities
|
||||||
|
"""
|
||||||
AllowsPreview = 1
|
AllowsPreview = 1
|
||||||
AllowsEdit = 2
|
AllowsEdit = 2
|
||||||
AllowsMaintain = 3
|
AllowsMaintain = 3
|
||||||
@ -66,9 +73,10 @@ class ServiceItem(object):
|
|||||||
The plugin that this service item belongs to.
|
The plugin that this service item belongs to.
|
||||||
"""
|
"""
|
||||||
if plugin:
|
if plugin:
|
||||||
self.RenderManager = plugin.render_manager
|
self.render_manager = plugin.render_manager
|
||||||
self.name = plugin.name
|
self.name = plugin.name
|
||||||
self.title = u''
|
self.title = u''
|
||||||
|
self.shortname = u''
|
||||||
self.audit = u''
|
self.audit = u''
|
||||||
self.items = []
|
self.items = []
|
||||||
self.iconic_representation = None
|
self.iconic_representation = None
|
||||||
@ -83,14 +91,27 @@ class ServiceItem(object):
|
|||||||
self.capabilities = []
|
self.capabilities = []
|
||||||
self.is_valid = True
|
self.is_valid = True
|
||||||
self.cache = []
|
self.cache = []
|
||||||
|
self.icon = None
|
||||||
|
|
||||||
def add_capability(self, capability):
|
def add_capability(self, capability):
|
||||||
|
"""
|
||||||
|
Add an ItemCapability to a ServiceItem
|
||||||
|
|
||||||
|
``capability``
|
||||||
|
The capability to add
|
||||||
|
"""
|
||||||
self.capabilities.append(capability)
|
self.capabilities.append(capability)
|
||||||
|
|
||||||
def is_capable(self, capability):
|
def is_capable(self, capability):
|
||||||
|
"""
|
||||||
|
Tell the caller if a ServiceItem has a capability
|
||||||
|
|
||||||
|
``capability``
|
||||||
|
The capability to test for
|
||||||
|
"""
|
||||||
return capability in self.capabilities
|
return capability in self.capabilities
|
||||||
|
|
||||||
def addIcon(self, icon):
|
def add_icon(self, icon):
|
||||||
"""
|
"""
|
||||||
Add an icon to the service item. This is used when displaying the
|
Add an icon to the service item. This is used when displaying the
|
||||||
service item in the service manager.
|
service item in the service manager.
|
||||||
@ -112,12 +133,12 @@ class ServiceItem(object):
|
|||||||
if self.service_item_type == ServiceItemType.Text:
|
if self.service_item_type == ServiceItemType.Text:
|
||||||
log.debug(u'Formatting slides')
|
log.debug(u'Formatting slides')
|
||||||
if self.theme is None:
|
if self.theme is None:
|
||||||
self.RenderManager.set_override_theme(None)
|
self.render_manager.set_override_theme(None)
|
||||||
else:
|
else:
|
||||||
self.RenderManager.set_override_theme(self.theme)
|
self.render_manager.set_override_theme(self.theme)
|
||||||
for slide in self._raw_frames:
|
for slide in self._raw_frames:
|
||||||
before = time.time()
|
before = time.time()
|
||||||
formated = self.RenderManager.format_slide(slide[u'raw_slide'])
|
formated = self.render_manager.format_slide(slide[u'raw_slide'])
|
||||||
for format in formated:
|
for format in formated:
|
||||||
lines = u''
|
lines = u''
|
||||||
title = u''
|
title = u''
|
||||||
@ -132,9 +153,8 @@ class ServiceItem(object):
|
|||||||
log.log(15, u'Formatting took %4s' % (time.time() - before))
|
log.log(15, u'Formatting took %4s' % (time.time() - before))
|
||||||
elif self.service_item_type == ServiceItemType.Image:
|
elif self.service_item_type == ServiceItemType.Image:
|
||||||
for slide in self._raw_frames:
|
for slide in self._raw_frames:
|
||||||
slide[u'image'] = \
|
slide[u'image'] = resize_image(slide[u'image'],
|
||||||
resize_image(slide[u'image'], self.RenderManager.width,
|
self.render_manager.width, self.render_manager.height)
|
||||||
self.RenderManager.height)
|
|
||||||
elif self.service_item_type == ServiceItemType.Command:
|
elif self.service_item_type == ServiceItemType.Command:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@ -148,19 +168,19 @@ class ServiceItem(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'render individual')
|
log.debug(u'render individual')
|
||||||
if self.theme is None:
|
if self.theme is None:
|
||||||
self.RenderManager.set_override_theme(None)
|
self.render_manager.set_override_theme(None)
|
||||||
else:
|
else:
|
||||||
self.RenderManager.set_override_theme(self.theme)
|
self.render_manager.set_override_theme(self.theme)
|
||||||
format = self._display_frames[row][u'text'].split(u'\n')
|
format = self._display_frames[row][u'text'].split(u'\n')
|
||||||
#if screen blank then do not display footer
|
#if screen blank then do not display footer
|
||||||
if self.cache[row] is not None:
|
if len(self.cache) > 0 and self.cache[row] is not None:
|
||||||
frame = self.cache[row]
|
frame = self.cache[row]
|
||||||
else:
|
else:
|
||||||
if format[0]:
|
if format[0]:
|
||||||
frame = self.RenderManager.generate_slide(format,
|
frame = self.render_manager.generate_slide(format,
|
||||||
self.raw_footer)
|
self.raw_footer)
|
||||||
else:
|
else:
|
||||||
frame = self.RenderManager.generate_slide(format, u'')
|
frame = self.render_manager.generate_slide(format, u'')
|
||||||
self.cache[row] = frame
|
self.cache[row] = frame
|
||||||
return frame
|
return frame
|
||||||
|
|
||||||
@ -181,7 +201,7 @@ class ServiceItem(object):
|
|||||||
self._raw_frames.append(
|
self._raw_frames.append(
|
||||||
{u'title': title, u'image': image, u'path': path})
|
{u'title': title, u'image': image, u'path': path})
|
||||||
|
|
||||||
def add_from_text(self, title, raw_slide, verseTag=None):
|
def add_from_text(self, title, raw_slide, verse_tag=None):
|
||||||
"""
|
"""
|
||||||
Add a text slide to the service item.
|
Add a text slide to the service item.
|
||||||
|
|
||||||
@ -194,7 +214,7 @@ class ServiceItem(object):
|
|||||||
self.service_item_type = ServiceItemType.Text
|
self.service_item_type = ServiceItemType.Text
|
||||||
title = title.split(u'\n')[0]
|
title = title.split(u'\n')[0]
|
||||||
self._raw_frames.append(
|
self._raw_frames.append(
|
||||||
{u'title': title, u'raw_slide': raw_slide, u'verseTag':verseTag})
|
{u'title': title, u'raw_slide': raw_slide, u'verseTag':verse_tag})
|
||||||
|
|
||||||
def add_from_command(self, path, file_name, image):
|
def add_from_command(self, path, file_name, image):
|
||||||
"""
|
"""
|
||||||
@ -261,7 +281,7 @@ class ServiceItem(object):
|
|||||||
self.service_item_type = header[u'type']
|
self.service_item_type = header[u'type']
|
||||||
self.shortname = header[u'plugin']
|
self.shortname = header[u'plugin']
|
||||||
self.theme = header[u'theme']
|
self.theme = header[u'theme']
|
||||||
self.addIcon(header[u'icon'])
|
self.add_icon(header[u'icon'])
|
||||||
self.raw_footer = header[u'footer']
|
self.raw_footer = header[u'footer']
|
||||||
self.audit = header[u'audit']
|
self.audit = header[u'audit']
|
||||||
self.notes = header[u'notes']
|
self.notes = header[u'notes']
|
||||||
@ -304,22 +324,40 @@ class ServiceItem(object):
|
|||||||
return self._uuid != other._uuid
|
return self._uuid != other._uuid
|
||||||
|
|
||||||
def is_media(self):
|
def is_media(self):
|
||||||
|
"""
|
||||||
|
Confirms if the ServiceItem is media
|
||||||
|
"""
|
||||||
return ItemCapabilities.RequiresMedia in self.capabilities
|
return ItemCapabilities.RequiresMedia in self.capabilities
|
||||||
|
|
||||||
def is_command(self):
|
def is_command(self):
|
||||||
|
"""
|
||||||
|
Confirms if the ServiceItem is a command
|
||||||
|
"""
|
||||||
return self.service_item_type == ServiceItemType.Command
|
return self.service_item_type == ServiceItemType.Command
|
||||||
|
|
||||||
def is_image(self):
|
def is_image(self):
|
||||||
|
"""
|
||||||
|
Confirms if the ServiceItem is an image
|
||||||
|
"""
|
||||||
return self.service_item_type == ServiceItemType.Image
|
return self.service_item_type == ServiceItemType.Image
|
||||||
|
|
||||||
def uses_file(self):
|
def uses_file(self):
|
||||||
|
"""
|
||||||
|
Confirms if the ServiceItem uses a file
|
||||||
|
"""
|
||||||
return self.service_item_type == ServiceItemType.Image or \
|
return self.service_item_type == ServiceItemType.Image or \
|
||||||
self.service_item_type == ServiceItemType.Command
|
self.service_item_type == ServiceItemType.Command
|
||||||
|
|
||||||
def is_text(self):
|
def is_text(self):
|
||||||
|
"""
|
||||||
|
Confirms if the ServiceItem is text
|
||||||
|
"""
|
||||||
return self.service_item_type == ServiceItemType.Text
|
return self.service_item_type == ServiceItemType.Text
|
||||||
|
|
||||||
def get_frames(self):
|
def get_frames(self):
|
||||||
|
"""
|
||||||
|
Returns the frames for the ServiceItem
|
||||||
|
"""
|
||||||
if self.service_item_type == ServiceItemType.Text:
|
if self.service_item_type == ServiceItemType.Text:
|
||||||
return self._display_frames
|
return self._display_frames
|
||||||
else:
|
else:
|
||||||
|
@ -22,6 +22,20 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`songxmlhandler` module provides the XML functionality for songs
|
||||||
|
|
||||||
|
The basic XML is of the format::
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<song version="1.0">
|
||||||
|
<lyrics language="en">
|
||||||
|
<verse type="chorus" label="1">
|
||||||
|
<![CDATA[ ... ]]>
|
||||||
|
</verse>
|
||||||
|
</lyrics>
|
||||||
|
</song>
|
||||||
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -34,17 +48,6 @@ log = logging.getLogger(__name__)
|
|||||||
class SongXMLBuilder(object):
|
class SongXMLBuilder(object):
|
||||||
"""
|
"""
|
||||||
This class builds the XML used to describe songs.
|
This class builds the XML used to describe songs.
|
||||||
|
|
||||||
The basic XML looks like this::
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<song version="1.0">
|
|
||||||
<lyrics language="en">
|
|
||||||
<verse type="chorus" label="1">
|
|
||||||
<![CDATA[ ... ]]>
|
|
||||||
</verse>
|
|
||||||
</lyrics>
|
|
||||||
</song>
|
|
||||||
"""
|
"""
|
||||||
log.info(u'SongXMLBuilder Loaded')
|
log.info(u'SongXMLBuilder Loaded')
|
||||||
|
|
||||||
@ -113,17 +116,6 @@ class SongXMLBuilder(object):
|
|||||||
class SongXMLParser(object):
|
class SongXMLParser(object):
|
||||||
"""
|
"""
|
||||||
A class to read in and parse a song's XML.
|
A class to read in and parse a song's XML.
|
||||||
|
|
||||||
The basic XML looks like this::
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<song version="1.0">
|
|
||||||
<lyrics language="en">
|
|
||||||
<verse type="chorus" label="1">
|
|
||||||
<![CDATA[ ... ]]>
|
|
||||||
</verse>
|
|
||||||
</lyrics>
|
|
||||||
</song>
|
|
||||||
"""
|
"""
|
||||||
log.info(u'SongXMLParser Loaded')
|
log.info(u'SongXMLParser Loaded')
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class XmlRootClass(object):
|
|||||||
|
|
||||||
(element.tag, val) = self.post_tag_hook(element.tag, val)
|
(element.tag, val) = self.post_tag_hook(element.tag, val)
|
||||||
"""
|
"""
|
||||||
def _setFromXml(self, xml, root_tag):
|
def _set_from_xml(self, xml, root_tag):
|
||||||
"""
|
"""
|
||||||
Set song properties from given xml content.
|
Set song properties from given xml content.
|
||||||
|
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
OpenLP version 1 theme handling
|
||||||
|
|
||||||
|
Provides reference data, a default v1 XML theme and class wrapper for
|
||||||
|
processing version 1 themes in OpenLP version 2.
|
||||||
|
"""
|
||||||
|
|
||||||
from xml.etree.ElementTree import ElementTree, XML
|
from xml.etree.ElementTree import ElementTree, XML
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
@ -54,51 +60,106 @@ BLANK_STYLE_XML = \
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
class Theme(object):
|
class Theme(object):
|
||||||
|
"""
|
||||||
|
Provide a class wrapper storing data from an XML theme
|
||||||
|
|
||||||
|
``name``
|
||||||
|
Theme name
|
||||||
|
|
||||||
|
``BackgroundMode``
|
||||||
|
The behaviour of the background. Valid modes are:
|
||||||
|
- 0 - Transparent
|
||||||
|
- 1 - Opaque
|
||||||
|
|
||||||
|
``BackgroundType``
|
||||||
|
The content of the background. Valid types are:
|
||||||
|
- 0 - solid color
|
||||||
|
- 1 - gradient color
|
||||||
|
- 2 - image
|
||||||
|
|
||||||
|
``BackgroundParameter1``
|
||||||
|
Extra information about the background. The contents of this attribute
|
||||||
|
depend on the BackgroundType:
|
||||||
|
- image: image filename
|
||||||
|
- gradient: start color
|
||||||
|
- solid: color
|
||||||
|
|
||||||
|
``BackgroundParameter2``
|
||||||
|
Extra information about the background. The contents of this attribute
|
||||||
|
depend on the BackgroundType:
|
||||||
|
- image: border color
|
||||||
|
- gradient: end color
|
||||||
|
- solid: N/A
|
||||||
|
|
||||||
|
``BackgroundParameter3``
|
||||||
|
Extra information about the background. The contents of this attribute
|
||||||
|
depend on the BackgroundType:
|
||||||
|
- image: N/A
|
||||||
|
- gradient: The direction of the gradient. Valid entries are:
|
||||||
|
- 0 -> vertical
|
||||||
|
- 1 -> horizontal
|
||||||
|
- solid: N/A
|
||||||
|
|
||||||
|
``FontName``
|
||||||
|
Name of the font to use for the main font.
|
||||||
|
|
||||||
|
``FontColor``
|
||||||
|
The color for the main font
|
||||||
|
|
||||||
|
``FontProportion``
|
||||||
|
The size of the main font
|
||||||
|
|
||||||
|
``FontUnits``
|
||||||
|
The units for FontProportion, either <pixels> or <points>
|
||||||
|
|
||||||
|
``Shadow``
|
||||||
|
The shadow type to apply to the main font.
|
||||||
|
- 0 - no shadow
|
||||||
|
- non-zero - use shadow
|
||||||
|
|
||||||
|
``ShadowColor``
|
||||||
|
Color for the shadow
|
||||||
|
|
||||||
|
``Outline``
|
||||||
|
The outline to apply to the main font
|
||||||
|
- 0 - no outline
|
||||||
|
- non-zero - use outline
|
||||||
|
|
||||||
|
``OutlineColor``
|
||||||
|
Color for the outline (or None if Outline is 0)
|
||||||
|
|
||||||
|
``HorizontalAlign``
|
||||||
|
The horizontal alignment to apply to text. Valid alignments are:
|
||||||
|
- 0 - left align
|
||||||
|
- 1 - right align
|
||||||
|
- 2 - centre align
|
||||||
|
|
||||||
|
``VerticalAlign``
|
||||||
|
The vertical alignment to apply to the text. Valid alignments are:
|
||||||
|
- 0 - top align
|
||||||
|
- 1 - bottom align
|
||||||
|
- 2 - centre align
|
||||||
|
|
||||||
|
``WrapStyle``
|
||||||
|
The wrap style to apply to the text. Valid styles are:
|
||||||
|
- 0 - normal
|
||||||
|
- 1 - lyrics
|
||||||
|
"""
|
||||||
def __init__(self, xml):
|
def __init__(self, xml):
|
||||||
""" stores the info about a theme
|
"""
|
||||||
attributes:
|
Initialise a theme with data from xml
|
||||||
name : theme name
|
|
||||||
|
|
||||||
BackgroundMode : 1 - Transparent
|
``xml``
|
||||||
1 - Opaque
|
The data to initialise the theme with
|
||||||
|
|
||||||
BackgroundType : 0 - solid color
|
|
||||||
1 - gradient color
|
|
||||||
2 - image
|
|
||||||
|
|
||||||
BackgroundParameter1 : for image - filename
|
|
||||||
for gradient - start color
|
|
||||||
for solid - color
|
|
||||||
BackgroundParameter2 : for image - border colour
|
|
||||||
for gradient - end color
|
|
||||||
for solid - N/A
|
|
||||||
BackgroundParameter3 : for image - N/A
|
|
||||||
for gradient - 0 -> vertical, 1 -> horizontal
|
|
||||||
|
|
||||||
FontName : name of font to use
|
|
||||||
FontColor : color for main font
|
|
||||||
FontProportion : size of font
|
|
||||||
FontUnits : whether size of font is in <pixels> or <points>
|
|
||||||
|
|
||||||
Shadow : 0 - no shadow, non-zero use shadow
|
|
||||||
ShadowColor : color for drop shadow
|
|
||||||
Outline : 0 - no outline, non-zero use outline
|
|
||||||
OutlineColor : color for outline (or None for no outline)
|
|
||||||
|
|
||||||
HorizontalAlign : 0 - left align
|
|
||||||
1 - right align
|
|
||||||
2 - centre align
|
|
||||||
VerticalAlign : 0 - top align
|
|
||||||
1 - bottom align
|
|
||||||
2 - centre align
|
|
||||||
WrapStyle : 0 - normal
|
|
||||||
1 - lyrics
|
|
||||||
"""
|
"""
|
||||||
# init to defaults
|
# init to defaults
|
||||||
self._set_from_XML(BLANK_STYLE_XML)
|
self._set_from_xml(BLANK_STYLE_XML)
|
||||||
self._set_from_XML(xml)
|
self._set_from_xml(xml)
|
||||||
|
|
||||||
def _get_as_string(self):
|
def _get_as_string(self):
|
||||||
|
"""
|
||||||
|
Return single line string representation of a theme
|
||||||
|
"""
|
||||||
theme_strings = []
|
theme_strings = []
|
||||||
keys = dir(self)
|
keys = dir(self)
|
||||||
keys.sort()
|
keys.sort()
|
||||||
@ -108,10 +169,16 @@ class Theme(object):
|
|||||||
return u''.join(theme_strings)
|
return u''.join(theme_strings)
|
||||||
|
|
||||||
def _set_from_XML(self, xml):
|
def _set_from_XML(self, xml):
|
||||||
|
"""
|
||||||
|
Set theme class attributes with data from XML
|
||||||
|
|
||||||
|
``xml``
|
||||||
|
The data to apply to the theme
|
||||||
|
"""
|
||||||
root = ElementTree(element=XML(xml))
|
root = ElementTree(element=XML(xml))
|
||||||
iter = root.getiterator()
|
xml_iter = root.getiterator()
|
||||||
for element in iter:
|
for element in xml_iter:
|
||||||
delphiColorChange = False
|
delphi_color_change = False
|
||||||
if element.tag != u'Theme':
|
if element.tag != u'Theme':
|
||||||
element_text = element.text
|
element_text = element.text
|
||||||
val = 0
|
val = 0
|
||||||
@ -127,7 +194,7 @@ class Theme(object):
|
|||||||
pass
|
pass
|
||||||
elif DELPHI_COLORS.has_key(element_text):
|
elif DELPHI_COLORS.has_key(element_text):
|
||||||
val = DELPHI_COLORS[element_text]
|
val = DELPHI_COLORS[element_text]
|
||||||
delphiColorChange = True
|
delphi_color_change = True
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
val = int(element_text)
|
val = int(element_text)
|
||||||
@ -137,7 +204,7 @@ class Theme(object):
|
|||||||
(element.tag.find(u'BackgroundParameter') == 0 and
|
(element.tag.find(u'BackgroundParameter') == 0 and
|
||||||
type(val) == type(0))):
|
type(val) == type(0))):
|
||||||
# convert to a wx.Colour
|
# convert to a wx.Colour
|
||||||
if not delphiColorChange:
|
if not delphi_color_change:
|
||||||
val = QtGui.QColor(
|
val = QtGui.QColor(
|
||||||
val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF)
|
val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF)
|
||||||
else:
|
else:
|
||||||
@ -146,8 +213,12 @@ class Theme(object):
|
|||||||
setattr(self, element.tag, val)
|
setattr(self, element.tag, val)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
"""
|
||||||
|
Provide Python string representation for the class (multiline output)
|
||||||
|
"""
|
||||||
theme_strings = []
|
theme_strings = []
|
||||||
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)
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`ui` module provides the core user interface for OpenLP
|
||||||
|
"""
|
||||||
|
|
||||||
class HideMode(object):
|
class HideMode(object):
|
||||||
"""
|
"""
|
||||||
|
@ -239,12 +239,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontMainColorPushButtonClicked(self):
|
def onFontMainColorPushButtonClicked(self):
|
||||||
self.theme.font_main_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.font_main_color), self).name()
|
QtGui.QColor(self.theme.font_main_color), self)
|
||||||
|
if new_color.isValid():
|
||||||
self.FontMainColorPushButton.setStyleSheet(
|
self.theme.font_main_color = new_color.name()
|
||||||
u'background-color: %s' % unicode(self.theme.font_main_color))
|
self.FontMainColorPushButton.setStyleSheet(
|
||||||
self.previewTheme()
|
u'background-color: %s' % unicode(self.theme.font_main_color))
|
||||||
|
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():
|
||||||
@ -332,11 +333,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterColorPushButtonClicked(self):
|
def onFontFooterColorPushButtonClicked(self):
|
||||||
self.theme.font_footer_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.font_footer_color), self).name()
|
QtGui.QColor(self.theme.font_footer_color), self)
|
||||||
self.FontFooterColorPushButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
'background-color: %s' % unicode(self.theme.font_footer_color))
|
self.theme.font_footer_color = new_color.name()
|
||||||
self.previewTheme()
|
self.FontFooterColorPushButton.setStyleSheet(
|
||||||
|
u'background-color: %s' % unicode(self.theme.font_footer_color))
|
||||||
|
self.previewTheme()
|
||||||
|
|
||||||
def onFontFooterSizeSpinBoxChanged(self):
|
def onFontFooterSizeSpinBoxChanged(self):
|
||||||
if self.theme.font_footer_proportion != \
|
if self.theme.font_footer_proportion != \
|
||||||
@ -431,24 +434,29 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
|
|
||||||
def onColor1PushButtonClicked(self):
|
def onColor1PushButtonClicked(self):
|
||||||
if self.theme.background_type == u'solid':
|
if self.theme.background_type == u'solid':
|
||||||
self.theme.background_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.background_color), self).name()
|
QtGui.QColor(self.theme.background_color), self)
|
||||||
self.Color1PushButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % unicode(self.theme.background_color))
|
self.theme.background_color = new_color.name()
|
||||||
|
self.Color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||||
|
unicode(self.theme.background_color))
|
||||||
else:
|
else:
|
||||||
self.theme.background_startColor = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.background_startColor), self).name()
|
QtGui.QColor(self.theme.background_startColor), self)
|
||||||
self.Color1PushButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % \
|
self.theme.background_startColor = new_color.name()
|
||||||
|
self.Color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||||
unicode(self.theme.background_startColor))
|
unicode(self.theme.background_startColor))
|
||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onColor2PushButtonClicked(self):
|
def onColor2PushButtonClicked(self):
|
||||||
self.theme.background_endColor = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.background_endColor), self).name()
|
QtGui.QColor(self.theme.background_endColor), self)
|
||||||
self.Color2PushButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % unicode(self.theme.background_endColor))
|
self.theme.background_endColor = new_color.name()
|
||||||
self.previewTheme()
|
self.Color2PushButton.setStyleSheet(u'background-color: %s' %
|
||||||
|
unicode(self.theme.background_endColor))
|
||||||
|
self.previewTheme()
|
||||||
|
|
||||||
#
|
#
|
||||||
#Other Tab
|
#Other Tab
|
||||||
@ -472,11 +480,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onOutlineColorPushButtonClicked(self):
|
def onOutlineColorPushButtonClicked(self):
|
||||||
self.theme.display_outline_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.display_outline_color), self).name()
|
QtGui.QColor(self.theme.display_outline_color), self)
|
||||||
self.OutlineColorPushButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % unicode(self.theme.display_outline_color))
|
self.theme.display_outline_color = new_color.name()
|
||||||
self.previewTheme()
|
self.OutlineColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||||
|
unicode(self.theme.display_outline_color))
|
||||||
|
self.previewTheme()
|
||||||
|
|
||||||
def onShadowCheckBoxChanged(self, value):
|
def onShadowCheckBoxChanged(self, value):
|
||||||
if value == 2: # checked
|
if value == 2: # checked
|
||||||
@ -495,11 +505,13 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onShadowColorPushButtonClicked(self):
|
def onShadowColorPushButtonClicked(self):
|
||||||
self.theme.display_shadow_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.theme.display_shadow_color), self).name()
|
QtGui.QColor(self.theme.display_shadow_color), self)
|
||||||
self.ShadowColorPushButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % unicode(self.theme.display_shadow_color))
|
self.theme.display_shadow_color = new_color.name()
|
||||||
self.previewTheme()
|
self.ShadowColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||||
|
unicode(self.theme.display_shadow_color))
|
||||||
|
self.previewTheme()
|
||||||
|
|
||||||
def onHorizontalComboBoxSelected(self, currentIndex):
|
def onHorizontalComboBoxSelected(self, currentIndex):
|
||||||
self.theme.display_horizontalAlign = currentIndex
|
self.theme.display_horizontalAlign = currentIndex
|
||||||
|
@ -29,16 +29,19 @@ from openlp.core.lib import SettingsTab, Receiver, translate
|
|||||||
|
|
||||||
class DisplayTab(SettingsTab):
|
class DisplayTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
Class documentation goes here.
|
Provide the UI for managing display related settings
|
||||||
"""
|
"""
|
||||||
def __init__(self, screens):
|
def __init__(self, screens):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Initialise the display tab from a SettingsTab
|
||||||
"""
|
"""
|
||||||
self.screens = screens
|
self.screens = screens
|
||||||
SettingsTab.__init__(self, u'Display')
|
SettingsTab.__init__(self, u'Display')
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
|
"""
|
||||||
|
Set up the UI widgets to show the settings
|
||||||
|
"""
|
||||||
self.tabTitleVisible = translate(u'DisplayTab', u'Displays')
|
self.tabTitleVisible = translate(u'DisplayTab', u'Displays')
|
||||||
self.layoutWidget = QtGui.QWidget(self)
|
self.layoutWidget = QtGui.QWidget(self)
|
||||||
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
|
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
|
||||||
@ -158,6 +161,9 @@ class DisplayTab(SettingsTab):
|
|||||||
QtCore.SIGNAL(u'stateChanged(int)'), self.onOverrideCheckBoxChanged)
|
QtCore.SIGNAL(u'stateChanged(int)'), self.onOverrideCheckBoxChanged)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
|
"""
|
||||||
|
Provide i18n support for this UI
|
||||||
|
"""
|
||||||
self.setWindowTitle(translate(u'DisplayTab', u'Amend Display Settings'))
|
self.setWindowTitle(translate(u'DisplayTab', u'Amend Display Settings'))
|
||||||
self.CurrentGroupBox.setTitle(
|
self.CurrentGroupBox.setTitle(
|
||||||
translate(u'DisplayTab', u'Default Settings'))
|
translate(u'DisplayTab', u'Default Settings'))
|
||||||
@ -179,6 +185,9 @@ class DisplayTab(SettingsTab):
|
|||||||
translate(u'DisplayTab', u'Override Output Display'))
|
translate(u'DisplayTab', u'Override Output Display'))
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
|
"""
|
||||||
|
Load current display settings
|
||||||
|
"""
|
||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
settings.beginGroup(self.settingsSection)
|
settings.beginGroup(self.settingsSection)
|
||||||
self.Xpos.setText(unicode(self.screens.current[u'size'].x()))
|
self.Xpos.setText(unicode(self.screens.current[u'size'].x()))
|
||||||
@ -209,6 +218,9 @@ class DisplayTab(SettingsTab):
|
|||||||
self.amend_display = True
|
self.amend_display = True
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
|
"""
|
||||||
|
Save chosen settings
|
||||||
|
"""
|
||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
settings.beginGroup(self.settingsSection)
|
settings.beginGroup(self.settingsSection)
|
||||||
settings.setValue('x position', QtCore.QVariant(self.XposEdit.text()))
|
settings.setValue('x position', QtCore.QVariant(self.XposEdit.text()))
|
||||||
|
@ -133,7 +133,6 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.display_alert = QtGui.QLabel(self)
|
self.display_alert = QtGui.QLabel(self)
|
||||||
self.display_alert.setScaledContents(True)
|
self.display_alert.setScaledContents(True)
|
||||||
self.primary = True
|
self.primary = True
|
||||||
self.displayBlank = False
|
|
||||||
self.blankFrame = None
|
self.blankFrame = None
|
||||||
self.frame = None
|
self.frame = None
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
@ -280,15 +279,15 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.display_alert.setPixmap(frame)
|
self.display_alert.setPixmap(frame)
|
||||||
self.moveToTop()
|
self.moveToTop()
|
||||||
|
|
||||||
def frameView(self, frame, transition=False):
|
def frameView(self, frame, transition=False, display=True):
|
||||||
"""
|
"""
|
||||||
Called from a slide controller to display a frame
|
Called from a slide controller to display a frame
|
||||||
if the alert is in progress the alert is added on top
|
if the alert is in progress the alert is added on top
|
||||||
``frame``
|
``frame``
|
||||||
Image frame to be rendered
|
Image frame to be rendered
|
||||||
"""
|
"""
|
||||||
log.debug(u'frameView %d' % (self.displayBlank))
|
log.debug(u'frameView %d' % (display))
|
||||||
if not self.displayBlank:
|
if display:
|
||||||
if transition:
|
if transition:
|
||||||
if self.frame is not None:
|
if self.frame is not None:
|
||||||
self.display_text.setPixmap(
|
self.display_text.setPixmap(
|
||||||
@ -314,8 +313,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
self.showFullScreen()
|
self.showFullScreen()
|
||||||
else:
|
else:
|
||||||
self.waitingFrame = frame
|
self.storeText = QtGui.QPixmap.fromImage(frame[u'main'])
|
||||||
self.waitingFrameTrans = transition
|
|
||||||
|
|
||||||
class VideoDisplay(Phonon.VideoWidget):
|
class VideoDisplay(Phonon.VideoWidget):
|
||||||
"""
|
"""
|
||||||
|
@ -356,7 +356,7 @@ class Ui_MainWindow(object):
|
|||||||
"""
|
"""
|
||||||
MainWindow.mainTitle = translate(u'MainWindow', u'OpenLP 2.0')
|
MainWindow.mainTitle = translate(u'MainWindow', u'OpenLP 2.0')
|
||||||
MainWindow.language = translate(u'MainWindow', u'English')
|
MainWindow.language = translate(u'MainWindow', u'English')
|
||||||
MainWindow.defaultThemeText = translate(u'MainWindow',
|
MainWindow.defaultThemeText = translate(u'MainWindow',
|
||||||
u'Default Theme: ')
|
u'Default Theme: ')
|
||||||
MainWindow.setWindowTitle(MainWindow.mainTitle)
|
MainWindow.setWindowTitle(MainWindow.mainTitle)
|
||||||
self.FileMenu.setTitle(translate(u'MainWindow', u'&File'))
|
self.FileMenu.setTitle(translate(u'MainWindow', u'&File'))
|
||||||
@ -456,7 +456,7 @@ class Ui_MainWindow(object):
|
|||||||
u'Set the interface language to %s')) % item.objectName())
|
u'Set the interface language to %s')) % item.objectName())
|
||||||
self.ToolsAddToolItem.setText(translate(u'MainWindow', u'Add &Tool...'))
|
self.ToolsAddToolItem.setText(translate(u'MainWindow', u'Add &Tool...'))
|
||||||
self.ToolsAddToolItem.setStatusTip(
|
self.ToolsAddToolItem.setStatusTip(
|
||||||
translate(u'MainWindow',
|
translate(u'MainWindow',
|
||||||
u'Add an application to the list of tools'))
|
u'Add an application to the list of tools'))
|
||||||
self.action_Preview_Panel.setText(
|
self.action_Preview_Panel.setText(
|
||||||
translate(u'MainWindow', u'&Preview Pane'))
|
translate(u'MainWindow', u'&Preview Pane'))
|
||||||
@ -652,15 +652,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
"""
|
"""
|
||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
settings.beginGroup(self.generalSettingsSection)
|
settings.beginGroup(self.generalSettingsSection)
|
||||||
if settings.value(u'screen blank', QtCore.QVariant(False)).toBool() \
|
if settings.value(u'screen blank', QtCore.QVariant(False)).toBool():
|
||||||
and settings.value(u'blank warning', QtCore.QVariant(False)).toBool():
|
self.LiveController.mainDisplaySetBackground()
|
||||||
self.LiveController.onBlankDisplay(True)
|
if settings.value(u'blank warning',
|
||||||
QtGui.QMessageBox.question(self,
|
QtCore.QVariant(False)).toBool():
|
||||||
translate(u'MainWindow', u'OpenLP Main Display Blanked'),
|
QtGui.QMessageBox.question(self,
|
||||||
translate(u'MainWindow',
|
translate(u'MainWindow', u'OpenLP Main Display Blanked'),
|
||||||
u'The Main Display has been blanked out'),
|
translate(u'MainWindow',
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
u'The Main Display has been blanked out'))
|
||||||
QtGui.QMessageBox.Ok)
|
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
def versionThread(self):
|
def versionThread(self):
|
||||||
|
@ -28,11 +28,25 @@ import logging
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class MediaDockManager(object):
|
class MediaDockManager(object):
|
||||||
|
"""
|
||||||
|
Provide a repository for MediaManagerItems
|
||||||
|
"""
|
||||||
def __init__(self, media_dock):
|
def __init__(self, media_dock):
|
||||||
|
"""
|
||||||
|
Initialise the media dock
|
||||||
|
"""
|
||||||
self.media_dock = media_dock
|
self.media_dock = media_dock
|
||||||
|
|
||||||
def add_dock(self, media_item, icon, weight):
|
def add_dock(self, media_item, icon, weight):
|
||||||
|
"""
|
||||||
|
Add a MediaManagerItem to the dock
|
||||||
|
|
||||||
|
``media_item``
|
||||||
|
The item to add to the dock
|
||||||
|
|
||||||
|
``icon``
|
||||||
|
An icon for this dock item
|
||||||
|
"""
|
||||||
log.info(u'Adding %s dock' % media_item.title)
|
log.info(u'Adding %s dock' % media_item.title)
|
||||||
self.media_dock.addItem(media_item, icon, media_item.title)
|
self.media_dock.addItem(media_item, icon, media_item.title)
|
||||||
|
|
||||||
@ -53,6 +67,12 @@ class MediaDockManager(object):
|
|||||||
self.media_dock.addItem(media_item, icon, media_item.title)
|
self.media_dock.addItem(media_item, icon, media_item.title)
|
||||||
|
|
||||||
def remove_dock(self, name):
|
def remove_dock(self, name):
|
||||||
|
"""
|
||||||
|
Removes a MediaManagerItem from the dock
|
||||||
|
|
||||||
|
``name``
|
||||||
|
The item to remove
|
||||||
|
"""
|
||||||
log.debug(u'remove %s dock' % name)
|
log.debug(u'remove %s dock' % name)
|
||||||
for dock_index in range(0, self.media_dock.count()):
|
for dock_index in range(0, self.media_dock.count()):
|
||||||
if self.media_dock.widget(dock_index):
|
if self.media_dock.widget(dock_index):
|
||||||
|
@ -67,9 +67,11 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
|||||||
if plugin.status == PluginStatus.Active:
|
if plugin.status == PluginStatus.Active:
|
||||||
status_text = unicode(translate(u'PluginForm', u'%s (Active)'))
|
status_text = unicode(translate(u'PluginForm', u'%s (Active)'))
|
||||||
elif plugin.status == PluginStatus.Inactive:
|
elif plugin.status == PluginStatus.Inactive:
|
||||||
status_text = unicode(translate(u'PluginForm', u'%s (Inactive)'))
|
status_text = unicode(
|
||||||
|
translate(u'PluginForm', u'%s (Inactive)'))
|
||||||
elif plugin.status == PluginStatus.Disabled:
|
elif plugin.status == PluginStatus.Disabled:
|
||||||
status_text = unicode(translate(u'PluginForm', u'%s (Disabled)'))
|
status_text = unicode(
|
||||||
|
translate(u'PluginForm', u'%s (Disabled)'))
|
||||||
item.setText(status_text % plugin.name)
|
item.setText(status_text % plugin.name)
|
||||||
# If the plugin has an icon, set it!
|
# If the plugin has an icon, set it!
|
||||||
if plugin.icon:
|
if plugin.icon:
|
||||||
|
@ -22,7 +22,10 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`screen` module provides management functionality for a machines'
|
||||||
|
displays
|
||||||
|
"""
|
||||||
import logging
|
import logging
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
@ -46,12 +49,18 @@ class ScreenList(object):
|
|||||||
self.monitor_number = 0
|
self.monitor_number = 0
|
||||||
|
|
||||||
def add_screen(self, screen):
|
def add_screen(self, screen):
|
||||||
|
"""
|
||||||
|
Add a screen to the list of known screens
|
||||||
|
"""
|
||||||
if screen[u'primary']:
|
if screen[u'primary']:
|
||||||
self.current = screen
|
self.current = screen
|
||||||
self.screen_list.append(screen)
|
self.screen_list.append(screen)
|
||||||
self.display_count += 1
|
self.display_count += 1
|
||||||
|
|
||||||
def screen_exists(self, number):
|
def screen_exists(self, number):
|
||||||
|
"""
|
||||||
|
Confirms a screen is known
|
||||||
|
"""
|
||||||
for screen in self.screen_list:
|
for screen in self.screen_list:
|
||||||
if screen[u'number'] == number:
|
if screen[u'number'] == number:
|
||||||
return True
|
return True
|
||||||
|
@ -96,6 +96,7 @@ 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)
|
||||||
|
|
||||||
def onItemDown(self):
|
def onItemDown(self):
|
||||||
"""
|
"""
|
||||||
@ -109,3 +110,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)
|
||||||
|
@ -32,13 +32,15 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import OpenLPToolbar, ServiceItem, contextMenuAction, \
|
from openlp.core.lib import OpenLPToolbar, ServiceItem, context_menu_action, \
|
||||||
Receiver, build_icon, ItemCapabilities, SettingsManager, translate
|
Receiver, build_icon, ItemCapabilities, SettingsManager, translate
|
||||||
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm
|
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
|
|
||||||
class ServiceManagerList(QtGui.QTreeWidget):
|
class ServiceManagerList(QtGui.QTreeWidget):
|
||||||
|
"""
|
||||||
|
Set up key bindings and mouse behaviour for the service list
|
||||||
|
"""
|
||||||
def __init__(self, parent=None, name=None):
|
def __init__(self, parent=None, name=None):
|
||||||
QtGui.QTreeWidget.__init__(self, parent)
|
QtGui.QTreeWidget.__init__(self, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
@ -925,13 +927,9 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
endpos = len(self.serviceItems)
|
endpos = len(self.serviceItems)
|
||||||
else:
|
else:
|
||||||
endpos = self._getParentItemData(item) - 1
|
endpos = self._getParentItemData(item) - 1
|
||||||
if endpos < startpos:
|
|
||||||
newpos = endpos
|
|
||||||
else:
|
|
||||||
newpos = endpos + 1
|
|
||||||
serviceItem = self.serviceItems[startpos]
|
serviceItem = self.serviceItems[startpos]
|
||||||
self.serviceItems.remove(serviceItem)
|
self.serviceItems.remove(serviceItem)
|
||||||
self.serviceItems.insert(newpos, serviceItem)
|
self.serviceItems.insert(endpos, serviceItem)
|
||||||
self.repaintServiceList(endpos, startCount)
|
self.repaintServiceList(endpos, startCount)
|
||||||
else:
|
else:
|
||||||
#we are not over anything so drop
|
#we are not over anything so drop
|
||||||
@ -970,7 +968,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.ThemeComboBox.addItem(u'')
|
self.ThemeComboBox.addItem(u'')
|
||||||
for theme in theme_list:
|
for theme in theme_list:
|
||||||
self.ThemeComboBox.addItem(theme)
|
self.ThemeComboBox.addItem(theme)
|
||||||
action = contextMenuAction(
|
action = context_menu_action(
|
||||||
self.ServiceManagerList,
|
self.ServiceManagerList,
|
||||||
None,
|
None,
|
||||||
theme , self.onThemeChangeAction)
|
theme , self.onThemeChangeAction)
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`settingsform` provides a user interface for the OpenLP settings
|
||||||
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
@ -33,8 +35,13 @@ from settingsdialog import Ui_SettingsDialog
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||||
|
"""
|
||||||
|
Provide the form to manipulate the settings for OpenLP
|
||||||
|
"""
|
||||||
def __init__(self, screens, mainWindow, parent=None):
|
def __init__(self, screens, mainWindow, parent=None):
|
||||||
|
"""
|
||||||
|
Initialise the settings form
|
||||||
|
"""
|
||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# General tab
|
# General tab
|
||||||
@ -48,16 +55,25 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
self.addTab(u'Display', self.DisplayTab)
|
self.addTab(u'Display', self.DisplayTab)
|
||||||
|
|
||||||
def addTab(self, name, tab):
|
def addTab(self, name, tab):
|
||||||
|
"""
|
||||||
|
Add a tab to the form
|
||||||
|
"""
|
||||||
log.info(u'Adding %s tab' % tab.tabTitle)
|
log.info(u'Adding %s tab' % tab.tabTitle)
|
||||||
self.SettingsTabWidget.addTab(tab, tab.tabTitleVisible)
|
self.SettingsTabWidget.addTab(tab, tab.tabTitleVisible)
|
||||||
|
|
||||||
def insertTab(self, tab, location):
|
def insertTab(self, tab, location):
|
||||||
|
"""
|
||||||
|
Add a tab to the form at a specific location
|
||||||
|
"""
|
||||||
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
||||||
#13 : There are 3 tables currently and locations starts at -10
|
#13 : There are 3 tables currently and locations starts at -10
|
||||||
self.SettingsTabWidget.insertTab(
|
self.SettingsTabWidget.insertTab(
|
||||||
location + 13, tab, tab.tabTitleVisible)
|
location + 13, tab, tab.tabTitleVisible)
|
||||||
|
|
||||||
def removeTab(self, name):
|
def removeTab(self, name):
|
||||||
|
"""
|
||||||
|
Remove a tab from the form
|
||||||
|
"""
|
||||||
log.debug(u'remove %s tab' % name)
|
log.debug(u'remove %s tab' % name)
|
||||||
for tab_index in range(0, self.SettingsTabWidget.count()):
|
for tab_index in range(0, self.SettingsTabWidget.count()):
|
||||||
if self.SettingsTabWidget.widget(tab_index):
|
if self.SettingsTabWidget.widget(tab_index):
|
||||||
@ -65,10 +81,16 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
self.SettingsTabWidget.removeTab(tab_index)
|
self.SettingsTabWidget.removeTab(tab_index)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
"""
|
||||||
|
Process the form saving the settings
|
||||||
|
"""
|
||||||
for tab_index in range(0, self.SettingsTabWidget.count()):
|
for tab_index in range(0, self.SettingsTabWidget.count()):
|
||||||
self.SettingsTabWidget.widget(tab_index).save()
|
self.SettingsTabWidget.widget(tab_index).save()
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self):
|
||||||
|
"""
|
||||||
|
Run any post-setup code for the tabs on the form
|
||||||
|
"""
|
||||||
for tab_index in range(0, self.SettingsTabWidget.count()):
|
for tab_index in range(0, self.SettingsTabWidget.count()):
|
||||||
self.SettingsTabWidget.widget(tab_index).postSetUp()
|
self.SettingsTabWidget.widget(tab_index).postSetUp()
|
||||||
|
@ -120,6 +120,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.serviceItem = None
|
self.serviceItem = None
|
||||||
self.Panel = QtGui.QWidget(parent.ControlSplitter)
|
self.Panel = QtGui.QWidget(parent.ControlSplitter)
|
||||||
self.slideList = {}
|
self.slideList = {}
|
||||||
|
self.canDisplay = True
|
||||||
# Layout for holding panel
|
# Layout for holding panel
|
||||||
self.PanelLayout = QtGui.QVBoxLayout(self.Panel)
|
self.PanelLayout = QtGui.QVBoxLayout(self.Panel)
|
||||||
self.PanelLayout.setSpacing(0)
|
self.PanelLayout.setSpacing(0)
|
||||||
@ -535,7 +536,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.PreviewListWidget.setCursor(QtCore.Qt.PointingHandCursor)
|
self.PreviewListWidget.setCursor(QtCore.Qt.PointingHandCursor)
|
||||||
before = time.time()
|
before = time.time()
|
||||||
#Clear the old serviceItem cache to release memory
|
#Clear the old serviceItem cache to release memory
|
||||||
if self.serviceItem:
|
if self.serviceItem and self.serviceItem is not serviceItem:
|
||||||
self.serviceItem.cache = []
|
self.serviceItem.cache = []
|
||||||
self.serviceItem = serviceItem
|
self.serviceItem = serviceItem
|
||||||
self.PreviewListWidget.clear()
|
self.PreviewListWidget.clear()
|
||||||
@ -650,6 +651,12 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.PreviewListWidget.selectRow(index)
|
self.PreviewListWidget.selectRow(index)
|
||||||
self.onSlideSelected()
|
self.onSlideSelected()
|
||||||
|
|
||||||
|
def mainDisplaySetBackground(self):
|
||||||
|
"""
|
||||||
|
Allow the main display to blank the main display at startup time
|
||||||
|
"""
|
||||||
|
self.blankButton.setChecked(True)
|
||||||
|
|
||||||
def onSlideBlank(self):
|
def onSlideBlank(self):
|
||||||
"""
|
"""
|
||||||
Handle the slidecontroller blank event
|
Handle the slidecontroller blank event
|
||||||
@ -669,6 +676,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.debug(u'onBlankDisplay %d' % checked)
|
log.debug(u'onBlankDisplay %d' % checked)
|
||||||
self.hideButton.setChecked(False)
|
self.hideButton.setChecked(False)
|
||||||
self.themeButton.setChecked(False)
|
self.themeButton.setChecked(False)
|
||||||
|
self.canDisplay = not checked
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.parent.generalSettingsSection + u'/screen blank',
|
self.parent.generalSettingsSection + u'/screen blank',
|
||||||
QtCore.QVariant(checked))
|
QtCore.QVariant(checked))
|
||||||
@ -686,6 +694,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.debug(u'onThemeDisplay %d' % checked)
|
log.debug(u'onThemeDisplay %d' % checked)
|
||||||
self.blankButton.setChecked(False)
|
self.blankButton.setChecked(False)
|
||||||
self.hideButton.setChecked(False)
|
self.hideButton.setChecked(False)
|
||||||
|
self.canDisplay = False
|
||||||
if checked:
|
if checked:
|
||||||
Receiver.send_message(u'maindisplay_hide', HideMode.Theme)
|
Receiver.send_message(u'maindisplay_hide', HideMode.Theme)
|
||||||
self.blankPlugin(True)
|
self.blankPlugin(True)
|
||||||
@ -700,6 +709,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.debug(u'onHideDisplay %d' % checked)
|
log.debug(u'onHideDisplay %d' % checked)
|
||||||
self.blankButton.setChecked(False)
|
self.blankButton.setChecked(False)
|
||||||
self.themeButton.setChecked(False)
|
self.themeButton.setChecked(False)
|
||||||
|
self.canDisplay = False
|
||||||
if checked:
|
if checked:
|
||||||
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||||
self.hidePlugin(True)
|
self.hidePlugin(True)
|
||||||
@ -709,7 +719,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
|
|
||||||
def blankPlugin(self, blank):
|
def blankPlugin(self, blank):
|
||||||
"""
|
"""
|
||||||
Blank the display screen.
|
Blank the display screen within a plugin if required.
|
||||||
"""
|
"""
|
||||||
if self.serviceItem is not None:
|
if self.serviceItem is not None:
|
||||||
if blank:
|
if blank:
|
||||||
@ -769,7 +779,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.log(
|
log.log(
|
||||||
15, u'Slide Rendering took %4s' % (time.time() - before))
|
15, u'Slide Rendering took %4s' % (time.time() - before))
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.mainDisplay.frameView(frame, True)
|
self.mainDisplay.frameView(frame, True, self.canDisplay)
|
||||||
self.selectedRow = row
|
self.selectedRow = row
|
||||||
Receiver.send_message(u'slidecontroller_%s_changed' % self.typePrefix,
|
Receiver.send_message(u'slidecontroller_%s_changed' % self.typePrefix,
|
||||||
row)
|
row)
|
||||||
|
@ -24,13 +24,15 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import build_icon
|
|
||||||
|
from openlp.core.lib import build_icon, translate
|
||||||
|
|
||||||
class SplashScreen(object):
|
class SplashScreen(object):
|
||||||
def __init__(self, version):
|
def __init__(self, version):
|
||||||
self.splash_screen = QtGui.QSplashScreen()
|
self.splash_screen = QtGui.QSplashScreen()
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
self.message = self.splash_screen.trUtf8('Starting')\
|
self.message = translate(
|
||||||
|
u'Splashscreen', u'Starting')\
|
||||||
+ '..... ' + version
|
+ '..... ' + version
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
@ -58,7 +60,7 @@ class SplashScreen(object):
|
|||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.splash_screen.setWindowTitle(
|
self.splash_screen.setWindowTitle(
|
||||||
self.splash_screen.trUtf8('Splash Screen'))
|
translate(u'Splashscreen', u'Splash Screen'))
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
self.splash_screen.show()
|
self.splash_screen.show()
|
||||||
|
@ -33,9 +33,9 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from openlp.core.ui import AmendThemeForm
|
from openlp.core.ui import AmendThemeForm
|
||||||
from openlp.core.theme import Theme
|
from openlp.core.theme import Theme
|
||||||
from openlp.core.lib import OpenLPToolbar, contextMenuAction, \
|
from openlp.core.lib import OpenLPToolbar, context_menu_action, \
|
||||||
ThemeXML, str_to_bool, get_text_file_string, build_icon, Receiver, \
|
ThemeXML, str_to_bool, get_text_file_string, build_icon, Receiver, \
|
||||||
contextMenuSeparator, SettingsManager, translate
|
context_menu_separator, SettingsManager, translate
|
||||||
from openlp.core.utils import AppLocation, get_filesystem_encoding
|
from openlp.core.utils import AppLocation, get_filesystem_encoding
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -81,27 +81,28 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
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(
|
||||||
contextMenuAction(self.ThemeListWidget, u':/themes/theme_edit.png',
|
context_menu_action(self.ThemeListWidget,
|
||||||
|
u':/themes/theme_edit.png',
|
||||||
translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme))
|
translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme))
|
||||||
self.ThemeListWidget.addAction(
|
self.ThemeListWidget.addAction(
|
||||||
contextMenuSeparator(self.ThemeListWidget))
|
context_menu_separator(self.ThemeListWidget))
|
||||||
self.ThemeListWidget.addAction(
|
self.ThemeListWidget.addAction(
|
||||||
contextMenuAction(self.ThemeListWidget,
|
context_menu_action(self.ThemeListWidget,
|
||||||
u':/general/general_delete.png',
|
u':/general/general_delete.png',
|
||||||
translate(u'ThemeManager', u'Delete theme'),
|
translate(u'ThemeManager', u'Delete theme'),
|
||||||
self.onDeleteTheme))
|
self.onDeleteTheme))
|
||||||
self.ThemeListWidget.addAction(
|
self.ThemeListWidget.addAction(
|
||||||
contextMenuAction(self.ThemeListWidget,
|
context_menu_action(self.ThemeListWidget,
|
||||||
u':/general/general_export.png',
|
u':/general/general_export.png',
|
||||||
translate(u'ThemeManager', u'Make Global'),
|
translate(u'ThemeManager', u'Make Global'),
|
||||||
self.changeGlobalFromScreen))
|
self.changeGlobalFromScreen))
|
||||||
self.ThemeListWidget.addAction(
|
self.ThemeListWidget.addAction(
|
||||||
contextMenuAction(self.ThemeListWidget,
|
context_menu_action(self.ThemeListWidget,
|
||||||
u':/general/general_export.png',
|
u':/general/general_export.png',
|
||||||
translate(u'ThemeManager', u'Export theme'),
|
translate(u'ThemeManager', u'Export theme'),
|
||||||
self.onExportTheme))
|
self.onExportTheme))
|
||||||
self.ThemeListWidget.addAction(
|
self.ThemeListWidget.addAction(
|
||||||
contextMenuSeparator(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)'),
|
||||||
@ -121,6 +122,10 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
QtCore.QVariant(u'')).toString())
|
QtCore.QVariant(u'')).toString())
|
||||||
|
|
||||||
def changeGlobalFromTab(self, themeName):
|
def changeGlobalFromTab(self, themeName):
|
||||||
|
"""
|
||||||
|
Change the global theme when it is changed through the Themes settings
|
||||||
|
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
|
||||||
@ -136,6 +141,10 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.ThemeListWidget.item(count).setText(name)
|
self.ThemeListWidget.item(count).setText(name)
|
||||||
|
|
||||||
def changeGlobalFromScreen(self, index = -1):
|
def changeGlobalFromScreen(self, index = -1):
|
||||||
|
"""
|
||||||
|
Change the global theme when a theme is double clicked upon in the
|
||||||
|
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()):
|
||||||
@ -159,12 +168,20 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.pushThemes()
|
self.pushThemes()
|
||||||
|
|
||||||
def onAddTheme(self):
|
def onAddTheme(self):
|
||||||
|
"""
|
||||||
|
Loads a new theme with the default settings and then launches the theme
|
||||||
|
editing form for the user to make their customisations.
|
||||||
|
"""
|
||||||
theme = self.createThemeFromXml(self.baseTheme(), self.path)
|
theme = self.createThemeFromXml(self.baseTheme(), self.path)
|
||||||
self.amendThemeForm.loadTheme(theme)
|
self.amendThemeForm.loadTheme(theme)
|
||||||
self.saveThemeName = u''
|
self.saveThemeName = u''
|
||||||
self.amendThemeForm.exec_()
|
self.amendThemeForm.exec_()
|
||||||
|
|
||||||
def onEditTheme(self):
|
def onEditTheme(self):
|
||||||
|
"""
|
||||||
|
Loads the settings for the theme that is to be edited and launches the
|
||||||
|
theme editing form so the user can make their changes.
|
||||||
|
"""
|
||||||
item = self.ThemeListWidget.currentItem()
|
item = self.ThemeListWidget.currentItem()
|
||||||
if item:
|
if item:
|
||||||
theme = self.getThemeData(
|
theme = self.getThemeData(
|
||||||
@ -175,6 +192,9 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.amendThemeForm.exec_()
|
self.amendThemeForm.exec_()
|
||||||
|
|
||||||
def onDeleteTheme(self):
|
def onDeleteTheme(self):
|
||||||
|
"""
|
||||||
|
Delete a theme
|
||||||
|
"""
|
||||||
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())
|
||||||
@ -264,6 +284,11 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
zip.close()
|
zip.close()
|
||||||
|
|
||||||
def onImportTheme(self):
|
def onImportTheme(self):
|
||||||
|
"""
|
||||||
|
Opens a file dialog to select the theme file(s) to import before
|
||||||
|
attempting to extract OpenLP themes from those files. This process
|
||||||
|
will load both OpenLP version 1 and version 2 themes.
|
||||||
|
"""
|
||||||
files = QtGui.QFileDialog.getOpenFileNames(
|
files = QtGui.QFileDialog.getOpenFileNames(
|
||||||
self, translate(u'ThemeManager', u'Select Theme Import File'),
|
self, translate(u'ThemeManager', u'Select Theme Import File'),
|
||||||
SettingsManager.get_last_dir(self.settingsSection), u'Theme (*.*)')
|
SettingsManager.get_last_dir(self.settingsSection), u'Theme (*.*)')
|
||||||
@ -313,12 +338,24 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.pushThemes()
|
self.pushThemes()
|
||||||
|
|
||||||
def pushThemes(self):
|
def pushThemes(self):
|
||||||
|
"""
|
||||||
|
Notify listeners that the theme list has been updated
|
||||||
|
"""
|
||||||
Receiver.send_message(u'theme_update_list', self.getThemes())
|
Receiver.send_message(u'theme_update_list', self.getThemes())
|
||||||
|
|
||||||
def getThemes(self):
|
def getThemes(self):
|
||||||
|
"""
|
||||||
|
Return the list of loaded themes
|
||||||
|
"""
|
||||||
return self.themelist
|
return self.themelist
|
||||||
|
|
||||||
def getThemeData(self, themename):
|
def getThemeData(self, themename):
|
||||||
|
"""
|
||||||
|
Returns a theme object from an XML file
|
||||||
|
|
||||||
|
``themename``
|
||||||
|
Name of the theme to load from file
|
||||||
|
"""
|
||||||
log.debug(u'getthemedata for theme %s', themename)
|
log.debug(u'getthemedata for theme %s', themename)
|
||||||
xml_file = os.path.join(self.path, unicode(themename),
|
xml_file = os.path.join(self.path, unicode(themename),
|
||||||
unicode(themename) + u'.xml')
|
unicode(themename) + u'.xml')
|
||||||
@ -328,6 +365,12 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
return self.createThemeFromXml(xml, self.path)
|
return self.createThemeFromXml(xml, self.path)
|
||||||
|
|
||||||
def checkThemesExists(self, dir):
|
def checkThemesExists(self, dir):
|
||||||
|
"""
|
||||||
|
Check a theme directory exists and if not create it
|
||||||
|
|
||||||
|
``dir``
|
||||||
|
Theme directory to make sure exists
|
||||||
|
"""
|
||||||
log.debug(u'check themes')
|
log.debug(u'check themes')
|
||||||
if not os.path.exists(dir):
|
if not os.path.exists(dir):
|
||||||
os.mkdir(dir)
|
os.mkdir(dir)
|
||||||
@ -378,8 +421,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
if os.path.splitext(ucsfile)[1].lower() in [u'.xml']:
|
if os.path.splitext(ucsfile)[1].lower() in [u'.xml']:
|
||||||
if self.checkVersion1(xml_data):
|
if self.checkVersion1(xml_data):
|
||||||
# upgrade theme xml
|
# upgrade theme xml
|
||||||
filexml = self.migrateVersion122(filename,
|
filexml = self.migrateVersion122(xml_data)
|
||||||
fullpath, xml_data)
|
|
||||||
else:
|
else:
|
||||||
filexml = xml_data
|
filexml = xml_data
|
||||||
outfile = open(fullpath, u'w')
|
outfile = open(fullpath, u'w')
|
||||||
@ -393,7 +435,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'ThemeManager', u'Error'),
|
self, translate(u'ThemeManager', u'Error'),
|
||||||
translate(u'ThemeManager', u'File is not a valid theme.'))
|
translate(u'ThemeManager', u'File is not a valid theme.'))
|
||||||
log.exception(u'Theme file dosen\'t contain XML data %s' % filename)
|
log.exception(u'Theme file dosen\'t contain XML data %s' %
|
||||||
|
filename)
|
||||||
except (IOError, NameError):
|
except (IOError, NameError):
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'ThemeManager', u'Error'),
|
self, translate(u'ThemeManager', u'Error'),
|
||||||
@ -407,7 +450,10 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
|
|
||||||
def checkVersion1(self, xmlfile):
|
def checkVersion1(self, xmlfile):
|
||||||
"""
|
"""
|
||||||
Am I a version 1 theme
|
Check if a theme is from OpenLP version 1
|
||||||
|
|
||||||
|
``xmlfile``
|
||||||
|
Theme XML to check the version of
|
||||||
"""
|
"""
|
||||||
log.debug(u'checkVersion1 ')
|
log.debug(u'checkVersion1 ')
|
||||||
theme = xmlfile
|
theme = xmlfile
|
||||||
@ -417,13 +463,16 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def migrateVersion122(self, filename, fullpath, xml_data):
|
def migrateVersion122(self, xml_data):
|
||||||
"""
|
"""
|
||||||
Called by convert the xml data from version 1 format
|
Convert the xml data from version 1 format to the current format.
|
||||||
to the current format.
|
|
||||||
New fields are defaulted but the new theme is useable
|
New fields are loaded with defaults to provide a complete, working
|
||||||
|
theme containing all compatible customisations from the old theme.
|
||||||
|
|
||||||
|
``xml_data``
|
||||||
|
Version 1 theme to convert
|
||||||
"""
|
"""
|
||||||
log.debug(u'migrateVersion122 %s %s', filename, fullpath)
|
|
||||||
theme = Theme(xml_data)
|
theme = Theme(xml_data)
|
||||||
newtheme = ThemeXML()
|
newtheme = ThemeXML()
|
||||||
newtheme.new_document(theme.Name)
|
newtheme.new_document(theme.Name)
|
||||||
@ -533,11 +582,20 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
return frame
|
return frame
|
||||||
|
|
||||||
def getPreviewImage(self, theme):
|
def getPreviewImage(self, theme):
|
||||||
|
"""
|
||||||
|
Return an image representing the look of the theme
|
||||||
|
|
||||||
|
``theme``
|
||||||
|
The theme to return the image for
|
||||||
|
"""
|
||||||
log.debug(u'getPreviewImage %s ', theme)
|
log.debug(u'getPreviewImage %s ', theme)
|
||||||
image = os.path.join(self.path, theme + u'.png')
|
image = os.path.join(self.path, theme + u'.png')
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def baseTheme(self):
|
def baseTheme(self):
|
||||||
|
"""
|
||||||
|
Provide a base theme with sensible defaults
|
||||||
|
"""
|
||||||
log.debug(u'base theme created')
|
log.debug(u'base theme created')
|
||||||
newtheme = ThemeXML()
|
newtheme = ThemeXML()
|
||||||
newtheme.new_document(unicode(translate(u'ThemeManager', u'New Theme')))
|
newtheme.new_document(unicode(translate(u'ThemeManager', u'New Theme')))
|
||||||
@ -551,6 +609,12 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
return newtheme.extract_xml()
|
return newtheme.extract_xml()
|
||||||
|
|
||||||
def createThemeFromXml(self, theme_xml, path):
|
def createThemeFromXml(self, theme_xml, path):
|
||||||
|
"""
|
||||||
|
Return a theme object using information parsed from XML
|
||||||
|
|
||||||
|
``theme_xml``
|
||||||
|
The XML data to load into the theme
|
||||||
|
"""
|
||||||
theme = ThemeXML()
|
theme = ThemeXML()
|
||||||
theme.parse(theme_xml)
|
theme.parse(theme_xml)
|
||||||
self.cleanTheme(theme)
|
self.cleanTheme(theme)
|
||||||
@ -558,6 +622,11 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
return theme
|
return theme
|
||||||
|
|
||||||
def cleanTheme(self, theme):
|
def cleanTheme(self, theme):
|
||||||
|
"""
|
||||||
|
Clean a theme loaded from an XML file by removing stray whitespace and
|
||||||
|
making sure parameters are the correct type for the theme object
|
||||||
|
attributes
|
||||||
|
"""
|
||||||
theme.background_color = theme.background_color.strip()
|
theme.background_color = theme.background_color.strip()
|
||||||
theme.background_direction = theme.background_direction.strip()
|
theme.background_direction = theme.background_direction.strip()
|
||||||
theme.background_endColor = theme.background_endColor.strip()
|
theme.background_endColor = theme.background_endColor.strip()
|
||||||
|
@ -22,13 +22,16 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`utils` module provides the utility libraries for OpenLP
|
||||||
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import urllib2
|
import urllib2
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
import openlp
|
import openlp
|
||||||
|
@ -22,3 +22,6 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`plugins` module provides all the project produced plugins
|
||||||
|
"""
|
||||||
|
@ -22,3 +22,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`alerts` module provides the Alerts plugin for producing impromptu
|
||||||
|
on-screen announcements during a service
|
||||||
|
"""
|
||||||
|
@ -64,9 +64,9 @@ class alertsPlugin(Plugin):
|
|||||||
self.toolsAlertItem.setIcon(AlertIcon)
|
self.toolsAlertItem.setIcon(AlertIcon)
|
||||||
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
||||||
self.toolsAlertItem.setText(
|
self.toolsAlertItem.setText(
|
||||||
translate(u'AlertsPlugin.AlertsPlugin', u'&Alert'))
|
translate(u'AlertsPlugin', u'&Alert'))
|
||||||
self.toolsAlertItem.setStatusTip(
|
self.toolsAlertItem.setStatusTip(
|
||||||
translate(u'AlertsPlugin.AlertsPlugin', u'Show an alert message'))
|
translate(u'AlertsPlugin', u'Show an alert message'))
|
||||||
self.toolsAlertItem.setShortcut(u'F7')
|
self.toolsAlertItem.setShortcut(u'F7')
|
||||||
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
||||||
QtCore.QObject.connect(self.toolsAlertItem,
|
QtCore.QObject.connect(self.toolsAlertItem,
|
||||||
@ -94,7 +94,7 @@ class alertsPlugin(Plugin):
|
|||||||
self.alertForm.exec_()
|
self.alertForm.exec_()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'AlertsPlugin.AlertsPlugin',
|
about_text = translate(u'AlertsPlugin',
|
||||||
u'<b>Alerts Plugin</b><br>This plugin '
|
u'<b>Alerts Plugin</b><br>This plugin '
|
||||||
u'controls the displaying of alerts on the presentations screen')
|
u'controls the displaying of alerts on the presentations screen')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -32,11 +32,11 @@ from alertdialog import Ui_AlertDialog
|
|||||||
|
|
||||||
class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||||
"""
|
"""
|
||||||
Class documentation goes here.
|
Provide UI for the alert system
|
||||||
"""
|
"""
|
||||||
def __init__(self, manager, parent):
|
def __init__(self, manager, parent):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Initialise the alert form
|
||||||
"""
|
"""
|
||||||
self.manager = manager
|
self.manager = manager
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
@ -103,6 +103,9 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
self.loadList()
|
self.loadList()
|
||||||
|
|
||||||
def onSaveClick(self):
|
def onSaveClick(self):
|
||||||
|
"""
|
||||||
|
Save an alert
|
||||||
|
"""
|
||||||
if self.item_id:
|
if self.item_id:
|
||||||
alert = self.manager.get_alert(self.item_id)
|
alert = self.manager.get_alert(self.item_id)
|
||||||
alert.text = unicode(self.AlertTextEdit.text())
|
alert.text = unicode(self.AlertTextEdit.text())
|
||||||
@ -113,7 +116,9 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
self.onNewClick()
|
self.onNewClick()
|
||||||
|
|
||||||
def onTextChanged(self):
|
def onTextChanged(self):
|
||||||
#Data has changed by editing it so potential storage required
|
"""
|
||||||
|
Enable save button when data has been changed by editing the form
|
||||||
|
"""
|
||||||
self.SaveButton.setEnabled(True)
|
self.SaveButton.setEnabled(True)
|
||||||
|
|
||||||
def onDoubleClick(self):
|
def onDoubleClick(self):
|
||||||
|
@ -214,11 +214,13 @@ class AlertsTab(SettingsTab):
|
|||||||
translate(u'AlertsPlugin.AlertsTab', u'Bottom'))
|
translate(u'AlertsPlugin.AlertsTab', u'Bottom'))
|
||||||
|
|
||||||
def onBackgroundColorButtonClicked(self):
|
def onBackgroundColorButtonClicked(self):
|
||||||
self.bg_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.bg_color), self).name()
|
QtGui.QColor(self.bg_color), self)
|
||||||
self.BackgroundColorButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % self.bg_color)
|
self.bg_color = new_color.name()
|
||||||
self.updateDisplay()
|
self.BackgroundColorButton.setStyleSheet(
|
||||||
|
u'background-color: %s' % self.bg_color)
|
||||||
|
self.updateDisplay()
|
||||||
|
|
||||||
def onFontComboBoxClicked(self):
|
def onFontComboBoxClicked(self):
|
||||||
self.updateDisplay()
|
self.updateDisplay()
|
||||||
@ -227,11 +229,13 @@ class AlertsTab(SettingsTab):
|
|||||||
self.location = location
|
self.location = location
|
||||||
|
|
||||||
def onFontColorButtonClicked(self):
|
def onFontColorButtonClicked(self):
|
||||||
self.font_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
QtGui.QColor(self.font_color), self).name()
|
QtGui.QColor(self.font_color), self)
|
||||||
self.FontColorButton.setStyleSheet(
|
if new_color.isValid():
|
||||||
u'background-color: %s' % self.font_color)
|
self.font_color = new_color.name()
|
||||||
self.updateDisplay()
|
self.FontColorButton.setStyleSheet(
|
||||||
|
u'background-color: %s' % self.font_color)
|
||||||
|
self.updateDisplay()
|
||||||
|
|
||||||
def onTimeoutSpinBoxChanged(self):
|
def onTimeoutSpinBoxChanged(self):
|
||||||
self.timeout = self.TimeoutSpinBox.value()
|
self.timeout = self.TimeoutSpinBox.value()
|
||||||
|
@ -22,3 +22,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`bibles' modules provides the Bible plugin to enable OpenLP to display
|
||||||
|
scripture
|
||||||
|
"""
|
||||||
|
@ -70,7 +70,8 @@ class BiblePlugin(Plugin):
|
|||||||
self.ImportBibleItem = QtGui.QAction(import_menu)
|
self.ImportBibleItem = QtGui.QAction(import_menu)
|
||||||
self.ImportBibleItem.setObjectName(u'ImportBibleItem')
|
self.ImportBibleItem.setObjectName(u'ImportBibleItem')
|
||||||
import_menu.addAction(self.ImportBibleItem)
|
import_menu.addAction(self.ImportBibleItem)
|
||||||
self.ImportBibleItem.setText(import_menu.trUtf8('&Bible'))
|
self.ImportBibleItem.setText(
|
||||||
|
translate(u'BiblePlugin', u'&Bible'))
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(self.ImportBibleItem,
|
QtCore.QObject.connect(self.ImportBibleItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
|
QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
|
||||||
@ -80,7 +81,8 @@ class BiblePlugin(Plugin):
|
|||||||
self.ExportBibleItem = QtGui.QAction(export_menu)
|
self.ExportBibleItem = QtGui.QAction(export_menu)
|
||||||
self.ExportBibleItem.setObjectName(u'ExportBibleItem')
|
self.ExportBibleItem.setObjectName(u'ExportBibleItem')
|
||||||
export_menu.addAction(self.ExportBibleItem)
|
export_menu.addAction(self.ExportBibleItem)
|
||||||
self.ExportBibleItem.setText(export_menu.trUtf8('&Bible'))
|
self.ExportBibleItem.setText(translate(
|
||||||
|
u'BiblePlugin', u'&Bible'))
|
||||||
self.ExportBibleItem.setVisible(False)
|
self.ExportBibleItem.setVisible(False)
|
||||||
|
|
||||||
def onBibleImportClick(self):
|
def onBibleImportClick(self):
|
||||||
@ -88,7 +90,7 @@ class BiblePlugin(Plugin):
|
|||||||
self.media_item.onImportClick()
|
self.media_item.onImportClick()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'BiblesPlugin.BiblePlugin',
|
about_text = translate(u'BiblePlugin',
|
||||||
u'<strong>Bible Plugin</strong><br />This '
|
u'<strong>Bible Plugin</strong><br />This '
|
||||||
u'plugin allows bible verses from different sources to be '
|
u'plugin allows bible verses from different sources to be '
|
||||||
u'displayed on the screen during the service.')
|
u'displayed on the screen during the service.')
|
||||||
|
@ -303,17 +303,20 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
self.setField(u'csv_versefile', QtCore.QVariant(''))
|
self.setField(u'csv_versefile', QtCore.QVariant(''))
|
||||||
self.setField(u'opensong_file', QtCore.QVariant(''))
|
self.setField(u'opensong_file', QtCore.QVariant(''))
|
||||||
self.setField(u'web_location', QtCore.QVariant(WebDownload.Crosswalk))
|
self.setField(u'web_location', QtCore.QVariant(WebDownload.Crosswalk))
|
||||||
self.setField(u'web_biblename', QtCore.QVariant(self.BibleComboBox))
|
self.setField(u'web_biblename',
|
||||||
|
QtCore.QVariant(self.BibleComboBox.currentIndex()))
|
||||||
self.setField(u'proxy_server',
|
self.setField(u'proxy_server',
|
||||||
settings.value(u'proxy address', QtCore.QVariant(u'')))
|
settings.value(u'proxy address', QtCore.QVariant(u'')))
|
||||||
self.setField(u'proxy_username',
|
self.setField(u'proxy_username',
|
||||||
settings.value(u'proxy username', QtCore.QVariant(u'')))
|
settings.value(u'proxy username', QtCore.QVariant(u'')))
|
||||||
self.setField(u'proxy_password',
|
self.setField(u'proxy_password',
|
||||||
settings.value(u'proxy password', QtCore.QVariant(u'')))
|
settings.value(u'proxy password', QtCore.QVariant(u'')))
|
||||||
self.setField(u'license_version', QtCore.QVariant(self.VersionNameEdit))
|
self.setField(u'license_version',
|
||||||
self.setField(u'license_copyright', QtCore.QVariant(self.CopyrightEdit))
|
QtCore.QVariant(self.VersionNameEdit.text()))
|
||||||
|
self.setField(u'license_copyright',
|
||||||
|
QtCore.QVariant(self.CopyrightEdit.text()))
|
||||||
self.setField(u'license_permission',
|
self.setField(u'license_permission',
|
||||||
QtCore.QVariant(self.PermissionEdit))
|
QtCore.QVariant(self.PermissionEdit.text()))
|
||||||
self.onLocationComboBoxChanged(WebDownload.Crosswalk)
|
self.onLocationComboBoxChanged(WebDownload.Crosswalk)
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
|
@ -56,13 +56,6 @@ class CSVBible(BibleDB):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
||||||
|
|
||||||
def stop_import(self):
|
|
||||||
"""
|
|
||||||
Stops the import of the Bible.
|
|
||||||
"""
|
|
||||||
log.debug('Stopping import!')
|
|
||||||
self.stop_import_flag = True
|
|
||||||
|
|
||||||
def do_import(self):
|
def do_import(self):
|
||||||
#Populate the Tables
|
#Populate the Tables
|
||||||
success = True
|
success = True
|
||||||
|
@ -29,8 +29,9 @@ import chardet
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
from openlp.core.lib import translate
|
||||||
from openlp.plugins.bibles.lib.models import *
|
from openlp.plugins.bibles.lib.models import *
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -59,6 +60,7 @@ class BibleDB(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
log.info(u'BibleDB loaded')
|
log.info(u'BibleDB loaded')
|
||||||
QtCore.QObject.__init__(self)
|
QtCore.QObject.__init__(self)
|
||||||
|
self.bible_plugin = parent
|
||||||
if u'path' not in kwargs:
|
if u'path' not in kwargs:
|
||||||
raise KeyError(u'Missing keyword argument "path".')
|
raise KeyError(u'Missing keyword argument "path".')
|
||||||
if u'name' not in kwargs and u'file' not in kwargs:
|
if u'name' not in kwargs and u'file' not in kwargs:
|
||||||
@ -92,6 +94,13 @@ class BibleDB(QtCore.QObject):
|
|||||||
if u'file' in kwargs:
|
if u'file' in kwargs:
|
||||||
self.get_name()
|
self.get_name()
|
||||||
|
|
||||||
|
def stop_import(self):
|
||||||
|
"""
|
||||||
|
Stops the import of the Bible.
|
||||||
|
"""
|
||||||
|
log.debug('Stopping import')
|
||||||
|
self.stop_import_flag = True
|
||||||
|
|
||||||
def get_name(self):
|
def get_name(self):
|
||||||
"""
|
"""
|
||||||
Returns the version name of the Bible.
|
Returns the version name of the Bible.
|
||||||
@ -296,14 +305,22 @@ class BibleDB(QtCore.QObject):
|
|||||||
if db_book:
|
if db_book:
|
||||||
book = db_book.name
|
book = db_book.name
|
||||||
log.debug(u'Book name corrected to "%s"', book)
|
log.debug(u'Book name corrected to "%s"', book)
|
||||||
verses = self.session.query(Verse)\
|
verses = self.session.query(Verse)\
|
||||||
.filter_by(book_id=db_book.id)\
|
.filter_by(book_id=db_book.id)\
|
||||||
.filter_by(chapter=chapter)\
|
.filter_by(chapter=chapter)\
|
||||||
.filter(Verse.verse >= start_verse)\
|
.filter(Verse.verse >= start_verse)\
|
||||||
.filter(Verse.verse <= end_verse)\
|
.filter(Verse.verse <= end_verse)\
|
||||||
.order_by(Verse.verse)\
|
.order_by(Verse.verse)\
|
||||||
.all()
|
.all()
|
||||||
verse_list.extend(verses)
|
verse_list.extend(verses)
|
||||||
|
else:
|
||||||
|
log.debug(u'OpenLP failed to find book %s', book)
|
||||||
|
QtGui.QMessageBox.information(self.bible_plugin.media_item,
|
||||||
|
translate(u'BibleDB', u'Book not found'),
|
||||||
|
translate(u'BibleDB', u'The book you requested could not '
|
||||||
|
u'be found in this bible. Please check your spelling '
|
||||||
|
u'and that this is a complete bible not just one '
|
||||||
|
u'testament.'))
|
||||||
return verse_list
|
return verse_list
|
||||||
|
|
||||||
def verse_search(self, text):
|
def verse_search(self, text):
|
||||||
@ -375,4 +392,3 @@ class BibleDB(QtCore.QObject):
|
|||||||
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)
|
||||||
|
|
||||||
|
@ -137,10 +137,10 @@ class HTTPBooks(object):
|
|||||||
u'verses FROM chapters WHERE book_id = ?', (book[u'id'],))
|
u'verses FROM chapters WHERE book_id = ?', (book[u'id'],))
|
||||||
if chapters:
|
if chapters:
|
||||||
return {
|
return {
|
||||||
u'id': chapters[0][0],
|
u'id': chapters[chapter][0],
|
||||||
u'book_id': chapters[0][1],
|
u'book_id': chapters[chapter][1],
|
||||||
u'chapter': chapters[0][2],
|
u'chapter': chapters[chapter][2],
|
||||||
u'verses': chapters[0][3]
|
u'verses': chapters[chapter][3]
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
@ -288,8 +288,7 @@ class CWExtract(BibleCommon):
|
|||||||
``chapter``
|
``chapter``
|
||||||
Chapter number
|
Chapter number
|
||||||
"""
|
"""
|
||||||
log.debug(u'get_bible_chapter %s,%s,%s',
|
log.debug(u'get_bible_chapter %s,%s,%s', version, bookname, chapter)
|
||||||
version, bookname, chapter)
|
|
||||||
urlbookname = bookname.replace(u' ', u'-')
|
urlbookname = bookname.replace(u' ', u'-')
|
||||||
chapter_url = u'http://www.biblestudytools.com/%s/%s/%s.html' % \
|
chapter_url = u'http://www.biblestudytools.com/%s/%s/%s.html' % \
|
||||||
(version, urlbookname.lower(), chapter)
|
(version, urlbookname.lower(), chapter)
|
||||||
|
@ -57,7 +57,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.IconPath = u'songs/song'
|
self.IconPath = u'songs/song'
|
||||||
self.ListViewWithDnD_class = BibleListView
|
self.ListViewWithDnD_class = BibleListView
|
||||||
self.lastReference = []
|
self.lastReference = []
|
||||||
self.addToServiceItem = True
|
|
||||||
MediaManagerItem.__init__(self, parent, icon, title)
|
MediaManagerItem.__init__(self, parent, icon, title)
|
||||||
# place to store the search results
|
# place to store the search results
|
||||||
self.search_results = {}
|
self.search_results = {}
|
||||||
@ -147,7 +146,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.QuickMessage = QtGui.QLabel(self.QuickTab)
|
self.QuickMessage = QtGui.QLabel(self.QuickTab)
|
||||||
self.QuickMessage.setObjectName(u'QuickMessage')
|
self.QuickMessage.setObjectName(u'QuickMessage')
|
||||||
self.QuickLayout.addWidget(self.QuickMessage, 6, 0, 1, 3)
|
self.QuickLayout.addWidget(self.QuickMessage, 6, 0, 1, 3)
|
||||||
self.SearchTabWidget.addTab(self.QuickTab,
|
self.SearchTabWidget.addTab(self.QuickTab,
|
||||||
translate(u'BiblesPlugin.MediaItem', u'Quick'))
|
translate(u'BiblesPlugin.MediaItem', u'Quick'))
|
||||||
QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum,
|
QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
@ -232,7 +231,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.AdvancedMessage = QtGui.QLabel(self.AdvancedTab)
|
self.AdvancedMessage = QtGui.QLabel(self.AdvancedTab)
|
||||||
self.AdvancedMessage.setObjectName(u'AdvancedMessage')
|
self.AdvancedMessage.setObjectName(u'AdvancedMessage')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3)
|
self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3)
|
||||||
self.SearchTabWidget.addTab(self.AdvancedTab,
|
self.SearchTabWidget.addTab(self.AdvancedTab,
|
||||||
translate(u'BiblesPlugin.MediaItem', u'Advanced'))
|
translate(u'BiblesPlugin.MediaItem', u'Advanced'))
|
||||||
# Add the search tab widget to the page layout
|
# Add the search tab widget to the page layout
|
||||||
self.PageLayout.addWidget(self.SearchTabWidget)
|
self.PageLayout.addWidget(self.SearchTabWidget)
|
||||||
@ -387,7 +386,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
def onNoBookFound(self):
|
def onNoBookFound(self):
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.MediaItem', u'No Book Found'),
|
translate(u'BiblesPlugin.MediaItem', u'No Book Found'),
|
||||||
translate(u'BiblesPlugin.MediaItem',
|
translate(u'BiblesPlugin.MediaItem',
|
||||||
u'No matching book could be found in this Bible.'),
|
u'No matching book could be found in this Bible.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||||
QtGui.QMessageBox.Ok
|
QtGui.QMessageBox.Ok
|
||||||
@ -495,7 +494,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
if bible2_version:
|
if bible2_version:
|
||||||
bible2_version = bible2_version.value
|
bible2_version = bible2_version.value
|
||||||
else:
|
else:
|
||||||
bible2_version = u''
|
bible2_version = u''
|
||||||
if bible2_copyright:
|
if bible2_copyright:
|
||||||
bible2_copyright = bible2_copyright.value
|
bible2_copyright = bible2_copyright.value
|
||||||
else:
|
else:
|
||||||
@ -558,7 +557,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
service_item.title = u'%s %s' % (book, verse_text)
|
service_item.title = u'%s %s' % (book, verse_text)
|
||||||
elif service_item.title.find(
|
elif service_item.title.find(
|
||||||
translate(u'BiblesPlugin.MediaItem', u'etc')) == -1:
|
translate(u'BiblesPlugin.MediaItem', u'etc')) == -1:
|
||||||
service_item.title = u'%s, %s' % (service_item.title,
|
service_item.title = u'%s, %s' % (service_item.title,
|
||||||
translate(u'BiblesPlugin.MediaItem', u'etc'))
|
translate(u'BiblesPlugin.MediaItem', u'etc'))
|
||||||
if len(self.parent.settings_tab.bible_theme) == 0:
|
if len(self.parent.settings_tab.bible_theme) == 0:
|
||||||
service_item.theme = None
|
service_item.theme = None
|
||||||
@ -569,7 +568,11 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
raw_slides.append(bible_text)
|
raw_slides.append(bible_text)
|
||||||
for slide in raw_slides:
|
for slide in raw_slides:
|
||||||
service_item.add_from_text(slide[:30], slide)
|
service_item.add_from_text(slide[:30], slide)
|
||||||
service_item.raw_footer = raw_footer
|
if service_item.raw_footer:
|
||||||
|
for foot in raw_footer:
|
||||||
|
service_item.raw_footer.append(foot)
|
||||||
|
else:
|
||||||
|
service_item.raw_footer = raw_footer
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def formatVerse(self, old_chapter, chapter, verse, opening, closing):
|
def formatVerse(self, old_chapter, chapter, verse, opening, closing):
|
||||||
|
@ -51,13 +51,6 @@ class OpenSongBible(BibleDB):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
||||||
|
|
||||||
def stop_import(self):
|
|
||||||
"""
|
|
||||||
Stops the import of the Bible.
|
|
||||||
"""
|
|
||||||
log.debug('Stopping import!')
|
|
||||||
self.stop_import_flag = True
|
|
||||||
|
|
||||||
def do_import(self):
|
def do_import(self):
|
||||||
"""
|
"""
|
||||||
Loads a Bible from file.
|
Loads a Bible from file.
|
||||||
|
@ -86,13 +86,6 @@ class OSISBible(BibleDB):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
||||||
|
|
||||||
def stop_import(self):
|
|
||||||
"""
|
|
||||||
Stops the import of the Bible.
|
|
||||||
"""
|
|
||||||
log.debug('Stopping import!')
|
|
||||||
self.stop_import_flag = True
|
|
||||||
|
|
||||||
def do_import(self):
|
def do_import(self):
|
||||||
"""
|
"""
|
||||||
Loads a Bible from file.
|
Loads a Bible from file.
|
||||||
|
@ -67,7 +67,7 @@ class CustomPlugin(Plugin):
|
|||||||
self.remove_toolbox_item()
|
self.remove_toolbox_item()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'CustomPlugin.CustomPlugin',
|
about_text = translate(u'CustomPlugin',
|
||||||
u'<b>Custom Plugin</b><br>This plugin '
|
u'<b>Custom Plugin</b><br>This plugin '
|
||||||
u'allows slides to be displayed on the screen in the same way '
|
u'allows slides to be displayed on the screen in the same way '
|
||||||
u'songs are. This plugin provides greater freedom over the '
|
u'songs are. This plugin provides greater freedom over the '
|
||||||
|
@ -115,16 +115,24 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
self.parent.edit_custom_form.exec_()
|
self.parent.edit_custom_form.exec_()
|
||||||
|
|
||||||
def onEditClick(self):
|
def onEditClick(self):
|
||||||
item = self.ListView.currentItem()
|
"""
|
||||||
if item:
|
Edit a custom item
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'CustomPlugin.MediaItem',
|
||||||
|
u'You must select an item to edit.')):
|
||||||
|
item = self.ListView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.parent.edit_custom_form.loadCustom(item_id, False)
|
self.parent.edit_custom_form.loadCustom(item_id, False)
|
||||||
self.parent.edit_custom_form.exec_()
|
self.parent.edit_custom_form.exec_()
|
||||||
self.initialise()
|
self.initialise()
|
||||||
|
|
||||||
def onDeleteClick(self):
|
def onDeleteClick(self):
|
||||||
item = self.ListView.currentItem()
|
"""
|
||||||
if item:
|
Remove a custom item from the list and database
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'CustomPlugin.MediaItem',
|
||||||
|
u'You must select an item to delete.')):
|
||||||
|
item = self.ListView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.parent.custommanager.delete_custom(item_id)
|
self.parent.custommanager.delete_custom(item_id)
|
||||||
row = self.ListView.row(item)
|
row = self.ListView.row(item)
|
||||||
|
@ -56,7 +56,7 @@ class ImagePlugin(Plugin):
|
|||||||
return ImageMediaItem(self, self.icon, self.name)
|
return ImageMediaItem(self, self.icon, self.name)
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'ImagePlugin.ImagePlugin', u'<b>Image Plugin'
|
about_text = translate(u'ImagePlugin', u'<b>Image Plugin'
|
||||||
u'</b><br>Allows images of all types to be displayed. If a number '
|
u'</b><br>Allows images of all types to be displayed. If a number '
|
||||||
u'of images are selected together and presented on the live '
|
u'of images are selected together and presented on the live '
|
||||||
u'controller it is possible to turn them into a timed loop.<br<br>'
|
u'controller it is possible to turn them into a timed loop.<br<br>'
|
||||||
|
@ -29,7 +29,7 @@ import os
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||||
contextMenuAction, ItemCapabilities, SettingsManager, translate
|
context_menu_action, ItemCapabilities, SettingsManager, translate
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -93,7 +93,7 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
MediaManagerItem.addListViewToToolBar(self)
|
MediaManagerItem.addListViewToToolBar(self)
|
||||||
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
context_menu_action(
|
||||||
self.ListView, u':/slides/slide_blank.png',
|
self.ListView, u':/slides/slide_blank.png',
|
||||||
translate(u'ImagePlugin.MediaItem', u'Replace Live Background'),
|
translate(u'ImagePlugin.MediaItem', u'Replace Live Background'),
|
||||||
self.onReplaceClick))
|
self.onReplaceClick))
|
||||||
@ -116,14 +116,18 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
self.PageLayout.addWidget(self.ImageWidget)
|
self.PageLayout.addWidget(self.ImageWidget)
|
||||||
|
|
||||||
def onDeleteClick(self):
|
def onDeleteClick(self):
|
||||||
items = self.ListView.selectedIndexes()
|
"""
|
||||||
if items:
|
Remove an image item from the list
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'ImagePlugin.MediaItem',
|
||||||
|
u'You must select an item to delete.')):
|
||||||
|
items = self.ListView.selectedIndexes()
|
||||||
for item in items:
|
for item in items:
|
||||||
text = self.ListView.item(item.row())
|
text = self.ListView.item(item.row())
|
||||||
if text:
|
if text:
|
||||||
try:
|
try:
|
||||||
os.remove(
|
os.remove(os.path.join(self.servicePath,
|
||||||
os.path.join(self.servicePath, unicode(text.text())))
|
unicode(text.text())))
|
||||||
except OSError:
|
except OSError:
|
||||||
#if not present do not worry
|
#if not present do not worry
|
||||||
pass
|
pass
|
||||||
|
@ -29,7 +29,7 @@ import os
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||||
ItemCapabilities, SettingsManager, contextMenuAction, Receiver, translate
|
ItemCapabilities, SettingsManager, context_menu_action, Receiver, translate
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
MediaManagerItem.addListViewToToolBar(self)
|
MediaManagerItem.addListViewToToolBar(self)
|
||||||
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(self.ListView, u':/slides/slide_blank.png',
|
context_menu_action(self.ListView, u':/slides/slide_blank.png',
|
||||||
translate(u'MediaPlugin.MediaItem', u'Replace Live Background'),
|
translate(u'MediaPlugin.MediaItem', u'Replace Live Background'),
|
||||||
self.onReplaceClick))
|
self.onReplaceClick))
|
||||||
|
|
||||||
@ -137,8 +137,12 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.settingsSection))
|
self.settingsSection))
|
||||||
|
|
||||||
def onDeleteClick(self):
|
def onDeleteClick(self):
|
||||||
item = self.ListView.currentItem()
|
"""
|
||||||
if item:
|
Remove a media item from the list
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'MediaPlugin.MediaItem',
|
||||||
|
u'You must select an item to delete.')):
|
||||||
|
item = self.ListView.currentItem()
|
||||||
row = self.ListView.row(item)
|
row = self.ListView.row(item)
|
||||||
self.ListView.takeItem(row)
|
self.ListView.takeItem(row)
|
||||||
SettingsManager.set_list(self.settingsSection,
|
SettingsManager.set_list(self.settingsSection,
|
||||||
@ -152,4 +156,3 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
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)
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ class MediaPlugin(Plugin):
|
|||||||
return MediaMediaItem(self, self.icon, self.name)
|
return MediaMediaItem(self, self.icon, self.name)
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'MediaPlugin.MediaPlugin',
|
about_text = translate(u'MediaPlugin',
|
||||||
u'<b>Media Plugin</b><br>This plugin '
|
u'<b>Media Plugin</b><br>This plugin '
|
||||||
u'allows the playing of audio and video media')
|
u'allows the playing of audio and video media')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -181,7 +181,7 @@ class ImpressController(PresentationController):
|
|||||||
class ImpressDocument(PresentationDocument):
|
class ImpressDocument(PresentationDocument):
|
||||||
def __init__(self, controller, presentation):
|
def __init__(self, controller, presentation):
|
||||||
log.debug(u'Init Presentation OpenOffice')
|
log.debug(u'Init Presentation OpenOffice')
|
||||||
PresentationDocument.__init__(controller, presentation)
|
PresentationDocument.__init__(self, controller, presentation)
|
||||||
self.document = None
|
self.document = None
|
||||||
self.presentation = None
|
self.presentation = None
|
||||||
self.control = None
|
self.control = None
|
||||||
@ -370,21 +370,6 @@ class ImpressDocument(PresentationDocument):
|
|||||||
"""
|
"""
|
||||||
self.control.gotoPreviousSlide()
|
self.control.gotoPreviousSlide()
|
||||||
|
|
||||||
def get_slide_preview_file(self, slide_no):
|
|
||||||
"""
|
|
||||||
Returns an image path containing a preview for the
|
|
||||||
requested slide
|
|
||||||
|
|
||||||
``slide_no``
|
|
||||||
The slide an image is required for, starting at 1
|
|
||||||
"""
|
|
||||||
path = os.path.join(self.thumbnailpath,
|
|
||||||
self.controller.thumbnailprefix + unicode(slide_no) + u'.png')
|
|
||||||
if os.path.isfile(path):
|
|
||||||
return path
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def get_slide_text(self, slide_no):
|
def get_slide_text(self, slide_no):
|
||||||
"""
|
"""
|
||||||
Returns the text on the slide
|
Returns the text on the slide
|
||||||
|
@ -174,8 +174,12 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
self.ListView.addItem(item_name)
|
self.ListView.addItem(item_name)
|
||||||
|
|
||||||
def onDeleteClick(self):
|
def onDeleteClick(self):
|
||||||
item = self.ListView.currentItem()
|
"""
|
||||||
if item:
|
Remove a presentation item from the list
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'PresentationPlugin.MediaItem',
|
||||||
|
u'You must select an item to delete.')):
|
||||||
|
item = self.ListView.currentItem()
|
||||||
row = self.ListView.row(item)
|
row = self.ListView.row(item)
|
||||||
self.ListView.takeItem(row)
|
self.ListView.takeItem(row)
|
||||||
SettingsManager.set_list(self.settingsSection,
|
SettingsManager.set_list(self.settingsSection,
|
||||||
|
@ -29,6 +29,7 @@ import os
|
|||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver
|
||||||
|
from openlp.core.ui import HideMode
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ class Controller(object):
|
|||||||
self.doc.start_presentation()
|
self.doc.start_presentation()
|
||||||
if isBlank:
|
if isBlank:
|
||||||
self.blank()
|
self.blank()
|
||||||
Receiver.send_message(u'maindisplay_hide')
|
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||||
self.doc.slidenumber = 0
|
self.doc.slidenumber = 0
|
||||||
|
|
||||||
def activate(self):
|
def activate(self):
|
||||||
@ -179,6 +180,7 @@ class Controller(object):
|
|||||||
self.doc.slidenumber != self.doc.get_slide_number():
|
self.doc.slidenumber != self.doc.get_slide_number():
|
||||||
self.doc.goto_slide(self.doc.slidenumber)
|
self.doc.goto_slide(self.doc.slidenumber)
|
||||||
self.doc.unblank_screen()
|
self.doc.unblank_screen()
|
||||||
|
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||||
|
|
||||||
def poll(self):
|
def poll(self):
|
||||||
self.doc.poll_slidenumber(self.isLive)
|
self.doc.poll_slidenumber(self.isLive)
|
||||||
|
@ -104,7 +104,7 @@ class PowerpointController(PresentationController):
|
|||||||
class PowerpointDocument(PresentationDocument):
|
class PowerpointDocument(PresentationDocument):
|
||||||
def __init__(self, controller, presentation):
|
def __init__(self, controller, presentation):
|
||||||
log.debug(u'Init Presentation Powerpoint')
|
log.debug(u'Init Presentation Powerpoint')
|
||||||
PresentationDocument.__init__(controller, presentation)
|
PresentationDocument.__init__(self, controller, presentation)
|
||||||
self.presentation = None
|
self.presentation = None
|
||||||
|
|
||||||
def load_presentation(self):
|
def load_presentation(self):
|
||||||
@ -142,7 +142,7 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
if self.check_thumbnails():
|
if self.check_thumbnails():
|
||||||
return
|
return
|
||||||
self.presentation.Export(os.path.join(self.thumbnailpath, ''), 'png',
|
self.presentation.Export(os.path.join(self.thumbnailpath, ''), 'png',
|
||||||
640, 480)
|
320, 240)
|
||||||
|
|
||||||
def close_presentation(self):
|
def close_presentation(self):
|
||||||
"""
|
"""
|
||||||
@ -269,20 +269,6 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
"""
|
"""
|
||||||
self.presentation.SlideShowWindow.View.Previous()
|
self.presentation.SlideShowWindow.View.Previous()
|
||||||
|
|
||||||
def get_slide_preview_file(self, slide_no):
|
|
||||||
"""
|
|
||||||
Returns an image path containing a preview for the requested slide
|
|
||||||
|
|
||||||
``slide_no``
|
|
||||||
The slide an image is required for, starting at 1
|
|
||||||
"""
|
|
||||||
path = os.path.join(self.thumbnailpath,
|
|
||||||
self.controller.thumbnailprefix + unicode(slide_no) + u'.png')
|
|
||||||
if os.path.isfile(path):
|
|
||||||
return path
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def get_slide_text(self, slide_no):
|
def get_slide_text(self, slide_no):
|
||||||
"""
|
"""
|
||||||
Returns the text on the slide
|
Returns the text on the slide
|
||||||
|
@ -102,7 +102,7 @@ class PptviewController(PresentationController):
|
|||||||
class PptviewDocument(PresentationDocument):
|
class PptviewDocument(PresentationDocument):
|
||||||
def __init__(self, controller, presentation):
|
def __init__(self, controller, presentation):
|
||||||
log.debug(u'Init Presentation PowerPoint')
|
log.debug(u'Init Presentation PowerPoint')
|
||||||
PresentationDocument.__init__(controller, presentation)
|
PresentationDocument.__init__(self, controller, presentation)
|
||||||
self.presentation = None
|
self.presentation = None
|
||||||
self.pptid = None
|
self.pptid = None
|
||||||
self.blanked = False
|
self.blanked = False
|
||||||
|
@ -357,7 +357,12 @@ class PresentationDocument(object):
|
|||||||
``slide_no``
|
``slide_no``
|
||||||
The slide an image is required for, starting at 1
|
The slide an image is required for, starting at 1
|
||||||
"""
|
"""
|
||||||
return None
|
path = os.path.join(self.thumbnailpath,
|
||||||
|
self.controller.thumbnailprefix + unicode(slide_no) + u'.png')
|
||||||
|
if os.path.isfile(path):
|
||||||
|
return path
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
def poll_slidenumber(self, is_live):
|
def poll_slidenumber(self, is_live):
|
||||||
"""
|
"""
|
||||||
|
@ -108,7 +108,7 @@ class PresentationPlugin(Plugin):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'PresentationPlugin.PresentationPlugin',
|
about_text = translate(u'PresentationPlugin',
|
||||||
u'<b>Presentation Plugin</b> <br> Delivers '
|
u'<b>Presentation Plugin</b> <br> Delivers '
|
||||||
u'the ability to show presentations using a number of different '
|
u'the ability to show presentations using a number of different '
|
||||||
u'programs. The choice of available presentation programs is '
|
u'programs. The choice of available presentation programs is '
|
||||||
|
@ -69,7 +69,7 @@ class RemotesPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
Information about this plugin
|
Information about this plugin
|
||||||
"""
|
"""
|
||||||
about_text = translate(u'RemotePlugin.RemotePlugin',
|
about_text = translate(u'RemotePlugin',
|
||||||
u'<b>Remote Plugin</b><br>This plugin '
|
u'<b>Remote Plugin</b><br>This plugin '
|
||||||
u'provides the ability to send messages to a running version of '
|
u'provides the ability to send messages to a running version of '
|
||||||
u'openlp on a different computer via a web browser or other app<br>'
|
u'openlp on a different computer via a web browser or other app<br>'
|
||||||
|
@ -23,68 +23,10 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
|
|
||||||
class VerseType(object):
|
|
||||||
Verse = 0
|
|
||||||
Chorus = 1
|
|
||||||
Bridge = 2
|
|
||||||
PreChorus = 3
|
|
||||||
Intro = 4
|
|
||||||
Ending = 5
|
|
||||||
Other = 6
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def to_string(verse_type):
|
|
||||||
if verse_type == VerseType.Verse:
|
|
||||||
return translate(u'VerseType', u'Verse')
|
|
||||||
elif verse_type == VerseType.Chorus:
|
|
||||||
return translate(u'VerseType', u'Chorus')
|
|
||||||
elif verse_type == VerseType.Bridge:
|
|
||||||
return translate(u'VerseType', u'Bridge')
|
|
||||||
elif verse_type == VerseType.PreChorus:
|
|
||||||
return translate(u'VerseType', u'Pre-Chorus')
|
|
||||||
elif verse_type == VerseType.Intro:
|
|
||||||
return translate(u'VerseType', u'Intro')
|
|
||||||
elif verse_type == VerseType.Ending:
|
|
||||||
return translate(u'VerseType', u'Ending')
|
|
||||||
elif verse_type == VerseType.Other:
|
|
||||||
return translate(u'VerseType', u'Other')
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def from_string(verse_type):
|
|
||||||
verse_type = verse_type.lower()
|
|
||||||
if verse_type == unicode(VerseType.to_string(VerseType.Verse)).lower():
|
|
||||||
return VerseType.Verse
|
|
||||||
elif verse_type == \
|
|
||||||
unicode(VerseType.to_string(VerseType.Chorus)).lower():
|
|
||||||
return VerseType.Chorus
|
|
||||||
elif verse_type == \
|
|
||||||
unicode(VerseType.to_string(VerseType.Bridge)).lower():
|
|
||||||
return VerseType.Bridge
|
|
||||||
elif verse_type == \
|
|
||||||
unicode(VerseType.to_string(VerseType.PreChorus)).lower():
|
|
||||||
return VerseType.PreChorus
|
|
||||||
elif verse_type == \
|
|
||||||
unicode(VerseType.to_string(VerseType.Intro)).lower():
|
|
||||||
return VerseType.Intro
|
|
||||||
elif verse_type == \
|
|
||||||
unicode(VerseType.to_string(VerseType.Ending)).lower():
|
|
||||||
return VerseType.Ending
|
|
||||||
elif verse_type == \
|
|
||||||
unicode(VerseType.to_string(VerseType.Other)).lower():
|
|
||||||
return VerseType.Other
|
|
||||||
|
|
||||||
from authorsform import AuthorsForm
|
from authorsform import AuthorsForm
|
||||||
from topicsform import TopicsForm
|
from topicsform import TopicsForm
|
||||||
from songbookform import SongBookForm
|
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 openlpexportform import OpenLPExportForm
|
|
||||||
#from openlpimportform import OpenLPImportForm
|
|
||||||
#from opensongexportform import OpenSongExportForm
|
|
||||||
#from opensongimportform import OpenSongImportForm
|
|
||||||
|
|
||||||
from songimportform import ImportWizardForm
|
from songimportform import ImportWizardForm
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.plugins.songs.forms import VerseType
|
from openlp.plugins.songs.lib import VerseType
|
||||||
|
|
||||||
class Ui_EditVerseDialog(object):
|
class Ui_EditVerseDialog(object):
|
||||||
def setupUi(self, EditVerseDialog):
|
def setupUi(self, EditVerseDialog):
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.plugins.songs.forms import VerseType
|
from openlp.plugins.songs.lib import VerseType
|
||||||
|
|
||||||
from editversedialog import Ui_EditVerseDialog
|
from editversedialog import Ui_EditVerseDialog
|
||||||
|
|
||||||
|
@ -1,326 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
|
|
||||||
class Ui_OpenLPExportDialog(object):
|
|
||||||
def setupUi(self, OpenLPExportDialog):
|
|
||||||
OpenLPExportDialog.setObjectName(u'OpenLPExportDialog')
|
|
||||||
OpenLPExportDialog.resize(473, 459)
|
|
||||||
icon = QtGui.QIcon()
|
|
||||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
OpenLPExportDialog.setWindowIcon(icon)
|
|
||||||
self.verticalLayout_5 = QtGui.QVBoxLayout(OpenLPExportDialog)
|
|
||||||
self.verticalLayout_5.setMargin(8)
|
|
||||||
self.verticalLayout_5.setObjectName(u'verticalLayout_5')
|
|
||||||
self.ExportFileWidget = QtGui.QWidget(OpenLPExportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ExportFileWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ExportFileWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ExportFileWidget.setObjectName(u'ExportFileWidget')
|
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout(self.ExportFileWidget)
|
|
||||||
self.horizontalLayout.setSpacing(3)
|
|
||||||
self.horizontalLayout.setMargin(0)
|
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
|
||||||
self.ExportFileLabel = QtGui.QLabel(self.ExportFileWidget)
|
|
||||||
self.ExportFileLabel.setObjectName(u'ExportFileLabel')
|
|
||||||
self.horizontalLayout.addWidget(self.ExportFileLabel)
|
|
||||||
self.ExportFileLineEdit = QtGui.QLineEdit(self.ExportFileWidget)
|
|
||||||
self.ExportFileLineEdit.setObjectName(u'ExportFileLineEdit')
|
|
||||||
self.horizontalLayout.addWidget(self.ExportFileLineEdit)
|
|
||||||
self.ExportFileSelectPushButton = QtGui.QPushButton(self.ExportFileWidget)
|
|
||||||
icon1 = QtGui.QIcon()
|
|
||||||
icon1.addPixmap(QtGui.QPixmap(u':/general/general_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ExportFileSelectPushButton.setIcon(icon1)
|
|
||||||
self.ExportFileSelectPushButton.setObjectName(u'ExportFileSelectPushButton')
|
|
||||||
self.horizontalLayout.addWidget(self.ExportFileSelectPushButton)
|
|
||||||
self.verticalLayout_5.addWidget(self.ExportFileWidget)
|
|
||||||
self.SongListFrame = QtGui.QFrame(OpenLPExportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SongListFrame.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SongListFrame.setSizePolicy(sizePolicy)
|
|
||||||
self.SongListFrame.setFrameShape(QtGui.QFrame.Box)
|
|
||||||
self.SongListFrame.setFrameShadow(QtGui.QFrame.Raised)
|
|
||||||
self.SongListFrame.setObjectName(u'SongListFrame')
|
|
||||||
self.horizontalLayout_6 = QtGui.QHBoxLayout(self.SongListFrame)
|
|
||||||
self.horizontalLayout_6.setSpacing(8)
|
|
||||||
self.horizontalLayout_6.setMargin(8)
|
|
||||||
self.horizontalLayout_6.setObjectName(u'horizontalLayout_6')
|
|
||||||
self.ExportFileSongListWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ExportFileSongListWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ExportFileSongListWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ExportFileSongListWidget.setObjectName(u'ExportFileSongListWidget')
|
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(self.ExportFileSongListWidget)
|
|
||||||
self.verticalLayout.setSpacing(6)
|
|
||||||
self.verticalLayout.setMargin(0)
|
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
|
||||||
self.ExportListLabel = QtGui.QLabel(self.ExportFileSongListWidget)
|
|
||||||
self.ExportListLabel.setObjectName(u'ExportListLabel')
|
|
||||||
self.verticalLayout.addWidget(self.ExportListLabel)
|
|
||||||
self.ExportListTable = QtGui.QTableWidget(self.ExportFileSongListWidget)
|
|
||||||
self.ExportListTable.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
|
|
||||||
self.ExportListTable.setShowGrid(False)
|
|
||||||
self.ExportListTable.setWordWrap(False)
|
|
||||||
self.ExportListTable.setCornerButtonEnabled(False)
|
|
||||||
self.ExportListTable.setObjectName(u'ExportListTable')
|
|
||||||
self.ExportListTable.setColumnCount(2)
|
|
||||||
self.ExportListTable.setRowCount(0)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.ExportListTable.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.ExportListTable.setHorizontalHeaderItem(1, item)
|
|
||||||
self.verticalLayout.addWidget(self.ExportListTable)
|
|
||||||
self.ExportSelectAllWidget = QtGui.QWidget(self.ExportFileSongListWidget)
|
|
||||||
self.ExportSelectAllWidget.setObjectName(u'ExportSelectAllWidget')
|
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.ExportSelectAllWidget)
|
|
||||||
self.horizontalLayout_2.setSpacing(6)
|
|
||||||
self.horizontalLayout_2.setMargin(0)
|
|
||||||
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
|
||||||
self.ExportSelectAllPushButton = QtGui.QPushButton(self.ExportSelectAllWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ExportSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ExportSelectAllPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.ExportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
|
||||||
icon2 = QtGui.QIcon()
|
|
||||||
icon2.addPixmap(QtGui.QPixmap(u':/exports/export_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ExportSelectAllPushButton.setIcon(icon2)
|
|
||||||
self.ExportSelectAllPushButton.setObjectName(u'ExportSelectAllPushButton')
|
|
||||||
self.horizontalLayout_2.addWidget(self.ExportSelectAllPushButton)
|
|
||||||
spacerItem = QtGui.QSpacerItem(89, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_2.addItem(spacerItem)
|
|
||||||
self.verticalLayout.addWidget(self.ExportSelectAllWidget)
|
|
||||||
self.exportFilterWidget = QtGui.QWidget(self.ExportFileSongListWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.exportFilterWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.exportFilterWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.exportFilterWidget.setMinimumSize(QtCore.QSize(0, 0))
|
|
||||||
self.exportFilterWidget.setObjectName(u'exportFilterWidget')
|
|
||||||
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.exportFilterWidget)
|
|
||||||
self.horizontalLayout_3.setMargin(0)
|
|
||||||
self.horizontalLayout_3.setObjectName(u'horizontalLayout_3')
|
|
||||||
self.ExportFilterComboBox = QtGui.QComboBox(self.exportFilterWidget)
|
|
||||||
self.ExportFilterComboBox.setMinimumSize(QtCore.QSize(70, 0))
|
|
||||||
self.ExportFilterComboBox.setObjectName(u'ExportFilterComboBox')
|
|
||||||
self.ExportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.ExportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.ExportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.horizontalLayout_3.addWidget(self.ExportFilterComboBox)
|
|
||||||
self.ExportFilterLineEdit = QtGui.QLineEdit(self.exportFilterWidget)
|
|
||||||
self.ExportFilterLineEdit.setObjectName(u'ExportFilterLineEdit')
|
|
||||||
self.horizontalLayout_3.addWidget(self.ExportFilterLineEdit)
|
|
||||||
self.verticalLayout.addWidget(self.exportFilterWidget)
|
|
||||||
self.horizontalLayout_6.addWidget(self.ExportFileSongListWidget)
|
|
||||||
self.AddSelectedWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.AddSelectedWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AddSelectedWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.AddSelectedWidget.setObjectName(u'AddSelectedWidget')
|
|
||||||
self.verticalLayout_3 = QtGui.QVBoxLayout(self.AddSelectedWidget)
|
|
||||||
self.verticalLayout_3.setMargin(0)
|
|
||||||
self.verticalLayout_3.setObjectName(u'verticalLayout_3')
|
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem1)
|
|
||||||
self.AddSelectedPushButton = QtGui.QPushButton(self.AddSelectedWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
|
|
||||||
icon3 = QtGui.QIcon()
|
|
||||||
icon3.addPixmap(QtGui.QPixmap(u':/exports/export_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.AddSelectedPushButton.setIcon(icon3)
|
|
||||||
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
|
|
||||||
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
|
|
||||||
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem2)
|
|
||||||
self.horizontalLayout_6.addWidget(self.AddSelectedWidget)
|
|
||||||
self.SelectedFileListWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedFileListWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedFileListWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedFileListWidget.setObjectName(u'SelectedFileListWidget')
|
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.SelectedFileListWidget)
|
|
||||||
self.verticalLayout_2.setMargin(0)
|
|
||||||
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
|
||||||
self.SelectedListLabel = QtGui.QLabel(self.SelectedFileListWidget)
|
|
||||||
self.SelectedListLabel.setObjectName(u'SelectedListLabel')
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedListLabel)
|
|
||||||
self.SelectedListTable = QtGui.QTableWidget(self.SelectedFileListWidget)
|
|
||||||
self.SelectedListTable.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
|
|
||||||
self.SelectedListTable.setShowGrid(False)
|
|
||||||
self.SelectedListTable.setWordWrap(False)
|
|
||||||
self.SelectedListTable.setCornerButtonEnabled(False)
|
|
||||||
self.SelectedListTable.setObjectName(u'SelectedListTable')
|
|
||||||
self.SelectedListTable.setColumnCount(2)
|
|
||||||
self.SelectedListTable.setRowCount(0)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.SelectedListTable.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.SelectedListTable.setHorizontalHeaderItem(1, item)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedListTable)
|
|
||||||
self.SelectedSelectAllWidget = QtGui.QWidget(self.SelectedFileListWidget)
|
|
||||||
self.SelectedSelectAllWidget.setObjectName(u'SelectedSelectAllWidget')
|
|
||||||
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.SelectedSelectAllWidget)
|
|
||||||
self.horizontalLayout_4.setSpacing(6)
|
|
||||||
self.horizontalLayout_4.setMargin(0)
|
|
||||||
self.horizontalLayout_4.setObjectName(u'horizontalLayout_4')
|
|
||||||
self.SelectedSelectAllPushButton = QtGui.QPushButton(self.SelectedSelectAllWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedSelectAllPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
|
||||||
self.SelectedSelectAllPushButton.setIcon(icon2)
|
|
||||||
self.SelectedSelectAllPushButton.setObjectName(u'SelectedSelectAllPushButton')
|
|
||||||
self.horizontalLayout_4.addWidget(self.SelectedSelectAllPushButton)
|
|
||||||
spacerItem3 = QtGui.QSpacerItem(92, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_4.addItem(spacerItem3)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedSelectAllWidget)
|
|
||||||
self.SelectedRemoveSelectedWidget = QtGui.QWidget(self.SelectedFileListWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedRemoveSelectedWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedRemoveSelectedWidget.setObjectName(u'SelectedRemoveSelectedWidget')
|
|
||||||
self.horizontalLayout_5 = QtGui.QHBoxLayout(self.SelectedRemoveSelectedWidget)
|
|
||||||
self.horizontalLayout_5.setMargin(0)
|
|
||||||
self.horizontalLayout_5.setObjectName(u'horizontalLayout_5')
|
|
||||||
self.SelectedRemoveSelectedButton = QtGui.QPushButton(self.SelectedRemoveSelectedWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
|
|
||||||
icon4 = QtGui.QIcon()
|
|
||||||
icon4.addPixmap(QtGui.QPixmap(u':/exports/export_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.SelectedRemoveSelectedButton.setIcon(icon4)
|
|
||||||
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
|
|
||||||
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
|
|
||||||
spacerItem4 = QtGui.QSpacerItem(49, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem4)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedRemoveSelectedWidget)
|
|
||||||
self.horizontalLayout_6.addWidget(self.SelectedFileListWidget)
|
|
||||||
self.verticalLayout_5.addWidget(self.SongListFrame)
|
|
||||||
self.ProgressGroupBox = QtGui.QGroupBox(OpenLPExportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ProgressGroupBox.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ProgressGroupBox.setSizePolicy(sizePolicy)
|
|
||||||
self.ProgressGroupBox.setObjectName(u'ProgressGroupBox')
|
|
||||||
self.verticalLayout_4 = QtGui.QVBoxLayout(self.ProgressGroupBox)
|
|
||||||
self.verticalLayout_4.setSpacing(8)
|
|
||||||
self.verticalLayout_4.setContentsMargins(8, 0, 8, 8)
|
|
||||||
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
|
|
||||||
self.ProgressLabel = QtGui.QLabel(self.ProgressGroupBox)
|
|
||||||
self.ProgressLabel.setObjectName(u'ProgressLabel')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressLabel)
|
|
||||||
self.ProgressBar = QtGui.QProgressBar(self.ProgressGroupBox)
|
|
||||||
self.ProgressBar.setProperty(u'value', QtCore.QVariant(24))
|
|
||||||
self.ProgressBar.setObjectName(u'ProgressBar')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressBar)
|
|
||||||
self.verticalLayout_5.addWidget(self.ProgressGroupBox)
|
|
||||||
self.ButtonBarWidget = QtGui.QWidget(OpenLPExportDialog)
|
|
||||||
self.ButtonBarWidget.setObjectName(u'ButtonBarWidget')
|
|
||||||
self.horizontalLayout_7 = QtGui.QHBoxLayout(self.ButtonBarWidget)
|
|
||||||
self.horizontalLayout_7.setSpacing(8)
|
|
||||||
self.horizontalLayout_7.setMargin(0)
|
|
||||||
self.horizontalLayout_7.setObjectName(u'horizontalLayout_7')
|
|
||||||
spacerItem5 = QtGui.QSpacerItem(288, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_7.addItem(spacerItem5)
|
|
||||||
self.ExportPushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ExportPushButton.setObjectName(u'ExportPushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ExportPushButton)
|
|
||||||
self.ClosePushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ClosePushButton.setObjectName(u'ClosePushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ClosePushButton)
|
|
||||||
self.verticalLayout_5.addWidget(self.ButtonBarWidget)
|
|
||||||
|
|
||||||
self.retranslateUi(OpenLPExportDialog)
|
|
||||||
QtCore.QObject.connect(self.ClosePushButton, QtCore.SIGNAL(u'clicked()'), OpenLPExportDialog.close)
|
|
||||||
QtCore.QObject.connect(self.ExportSelectAllPushButton, QtCore.SIGNAL(u'clicked()'), self.ExportListTable.selectAll)
|
|
||||||
QtCore.QObject.connect(self.SelectedSelectAllPushButton, QtCore.SIGNAL(u'clicked()'), self.SelectedListTable.selectAll)
|
|
||||||
QtCore.QObject.connect(self.SelectedRemoveSelectedButton, QtCore.SIGNAL(u'clicked()'), self.SelectedListTable.clear)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(OpenLPExportDialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, OpenLPExportDialog):
|
|
||||||
OpenLPExportDialog.setWindowTitle(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm',
|
|
||||||
u'openlp.org Song Exporter'))
|
|
||||||
self.ExportFileLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm',
|
|
||||||
u'Select openlp.org export filename:'))
|
|
||||||
self.ExportListLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Full Song List'))
|
|
||||||
self.ExportListTable.horizontalHeaderItem(0).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Song Title'))
|
|
||||||
self.ExportListTable.horizontalHeaderItem(1).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Author'))
|
|
||||||
self.ExportSelectAllPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Select All'))
|
|
||||||
self.ExportFilterComboBox.setItemText(0,
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Lyrics'))
|
|
||||||
self.ExportFilterComboBox.setItemText(1,
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Title'))
|
|
||||||
self.ExportFilterComboBox.setItemText(2,
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Author'))
|
|
||||||
self.SelectedListLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Song Export List'))
|
|
||||||
self.SelectedListTable.horizontalHeaderItem(0).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Song Title'))
|
|
||||||
self.SelectedListTable.horizontalHeaderItem(1).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Author'))
|
|
||||||
self.SelectedSelectAllPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Select All'))
|
|
||||||
self.SelectedRemoveSelectedButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Remove Selected'))
|
|
||||||
self.ProgressGroupBox.setTitle(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Progress:'))
|
|
||||||
self.ProgressLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Ready to export'))
|
|
||||||
self.ExportPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Export'))
|
|
||||||
self.ClosePushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPExportForm', u'Close'))
|
|
@ -1,34 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
|
||||||
|
|
||||||
from openlp.plugins.songs.forms.openlpexportdialog import Ui_OpenLPExportDialog
|
|
||||||
|
|
||||||
class OpenLPExportForm(QtGui.QDialog, Ui_OpenLPExportDialog):
|
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
QtGui.QDialog.__init__(self, parent)
|
|
||||||
self.setupUi(self)
|
|
@ -1,327 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
|
|
||||||
class Ui_OpenLPImportDialog(object):
|
|
||||||
def setupUi(self, OpenLPImportDialog):
|
|
||||||
OpenLPImportDialog.setObjectName(u'OpenLPImportDialog')
|
|
||||||
OpenLPImportDialog.resize(473, 459)
|
|
||||||
icon = QtGui.QIcon()
|
|
||||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
OpenLPImportDialog.setWindowIcon(icon)
|
|
||||||
self.verticalLayout_5 = QtGui.QVBoxLayout(OpenLPImportDialog)
|
|
||||||
self.verticalLayout_5.setMargin(8)
|
|
||||||
self.verticalLayout_5.setObjectName(u'verticalLayout_5')
|
|
||||||
self.ImportFileWidget = QtGui.QWidget(OpenLPImportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ImportFileWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ImportFileWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ImportFileWidget.setObjectName(u'ImportFileWidget')
|
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout(self.ImportFileWidget)
|
|
||||||
self.horizontalLayout.setSpacing(3)
|
|
||||||
self.horizontalLayout.setMargin(0)
|
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
|
||||||
self.ImportFileLabel = QtGui.QLabel(self.ImportFileWidget)
|
|
||||||
self.ImportFileLabel.setObjectName(u'ImportFileLabel')
|
|
||||||
self.horizontalLayout.addWidget(self.ImportFileLabel)
|
|
||||||
self.ImportFileLineEdit = QtGui.QLineEdit(self.ImportFileWidget)
|
|
||||||
self.ImportFileLineEdit.setObjectName(u'ImportFileLineEdit')
|
|
||||||
self.horizontalLayout.addWidget(self.ImportFileLineEdit)
|
|
||||||
self.ImportFileSelectPushButton = QtGui.QPushButton(self.ImportFileWidget)
|
|
||||||
icon1 = QtGui.QIcon()
|
|
||||||
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ImportFileSelectPushButton.setIcon(icon1)
|
|
||||||
self.ImportFileSelectPushButton.setObjectName(u'ImportFileSelectPushButton')
|
|
||||||
self.horizontalLayout.addWidget(self.ImportFileSelectPushButton)
|
|
||||||
self.verticalLayout_5.addWidget(self.ImportFileWidget)
|
|
||||||
self.SongListFrame = QtGui.QFrame(OpenLPImportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SongListFrame.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SongListFrame.setSizePolicy(sizePolicy)
|
|
||||||
self.SongListFrame.setFrameShape(QtGui.QFrame.Box)
|
|
||||||
self.SongListFrame.setFrameShadow(QtGui.QFrame.Raised)
|
|
||||||
self.SongListFrame.setObjectName(u'SongListFrame')
|
|
||||||
self.horizontalLayout_6 = QtGui.QHBoxLayout(self.SongListFrame)
|
|
||||||
self.horizontalLayout_6.setSpacing(8)
|
|
||||||
self.horizontalLayout_6.setMargin(8)
|
|
||||||
self.horizontalLayout_6.setObjectName(u'horizontalLayout_6')
|
|
||||||
self.ImportFileSongListWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ImportFileSongListWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ImportFileSongListWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ImportFileSongListWidget.setObjectName(u'ImportFileSongListWidget')
|
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(self.ImportFileSongListWidget)
|
|
||||||
self.verticalLayout.setSpacing(6)
|
|
||||||
self.verticalLayout.setMargin(0)
|
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
|
||||||
self.ImportListLabel = QtGui.QLabel(self.ImportFileSongListWidget)
|
|
||||||
self.ImportListLabel.setObjectName(u'ImportListLabel')
|
|
||||||
self.verticalLayout.addWidget(self.ImportListLabel)
|
|
||||||
self.ImportListTable = QtGui.QTableWidget(self.ImportFileSongListWidget)
|
|
||||||
self.ImportListTable.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
|
|
||||||
self.ImportListTable.setShowGrid(False)
|
|
||||||
self.ImportListTable.setWordWrap(False)
|
|
||||||
self.ImportListTable.setCornerButtonEnabled(False)
|
|
||||||
self.ImportListTable.setObjectName(u'ImportListTable')
|
|
||||||
self.ImportListTable.setColumnCount(2)
|
|
||||||
self.ImportListTable.setRowCount(0)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.ImportListTable.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.ImportListTable.setHorizontalHeaderItem(1, item)
|
|
||||||
self.verticalLayout.addWidget(self.ImportListTable)
|
|
||||||
self.ImportSelectAllWidget = QtGui.QWidget(self.ImportFileSongListWidget)
|
|
||||||
self.ImportSelectAllWidget.setObjectName(u'ImportSelectAllWidget')
|
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.ImportSelectAllWidget)
|
|
||||||
self.horizontalLayout_2.setSpacing(6)
|
|
||||||
self.horizontalLayout_2.setMargin(0)
|
|
||||||
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
|
||||||
self.ImportSelectAllPushButton = QtGui.QPushButton(self.ImportSelectAllWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ImportSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ImportSelectAllPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.ImportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
|
||||||
icon2 = QtGui.QIcon()
|
|
||||||
icon2.addPixmap(QtGui.QPixmap(u':/imports/import_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ImportSelectAllPushButton.setIcon(icon2)
|
|
||||||
self.ImportSelectAllPushButton.setObjectName(u'ImportSelectAllPushButton')
|
|
||||||
self.horizontalLayout_2.addWidget(self.ImportSelectAllPushButton)
|
|
||||||
spacerItem = QtGui.QSpacerItem(89, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_2.addItem(spacerItem)
|
|
||||||
self.verticalLayout.addWidget(self.ImportSelectAllWidget)
|
|
||||||
self.importFilterWidget = QtGui.QWidget(self.ImportFileSongListWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.importFilterWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.importFilterWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.importFilterWidget.setMinimumSize(QtCore.QSize(0, 0))
|
|
||||||
self.importFilterWidget.setObjectName(u'importFilterWidget')
|
|
||||||
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.importFilterWidget)
|
|
||||||
self.horizontalLayout_3.setMargin(0)
|
|
||||||
self.horizontalLayout_3.setObjectName(u'horizontalLayout_3')
|
|
||||||
self.ImportFilterComboBox = QtGui.QComboBox(self.importFilterWidget)
|
|
||||||
self.ImportFilterComboBox.setMinimumSize(QtCore.QSize(70, 0))
|
|
||||||
self.ImportFilterComboBox.setObjectName(u'ImportFilterComboBox')
|
|
||||||
self.ImportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.ImportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.ImportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.horizontalLayout_3.addWidget(self.ImportFilterComboBox)
|
|
||||||
self.importFilterLineEdit = QtGui.QLineEdit(self.importFilterWidget)
|
|
||||||
self.importFilterLineEdit.setObjectName(u'importFilterLineEdit')
|
|
||||||
self.horizontalLayout_3.addWidget(self.importFilterLineEdit)
|
|
||||||
self.verticalLayout.addWidget(self.importFilterWidget)
|
|
||||||
self.horizontalLayout_6.addWidget(self.ImportFileSongListWidget)
|
|
||||||
self.AddSelectedWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.AddSelectedWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AddSelectedWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.AddSelectedWidget.setObjectName(u'AddSelectedWidget')
|
|
||||||
self.verticalLayout_3 = QtGui.QVBoxLayout(self.AddSelectedWidget)
|
|
||||||
self.verticalLayout_3.setMargin(0)
|
|
||||||
self.verticalLayout_3.setObjectName(u'verticalLayout_3')
|
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem1)
|
|
||||||
self.AddSelectedPushButton = QtGui.QPushButton(self.AddSelectedWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
|
|
||||||
icon3 = QtGui.QIcon()
|
|
||||||
icon3.addPixmap(QtGui.QPixmap(u':/imports/import_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.AddSelectedPushButton.setIcon(icon3)
|
|
||||||
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
|
|
||||||
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
|
|
||||||
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem2)
|
|
||||||
self.horizontalLayout_6.addWidget(self.AddSelectedWidget)
|
|
||||||
self.SelectedFileListWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedFileListWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedFileListWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedFileListWidget.setObjectName(u'SelectedFileListWidget')
|
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.SelectedFileListWidget)
|
|
||||||
self.verticalLayout_2.setMargin(0)
|
|
||||||
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
|
||||||
self.SelectedListLabel = QtGui.QLabel(self.SelectedFileListWidget)
|
|
||||||
self.SelectedListLabel.setObjectName(u'SelectedListLabel')
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedListLabel)
|
|
||||||
self.SelectedListTable = QtGui.QTableWidget(self.SelectedFileListWidget)
|
|
||||||
self.SelectedListTable.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
|
|
||||||
self.SelectedListTable.setShowGrid(False)
|
|
||||||
self.SelectedListTable.setWordWrap(False)
|
|
||||||
self.SelectedListTable.setCornerButtonEnabled(False)
|
|
||||||
self.SelectedListTable.setObjectName(u'SelectedListTable')
|
|
||||||
self.SelectedListTable.setColumnCount(2)
|
|
||||||
self.SelectedListTable.setRowCount(0)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.SelectedListTable.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.SelectedListTable.setHorizontalHeaderItem(1, item)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedListTable)
|
|
||||||
self.SelectedSelectAllWidget = QtGui.QWidget(self.SelectedFileListWidget)
|
|
||||||
self.SelectedSelectAllWidget.setObjectName(u'SelectedSelectAllWidget')
|
|
||||||
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.SelectedSelectAllWidget)
|
|
||||||
self.horizontalLayout_4.setSpacing(6)
|
|
||||||
self.horizontalLayout_4.setMargin(0)
|
|
||||||
self.horizontalLayout_4.setObjectName(u'horizontalLayout_4')
|
|
||||||
self.SelectedSelectAllPushButton = QtGui.QPushButton(self.SelectedSelectAllWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedSelectAllPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
|
||||||
self.SelectedSelectAllPushButton.setIcon(icon2)
|
|
||||||
self.SelectedSelectAllPushButton.setObjectName(u'SelectedSelectAllPushButton')
|
|
||||||
self.horizontalLayout_4.addWidget(self.SelectedSelectAllPushButton)
|
|
||||||
spacerItem3 = QtGui.QSpacerItem(92, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_4.addItem(spacerItem3)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedSelectAllWidget)
|
|
||||||
self.SelectedRemoveSelectedWidget = QtGui.QWidget(self.SelectedFileListWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedRemoveSelectedWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedRemoveSelectedWidget.setObjectName(u'SelectedRemoveSelectedWidget')
|
|
||||||
self.horizontalLayout_5 = QtGui.QHBoxLayout(self.SelectedRemoveSelectedWidget)
|
|
||||||
self.horizontalLayout_5.setMargin(0)
|
|
||||||
self.horizontalLayout_5.setObjectName(u'horizontalLayout_5')
|
|
||||||
self.SelectedRemoveSelectedButton = QtGui.QPushButton(self.SelectedRemoveSelectedWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
|
|
||||||
icon4 = QtGui.QIcon()
|
|
||||||
icon4.addPixmap(QtGui.QPixmap(u':/imports/import_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.SelectedRemoveSelectedButton.setIcon(icon4)
|
|
||||||
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
|
|
||||||
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
|
|
||||||
spacerItem4 = QtGui.QSpacerItem(49, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem4)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedRemoveSelectedWidget)
|
|
||||||
self.horizontalLayout_6.addWidget(self.SelectedFileListWidget)
|
|
||||||
self.verticalLayout_5.addWidget(self.SongListFrame)
|
|
||||||
self.ProgressGroupBox = QtGui.QGroupBox(OpenLPImportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ProgressGroupBox.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ProgressGroupBox.setSizePolicy(sizePolicy)
|
|
||||||
self.ProgressGroupBox.setObjectName(u'ProgressGroupBox')
|
|
||||||
self.verticalLayout_4 = QtGui.QVBoxLayout(self.ProgressGroupBox)
|
|
||||||
self.verticalLayout_4.setSpacing(8)
|
|
||||||
self.verticalLayout_4.setContentsMargins(8, 0, 8, 8)
|
|
||||||
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
|
|
||||||
self.ProgressLabel = QtGui.QLabel(self.ProgressGroupBox)
|
|
||||||
self.ProgressLabel.setObjectName(u'ProgressLabel')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressLabel)
|
|
||||||
self.ProgressBar = QtGui.QProgressBar(self.ProgressGroupBox)
|
|
||||||
self.ProgressBar.setProperty(u'value', QtCore.QVariant(24))
|
|
||||||
self.ProgressBar.setObjectName(u'ProgressBar')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressBar)
|
|
||||||
self.verticalLayout_5.addWidget(self.ProgressGroupBox)
|
|
||||||
self.ButtonBarWidget = QtGui.QWidget(OpenLPImportDialog)
|
|
||||||
self.ButtonBarWidget.setObjectName(u'ButtonBarWidget')
|
|
||||||
self.horizontalLayout_7 = QtGui.QHBoxLayout(self.ButtonBarWidget)
|
|
||||||
self.horizontalLayout_7.setSpacing(8)
|
|
||||||
self.horizontalLayout_7.setMargin(0)
|
|
||||||
self.horizontalLayout_7.setObjectName(u'horizontalLayout_7')
|
|
||||||
spacerItem5 = QtGui.QSpacerItem(288, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_7.addItem(spacerItem5)
|
|
||||||
self.ImportPushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ImportPushButton.setObjectName(u'ImportPushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ImportPushButton)
|
|
||||||
self.ClosePushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ClosePushButton.setObjectName(u'ClosePushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ClosePushButton)
|
|
||||||
self.verticalLayout_5.addWidget(self.ButtonBarWidget)
|
|
||||||
|
|
||||||
self.retranslateUi(OpenLPImportDialog)
|
|
||||||
QtCore.QObject.connect(self.ClosePushButton, QtCore.SIGNAL(u'clicked()'), OpenLPImportDialog.close)
|
|
||||||
QtCore.QObject.connect(self.ImportSelectAllPushButton, QtCore.SIGNAL(u'clicked()'), self.ImportListTable.selectAll)
|
|
||||||
QtCore.QObject.connect(self.SelectedSelectAllPushButton, QtCore.SIGNAL(u'clicked()'), self.SelectedListTable.selectAll)
|
|
||||||
QtCore.QObject.connect(self.SelectedRemoveSelectedButton, QtCore.SIGNAL(u'clicked()'), self.SelectedListTable.clear)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(OpenLPImportDialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, OpenLPImportDialog):
|
|
||||||
OpenLPImportDialog.setWindowTitle(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm',
|
|
||||||
u'openlp.org Song Importer'))
|
|
||||||
self.ImportFileLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm',
|
|
||||||
u'Select openlp.org songfile to import:'))
|
|
||||||
self.ImportListLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm',
|
|
||||||
u'Import File Song List'))
|
|
||||||
self.ImportListTable.horizontalHeaderItem(0).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Song Title'))
|
|
||||||
self.ImportListTable.horizontalHeaderItem(1).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Author'))
|
|
||||||
self.ImportSelectAllPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Select All'))
|
|
||||||
self.ImportFilterComboBox.setItemText(0,
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Lyrics'))
|
|
||||||
self.ImportFilterComboBox.setItemText(1,
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Title'))
|
|
||||||
self.ImportFilterComboBox.setItemText(2,
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Author'))
|
|
||||||
self.SelectedListLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Song Import List'))
|
|
||||||
self.SelectedListTable.horizontalHeaderItem(0).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Song Title'))
|
|
||||||
self.SelectedListTable.horizontalHeaderItem(1).setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Author'))
|
|
||||||
self.SelectedSelectAllPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Select All'))
|
|
||||||
self.SelectedRemoveSelectedButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Remove Selected'))
|
|
||||||
self.ProgressGroupBox.setTitle(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Progress:'))
|
|
||||||
self.ProgressLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Ready to import'))
|
|
||||||
self.ImportPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Import'))
|
|
||||||
self.ClosePushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenLPImportForm', u'Close'))
|
|
@ -1,33 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
|
||||||
from openlp.plugins.songs.forms.openlpimportdialog import Ui_OpenLPImportDialog
|
|
||||||
|
|
||||||
class OpenLPImportForm(QtGui.QDialog, Ui_OpenLPImportDialog):
|
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
QtGui.QDialog.__init__(self, parent)
|
|
||||||
self.setupUi(self)
|
|
@ -1,324 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
|
|
||||||
class Ui_OpenSongExportDialog(object):
|
|
||||||
def setupUi(self, OpenSongExportDialog):
|
|
||||||
OpenSongExportDialog.setObjectName(u'OpenSongExportDialog')
|
|
||||||
OpenSongExportDialog.resize(473, 459)
|
|
||||||
icon = QtGui.QIcon()
|
|
||||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
OpenSongExportDialog.setWindowIcon(icon)
|
|
||||||
self.verticalLayout_5 = QtGui.QVBoxLayout(OpenSongExportDialog)
|
|
||||||
self.verticalLayout_5.setMargin(8)
|
|
||||||
self.verticalLayout_5.setObjectName(u'verticalLayout_5')
|
|
||||||
self.ExportFileWidget = QtGui.QWidget(OpenSongExportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ExportFileWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ExportFileWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ExportFileWidget.setObjectName(u'ExportFileWidget')
|
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout(self.ExportFileWidget)
|
|
||||||
self.horizontalLayout.setSpacing(3)
|
|
||||||
self.horizontalLayout.setMargin(0)
|
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
|
||||||
self.ExportFileLabel = QtGui.QLabel(self.ExportFileWidget)
|
|
||||||
self.ExportFileLabel.setObjectName(u'ExportFileLabel')
|
|
||||||
self.horizontalLayout.addWidget(self.ExportFileLabel)
|
|
||||||
self.ExportFileLineEdit = QtGui.QLineEdit(self.ExportFileWidget)
|
|
||||||
self.ExportFileLineEdit.setObjectName(u'ExportFileLineEdit')
|
|
||||||
self.horizontalLayout.addWidget(self.ExportFileLineEdit)
|
|
||||||
self.ExportFileSelectPushButton = QtGui.QPushButton(self.ExportFileWidget)
|
|
||||||
icon1 = QtGui.QIcon()
|
|
||||||
icon1.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ExportFileSelectPushButton.setIcon(icon1)
|
|
||||||
self.ExportFileSelectPushButton.setObjectName(u'ExportFileSelectPushButton')
|
|
||||||
self.horizontalLayout.addWidget(self.ExportFileSelectPushButton)
|
|
||||||
self.verticalLayout_5.addWidget(self.ExportFileWidget)
|
|
||||||
self.SongListFrame = QtGui.QFrame(OpenSongExportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SongListFrame.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SongListFrame.setSizePolicy(sizePolicy)
|
|
||||||
self.SongListFrame.setFrameShape(QtGui.QFrame.Box)
|
|
||||||
self.SongListFrame.setFrameShadow(QtGui.QFrame.Raised)
|
|
||||||
self.SongListFrame.setObjectName(u'SongListFrame')
|
|
||||||
self.horizontalLayout_6 = QtGui.QHBoxLayout(self.SongListFrame)
|
|
||||||
self.horizontalLayout_6.setSpacing(8)
|
|
||||||
self.horizontalLayout_6.setMargin(8)
|
|
||||||
self.horizontalLayout_6.setObjectName(u'horizontalLayout_6')
|
|
||||||
self.ExportFileSongListWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ExportFileSongListWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ExportFileSongListWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ExportFileSongListWidget.setObjectName(u'ExportFileSongListWidget')
|
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(self.ExportFileSongListWidget)
|
|
||||||
self.verticalLayout.setSpacing(6)
|
|
||||||
self.verticalLayout.setMargin(0)
|
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
|
||||||
self.ExportListLabel = QtGui.QLabel(self.ExportFileSongListWidget)
|
|
||||||
self.ExportListLabel.setObjectName(u'ExportListLabel')
|
|
||||||
self.verticalLayout.addWidget(self.ExportListLabel)
|
|
||||||
self.ExportListTable = QtGui.QTableWidget(self.ExportFileSongListWidget)
|
|
||||||
self.ExportListTable.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
|
|
||||||
self.ExportListTable.setShowGrid(False)
|
|
||||||
self.ExportListTable.setWordWrap(False)
|
|
||||||
self.ExportListTable.setCornerButtonEnabled(False)
|
|
||||||
self.ExportListTable.setObjectName(u'ExportListTable')
|
|
||||||
self.ExportListTable.setColumnCount(2)
|
|
||||||
self.ExportListTable.setRowCount(0)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.ExportListTable.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.ExportListTable.setHorizontalHeaderItem(1, item)
|
|
||||||
self.verticalLayout.addWidget(self.ExportListTable)
|
|
||||||
self.ExportSelectAllWidget = QtGui.QWidget(self.ExportFileSongListWidget)
|
|
||||||
self.ExportSelectAllWidget.setObjectName(u'ExportSelectAllWidget')
|
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.ExportSelectAllWidget)
|
|
||||||
self.horizontalLayout_2.setSpacing(6)
|
|
||||||
self.horizontalLayout_2.setMargin(0)
|
|
||||||
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
|
||||||
self.ExportSelectAllPushButton = QtGui.QPushButton(self.ExportSelectAllWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ExportSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ExportSelectAllPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.ExportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
|
||||||
icon2 = QtGui.QIcon()
|
|
||||||
icon2.addPixmap(QtGui.QPixmap(u':/exports/export_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ExportSelectAllPushButton.setIcon(icon2)
|
|
||||||
self.ExportSelectAllPushButton.setObjectName(u'ExportSelectAllPushButton')
|
|
||||||
self.horizontalLayout_2.addWidget(self.ExportSelectAllPushButton)
|
|
||||||
spacerItem = QtGui.QSpacerItem(89, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_2.addItem(spacerItem)
|
|
||||||
self.verticalLayout.addWidget(self.ExportSelectAllWidget)
|
|
||||||
self.exportFilterWidget = QtGui.QWidget(self.ExportFileSongListWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.exportFilterWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.exportFilterWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.exportFilterWidget.setMinimumSize(QtCore.QSize(0, 0))
|
|
||||||
self.exportFilterWidget.setObjectName(u'exportFilterWidget')
|
|
||||||
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.exportFilterWidget)
|
|
||||||
self.horizontalLayout_3.setMargin(0)
|
|
||||||
self.horizontalLayout_3.setObjectName(u'horizontalLayout_3')
|
|
||||||
self.ExportFilterComboBox = QtGui.QComboBox(self.exportFilterWidget)
|
|
||||||
self.ExportFilterComboBox.setMinimumSize(QtCore.QSize(70, 0))
|
|
||||||
self.ExportFilterComboBox.setObjectName(u'ExportFilterComboBox')
|
|
||||||
self.ExportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.ExportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.ExportFilterComboBox.addItem(QtCore.QString())
|
|
||||||
self.horizontalLayout_3.addWidget(self.ExportFilterComboBox)
|
|
||||||
self.ExportFilterLineEdit = QtGui.QLineEdit(self.exportFilterWidget)
|
|
||||||
self.ExportFilterLineEdit.setObjectName(u'ExportFilterLineEdit')
|
|
||||||
self.horizontalLayout_3.addWidget(self.ExportFilterLineEdit)
|
|
||||||
self.verticalLayout.addWidget(self.exportFilterWidget)
|
|
||||||
self.horizontalLayout_6.addWidget(self.ExportFileSongListWidget)
|
|
||||||
self.AddSelectedWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.AddSelectedWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AddSelectedWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.AddSelectedWidget.setObjectName(u'AddSelectedWidget')
|
|
||||||
self.verticalLayout_3 = QtGui.QVBoxLayout(self.AddSelectedWidget)
|
|
||||||
self.verticalLayout_3.setMargin(0)
|
|
||||||
self.verticalLayout_3.setObjectName(u'verticalLayout_3')
|
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem1)
|
|
||||||
self.AddSelectedPushButton = QtGui.QPushButton(self.AddSelectedWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
|
|
||||||
icon3 = QtGui.QIcon()
|
|
||||||
icon3.addPixmap(QtGui.QPixmap(u':/exports/export_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.AddSelectedPushButton.setIcon(icon3)
|
|
||||||
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
|
|
||||||
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
|
|
||||||
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem2)
|
|
||||||
self.horizontalLayout_6.addWidget(self.AddSelectedWidget)
|
|
||||||
self.SelectedFileListWidget = QtGui.QWidget(self.SongListFrame)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedFileListWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedFileListWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedFileListWidget.setObjectName(u'SelectedFileListWidget')
|
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.SelectedFileListWidget)
|
|
||||||
self.verticalLayout_2.setMargin(0)
|
|
||||||
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
|
||||||
self.SelectedListLabel = QtGui.QLabel(self.SelectedFileListWidget)
|
|
||||||
self.SelectedListLabel.setObjectName(u'SelectedListLabel')
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedListLabel)
|
|
||||||
self.SelectedListTable = QtGui.QTableWidget(self.SelectedFileListWidget)
|
|
||||||
self.SelectedListTable.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
|
|
||||||
self.SelectedListTable.setShowGrid(False)
|
|
||||||
self.SelectedListTable.setWordWrap(False)
|
|
||||||
self.SelectedListTable.setCornerButtonEnabled(False)
|
|
||||||
self.SelectedListTable.setObjectName(u'SelectedListTable')
|
|
||||||
self.SelectedListTable.setColumnCount(2)
|
|
||||||
self.SelectedListTable.setRowCount(0)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.SelectedListTable.setHorizontalHeaderItem(0, item)
|
|
||||||
item = QtGui.QTableWidgetItem()
|
|
||||||
self.SelectedListTable.setHorizontalHeaderItem(1, item)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedListTable)
|
|
||||||
self.SelectedSelectAllWidget = QtGui.QWidget(self.SelectedFileListWidget)
|
|
||||||
self.SelectedSelectAllWidget.setObjectName(u'SelectedSelectAllWidget')
|
|
||||||
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.SelectedSelectAllWidget)
|
|
||||||
self.horizontalLayout_4.setSpacing(6)
|
|
||||||
self.horizontalLayout_4.setMargin(0)
|
|
||||||
self.horizontalLayout_4.setObjectName(u'horizontalLayout_4')
|
|
||||||
self.SelectedSelectAllPushButton = QtGui.QPushButton(self.SelectedSelectAllWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedSelectAllPushButton.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
|
||||||
self.SelectedSelectAllPushButton.setIcon(icon2)
|
|
||||||
self.SelectedSelectAllPushButton.setObjectName(u'SelectedSelectAllPushButton')
|
|
||||||
self.horizontalLayout_4.addWidget(self.SelectedSelectAllPushButton)
|
|
||||||
spacerItem3 = QtGui.QSpacerItem(92, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_4.addItem(spacerItem3)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedSelectAllWidget)
|
|
||||||
self.SelectedRemoveSelectedWidget = QtGui.QWidget(self.SelectedFileListWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedRemoveSelectedWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedRemoveSelectedWidget.setObjectName(u'SelectedRemoveSelectedWidget')
|
|
||||||
self.horizontalLayout_5 = QtGui.QHBoxLayout(self.SelectedRemoveSelectedWidget)
|
|
||||||
self.horizontalLayout_5.setMargin(0)
|
|
||||||
self.horizontalLayout_5.setObjectName(u'horizontalLayout_5')
|
|
||||||
self.SelectedRemoveSelectedButton = QtGui.QPushButton(self.SelectedRemoveSelectedWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
|
|
||||||
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
|
|
||||||
icon4 = QtGui.QIcon()
|
|
||||||
icon4.addPixmap(QtGui.QPixmap(u':/exports/export_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.SelectedRemoveSelectedButton.setIcon(icon4)
|
|
||||||
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
|
|
||||||
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
|
|
||||||
spacerItem4 = QtGui.QSpacerItem(49, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_5.addItem(spacerItem4)
|
|
||||||
self.verticalLayout_2.addWidget(self.SelectedRemoveSelectedWidget)
|
|
||||||
self.horizontalLayout_6.addWidget(self.SelectedFileListWidget)
|
|
||||||
self.verticalLayout_5.addWidget(self.SongListFrame)
|
|
||||||
self.ProgressGroupBox = QtGui.QGroupBox(OpenSongExportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ProgressGroupBox.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ProgressGroupBox.setSizePolicy(sizePolicy)
|
|
||||||
self.ProgressGroupBox.setObjectName(u'ProgressGroupBox')
|
|
||||||
self.verticalLayout_4 = QtGui.QVBoxLayout(self.ProgressGroupBox)
|
|
||||||
self.verticalLayout_4.setSpacing(8)
|
|
||||||
self.verticalLayout_4.setContentsMargins(8, 0, 8, 8)
|
|
||||||
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
|
|
||||||
self.ProgressLabel = QtGui.QLabel(self.ProgressGroupBox)
|
|
||||||
self.ProgressLabel.setObjectName(u'ProgressLabel')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressLabel)
|
|
||||||
self.ProgressBar = QtGui.QProgressBar(self.ProgressGroupBox)
|
|
||||||
self.ProgressBar.setProperty(u'value', QtCore.QVariant(24))
|
|
||||||
self.ProgressBar.setObjectName(u'ProgressBar')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressBar)
|
|
||||||
self.verticalLayout_5.addWidget(self.ProgressGroupBox)
|
|
||||||
self.ButtonBarWidget = QtGui.QWidget(OpenSongExportDialog)
|
|
||||||
self.ButtonBarWidget.setObjectName(u'ButtonBarWidget')
|
|
||||||
self.horizontalLayout_7 = QtGui.QHBoxLayout(self.ButtonBarWidget)
|
|
||||||
self.horizontalLayout_7.setSpacing(8)
|
|
||||||
self.horizontalLayout_7.setMargin(0)
|
|
||||||
self.horizontalLayout_7.setObjectName(u'horizontalLayout_7')
|
|
||||||
spacerItem5 = QtGui.QSpacerItem(288, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_7.addItem(spacerItem5)
|
|
||||||
self.ExportPushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ExportPushButton.setObjectName(u'ExportPushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ExportPushButton)
|
|
||||||
self.ClosePushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ClosePushButton.setObjectName(u'ClosePushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ClosePushButton)
|
|
||||||
self.verticalLayout_5.addWidget(self.ButtonBarWidget)
|
|
||||||
|
|
||||||
self.retranslateUi(OpenSongExportDialog)
|
|
||||||
QtCore.QObject.connect(self.ClosePushButton, QtCore.SIGNAL(u'clicked()'), OpenSongExportDialog.close)
|
|
||||||
QtCore.QObject.connect(self.ExportSelectAllPushButton, QtCore.SIGNAL(u'clicked()'), self.ExportListTable.selectAll)
|
|
||||||
QtCore.QObject.connect(self.SelectedSelectAllPushButton, QtCore.SIGNAL(u'clicked()'), self.SelectedListTable.selectAll)
|
|
||||||
QtCore.QObject.connect(self.SelectedRemoveSelectedButton, QtCore.SIGNAL(u'clicked()'), self.SelectedListTable.clear)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(OpenSongExportDialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, OpenSongExportDialog):
|
|
||||||
OpenSongExportDialog.setWindowTitle(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'OpenSong Song Exporter'))
|
|
||||||
self.ExportFileLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Select OpenSong song folder:'))
|
|
||||||
self.ExportListLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Full Song List'))
|
|
||||||
self.ExportListTable.horizontalHeaderItem(0).setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Song Title'))
|
|
||||||
self.ExportListTable.horizontalHeaderItem(1).setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Author'))
|
|
||||||
self.ExportSelectAllPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Select All'))
|
|
||||||
self.ExportFilterComboBox.setItemText(0,
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Lyrics'))
|
|
||||||
self.ExportFilterComboBox.setItemText(1,
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Title'))
|
|
||||||
self.ExportFilterComboBox.setItemText(2,
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Author'))
|
|
||||||
self.SelectedListLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Song Export List'))
|
|
||||||
self.SelectedListTable.horizontalHeaderItem(0).setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Song Title'))
|
|
||||||
self.SelectedListTable.horizontalHeaderItem(1).setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Author'))
|
|
||||||
self.SelectedSelectAllPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Select All'))
|
|
||||||
self.SelectedRemoveSelectedButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Remove Selected'))
|
|
||||||
self.ProgressGroupBox.setTitle(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Progress:'))
|
|
||||||
self.ProgressLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Ready to export'))
|
|
||||||
self.ExportPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Export'))
|
|
||||||
self.ClosePushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongExportForm', u'Close'))
|
|
@ -1,33 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
|
||||||
from openlp.plugins.songs.forms.opensongexportdialog import Ui_OpenSongExportDialog
|
|
||||||
|
|
||||||
class OpenSongExportForm(QtGui.QDialog, Ui_OpenSongExportDialog):
|
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
QtGui.QDialog.__init__(self, parent)
|
|
||||||
self.setupUi(self)
|
|
@ -1,115 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
|
|
||||||
class Ui_OpenSongImportDialog(object):
|
|
||||||
def setupUi(self, OpenSongImportDialog):
|
|
||||||
OpenSongImportDialog.setObjectName(u'OpenSongImportDialog')
|
|
||||||
OpenSongImportDialog.resize(481, 172)
|
|
||||||
icon = QtGui.QIcon()
|
|
||||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
OpenSongImportDialog.setWindowIcon(icon)
|
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(OpenSongImportDialog)
|
|
||||||
self.verticalLayout.setSpacing(6)
|
|
||||||
self.verticalLayout.setMargin(8)
|
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
|
||||||
self.ImportFileWidget = QtGui.QWidget(OpenSongImportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ImportFileWidget.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ImportFileWidget.setSizePolicy(sizePolicy)
|
|
||||||
self.ImportFileWidget.setObjectName(u'ImportFileWidget')
|
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout(self.ImportFileWidget)
|
|
||||||
self.horizontalLayout.setSpacing(6)
|
|
||||||
self.horizontalLayout.setMargin(0)
|
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
|
||||||
self.ImportFileLabel = QtGui.QLabel(self.ImportFileWidget)
|
|
||||||
self.ImportFileLabel.setObjectName(u'ImportFileLabel')
|
|
||||||
self.horizontalLayout.addWidget(self.ImportFileLabel)
|
|
||||||
self.ImportFileLineEdit = QtGui.QLineEdit(self.ImportFileWidget)
|
|
||||||
self.ImportFileLineEdit.setObjectName(u'ImportFileLineEdit')
|
|
||||||
self.horizontalLayout.addWidget(self.ImportFileLineEdit)
|
|
||||||
self.ImportFileSelectPushButton = QtGui.QPushButton(self.ImportFileWidget)
|
|
||||||
icon1 = QtGui.QIcon()
|
|
||||||
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.ImportFileSelectPushButton.setIcon(icon1)
|
|
||||||
self.ImportFileSelectPushButton.setObjectName(u'ImportFileSelectPushButton')
|
|
||||||
self.horizontalLayout.addWidget(self.ImportFileSelectPushButton)
|
|
||||||
self.verticalLayout.addWidget(self.ImportFileWidget)
|
|
||||||
self.ProgressGroupBox = QtGui.QGroupBox(OpenSongImportDialog)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.ProgressGroupBox.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ProgressGroupBox.setSizePolicy(sizePolicy)
|
|
||||||
self.ProgressGroupBox.setObjectName(u'ProgressGroupBox')
|
|
||||||
self.verticalLayout_4 = QtGui.QVBoxLayout(self.ProgressGroupBox)
|
|
||||||
self.verticalLayout_4.setSpacing(6)
|
|
||||||
self.verticalLayout_4.setContentsMargins(6, 0, 8, 8)
|
|
||||||
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
|
|
||||||
self.ProgressLabel = QtGui.QLabel(self.ProgressGroupBox)
|
|
||||||
self.ProgressLabel.setObjectName(u'ProgressLabel')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressLabel)
|
|
||||||
self.ProgressBar = QtGui.QProgressBar(self.ProgressGroupBox)
|
|
||||||
self.ProgressBar.setProperty(u'value', QtCore.QVariant(24))
|
|
||||||
self.ProgressBar.setObjectName(u'ProgressBar')
|
|
||||||
self.verticalLayout_4.addWidget(self.ProgressBar)
|
|
||||||
self.verticalLayout.addWidget(self.ProgressGroupBox)
|
|
||||||
self.ButtonBarWidget = QtGui.QWidget(OpenSongImportDialog)
|
|
||||||
self.ButtonBarWidget.setObjectName(u'ButtonBarWidget')
|
|
||||||
self.horizontalLayout_7 = QtGui.QHBoxLayout(self.ButtonBarWidget)
|
|
||||||
self.horizontalLayout_7.setSpacing(8)
|
|
||||||
self.horizontalLayout_7.setMargin(0)
|
|
||||||
self.horizontalLayout_7.setObjectName(u'horizontalLayout_7')
|
|
||||||
spacerItem = QtGui.QSpacerItem(288, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.horizontalLayout_7.addItem(spacerItem)
|
|
||||||
self.ImportPushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ImportPushButton.setObjectName(u'ImportPushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ImportPushButton)
|
|
||||||
self.ClosePushButton = QtGui.QPushButton(self.ButtonBarWidget)
|
|
||||||
self.ClosePushButton.setObjectName(u'ClosePushButton')
|
|
||||||
self.horizontalLayout_7.addWidget(self.ClosePushButton)
|
|
||||||
self.verticalLayout.addWidget(self.ButtonBarWidget)
|
|
||||||
|
|
||||||
self.retranslateUi(OpenSongImportDialog)
|
|
||||||
QtCore.QObject.connect(self.ClosePushButton, QtCore.SIGNAL(u'clicked()'), OpenSongImportDialog.close)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(OpenSongImportDialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, OpenSongImportDialog):
|
|
||||||
OpenSongImportDialog.setWindowTitle(
|
|
||||||
translate(u'SongsPlugin.OpenSongImportForm', u'OpenSong Song Importer'))
|
|
||||||
self.ImportFileLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongImportForm', u'OpenSong Folder:'))
|
|
||||||
self.ProgressGroupBox.setTitle(
|
|
||||||
translate(u'SongsPlugin.OpenSongImportForm', u'Progress:'))
|
|
||||||
self.ProgressLabel.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongImportForm', u'Ready to import'))
|
|
||||||
self.ImportPushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongImportForm', u'Import'))
|
|
||||||
self.ClosePushButton.setText(
|
|
||||||
translate(u'SongsPlugin.OpenSongImportForm', u'Close'))
|
|
@ -1,33 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
|
||||||
from openlp.plugins.songs.forms.opensongimportdialog import Ui_OpenSongImportDialog
|
|
||||||
|
|
||||||
class OpenSongImportForm(QtGui.QDialog, Ui_OpenSongImportDialog):
|
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
QtGui.QDialog.__init__(self, parent)
|
|
||||||
self.setupUi(self)
|
|
@ -113,7 +113,8 @@ class Ui_SongImportWizard(object):
|
|||||||
self.OpenIcon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'),
|
self.OpenIcon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'),
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.DeleteIcon = QtGui.QIcon()
|
self.DeleteIcon = QtGui.QIcon()
|
||||||
self.DeleteIcon.addPixmap(QtGui.QPixmap(u':/general/general_delete.png'),
|
self.DeleteIcon.addPixmap(
|
||||||
|
QtGui.QPixmap(u':/general/general_delete.png'),
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.OpenLyricsAddButton.setIcon(self.OpenIcon)
|
self.OpenLyricsAddButton.setIcon(self.OpenIcon)
|
||||||
self.OpenLyricsAddButton.setObjectName(u'OpenLyricsAddButton')
|
self.OpenLyricsAddButton.setObjectName(u'OpenLyricsAddButton')
|
||||||
@ -185,7 +186,8 @@ class Ui_SongImportWizard(object):
|
|||||||
self.CSVLayout.setObjectName(u'CSVLayout')
|
self.CSVLayout.setObjectName(u'CSVLayout')
|
||||||
self.CSVFilenameLabel = QtGui.QLabel(self.CSVPage)
|
self.CSVFilenameLabel = QtGui.QLabel(self.CSVPage)
|
||||||
self.CSVFilenameLabel.setObjectName(u'CSVFilenameLabel')
|
self.CSVFilenameLabel.setObjectName(u'CSVFilenameLabel')
|
||||||
self.CSVLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.CSVFilenameLabel)
|
self.CSVLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||||
|
self.CSVFilenameLabel)
|
||||||
self.CSVFileLayout = QtGui.QHBoxLayout()
|
self.CSVFileLayout = QtGui.QHBoxLayout()
|
||||||
self.CSVFileLayout.setSpacing(8)
|
self.CSVFileLayout.setSpacing(8)
|
||||||
self.CSVFileLayout.setObjectName(u'CSVFileLayout')
|
self.CSVFileLayout.setObjectName(u'CSVFileLayout')
|
||||||
@ -196,7 +198,8 @@ class Ui_SongImportWizard(object):
|
|||||||
self.CSVBrowseButton.setIcon(self.OpenIcon)
|
self.CSVBrowseButton.setIcon(self.OpenIcon)
|
||||||
self.CSVBrowseButton.setObjectName(u'CSVBrowseButton')
|
self.CSVBrowseButton.setObjectName(u'CSVBrowseButton')
|
||||||
self.CSVFileLayout.addWidget(self.CSVBrowseButton)
|
self.CSVFileLayout.addWidget(self.CSVBrowseButton)
|
||||||
self.CSVLayout.setLayout(0, QtGui.QFormLayout.FieldRole, self.CSVFileLayout)
|
self.CSVLayout.setLayout(0, QtGui.QFormLayout.FieldRole,
|
||||||
|
self.CSVFileLayout)
|
||||||
self.FormatStackedWidget.addWidget(self.CSVPage)
|
self.FormatStackedWidget.addWidget(self.CSVPage)
|
||||||
self.SourceLayout.addWidget(self.FormatStackedWidget)
|
self.SourceLayout.addWidget(self.FormatStackedWidget)
|
||||||
SongImportWizard.addPage(self.SourcePage)
|
SongImportWizard.addPage(self.SourcePage)
|
||||||
|
@ -31,7 +31,7 @@ class Ui_SongMaintenanceDialog(object):
|
|||||||
def setupUi(self, SongMaintenanceDialog):
|
def setupUi(self, SongMaintenanceDialog):
|
||||||
SongMaintenanceDialog.setObjectName(u'SongMaintenanceDialog')
|
SongMaintenanceDialog.setObjectName(u'SongMaintenanceDialog')
|
||||||
SongMaintenanceDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
SongMaintenanceDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||||
SongMaintenanceDialog.resize(486, 361)
|
SongMaintenanceDialog.resize(582, 361)
|
||||||
self.DialogLayout = QtGui.QVBoxLayout(SongMaintenanceDialog)
|
self.DialogLayout = QtGui.QVBoxLayout(SongMaintenanceDialog)
|
||||||
self.DialogLayout.setSpacing(8)
|
self.DialogLayout.setSpacing(8)
|
||||||
self.DialogLayout.setMargin(8)
|
self.DialogLayout.setMargin(8)
|
||||||
@ -50,10 +50,10 @@ class Ui_SongMaintenanceDialog(object):
|
|||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(
|
||||||
self.TypeListWidget.sizePolicy().hasHeightForWidth())
|
self.TypeListWidget.sizePolicy().hasHeightForWidth())
|
||||||
self.TypeListWidget.setSizePolicy(sizePolicy)
|
self.TypeListWidget.setSizePolicy(sizePolicy)
|
||||||
self.TypeListWidget.setViewMode(QtGui.QListView.IconMode)
|
self.TypeListWidget.setViewMode(QtGui.QListView.ListMode)
|
||||||
self.TypeListWidget.setIconSize(QtCore.QSize(112, 100))
|
self.TypeListWidget.setIconSize(QtCore.QSize(32, 32))
|
||||||
self.TypeListWidget.setMovement(QtGui.QListView.Static)
|
self.TypeListWidget.setMovement(QtGui.QListView.Static)
|
||||||
self.TypeListWidget.setMaximumWidth(118)
|
self.TypeListWidget.setMaximumWidth(172)
|
||||||
self.TypeListWidget.setSpacing(0)
|
self.TypeListWidget.setSpacing(0)
|
||||||
self.TypeListWidget.setSortingEnabled(False)
|
self.TypeListWidget.setSortingEnabled(False)
|
||||||
self.TypeListWidget.setUniformItemSizes(True)
|
self.TypeListWidget.setUniformItemSizes(True)
|
||||||
|
@ -23,10 +23,77 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
from openlp.core.lib import translate
|
||||||
|
|
||||||
|
class VerseType(object):
|
||||||
|
"""
|
||||||
|
VerseType provides an enumeration for the tags that may be associated
|
||||||
|
with verses in songs.
|
||||||
|
"""
|
||||||
|
Verse = 0
|
||||||
|
Chorus = 1
|
||||||
|
Bridge = 2
|
||||||
|
PreChorus = 3
|
||||||
|
Intro = 4
|
||||||
|
Ending = 5
|
||||||
|
Other = 6
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def to_string(verse_type):
|
||||||
|
"""
|
||||||
|
Return a string for a given VerseType
|
||||||
|
|
||||||
|
``verse_type``
|
||||||
|
The type to return a string for
|
||||||
|
"""
|
||||||
|
if verse_type == VerseType.Verse:
|
||||||
|
return translate(u'VerseType', u'Verse')
|
||||||
|
elif verse_type == VerseType.Chorus:
|
||||||
|
return translate(u'VerseType', u'Chorus')
|
||||||
|
elif verse_type == VerseType.Bridge:
|
||||||
|
return translate(u'VerseType', u'Bridge')
|
||||||
|
elif verse_type == VerseType.PreChorus:
|
||||||
|
return translate(u'VerseType', u'Pre-Chorus')
|
||||||
|
elif verse_type == VerseType.Intro:
|
||||||
|
return translate(u'VerseType', u'Intro')
|
||||||
|
elif verse_type == VerseType.Ending:
|
||||||
|
return translate(u'VerseType', u'Ending')
|
||||||
|
elif verse_type == VerseType.Other:
|
||||||
|
return translate(u'VerseType', u'Other')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_string(verse_type):
|
||||||
|
"""
|
||||||
|
Return the VerseType for a given string
|
||||||
|
|
||||||
|
``verse_type``
|
||||||
|
The string to return a VerseType for
|
||||||
|
"""
|
||||||
|
verse_type = verse_type.lower()
|
||||||
|
if verse_type == unicode(VerseType.to_string(VerseType.Verse)).lower():
|
||||||
|
return VerseType.Verse
|
||||||
|
elif verse_type == \
|
||||||
|
unicode(VerseType.to_string(VerseType.Chorus)).lower():
|
||||||
|
return VerseType.Chorus
|
||||||
|
elif verse_type == \
|
||||||
|
unicode(VerseType.to_string(VerseType.Bridge)).lower():
|
||||||
|
return VerseType.Bridge
|
||||||
|
elif verse_type == \
|
||||||
|
unicode(VerseType.to_string(VerseType.PreChorus)).lower():
|
||||||
|
return VerseType.PreChorus
|
||||||
|
elif verse_type == \
|
||||||
|
unicode(VerseType.to_string(VerseType.Intro)).lower():
|
||||||
|
return VerseType.Intro
|
||||||
|
elif verse_type == \
|
||||||
|
unicode(VerseType.to_string(VerseType.Ending)).lower():
|
||||||
|
return VerseType.Ending
|
||||||
|
elif verse_type == \
|
||||||
|
unicode(VerseType.to_string(VerseType.Other)).lower():
|
||||||
|
return VerseType.Other
|
||||||
|
|
||||||
from manager import SongManager
|
from manager import SongManager
|
||||||
from songstab import SongsTab
|
from songstab import SongsTab
|
||||||
from mediaitem import SongMediaItem
|
from mediaitem import SongMediaItem
|
||||||
from sofimport import SofImport
|
from sofimport import SofImport
|
||||||
from oooimport import OooImport
|
from oooimport import OooImport
|
||||||
from songimport import SongImport
|
from songimport import SongImport
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ class SongManager(object):
|
|||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
settings.beginGroup(u'songs')
|
settings.beginGroup(u'songs')
|
||||||
self.db_url = u''
|
self.db_url = u''
|
||||||
db_type = unicode(settings.value(u'songs/db type',
|
db_type = unicode(settings.value(u'db type',
|
||||||
QtCore.QVariant(u'sqlite')).toString())
|
QtCore.QVariant(u'sqlite')).toString())
|
||||||
if db_type == u'sqlite':
|
if db_type == u'sqlite':
|
||||||
self.db_url = u'sqlite:///%s/songs.sqlite' % \
|
self.db_url = u'sqlite:///%s/songs.sqlite' % \
|
||||||
|
@ -275,15 +275,23 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
self.edit_song_form.exec_()
|
self.edit_song_form.exec_()
|
||||||
|
|
||||||
def onEditClick(self):
|
def onEditClick(self):
|
||||||
item = self.ListView.currentItem()
|
"""
|
||||||
if item:
|
Edit a song
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'SongsPlugin.MediaItem',
|
||||||
|
u'You must select an item to edit.')):
|
||||||
|
item = self.ListView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.edit_song_form.loadSong(item_id, False)
|
self.edit_song_form.loadSong(item_id, False)
|
||||||
self.edit_song_form.exec_()
|
self.edit_song_form.exec_()
|
||||||
|
|
||||||
def onDeleteClick(self):
|
def onDeleteClick(self):
|
||||||
items = self.ListView.selectedIndexes()
|
"""
|
||||||
if items:
|
Remove a song from the list and database
|
||||||
|
"""
|
||||||
|
if self.checkItemSelected(translate(u'SongsPlugin.MediaItem',
|
||||||
|
u'You must select an item to delete.')):
|
||||||
|
items = self.ListView.selectedIndexes()
|
||||||
if len(items) == 1:
|
if len(items) == 1:
|
||||||
del_message = translate(u'SongsPlugin.MediaItem',
|
del_message = translate(u'SongsPlugin.MediaItem',
|
||||||
u'Delete song?')
|
u'Delete song?')
|
||||||
@ -333,7 +341,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
verseTag = u'%s:%s' % (
|
verseTag = u'%s:%s' % (
|
||||||
verse[0][u'type'], verse[0][u'label'])
|
verse[0][u'type'], verse[0][u'label'])
|
||||||
service_item.add_from_text(\
|
service_item.add_from_text(
|
||||||
verse[1][:30], unicode(verse[1]), verseTag)
|
verse[1][:30], unicode(verse[1]), verseTag)
|
||||||
else:
|
else:
|
||||||
#Loop through the verse list and expand the song accordingly.
|
#Loop through the verse list and expand the song accordingly.
|
||||||
@ -345,8 +353,8 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
verse[0][u'type'][0] == order[0]:
|
verse[0][u'type'][0] == order[0]:
|
||||||
verseTag = u'%s:%s' % \
|
verseTag = u'%s:%s' % \
|
||||||
(verse[0][u'type'], verse[0][u'label'])
|
(verse[0][u'type'], verse[0][u'label'])
|
||||||
service_item.add_from_text\
|
service_item.add_from_text(
|
||||||
(verse[1][:30], verse[1], verseTag)
|
verse[1][:30], verse[1], verseTag)
|
||||||
else:
|
else:
|
||||||
verses = song.lyrics.split(u'\n\n')
|
verses = song.lyrics.split(u'\n\n')
|
||||||
for slide in verses:
|
for slide in verses:
|
||||||
@ -371,4 +379,3 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
song.title, author_audit, song.copyright, song.ccli_number
|
song.title, author_audit, song.copyright, song.ccli_number
|
||||||
]
|
]
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ import string
|
|||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SongXMLBuilder
|
from openlp.core.lib import SongXMLBuilder
|
||||||
|
from openlp.plugins.songs.lib import VerseType
|
||||||
from openlp.plugins.songs.lib.models import Song, Author, Topic, Book
|
from openlp.plugins.songs.lib.models import Song, Author, Topic, Book
|
||||||
from openlp.plugins.songs.forms import VerseType
|
|
||||||
|
|
||||||
class SongImport(object):
|
class SongImport(object):
|
||||||
"""
|
"""
|
||||||
|
@ -94,36 +94,44 @@ class SongsPlugin(Plugin):
|
|||||||
# Main song import menu item - will eventually be the only one
|
# Main song import menu item - will eventually be the only one
|
||||||
self.SongImportItem = QtGui.QAction(import_menu)
|
self.SongImportItem = QtGui.QAction(import_menu)
|
||||||
self.SongImportItem.setObjectName(u'SongImportItem')
|
self.SongImportItem.setObjectName(u'SongImportItem')
|
||||||
self.SongImportItem.setText(import_menu.trUtf8('&Song'))
|
self.SongImportItem.setText(translate(
|
||||||
|
u'SongsPlugin', u'&Song'))
|
||||||
self.SongImportItem.setToolTip(
|
self.SongImportItem.setToolTip(
|
||||||
import_menu.trUtf8('Import songs using the import wizard.'))
|
translate(u'SongsPlugin',
|
||||||
|
u'Import songs using the import wizard.'))
|
||||||
import_menu.addAction(self.SongImportItem)
|
import_menu.addAction(self.SongImportItem)
|
||||||
# Songs of Fellowship import menu item - will be removed and the
|
# Songs of Fellowship import menu item - will be removed and the
|
||||||
# functionality will be contained within the import wizard
|
# functionality will be contained within the import wizard
|
||||||
self.ImportSofItem = QtGui.QAction(import_menu)
|
self.ImportSofItem = QtGui.QAction(import_menu)
|
||||||
self.ImportSofItem.setObjectName(u'ImportSofItem')
|
self.ImportSofItem.setObjectName(u'ImportSofItem')
|
||||||
self.ImportSofItem.setText(
|
self.ImportSofItem.setText(
|
||||||
import_menu.trUtf8('Songs of Fellowship (temp menu item)'))
|
translate(u'SongsPlugin',
|
||||||
|
u'Songs of Fellowship (temp menu item)'))
|
||||||
self.ImportSofItem.setToolTip(
|
self.ImportSofItem.setToolTip(
|
||||||
import_menu.trUtf8('Import songs from the VOLS1_2.RTF, sof3words' \
|
translate(u'SongsPlugin',
|
||||||
+ '.rtf and sof4words.rtf supplied with the music books'))
|
u'Import songs from the VOLS1_2.RTF, sof3words' \
|
||||||
|
+ u'.rtf and sof4words.rtf supplied with the music books'))
|
||||||
self.ImportSofItem.setStatusTip(
|
self.ImportSofItem.setStatusTip(
|
||||||
import_menu.trUtf8('Import songs from the VOLS1_2.RTF, sof3words' \
|
translate(u'SongsPlugin',
|
||||||
+ '.rtf and sof4words.rtf supplied with the music books'))
|
u'Import songs from the VOLS1_2.RTF, sof3words' \
|
||||||
|
+ u'.rtf and sof4words.rtf supplied with the music books'))
|
||||||
import_menu.addAction(self.ImportSofItem)
|
import_menu.addAction(self.ImportSofItem)
|
||||||
# OpenOffice.org import menu item - will be removed and the
|
# OpenOffice.org import menu item - will be removed and the
|
||||||
# functionality will be contained within the import wizard
|
# functionality will be contained within the import wizard
|
||||||
self.ImportOooItem = QtGui.QAction(import_menu)
|
self.ImportOooItem = QtGui.QAction(import_menu)
|
||||||
self.ImportOooItem.setObjectName(u'ImportOooItem')
|
self.ImportOooItem.setObjectName(u'ImportOooItem')
|
||||||
self.ImportOooItem.setText(
|
self.ImportOooItem.setText(
|
||||||
import_menu.trUtf8('Generic Document/Presentation Import '
|
translate(u'SongsPlugin',
|
||||||
'(temp menu item)'))
|
u'Generic Document/Presentation Import '
|
||||||
|
u'(temp menu item)'))
|
||||||
self.ImportOooItem.setToolTip(
|
self.ImportOooItem.setToolTip(
|
||||||
import_menu.trUtf8('Import songs from '
|
translate(u'SongsPlugin',
|
||||||
'Word/Writer/Powerpoint/Impress'))
|
u'Import songs from '
|
||||||
|
u'Word/Writer/Powerpoint/Impress'))
|
||||||
self.ImportOooItem.setStatusTip(
|
self.ImportOooItem.setStatusTip(
|
||||||
import_menu.trUtf8('Import songs from '
|
translate(u'SongsPlugin',
|
||||||
'Word/Writer/Powerpoint/Impress'))
|
u'Import songs from '
|
||||||
|
u'Word/Writer/Powerpoint/Impress'))
|
||||||
import_menu.addAction(self.ImportOooItem)
|
import_menu.addAction(self.ImportOooItem)
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(self.SongImportItem,
|
QtCore.QObject.connect(self.SongImportItem,
|
||||||
@ -151,7 +159,7 @@ class SongsPlugin(Plugin):
|
|||||||
|
|
||||||
def onImportSofItemClick(self):
|
def onImportSofItemClick(self):
|
||||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||||
None, translate(u'SongsPlugin.Songsplugin',
|
None, translate(u'SongsPlugin',
|
||||||
u'Open Songs of Fellowship file'),
|
u'Open Songs of Fellowship file'),
|
||||||
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
||||||
try:
|
try:
|
||||||
@ -161,18 +169,20 @@ class SongsPlugin(Plugin):
|
|||||||
except:
|
except:
|
||||||
log.exception('Could not import SoF file')
|
log.exception('Could not import SoF file')
|
||||||
QtGui.QMessageBox.critical(None,
|
QtGui.QMessageBox.critical(None,
|
||||||
self.ImportSongMenu.trUtf8('Import Error'),
|
translate(u'SongsPlugin',
|
||||||
self.ImportSongMenu.trUtf8('Error importing Songs of '
|
u'Import Error'),
|
||||||
'Fellowship file.\nOpenOffice.org must be installed'
|
translate(u'SongsPlugin',
|
||||||
' and you must be using an unedited copy of the RTF'
|
u'Error importing Songs of '
|
||||||
' included with the Songs of Fellowship Music Editions'),
|
u'Fellowship file.\nOpenOffice.org must be installed'
|
||||||
|
u' and you must be using an unedited copy of the RTF'
|
||||||
|
u' included with the Songs of Fellowship Music Editions'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
|
|
||||||
def onImportOooItemClick(self):
|
def onImportOooItemClick(self):
|
||||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||||
None, translate(u'SongsPlugin.Songsplugin',
|
None, translate(u'SongsPlugin',
|
||||||
u'Open documents or presentations'),
|
u'Open documents or presentations'),
|
||||||
u'', u'All Files(*.*)')
|
u'', u'All Files(*.*)')
|
||||||
oooimport = OooImport(self.manager)
|
oooimport = OooImport(self.manager)
|
||||||
@ -180,7 +190,7 @@ class SongsPlugin(Plugin):
|
|||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'SongsPlugin.Songsplugin',
|
about_text = translate(u'SongsPlugin',
|
||||||
u'<strong>Song Plugin</strong><br />'
|
u'<strong>Song Plugin</strong><br />'
|
||||||
u'This plugin allows songs to be managed and displayed.')
|
u'This plugin allows songs to be managed and displayed.')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -59,20 +59,25 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.toolsMenu = tools_menu
|
self.toolsMenu = tools_menu
|
||||||
self.SongUsageMenu = QtGui.QMenu(tools_menu)
|
self.SongUsageMenu = QtGui.QMenu(tools_menu)
|
||||||
self.SongUsageMenu.setObjectName(u'SongUsageMenu')
|
self.SongUsageMenu.setObjectName(u'SongUsageMenu')
|
||||||
self.SongUsageMenu.setTitle(tools_menu.trUtf8('&Song Usage'))
|
self.SongUsageMenu.setTitle(translate(
|
||||||
|
u'SongUsagePlugin', u'&Song Usage'))
|
||||||
#SongUsage Delete
|
#SongUsage Delete
|
||||||
self.SongUsageDelete = QtGui.QAction(tools_menu)
|
self.SongUsageDelete = QtGui.QAction(tools_menu)
|
||||||
self.SongUsageDelete.setText(
|
self.SongUsageDelete.setText(
|
||||||
tools_menu.trUtf8('&Delete recorded data'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'&Delete recorded data'))
|
||||||
self.SongUsageDelete.setStatusTip(
|
self.SongUsageDelete.setStatusTip(
|
||||||
tools_menu.trUtf8('Delete song usage to specified date'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'Delete song usage to specified date'))
|
||||||
self.SongUsageDelete.setObjectName(u'SongUsageDelete')
|
self.SongUsageDelete.setObjectName(u'SongUsageDelete')
|
||||||
#SongUsage Report
|
#SongUsage Report
|
||||||
self.SongUsageReport = QtGui.QAction(tools_menu)
|
self.SongUsageReport = QtGui.QAction(tools_menu)
|
||||||
self.SongUsageReport.setText(
|
self.SongUsageReport.setText(
|
||||||
tools_menu.trUtf8('&Extract recorded data'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'&Extract recorded data'))
|
||||||
self.SongUsageReport.setStatusTip(
|
self.SongUsageReport.setStatusTip(
|
||||||
tools_menu.trUtf8('Generate report on Song Usage'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'Generate report on Song Usage'))
|
||||||
self.SongUsageReport.setObjectName(u'SongUsageReport')
|
self.SongUsageReport.setObjectName(u'SongUsageReport')
|
||||||
#SongUsage activation
|
#SongUsage activation
|
||||||
SongUsageIcon = build_icon(u':/tools/tools_alert.png')
|
SongUsageIcon = build_icon(u':/tools/tools_alert.png')
|
||||||
@ -80,9 +85,11 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsageStatus.setIcon(SongUsageIcon)
|
self.SongUsageStatus.setIcon(SongUsageIcon)
|
||||||
self.SongUsageStatus.setCheckable(True)
|
self.SongUsageStatus.setCheckable(True)
|
||||||
self.SongUsageStatus.setChecked(False)
|
self.SongUsageStatus.setChecked(False)
|
||||||
self.SongUsageStatus.setText(tools_menu.trUtf8('Song Usage Status'))
|
self.SongUsageStatus.setText(translate(
|
||||||
|
u'SongUsagePlugin', u'Song Usage Status'))
|
||||||
self.SongUsageStatus.setStatusTip(
|
self.SongUsageStatus.setStatusTip(
|
||||||
tools_menu.trUtf8('Start/Stop live song usage recording'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'Start/Stop live song usage recording'))
|
||||||
self.SongUsageStatus.setShortcut(u'F4')
|
self.SongUsageStatus.setShortcut(u'F4')
|
||||||
self.SongUsageStatus.setObjectName(u'SongUsageStatus')
|
self.SongUsageStatus.setObjectName(u'SongUsageStatus')
|
||||||
#Add Menus together
|
#Add Menus together
|
||||||
@ -156,7 +163,7 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsagedetailform.exec_()
|
self.SongUsagedetailform.exec_()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'SongsPlugin.SongUsagePlugin',
|
about_text = translate(u'SongUsagePlugin',
|
||||||
u'<b>SongUsage Plugin</b><br>This plugin '
|
u'<b>SongUsage Plugin</b><br>This plugin '
|
||||||
u'records the use of songs and when they have been used during '
|
u'records the use of songs and when they have been used during '
|
||||||
u'a live service')
|
u'a live service')
|
||||||
|
@ -1,613 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>OpenLPExportDialog</class>
|
|
||||||
<widget class="QDialog" name="OpenLPExportDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>473</width>
|
|
||||||
<height>459</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>openlp.org Song Exporter</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ExportFileWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ExportFileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select openlp.org export filename:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ExportFileLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ExportFileSelectPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_load.png</normaloff>:/exports/export_load.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="SongListFrame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::Box</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ExportFileSongListWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ExportListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Full Song List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="ExportListTable">
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Title</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ExportSelectAllWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ExportSelectAllPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select All</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_selectall.png</normaloff>:/exports/export_selectall.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="ExportSelectAllHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>89</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="exportFilterWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="ExportFilterComboBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Lyrics</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Title</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ExportFilterLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>exportFilterWidget</zorder>
|
|
||||||
<zorder>ExportListTable</zorder>
|
|
||||||
<zorder>ExportListLabel</zorder>
|
|
||||||
<zorder>ExportSelectAllWidget</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="AddSelectedWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="AddSelectedTopVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="AddSelectedPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>25</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_move_to_list.png</normaloff>:/exports/export_move_to_list.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="AddSelectedBottomVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedFileListWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="SelectedListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Export List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="SelectedListTable">
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Title</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedSelectAllWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="SelectedSelectAllPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select All</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_selectall.png</normaloff>:/exports/export_selectall.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SelectedSelectAllHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>92</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedRemoveSelectedWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="SelectedRemoveSelectedButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>140</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove Selected</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_remove.png</normaloff>:/exports/export_remove.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SelectedRemoveSelectedHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>49</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>ExportFileSongListWidget</zorder>
|
|
||||||
<zorder>SelectedFileListWidget</zorder>
|
|
||||||
<zorder>AddSelectedWidget</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="ProgressGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Progress:</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ProgressLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ready to export</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="ProgressBar">
|
|
||||||
<property name="value">
|
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ButtonBarWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="ButtonBarHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>288</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ExportPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Export</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ClosePushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="../images/openlp-2.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>ClosePushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>OpenLPExportDialog</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>436</x>
|
|
||||||
<y>436</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>462</x>
|
|
||||||
<y>455</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>ExportSelectAllPushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>ExportListTable</receiver>
|
|
||||||
<slot>selectAll()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>75</x>
|
|
||||||
<y>281</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>88</x>
|
|
||||||
<y>176</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>SelectedSelectAllPushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>SelectedListTable</receiver>
|
|
||||||
<slot>selectAll()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>311</x>
|
|
||||||
<y>277</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>339</x>
|
|
||||||
<y>190</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>SelectedRemoveSelectedButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>SelectedListTable</receiver>
|
|
||||||
<slot>clear()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>379</x>
|
|
||||||
<y>308</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>389</x>
|
|
||||||
<y>188</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,613 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>OpenLPImportDialog</class>
|
|
||||||
<widget class="QDialog" name="OpenLPImportDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>473</width>
|
|
||||||
<height>459</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>openlp.org Song Importer</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ImportFileWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ImportFileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select openlp.org songfile to import:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ImportFileLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ImportFileSelectPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="SongListFrame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::Box</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ImportFileSongListWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ImportListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Import File Song List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="ImportListTable">
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Title</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ImportSelectAllWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ImportSelectAllPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select All</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/imports/import_selectall.png</normaloff>:/imports/import_selectall.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="ImportSelectAllHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>89</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="importFilterWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="ImportFilterComboBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Lyrics</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Title</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="importFilterLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>ImportListTable</zorder>
|
|
||||||
<zorder>ImportListLabel</zorder>
|
|
||||||
<zorder>importFilterWidget</zorder>
|
|
||||||
<zorder>ImportSelectAllWidget</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="AddSelectedWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="AddSelectedTopVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="AddSelectedPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>25</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/imports/import_move_to_list.png</normaloff>:/imports/import_move_to_list.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="AddSelectedBottomVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedFileListWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="SelectedListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Import List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="SelectedListTable">
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Title</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedSelectAllWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="SelectedSelectAllPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select All</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/imports/import_selectall.png</normaloff>:/imports/import_selectall.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SelectedSelectAllHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>92</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedRemoveSelectedWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="SelectedRemoveSelectedButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>140</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove Selected</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/imports/import_remove.png</normaloff>:/imports/import_remove.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SelectedRemoveSelectedHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>49</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>ImportFileSongListWidget</zorder>
|
|
||||||
<zorder>SelectedFileListWidget</zorder>
|
|
||||||
<zorder>AddSelectedWidget</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="ProgressGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Progress:</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ProgressLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ready to import</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="ProgressBar">
|
|
||||||
<property name="value">
|
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ButtonBarWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="ButtonBarHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>288</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ImportPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Import</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ClosePushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="../images/openlp-2.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>ClosePushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>OpenLPImportDialog</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>436</x>
|
|
||||||
<y>436</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>462</x>
|
|
||||||
<y>455</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>ImportSelectAllPushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>ImportListTable</receiver>
|
|
||||||
<slot>selectAll()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>75</x>
|
|
||||||
<y>281</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>88</x>
|
|
||||||
<y>176</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>SelectedSelectAllPushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>SelectedListTable</receiver>
|
|
||||||
<slot>selectAll()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>311</x>
|
|
||||||
<y>277</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>339</x>
|
|
||||||
<y>190</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>SelectedRemoveSelectedButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>SelectedListTable</receiver>
|
|
||||||
<slot>clear()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>379</x>
|
|
||||||
<y>308</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>389</x>
|
|
||||||
<y>188</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,613 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>OpenSongExportDialog</class>
|
|
||||||
<widget class="QDialog" name="OpenSongExportDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>473</width>
|
|
||||||
<height>459</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>OpenSong Song Exporter</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ExportFileWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ExportFileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select OpenSong song folder:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ExportFileLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ExportFileSelectPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_load.png</normaloff>:/exports/export_load.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="SongListFrame">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::Box</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ExportFileSongListWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ExportListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Full Song List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="ExportListTable">
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Title</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ExportSelectAllWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ExportSelectAllPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select All</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_selectall.png</normaloff>:/exports/export_selectall.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="ExportSelectAllHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>89</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="exportFilterWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="ExportFilterComboBox">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Lyrics</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Title</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ExportFilterLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>exportFilterWidget</zorder>
|
|
||||||
<zorder>ExportListTable</zorder>
|
|
||||||
<zorder>ExportListLabel</zorder>
|
|
||||||
<zorder>ExportSelectAllWidget</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="AddSelectedWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="AddSelectedTopVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="AddSelectedPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>25</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_move_to_list.png</normaloff>:/exports/export_move_to_list.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="AddSelectedBottomVSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedFileListWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="SelectedListLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Export List</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="SelectedListTable">
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::MultiSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cornerButtonEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Song Title</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Author</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedSelectAllWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="SelectedSelectAllPushButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select All</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_selectall.png</normaloff>:/exports/export_selectall.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SelectedSelectAllHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>92</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SelectedRemoveSelectedWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="SelectedRemoveSelectedButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>140</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove Selected</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/exports/export_remove.png</normaloff>:/exports/export_remove.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SelectedRemoveSelectedHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>49</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>ExportFileSongListWidget</zorder>
|
|
||||||
<zorder>SelectedFileListWidget</zorder>
|
|
||||||
<zorder>AddSelectedWidget</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="ProgressGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Progress:</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ProgressLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ready to export</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="ProgressBar">
|
|
||||||
<property name="value">
|
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ButtonBarWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="ButtonBarHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>288</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ExportPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Export</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ClosePushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="../images/openlp-2.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>ClosePushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>OpenSongExportDialog</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>436</x>
|
|
||||||
<y>436</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>462</x>
|
|
||||||
<y>455</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>ExportSelectAllPushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>ExportListTable</receiver>
|
|
||||||
<slot>selectAll()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>75</x>
|
|
||||||
<y>281</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>88</x>
|
|
||||||
<y>176</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>SelectedSelectAllPushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>SelectedListTable</receiver>
|
|
||||||
<slot>selectAll()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>311</x>
|
|
||||||
<y>277</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>339</x>
|
|
||||||
<y>190</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>SelectedRemoveSelectedButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>SelectedListTable</receiver>
|
|
||||||
<slot>clear()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>379</x>
|
|
||||||
<y>308</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>389</x>
|
|
||||||
<y>188</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,172 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>OpenSongImportDialog</class>
|
|
||||||
<widget class="QDialog" name="OpenSongImportDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>481</width>
|
|
||||||
<height>172</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>OpenSong Song Importer</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ImportFileWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ImportFileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>OpenSong Folder:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="ImportFileLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ImportFileSelectPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
|
||||||
<normaloff>:/imports/import_load.png</normaloff>:/imports/import_load.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="ProgressGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Progress:</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="ProgressLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ready to import</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="ProgressBar">
|
|
||||||
<property name="value">
|
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ButtonBarWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="ButtonBarHSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>288</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ImportPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Import</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="ClosePushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="../images/openlp-2.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>ClosePushButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>OpenSongImportDialog</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>424</x>
|
|
||||||
<y>132</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>288</x>
|
|
||||||
<y>-25</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,116 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
|
|
||||||
# Thompson, Jon Tibble, Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
import os
|
|
||||||
from cgi import escape
|
|
||||||
from ast import parse, NodeVisitor, Str
|
|
||||||
|
|
||||||
ts_file = u"""<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="1.1">
|
|
||||||
%s
|
|
||||||
</TS>
|
|
||||||
"""
|
|
||||||
ts_context = u""" <context>
|
|
||||||
<name>%s</name>
|
|
||||||
%s </context>
|
|
||||||
"""
|
|
||||||
ts_message = u""" <message>
|
|
||||||
<location filename="%s" line="%d"/>
|
|
||||||
<source>%s</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
"""
|
|
||||||
|
|
||||||
class StringExtractor(NodeVisitor):
|
|
||||||
|
|
||||||
def __init__(self, strings, filename, base_path):
|
|
||||||
self.base_path = base_path
|
|
||||||
self.filename = filename
|
|
||||||
self.strings = strings
|
|
||||||
self.classname = 'unknown'
|
|
||||||
|
|
||||||
def visit_ClassDef(self, node):
|
|
||||||
self.classname = node.name
|
|
||||||
self.generic_visit(node)
|
|
||||||
|
|
||||||
def visit_Call(self, node):
|
|
||||||
if hasattr(node.func, 'attr') and node.func.attr == 'trUtf8' and isinstance(node.args[0], Str):
|
|
||||||
string = node.args[0].s
|
|
||||||
key = '%s-%s' % (self.classname, string)
|
|
||||||
self.strings[key] = [self.classname, self.filename[len(self.base_path) + 1:], node.lineno, escape(string)]
|
|
||||||
self.generic_visit(node)
|
|
||||||
|
|
||||||
def parse_file(base_path, filename, strings):
|
|
||||||
file = open(filename, u'r')
|
|
||||||
try:
|
|
||||||
ast = parse(file.read())
|
|
||||||
except SyntaxError, e:
|
|
||||||
print "Unable to parse %s: %s" % (filename, e)
|
|
||||||
return
|
|
||||||
file.close()
|
|
||||||
|
|
||||||
StringExtractor(strings, filename, base_path).visit(ast)
|
|
||||||
|
|
||||||
def write_file(filename, strings):
|
|
||||||
translation_file = u''
|
|
||||||
translation_contexts = []
|
|
||||||
translation_messages = []
|
|
||||||
class_name = strings[strings.keys()[0]][0]
|
|
||||||
current_context = u''
|
|
||||||
for key, translation in strings.iteritems():
|
|
||||||
if class_name != translation[0]:
|
|
||||||
current_context = ts_context % (class_name, u''.join(translation_messages))
|
|
||||||
translation_contexts.append(current_context)
|
|
||||||
translation_messages = []
|
|
||||||
class_name = translation[0]
|
|
||||||
translation_messages.append(ts_message % (translation[1], translation[2], translation[3]))
|
|
||||||
current_context = ts_context % (class_name, u''.join(translation_messages))
|
|
||||||
translation_contexts.append(current_context)
|
|
||||||
translation_file = ts_file % (u''.join(translation_contexts))
|
|
||||||
file = open(filename, u'w')
|
|
||||||
file.write(translation_file.encode('utf8'))
|
|
||||||
file.close()
|
|
||||||
|
|
||||||
def main():
|
|
||||||
strings = {}
|
|
||||||
start_dir = os.path.abspath(u'..')
|
|
||||||
for root, dirs, files in os.walk(start_dir):
|
|
||||||
for file in files:
|
|
||||||
if file.startswith(u'hook-') or file.startswith(u'test_'):
|
|
||||||
continue
|
|
||||||
if file.endswith(u'.py'):
|
|
||||||
print u'Parsing "%s"' % file
|
|
||||||
parse_file(start_dir, os.path.join(root, file), strings)
|
|
||||||
print u'Generating TS file...',
|
|
||||||
write_file(os.path.join(start_dir, u'resources', u'i18n', u'openlp_en.ts'), strings)
|
|
||||||
print u'done.'
|
|
||||||
|
|
||||||
if __name__ == u'__main__':
|
|
||||||
if os.path.split(os.path.abspath(u'.'))[1] != u'scripts':
|
|
||||||
print u'You need to run this script from the scripts directory.'
|
|
||||||
else:
|
|
||||||
main()
|
|
Loading…
Reference in New Issue
Block a user