forked from openlp/openlp
Head
This commit is contained in:
commit
968eaad46a
@ -66,7 +66,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
The shortened (usually singular) name for the plugin e.g. *'Song'*
|
||||
for the Songs plugin.
|
||||
|
||||
``self.PluginNameVisible``
|
||||
``self.pluginNameVisible``
|
||||
The user visible name for a plugin which should use a suitable
|
||||
translation function.
|
||||
|
||||
@ -108,21 +108,17 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.icon = None
|
||||
if title:
|
||||
self.title = title
|
||||
self.Toolbar = None
|
||||
self.toolbar = None
|
||||
self.remoteTriggered = None
|
||||
self.ServiceItemIconName = None
|
||||
self.serviceItemIconName = None
|
||||
self.singleServiceItem = True
|
||||
self.PageLayout = QtGui.QVBoxLayout(self)
|
||||
self.PageLayout.setSpacing(0)
|
||||
self.PageLayout.setContentsMargins(4, 0, 4, 0)
|
||||
self.pageLayout = QtGui.QVBoxLayout(self)
|
||||
self.pageLayout.setSpacing(0)
|
||||
self.pageLayout.setContentsMargins(4, 0, 4, 0)
|
||||
self.requiredIcons()
|
||||
self.initPluginNameVisible()
|
||||
self.setupUi()
|
||||
self.retranslateUi()
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
pass
|
||||
|
||||
def requiredIcons(self):
|
||||
"""
|
||||
This method is called to define the icons for the plugin.
|
||||
@ -149,9 +145,9 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
A method to help developers easily add a toolbar to the media
|
||||
manager item.
|
||||
"""
|
||||
if self.Toolbar is None:
|
||||
self.Toolbar = OpenLPToolbar(self)
|
||||
self.PageLayout.addWidget(self.Toolbar)
|
||||
if self.toolbar is None:
|
||||
self.toolbar = OpenLPToolbar(self)
|
||||
self.pageLayout.addWidget(self.toolbar)
|
||||
|
||||
def addToolbarButton(
|
||||
self, title, tooltip, icon, slot=None, checkable=False):
|
||||
@ -180,13 +176,13 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
# break compatability), but it makes sense for the icon to
|
||||
# come before the tooltip (as you have to have an icon, but
|
||||
# not neccesarily a tooltip)
|
||||
self.Toolbar.addToolbarButton(title, icon, tooltip, slot, checkable)
|
||||
self.toolbar.addToolbarButton(title, icon, tooltip, slot, checkable)
|
||||
|
||||
def addToolbarSeparator(self):
|
||||
"""
|
||||
A very simple method to add a separator to the toolbar.
|
||||
"""
|
||||
self.Toolbar.addSeparator()
|
||||
self.toolbar.addSeparator()
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
@ -215,7 +211,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
unicode(translate('MediaManagerItem', 'Import %s')) %
|
||||
self.PluginNameShort,
|
||||
unicode(translate('MediaManagerItem', 'Import a %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
u':/general/general_import.png', self.onImportClick)
|
||||
## File Button ##
|
||||
if self.hasFileIcon:
|
||||
@ -223,7 +219,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
unicode(translate('MediaManagerItem', 'Load %s')) %
|
||||
self.PluginNameShort,
|
||||
unicode(translate('MediaManagerItem', 'Load a new %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
u':/general/general_open.png', self.onFileClick)
|
||||
## New Button ##
|
||||
if self.hasNewIcon:
|
||||
@ -231,7 +227,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
unicode(translate('MediaManagerItem', 'New %s')) %
|
||||
self.PluginNameShort,
|
||||
unicode(translate('MediaManagerItem', 'Add a new %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
u':/general/general_new.png', self.onNewClick)
|
||||
## Edit Button ##
|
||||
if self.hasEditIcon:
|
||||
@ -240,7 +236,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.PluginNameShort,
|
||||
unicode(translate(
|
||||
'MediaManagerItem', 'Edit the selected %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
u':/general/general_edit.png', self.onEditClick)
|
||||
## Delete Button ##
|
||||
if self.hasDeleteIcon:
|
||||
@ -275,60 +271,60 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
Creates the main widget for listing items the media item is tracking
|
||||
"""
|
||||
#Add the List widget
|
||||
self.ListView = self.ListViewWithDnD_class(self)
|
||||
self.ListView.uniformItemSizes = True
|
||||
self.ListView.setGeometry(QtCore.QRect(10, 100, 256, 591))
|
||||
self.ListView.setSpacing(1)
|
||||
self.ListView.setSelectionMode(
|
||||
self.listView = self.ListViewWithDnD_class(self)
|
||||
self.listView.uniformItemSizes = True
|
||||
self.listView.setGeometry(QtCore.QRect(10, 100, 256, 591))
|
||||
self.listView.setSpacing(1)
|
||||
self.listView.setSelectionMode(
|
||||
QtGui.QAbstractItemView.ExtendedSelection)
|
||||
self.ListView.setAlternatingRowColors(True)
|
||||
self.ListView.setDragEnabled(True)
|
||||
self.ListView.setObjectName(u'%sListView' % self.PluginNameShort)
|
||||
#Add tp PageLayout
|
||||
self.PageLayout.addWidget(self.ListView)
|
||||
self.listView.setAlternatingRowColors(True)
|
||||
self.listView.setDragEnabled(True)
|
||||
self.listView.setObjectName(u'%sListView' % self.PluginNameShort)
|
||||
#Add to pageLayout
|
||||
self.pageLayout.addWidget(self.listView)
|
||||
#define and add the context menu
|
||||
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
if self.hasEditIcon:
|
||||
self.ListView.addAction(
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/general/general_edit.png',
|
||||
self.listView, u':/general/general_edit.png',
|
||||
unicode(translate('MediaManagerItem', '&Edit %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
self.onEditClick))
|
||||
self.ListView.addAction(context_menu_separator(self.ListView))
|
||||
self.listView.addAction(context_menu_separator(self.listView))
|
||||
if self.hasDeleteIcon:
|
||||
self.ListView.addAction(
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/general/general_delete.png',
|
||||
self.listView, u':/general/general_delete.png',
|
||||
unicode(translate('MediaManagerItem', '&Delete %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
self.onDeleteClick))
|
||||
self.ListView.addAction(context_menu_separator(self.ListView))
|
||||
self.ListView.addAction(
|
||||
self.listView.addAction(context_menu_separator(self.listView))
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/general/general_preview.png',
|
||||
self.listView, u':/general/general_preview.png',
|
||||
unicode(translate('MediaManagerItem', '&Preview %s')) %
|
||||
self.PluginNameVisible,
|
||||
self.pluginNameVisible,
|
||||
self.onPreviewClick))
|
||||
self.ListView.addAction(
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/general/general_live.png',
|
||||
self.listView, u':/general/general_live.png',
|
||||
translate('MediaManagerItem', '&Show Live'),
|
||||
self.onLiveClick))
|
||||
self.ListView.addAction(
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/general/general_add.png',
|
||||
self.listView, u':/general/general_add.png',
|
||||
translate('MediaManagerItem', '&Add to Service'),
|
||||
self.onAddClick))
|
||||
if self.addToServiceItem:
|
||||
self.ListView.addAction(
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/general/general_add.png',
|
||||
self.listView, u':/general/general_add.png',
|
||||
translate('MediaManagerItem',
|
||||
'&Add to selected Service Item'),
|
||||
self.onAddEditClick))
|
||||
QtCore.QObject.connect(
|
||||
self.ListView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||
self.listView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||
self.onPreviewClick)
|
||||
|
||||
def initialise(self):
|
||||
@ -372,8 +368,8 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
count = 0
|
||||
filelist = []
|
||||
while count < self.ListView.count():
|
||||
bitem = self.ListView.item(count)
|
||||
while count < self.listView.count():
|
||||
bitem = self.listView.item(count)
|
||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
filelist.append(filename)
|
||||
count += 1
|
||||
@ -390,12 +386,12 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
thumbdate = os.stat(thumb).st_mtime
|
||||
#if file updated rebuild icon
|
||||
if filedate > thumbdate:
|
||||
self.IconFromFile(file, thumb)
|
||||
self.iconFromFile(file, thumb)
|
||||
else:
|
||||
self.IconFromFile(file, thumb)
|
||||
self.iconFromFile(file, thumb)
|
||||
return True
|
||||
|
||||
def IconFromFile(self, file, thumb):
|
||||
def iconFromFile(self, file, thumb):
|
||||
"""
|
||||
Create a thumbnail icon from a given file
|
||||
|
||||
@ -436,7 +432,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
Preview an item by building a service item then adding that service
|
||||
item to the preview slide controller.
|
||||
"""
|
||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('MediaManagerItem', 'No Items Selected'),
|
||||
translate('MediaManagerItem',
|
||||
@ -453,7 +449,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
Send an item live by building a service item then adding that service
|
||||
item to the live slide controller.
|
||||
"""
|
||||
if not self.ListView.selectedIndexes():
|
||||
if not self.listView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('MediaManagerItem', 'No Items Selected'),
|
||||
translate('MediaManagerItem',
|
||||
@ -469,7 +465,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
Add a selected item to the current service
|
||||
"""
|
||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('MediaManagerItem', 'No Items Selected'),
|
||||
translate('MediaManagerItem',
|
||||
@ -485,7 +481,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.parent.serviceManager.addServiceItem(service_item,
|
||||
replace=self.remoteTriggered)
|
||||
else:
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
for item in items:
|
||||
service_item = self.buildServiceItem(item)
|
||||
if service_item:
|
||||
@ -496,7 +492,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
"""
|
||||
Add a selected item to an existing item in the current service.
|
||||
"""
|
||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('MediaManagerItem', 'No items selected'),
|
||||
translate('MediaManagerItem',
|
||||
@ -525,10 +521,10 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
Common method for generating a service item
|
||||
"""
|
||||
service_item = ServiceItem(self.parent)
|
||||
if self.ServiceItemIconName:
|
||||
service_item.add_icon(self.ServiceItemIconName)
|
||||
if self.serviceItemIconName:
|
||||
service_item.add_icon(self.serviceItemIconName)
|
||||
else:
|
||||
service_item.add_icon(self.parent.icon)
|
||||
service_item.add_icon(self.parent.icon_path)
|
||||
if self.generateSlideData(service_item, item):
|
||||
return service_item
|
||||
else:
|
||||
|
@ -117,8 +117,7 @@ class ServiceItem(object):
|
||||
service item in the service manager.
|
||||
|
||||
``icon``
|
||||
An instance of QIcon or a string to an icon in the resource or on
|
||||
disk.
|
||||
A string to an icon in the resources or on disk.
|
||||
"""
|
||||
self.icon = icon
|
||||
self.iconic_representation = build_icon(icon)
|
||||
|
@ -71,27 +71,27 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
``objectname``
|
||||
The name of the object, as used in `<button>.setObjectName()`.
|
||||
"""
|
||||
ToolbarButton = None
|
||||
toolbarButton = None
|
||||
if icon:
|
||||
ButtonIcon = build_icon(icon)
|
||||
buttonIcon = build_icon(icon)
|
||||
if slot and not checkable:
|
||||
ToolbarButton = self.addAction(ButtonIcon, title, slot)
|
||||
toolbarButton = self.addAction(buttonIcon, title, slot)
|
||||
else:
|
||||
ToolbarButton = self.addAction(ButtonIcon, title)
|
||||
self.icons[title] = ButtonIcon
|
||||
toolbarButton = self.addAction(buttonIcon, title)
|
||||
self.icons[title] = buttonIcon
|
||||
else:
|
||||
ToolbarButton = QtGui.QAction(title, ToolbarButton)
|
||||
self.addAction(ToolbarButton)
|
||||
QtCore.QObject.connect(ToolbarButton,
|
||||
toolbarButton = QtGui.QAction(title, toolbarButton)
|
||||
self.addAction(toolbarButton)
|
||||
QtCore.QObject.connect(toolbarButton,
|
||||
QtCore.SIGNAL(u'triggered()'), slot)
|
||||
if tooltip:
|
||||
ToolbarButton.setToolTip(tooltip)
|
||||
toolbarButton.setToolTip(tooltip)
|
||||
if checkable:
|
||||
ToolbarButton.setCheckable(True)
|
||||
QtCore.QObject.connect(ToolbarButton,
|
||||
toolbarButton.setCheckable(True)
|
||||
QtCore.QObject.connect(toolbarButton,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), slot)
|
||||
self.actions[title] = ToolbarButton
|
||||
return ToolbarButton
|
||||
self.actions[title] = toolbarButton
|
||||
return toolbarButton
|
||||
|
||||
def addToolbarSeparator(self, handle):
|
||||
"""
|
||||
|
@ -203,7 +203,7 @@ class Theme(object):
|
||||
val = element_text
|
||||
if (element.tag.find(u'Color') > 0 or
|
||||
(element.tag.find(u'BackgroundParameter') == 0 and
|
||||
type(val) == type(0))):
|
||||
isinstance(int, val))):
|
||||
# convert to a wx.Colour
|
||||
if not delphi_color_change:
|
||||
val = QtGui.QColor(
|
||||
|
@ -49,6 +49,7 @@ from splashscreen import SplashScreen
|
||||
from displaytab import DisplayTab
|
||||
from generaltab import GeneralTab
|
||||
from themestab import ThemesTab
|
||||
from advancedtab import AdvancedTab
|
||||
from aboutform import AboutForm
|
||||
from pluginform import PluginForm
|
||||
from settingsform import SettingsForm
|
||||
|
@ -24,98 +24,89 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_AboutDialog(object):
|
||||
def setupUi(self, AboutDialog):
|
||||
AboutDialog.setObjectName(u'AboutDialog')
|
||||
AboutDialog.resize(516, 481)
|
||||
LogoIcon = QtGui.QIcon()
|
||||
LogoIcon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
AboutDialog.setWindowIcon(LogoIcon)
|
||||
self.AboutDialogLayout = QtGui.QVBoxLayout(AboutDialog)
|
||||
self.AboutDialogLayout.setSpacing(8)
|
||||
self.AboutDialogLayout.setMargin(8)
|
||||
self.AboutDialogLayout.setObjectName(u'AboutDialogLayout')
|
||||
self.LogoLabel = QtGui.QLabel(AboutDialog)
|
||||
self.LogoLabel.setPixmap(
|
||||
def setupUi(self, aboutDialog):
|
||||
aboutDialog.setObjectName(u'aboutDialog')
|
||||
aboutDialog.resize(516, 481)
|
||||
aboutDialog.setWindowIcon(build_icon(u':/icon/openlp-logo-16x16.png'))
|
||||
self.aboutDialogLayout = QtGui.QVBoxLayout(aboutDialog)
|
||||
self.aboutDialogLayout.setSpacing(8)
|
||||
self.aboutDialogLayout.setMargin(8)
|
||||
self.aboutDialogLayout.setObjectName(u'aboutDialogLayout')
|
||||
self.logoLabel = QtGui.QLabel(aboutDialog)
|
||||
self.logoLabel.setPixmap(
|
||||
QtGui.QPixmap(u':/graphics/openlp-about-logo.png'))
|
||||
self.LogoLabel.setScaledContents(False)
|
||||
self.LogoLabel.setIndent(0)
|
||||
self.LogoLabel.setObjectName(u'LogoLabel')
|
||||
self.AboutDialogLayout.addWidget(self.LogoLabel)
|
||||
self.AboutNotebook = QtGui.QTabWidget(AboutDialog)
|
||||
self.AboutNotebook.setObjectName(u'AboutNotebook')
|
||||
self.AboutTab = QtGui.QWidget()
|
||||
self.AboutTab.setObjectName(u'AboutTab')
|
||||
self.AboutTabLayout = QtGui.QVBoxLayout(self.AboutTab)
|
||||
self.AboutTabLayout.setSpacing(0)
|
||||
self.AboutTabLayout.setMargin(8)
|
||||
self.AboutTabLayout.setObjectName(u'AboutTabLayout')
|
||||
self.AboutTextEdit = QtGui.QPlainTextEdit(self.AboutTab)
|
||||
self.AboutTextEdit.setReadOnly(True)
|
||||
self.AboutTextEdit.setObjectName(u'AboutTextEdit')
|
||||
self.AboutTabLayout.addWidget(self.AboutTextEdit)
|
||||
self.AboutNotebook.addTab(self.AboutTab, '')
|
||||
self.CreditsTab = QtGui.QWidget()
|
||||
self.CreditsTab.setObjectName(u'CreditsTab')
|
||||
self.CreditsTabLayout = QtGui.QVBoxLayout(self.CreditsTab)
|
||||
self.CreditsTabLayout.setSpacing(0)
|
||||
self.CreditsTabLayout.setMargin(8)
|
||||
self.CreditsTabLayout.setObjectName(u'CreditsTabLayout')
|
||||
self.CreditsTextEdit = QtGui.QPlainTextEdit(self.CreditsTab)
|
||||
self.CreditsTextEdit.setReadOnly(True)
|
||||
self.CreditsTextEdit.setObjectName(u'CreditsTextEdit')
|
||||
self.CreditsTabLayout.addWidget(self.CreditsTextEdit)
|
||||
self.AboutNotebook.addTab(self.CreditsTab, '')
|
||||
self.LicenseTab = QtGui.QWidget()
|
||||
self.LicenseTab.setObjectName(u'LicenseTab')
|
||||
self.LicenseTabLayout = QtGui.QVBoxLayout(self.LicenseTab)
|
||||
self.LicenseTabLayout.setSpacing(8)
|
||||
self.LicenseTabLayout.setMargin(8)
|
||||
self.LicenseTabLayout.setObjectName(u'LicenseTabLayout')
|
||||
self.LicenseTextEdit = QtGui.QPlainTextEdit(self.LicenseTab)
|
||||
self.LicenseTextEdit.setReadOnly(True)
|
||||
self.LicenseTextEdit.setObjectName(u'LicenseTextEdit')
|
||||
self.LicenseTabLayout.addWidget(self.LicenseTextEdit)
|
||||
self.AboutNotebook.addTab(self.LicenseTab, '')
|
||||
self.AboutDialogLayout.addWidget(self.AboutNotebook)
|
||||
self.ButtonWidget = QtGui.QWidget(AboutDialog)
|
||||
self.ButtonWidget.setObjectName(u'ButtonWidget')
|
||||
self.ButtonWidgetLayout = QtGui.QHBoxLayout(self.ButtonWidget)
|
||||
self.ButtonWidgetLayout.setSpacing(8)
|
||||
self.ButtonWidgetLayout.setMargin(0)
|
||||
self.ButtonWidgetLayout.setObjectName(u'ButtonWidgetLayout')
|
||||
ButtonSpacer = QtGui.QSpacerItem(275, 20,
|
||||
self.logoLabel.setScaledContents(False)
|
||||
self.logoLabel.setIndent(0)
|
||||
self.logoLabel.setObjectName(u'logoLabel')
|
||||
self.aboutDialogLayout.addWidget(self.logoLabel)
|
||||
self.aboutNotebook = QtGui.QTabWidget(aboutDialog)
|
||||
self.aboutNotebook.setObjectName(u'aboutNotebook')
|
||||
self.aboutTab = QtGui.QWidget()
|
||||
self.aboutTab.setObjectName(u'aboutTab')
|
||||
self.aboutTabLayout = QtGui.QVBoxLayout(self.aboutTab)
|
||||
self.aboutTabLayout.setSpacing(0)
|
||||
self.aboutTabLayout.setMargin(8)
|
||||
self.aboutTabLayout.setObjectName(u'aboutTabLayout')
|
||||
self.aboutTextEdit = QtGui.QPlainTextEdit(self.aboutTab)
|
||||
self.aboutTextEdit.setReadOnly(True)
|
||||
self.aboutTextEdit.setObjectName(u'aboutTextEdit')
|
||||
self.aboutTabLayout.addWidget(self.aboutTextEdit)
|
||||
self.aboutNotebook.addTab(self.aboutTab, '')
|
||||
self.creditsTab = QtGui.QWidget()
|
||||
self.creditsTab.setObjectName(u'creditsTab')
|
||||
self.creditsTabLayout = QtGui.QVBoxLayout(self.creditsTab)
|
||||
self.creditsTabLayout.setSpacing(0)
|
||||
self.creditsTabLayout.setMargin(8)
|
||||
self.creditsTabLayout.setObjectName(u'creditsTabLayout')
|
||||
self.creditsTextEdit = QtGui.QPlainTextEdit(self.creditsTab)
|
||||
self.creditsTextEdit.setReadOnly(True)
|
||||
self.creditsTextEdit.setObjectName(u'creditsTextEdit')
|
||||
self.creditsTabLayout.addWidget(self.creditsTextEdit)
|
||||
self.aboutNotebook.addTab(self.creditsTab, '')
|
||||
self.licenseTab = QtGui.QWidget()
|
||||
self.licenseTab.setObjectName(u'licenseTab')
|
||||
self.licenseTabLayout = QtGui.QVBoxLayout(self.licenseTab)
|
||||
self.licenseTabLayout.setSpacing(8)
|
||||
self.licenseTabLayout.setMargin(8)
|
||||
self.licenseTabLayout.setObjectName(u'licenseTabLayout')
|
||||
self.licenseTextEdit = QtGui.QPlainTextEdit(self.licenseTab)
|
||||
self.licenseTextEdit.setReadOnly(True)
|
||||
self.licenseTextEdit.setObjectName(u'licenseTextEdit')
|
||||
self.licenseTabLayout.addWidget(self.licenseTextEdit)
|
||||
self.aboutNotebook.addTab(self.licenseTab, '')
|
||||
self.aboutDialogLayout.addWidget(self.aboutNotebook)
|
||||
self.buttonWidget = QtGui.QWidget(aboutDialog)
|
||||
self.buttonWidget.setObjectName(u'buttonWidget')
|
||||
self.buttonWidgetLayout = QtGui.QHBoxLayout(self.buttonWidget)
|
||||
self.buttonWidgetLayout.setSpacing(8)
|
||||
self.buttonWidgetLayout.setMargin(0)
|
||||
self.buttonWidgetLayout.setObjectName(u'buttonWidgetLayout')
|
||||
buttonSpacer = QtGui.QSpacerItem(275, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.ButtonWidgetLayout.addItem(ButtonSpacer)
|
||||
self.ContributeButton = QtGui.QPushButton(self.ButtonWidget)
|
||||
ContributeIcon = QtGui.QIcon()
|
||||
ContributeIcon.addPixmap(
|
||||
QtGui.QPixmap(u':/system/system_contribute.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.ContributeButton.setIcon(ContributeIcon)
|
||||
self.ContributeButton.setObjectName(u'ContributeButton')
|
||||
self.ButtonWidgetLayout.addWidget(self.ContributeButton)
|
||||
self.CloseButton = QtGui.QPushButton(self.ButtonWidget)
|
||||
CloseIcon = QtGui.QIcon()
|
||||
CloseIcon.addPixmap(QtGui.QPixmap(u':/system/system_close.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.CloseButton.setIcon(CloseIcon)
|
||||
self.CloseButton.setObjectName(u'CloseButton')
|
||||
self.ButtonWidgetLayout.addWidget(self.CloseButton)
|
||||
self.AboutDialogLayout.addWidget(self.ButtonWidget)
|
||||
self.buttonWidgetLayout.addItem(buttonSpacer)
|
||||
self.contributeButton = QtGui.QPushButton(self.buttonWidget)
|
||||
self.contributeButton.setIcon(
|
||||
build_icon(u':/system/system_contribute.png'))
|
||||
self.contributeButton.setObjectName(u'contributeButton')
|
||||
self.buttonWidgetLayout.addWidget(self.contributeButton)
|
||||
self.closeButton = QtGui.QPushButton(self.buttonWidget)
|
||||
self.closeButton.setIcon(build_icon(u':/system/system_close.png'))
|
||||
self.closeButton.setObjectName(u'closeButton')
|
||||
self.buttonWidgetLayout.addWidget(self.closeButton)
|
||||
self.aboutDialogLayout.addWidget(self.buttonWidget)
|
||||
self.retranslateUi(aboutDialog)
|
||||
self.aboutNotebook.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL(u'clicked()'),
|
||||
aboutDialog.close)
|
||||
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
|
||||
|
||||
self.retranslateUi(AboutDialog)
|
||||
self.AboutNotebook.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.CloseButton, QtCore.SIGNAL(u'clicked()'),
|
||||
AboutDialog.close)
|
||||
QtCore.QMetaObject.connectSlotsByName(AboutDialog)
|
||||
|
||||
def retranslateUi(self, AboutDialog):
|
||||
AboutDialog.setWindowTitle(translate('AboutForm', 'About OpenLP'))
|
||||
self.AboutTextEdit.setPlainText(translate('AboutForm',
|
||||
def retranslateUi(self, aboutDialog):
|
||||
aboutDialog.setWindowTitle(translate('AboutForm', 'About OpenLP'))
|
||||
self.aboutTextEdit.setPlainText(translate('AboutForm',
|
||||
'OpenLP <version><revision> - Open Source Lyrics '
|
||||
'Projection\n'
|
||||
'\n'
|
||||
@ -131,11 +122,10 @@ class Ui_AboutDialog(object):
|
||||
'like to see more free Christian software being written, please '
|
||||
'consider contributing by using the button below.'
|
||||
))
|
||||
self.AboutNotebook.setTabText(
|
||||
|
||||
self.AboutNotebook.indexOf(self.AboutTab),
|
||||
self.aboutNotebook.setTabText(
|
||||
self.aboutNotebook.indexOf(self.aboutTab),
|
||||
translate('AboutForm', 'About'))
|
||||
self.CreditsTextEdit.setPlainText(translate('AboutForm',
|
||||
self.creditsTextEdit.setPlainText(translate('AboutForm',
|
||||
'Project Lead\n'
|
||||
' Raoul "superfly" Snyman\n'
|
||||
'\n'
|
||||
@ -165,10 +155,10 @@ class Ui_AboutDialog(object):
|
||||
' Matthias "matthub" Hub (Mac OS X)\n'
|
||||
' Raoul "superfly" Snyman (Windows)\n'
|
||||
))
|
||||
self.AboutNotebook.setTabText(
|
||||
self.AboutNotebook.indexOf(self.CreditsTab),
|
||||
self.aboutNotebook.setTabText(
|
||||
self.aboutNotebook.indexOf(self.creditsTab),
|
||||
translate('AboutForm', 'Credits'))
|
||||
self.LicenseTextEdit.setPlainText(translate('AboutForm',
|
||||
self.licenseTextEdit.setPlainText(translate('AboutForm',
|
||||
'Copyright \xa9 2004-2010 Raoul Snyman\n'
|
||||
'Portions copyright \xa9 2004-2010 '
|
||||
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, '
|
||||
@ -557,8 +547,8 @@ class Ui_AboutDialog(object):
|
||||
'linking proprietary applications with the library. If this is '
|
||||
'what you want to do, use the GNU Lesser General Public License '
|
||||
'instead of this License.'))
|
||||
self.AboutNotebook.setTabText(
|
||||
self.AboutNotebook.indexOf(self.LicenseTab),
|
||||
self.aboutNotebook.setTabText(
|
||||
self.aboutNotebook.indexOf(self.licenseTab),
|
||||
translate('AboutForm', 'License'))
|
||||
self.ContributeButton.setText(translate('AboutForm', 'Contribute'))
|
||||
self.CloseButton.setText(translate('AboutForm', 'Close'))
|
||||
self.contributeButton.setText(translate('AboutForm', 'Contribute'))
|
||||
self.closeButton.setText(translate('AboutForm', 'Close'))
|
||||
|
@ -40,7 +40,7 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.applicationVersion = applicationVersion
|
||||
self.setupUi(self)
|
||||
about_text = self.AboutTextEdit.toPlainText()
|
||||
about_text = self.aboutTextEdit.toPlainText()
|
||||
about_text = about_text.replace(u'<version>',
|
||||
self.applicationVersion[u'version'])
|
||||
if self.applicationVersion[u'build']:
|
||||
@ -49,8 +49,8 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
||||
else:
|
||||
build_text = u''
|
||||
about_text = about_text.replace(u'<revision>', build_text)
|
||||
self.AboutTextEdit.setPlainText(about_text)
|
||||
QtCore.QObject.connect(self.ContributeButton,
|
||||
self.aboutTextEdit.setPlainText(about_text)
|
||||
QtCore.QObject.connect(self.contributeButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.onContributeButtonClicked)
|
||||
|
||||
def onContributeButtonClicked(self):
|
||||
|
162
openlp/core/ui/advancedtab.py
Normal file
162
openlp/core/ui/advancedtab.py
Normal file
@ -0,0 +1,162 @@
|
||||
# -*- 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 #
|
||||
###############################################################################
|
||||
"""
|
||||
The :mod:`advancedtab` provides an advanced settings facility.
|
||||
"""
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class AdvancedTab(SettingsTab):
|
||||
"""
|
||||
The :class:`AdvancedTab` manages the advanced settings tab including the UI
|
||||
and the loading and saving of the displayed settings.
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Initialise the settings tab
|
||||
"""
|
||||
SettingsTab.__init__(self, u'Advanced')
|
||||
|
||||
def setupUi(self):
|
||||
"""
|
||||
Configure the UI elements for the tab.
|
||||
"""
|
||||
self.setObjectName(u'AdvancedTab')
|
||||
self.tabTitleVisible = translate('AdvancedTab', 'Advanced')
|
||||
self.advancedTabLayout = QtGui.QHBoxLayout(self)
|
||||
self.advancedTabLayout.setSpacing(8)
|
||||
self.advancedTabLayout.setMargin(8)
|
||||
self.leftWidget = QtGui.QWidget(self)
|
||||
self.leftLayout = QtGui.QVBoxLayout(self.leftWidget)
|
||||
self.leftLayout.setSpacing(8)
|
||||
self.leftLayout.setMargin(0)
|
||||
self.recentGroupBox = QtGui.QGroupBox(self.leftWidget)
|
||||
self.recentGroupBox.setObjectName(u'recentGroupBox')
|
||||
self.recentGroupBox.setGeometry(QtCore.QRect(0, 0, 220, 57))
|
||||
self.recentGroupBox.setMaximumSize(QtCore.QSize(220, 57))
|
||||
self.recentLayout = QtGui.QHBoxLayout(self.recentGroupBox)
|
||||
self.recentLayout.setSpacing(8)
|
||||
self.recentLayout.setMargin(6)
|
||||
self.recentLayout.setObjectName(u'recentLayout')
|
||||
self.recentLabel = QtGui.QLabel(self.recentGroupBox)
|
||||
self.recentLabel.setObjectName(u'recentLabel')
|
||||
self.recentLayout.addWidget(self.recentLabel)
|
||||
self.recentSpinBox = QtGui.QSpinBox(self.recentGroupBox)
|
||||
self.recentSpinBox.setMinimum(0)
|
||||
self.recentSpinBox.setObjectName(u'recentSpinBox')
|
||||
self.recentLayout.addWidget(self.recentSpinBox)
|
||||
self.leftLayout.addWidget(self.recentGroupBox)
|
||||
# self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget)
|
||||
# self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
|
||||
# self.sharedDirGroupBox.setGeometry(QtCore.QRect(0, 65, 500, 85))
|
||||
# self.sharedDirGroupBox.setMaximumSize(QtCore.QSize(500, 85))
|
||||
# self.sharedDirLayout = QtGui.QVBoxLayout(self.sharedDirGroupBox)
|
||||
# self.sharedDirLayout.setSpacing(8)
|
||||
# self.sharedDirLayout.setMargin(8)
|
||||
# self.sharedCheckBox = QtGui.QCheckBox(self.sharedDirGroupBox)
|
||||
# self.sharedCheckBox.setObjectName(u'sharedCheckBox')
|
||||
# self.sharedDirLayout.addWidget(self.sharedCheckBox)
|
||||
# self.sharedSubLayout = QtGui.QHBoxLayout()
|
||||
# self.sharedSubLayout.setSpacing(8)
|
||||
# self.sharedSubLayout.setMargin(0)
|
||||
# self.sharedLabel = QtGui.QLabel(self.sharedDirGroupBox)
|
||||
# self.sharedLabel.setObjectName(u'sharedLabel')
|
||||
# self.sharedSubLayout.addWidget(self.sharedLabel)
|
||||
# self.sharedLineEdit = QtGui.QLineEdit(self.sharedDirGroupBox)
|
||||
# self.sharedLineEdit.setObjectName(u'sharedLineEdit')
|
||||
# self.sharedSubLayout.addWidget(self.sharedLineEdit)
|
||||
# self.sharedPushButton = QtGui.QPushButton(self.sharedDirGroupBox)
|
||||
# self.sharedPushButton.setObjectName(u'sharedPushButton')
|
||||
# self.sharedSubLayout.addWidget(self.sharedPushButton)
|
||||
# self.sharedDirLayout.addLayout(self.sharedSubLayout)
|
||||
# self.leftLayout.addWidget(self.sharedDirGroupBox)
|
||||
self.leftSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.leftLayout.addItem(self.leftSpacer)
|
||||
self.advancedTabLayout.addWidget(self.leftWidget)
|
||||
# self.rightWidget = QtGui.QWidget(self)
|
||||
# self.rightLayout = QtGui.QVBoxLayout(self.rightWidget)
|
||||
# self.rightLayout.setSpacing(8)
|
||||
# self.rightLayout.setMargin(0)
|
||||
# self.databaseGroupBox = QtGui.QGroupBox(self.rightWidget)
|
||||
# self.databaseGroupBox.setObjectName(u'databaseGroupBox')
|
||||
# self.databaseGroupBox.setEnabled(False)
|
||||
# self.databaseLayout = QtGui.QVBoxLayout(self.databaseGroupBox)
|
||||
# self.databaseLayout.setSpacing(8)
|
||||
# self.databaseLayout.setMargin(8)
|
||||
# self.rightLayout.addWidget(self.databaseGroupBox)
|
||||
# self.advancedTabLayout.addWidget(self.rightWidget)
|
||||
# QtCore.QObject.connect(self.sharedCheckBox,
|
||||
# QtCore.SIGNAL(u'stateChanged(int)'), self.onSharedCheckBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
Setup the interface translation strings.
|
||||
"""
|
||||
self.recentGroupBox.setTitle(translate('AdvancedTab', 'Recent Files'))
|
||||
self.recentLabel.setText(
|
||||
translate('AdvancedTab', 'Number of recent files to list:'))
|
||||
# self.sharedDirGroupBox.setTitle(
|
||||
# translate('AdvancedTab', 'Central Data Store'))
|
||||
# self.sharedCheckBox.setText(
|
||||
# translate('AdvancedTab', 'Enable a shared data location'))
|
||||
# self.sharedLabel.setText(translate('AdvancedTab', 'Store location:'))
|
||||
# self.sharedPushButton.setText(translate('AdvancedTab', 'Browse...'))
|
||||
# self.databaseGroupBox.setTitle(translate('AdvancedTab', 'Databases'))
|
||||
|
||||
def load(self):
|
||||
"""
|
||||
Load settings from disk.
|
||||
"""
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
# The max recent files value does not have an interface and so never
|
||||
# gets actually stored in the settings therefore the default value of
|
||||
# 20 will always be used.
|
||||
self.recentSpinBox.setMaximum(QtCore.QSettings().value(
|
||||
u'max recent files', QtCore.QVariant(20)).toInt()[0])
|
||||
self.recentSpinBox.setValue(settings.value(u'recent file count',
|
||||
QtCore.QVariant(4)).toInt()[0])
|
||||
settings.endGroup()
|
||||
|
||||
def save(self):
|
||||
"""
|
||||
Save settings to disk.
|
||||
"""
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
settings.setValue(u'recent file count',
|
||||
QtCore.QVariant(self.recentSpinBox.value()))
|
||||
settings.endGroup()
|
||||
|
||||
def onSharedCheckBoxChanged(self, checked):
|
||||
"""
|
||||
Enables the widgets to allow a shared data location
|
||||
"""
|
||||
self.sharedLabel.setEnabled(checked)
|
||||
self.sharedTextEdit.setEnabled(checked)
|
||||
self.sharedPushButton.setEnabled(checked)
|
||||
|
@ -44,10 +44,12 @@ class DisplayTab(SettingsTab):
|
||||
"""
|
||||
self.tabTitleVisible = translate('DisplayTab', 'Displays')
|
||||
self.layoutWidget = QtGui.QWidget(self)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
|
||||
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.OverrideCheckBox = QtGui.QCheckBox(self.layoutWidget)
|
||||
self.OverrideCheckBox.setObjectName(u'OverrideCheckBox')
|
||||
self.verticalLayout.addWidget(self.OverrideCheckBox)
|
||||
self.CurrentGroupBox = QtGui.QGroupBox(self.layoutWidget)
|
||||
self.CurrentGroupBox.setObjectName(u'CurrentGroupBox')
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.CurrentGroupBox)
|
||||
@ -153,9 +155,7 @@ class DisplayTab(SettingsTab):
|
||||
self.WidthEdit.setObjectName(u'WidthEdit')
|
||||
self.verticalLayout_5.addWidget(self.WidthEdit)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_5)
|
||||
self.OverrideCheckBox = QtGui.QCheckBox(self)
|
||||
self.OverrideCheckBox.setGeometry(QtCore.QRect(0, 10, 191, 23))
|
||||
self.OverrideCheckBox.setObjectName(u'OverrideCheckBox')
|
||||
self.verticalLayout.addWidget(self.CurrentGroupBox_2)
|
||||
QtCore.QMetaObject.connectSlotsByName(self)
|
||||
QtCore.QObject.connect(self.OverrideCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.onOverrideCheckBoxChanged)
|
||||
|
@ -154,9 +154,10 @@ class DisplayWidget(QtGui.QGraphicsView):
|
||||
"""
|
||||
log.info(u'MainDisplay loaded')
|
||||
|
||||
def __init__(self, parent=None, name=None):
|
||||
def __init__(self, parent=None, name=None, primary=False):
|
||||
QtGui.QWidget.__init__(self, None)
|
||||
self.parent = parent
|
||||
self.primary = primary
|
||||
self.hotkey_map = {
|
||||
QtCore.Qt.Key_Return: 'servicemanager_next_item',
|
||||
QtCore.Qt.Key_Space: 'slidecontroller_live_next_noloop',
|
||||
@ -189,6 +190,14 @@ class DisplayWidget(QtGui.QGraphicsView):
|
||||
else:
|
||||
event.ignore()
|
||||
|
||||
def resetDisplay(self):
|
||||
log.debug(u'resetDisplay')
|
||||
Receiver.send_message(u'slidecontroller_live_stop_loop')
|
||||
if self.primary:
|
||||
self.setVisible(False)
|
||||
else:
|
||||
self.setVisible(True)
|
||||
|
||||
class MainDisplay(DisplayWidget):
|
||||
"""
|
||||
This is the form that is used to display things on the projector.
|
||||
@ -206,7 +215,7 @@ class MainDisplay(DisplayWidget):
|
||||
The list of screens.
|
||||
"""
|
||||
log.debug(u'Initialisation started')
|
||||
DisplayWidget.__init__(self, parent)
|
||||
DisplayWidget.__init__(self, parent, primary=True)
|
||||
self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
@ -222,7 +231,6 @@ class MainDisplay(DisplayWidget):
|
||||
self.setupText()
|
||||
self.setupAlert()
|
||||
self.setupBlank()
|
||||
self.primary = True
|
||||
self.blankFrame = None
|
||||
self.frame = None
|
||||
#Hide desktop for now until we know where to put it
|
||||
@ -239,23 +247,24 @@ class MainDisplay(DisplayWidget):
|
||||
self.screen = self.screens.current
|
||||
#Sort out screen locations and sizes
|
||||
self.setGeometry(self.screen[u'size'])
|
||||
self.scene.setSceneRect(0,0,self.size().width(), self.size().height())
|
||||
self.scene.setSceneRect(0, 0, self.size().width(),
|
||||
self.size().height())
|
||||
self.webView.setGeometry(0, 0, self.size().width(),
|
||||
self.size().height())
|
||||
#Build a custom splash screen
|
||||
self.InitialFrame = QtGui.QImage(
|
||||
self.initialFrame = QtGui.QImage(
|
||||
self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height(),
|
||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
||||
painter_image = QtGui.QPainter()
|
||||
painter_image.begin(self.InitialFrame)
|
||||
painter_image.fillRect(self.InitialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.begin(self.initialFrame)
|
||||
painter_image.fillRect(self.initialFrame.rect(), QtCore.Qt.white)
|
||||
painter_image.drawImage(
|
||||
(self.screen[u'size'].width() - splash_image.width()) / 2,
|
||||
(self.screen[u'size'].height() - splash_image.height()) / 2,
|
||||
splash_image)
|
||||
self.displayImage(self.InitialFrame)
|
||||
self.displayImage(self.initialFrame)
|
||||
self.repaint()
|
||||
#Build a Black screen
|
||||
painter = QtGui.QPainter()
|
||||
@ -281,7 +290,7 @@ class MainDisplay(DisplayWidget):
|
||||
|
||||
def setupScene(self):
|
||||
self.scene = QtGui.QGraphicsScene(self)
|
||||
self.scene.setSceneRect(0,0,self.size().width(), self.size().height())
|
||||
self.scene.setSceneRect(0, 0, self.size().width(), self.size().height())
|
||||
self.setScene(self.scene)
|
||||
|
||||
def setupVideo(self):
|
||||
@ -323,14 +332,6 @@ class MainDisplay(DisplayWidget):
|
||||
self.displayBlank.setZValue(10)
|
||||
self.scene.addItem(self.displayBlank)
|
||||
|
||||
def resetDisplay(self):
|
||||
log.debug(u'resetDisplay')
|
||||
Receiver.send_message(u'slidecontroller_live_stop_loop')
|
||||
if self.primary:
|
||||
self.setVisible(False)
|
||||
else:
|
||||
self.setVisible(True)
|
||||
|
||||
# def hideDisplayForVideo(self):
|
||||
# """
|
||||
# Hides the main display if for the video to be played
|
||||
@ -389,9 +390,9 @@ class MainDisplay(DisplayWidget):
|
||||
if location == 0:
|
||||
self.alertText.setPos(0, 0)
|
||||
elif location == 1:
|
||||
self.alertText.setPos(0,self.size().height()/2)
|
||||
self.alertText.setPos(0, self.size().height() / 2)
|
||||
else:
|
||||
self.alertText.setPos(0,self.size().height() - 76)
|
||||
self.alertText.setPos(0, self.size().height() - 76)
|
||||
self.alertText.setHtml(message)
|
||||
|
||||
def displayImage(self, frame):
|
||||
@ -536,8 +537,8 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
Shutting down so clean up connections
|
||||
"""
|
||||
self.onMediaStop()
|
||||
for pth in self.outputPaths():
|
||||
disconnected = pth.disconnect()
|
||||
for path in self.outputPaths():
|
||||
path.disconnect()
|
||||
|
||||
# def onMediaBackground(self, message=None):
|
||||
# """
|
||||
@ -662,8 +663,8 @@ class AudioPlayer(QtCore.QObject):
|
||||
Shutting down so clean up connections
|
||||
"""
|
||||
self.onMediaStop()
|
||||
for pth in self.mediaObject.outputPaths():
|
||||
disconnected = pth.disconnect()
|
||||
for path in self.mediaObject.outputPaths():
|
||||
path.disconnect()
|
||||
|
||||
def onMediaQueue(self, message):
|
||||
"""
|
||||
|
@ -38,7 +38,7 @@ from openlp.core.utils import check_latest_version, AppLocation, add_actions, \
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
media_manager_style = """
|
||||
MEDIA_MANAGER_STYLE = """
|
||||
QToolBox::tab {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 palette(button), stop: 1.0 palette(dark));
|
||||
@ -174,7 +174,7 @@ class Ui_MainWindow(object):
|
||||
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
|
||||
self.MediaManagerDock.setWindowIcon(
|
||||
build_icon(u':/system/system_mediamanager.png'))
|
||||
self.MediaManagerDock.setStyleSheet(media_manager_style)
|
||||
self.MediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
|
||||
self.MediaManagerDock.setMinimumWidth(
|
||||
self.settingsmanager.mainwindow_left)
|
||||
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
|
||||
@ -469,7 +469,8 @@ class Ui_MainWindow(object):
|
||||
'&Plugin List'))
|
||||
self.SettingsPluginListItem.setStatusTip(
|
||||
translate('MainWindow', 'List the Plugins'))
|
||||
self.SettingsPluginListItem.setShortcut(translate('MainWindow', 'Alt+F7'))
|
||||
self.SettingsPluginListItem.setShortcut(
|
||||
translate('MainWindow', 'Alt+F7'))
|
||||
self.HelpDocumentationItem.setText(
|
||||
translate('MainWindow', '&User Guide'))
|
||||
self.HelpAboutItem.setText(translate('MainWindow', '&About'))
|
||||
@ -897,6 +898,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.ViewLivePanel.setChecked(visible)
|
||||
|
||||
def loadSettings(self):
|
||||
"""
|
||||
Load the main window settings.
|
||||
"""
|
||||
log.debug(u'Loading QSettings')
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.generalSettingsSection)
|
||||
@ -911,6 +915,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
settings.endGroup()
|
||||
|
||||
def saveSettings(self):
|
||||
"""
|
||||
Save the main window settings.
|
||||
"""
|
||||
log.debug(u'Saving QSettings')
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.generalSettingsSection)
|
||||
@ -928,15 +935,19 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
settings.endGroup()
|
||||
|
||||
def updateFileMenu(self):
|
||||
"""
|
||||
Updates the file menu with the latest list of service files accessed.
|
||||
"""
|
||||
recentFileCount = QtCore.QSettings().value(
|
||||
u'advanced/recent file count', QtCore.QVariant(4)).toInt()[0]
|
||||
self.FileMenu.clear()
|
||||
add_actions(self.FileMenu, self.FileMenuActions[:-1])
|
||||
existingRecentFiles = []
|
||||
for file in self.recentFiles:
|
||||
if QtCore.QFile.exists(file):
|
||||
existingRecentFiles.append(file)
|
||||
if existingRecentFiles:
|
||||
existingRecentFiles = [file for file in self.recentFiles
|
||||
if QtCore.QFile.exists(file)]
|
||||
recentFilesToDisplay = existingRecentFiles[0:recentFileCount]
|
||||
if recentFilesToDisplay:
|
||||
self.FileMenu.addSeparator()
|
||||
for fileId, filename in enumerate(existingRecentFiles):
|
||||
for fileId, filename in enumerate(recentFilesToDisplay):
|
||||
action = QtGui.QAction(u'&%d %s' % (fileId +1,
|
||||
QtCore.QFileInfo(filename).fileName()), self)
|
||||
action.setData(QtCore.QVariant(filename))
|
||||
@ -947,13 +958,22 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.FileMenu.addAction(self.FileMenuActions[-1])
|
||||
|
||||
def addRecentFile(self, filename):
|
||||
recentFileCount = QtCore.QSettings().value(
|
||||
self.generalSettingsSection + u'/max recent files',
|
||||
QtCore.QVariant(4)).toInt()[0]
|
||||
"""
|
||||
Adds a service to the list of recently used files.
|
||||
|
||||
``filename``
|
||||
The service filename to add
|
||||
"""
|
||||
# The maxRecentFiles value does not have an interface and so never gets
|
||||
# actually stored in the settings therefore the default value of 20
|
||||
# will always be used.
|
||||
maxRecentFiles = QtCore.QSettings().value(u'advanced/max recent files',
|
||||
QtCore.QVariant(20)).toInt()[0]
|
||||
if filename:
|
||||
position = self.recentFiles.indexOf(filename)
|
||||
if position != -1:
|
||||
self.recentFiles.removeAt(position)
|
||||
self.recentFiles.insert(0, QtCore.QString(filename))
|
||||
while self.recentFiles.count() > recentFileCount:
|
||||
self.recentFiles.removeLast()
|
||||
# Don't care what API says takeLast works, removeLast doesn't!
|
||||
self.recentFiles.takeLast()
|
||||
|
@ -33,7 +33,8 @@ log = logging.getLogger(__name__)
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import OpenLPToolbar, ServiceItem, context_menu_action, \
|
||||
Receiver, build_icon, ItemCapabilities, SettingsManager, translate, ThemeLevel
|
||||
Receiver, build_icon, ItemCapabilities, SettingsManager, translate, \
|
||||
ThemeLevel
|
||||
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm
|
||||
from openlp.core.utils import AppLocation
|
||||
|
||||
|
@ -29,7 +29,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.ui import GeneralTab, ThemesTab, DisplayTab
|
||||
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab, DisplayTab
|
||||
from settingsdialog import Ui_SettingsDialog
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -53,6 +53,9 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||
# Display tab
|
||||
self.DisplayTab = DisplayTab(screens)
|
||||
self.addTab(u'Display', self.DisplayTab)
|
||||
# Advanced tab
|
||||
self.advancedTab = AdvancedTab()
|
||||
self.addTab(u'Advanced', self.advancedTab)
|
||||
|
||||
def addTab(self, name, tab):
|
||||
"""
|
||||
@ -66,9 +69,9 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
||||
Add a tab to the form at a specific location
|
||||
"""
|
||||
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
||||
#13 : There are 3 tables currently and locations starts at -10
|
||||
# 14 : There are 3 tables currently and locations starts at -10
|
||||
self.SettingsTabWidget.insertTab(
|
||||
location + 13, tab, tab.tabTitleVisible)
|
||||
location + 14, tab, tab.tabTitleVisible)
|
||||
|
||||
def removeTab(self, name):
|
||||
"""
|
||||
|
@ -25,16 +25,13 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_AlertDialog(object):
|
||||
def setupUi(self, AlertDialog):
|
||||
AlertDialog.setObjectName(u'AlertDialog')
|
||||
AlertDialog.resize(567, 440)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
AlertDialog.setWindowIcon(icon)
|
||||
AlertDialog.setWindowIcon(build_icon(u':/icon/openlp.org-icon-32.bmp'))
|
||||
self.AlertDialogLayout = QtGui.QVBoxLayout(AlertDialog)
|
||||
self.AlertDialogLayout.setSpacing(8)
|
||||
self.AlertDialogLayout.setMargin(8)
|
||||
@ -79,25 +76,16 @@ class Ui_AlertDialog(object):
|
||||
self.ManageButtonLayout.setSpacing(8)
|
||||
self.ManageButtonLayout.setObjectName(u'ManageButtonLayout')
|
||||
self.NewButton = QtGui.QPushButton(AlertDialog)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/general/general_new.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.NewButton.setIcon(icon1)
|
||||
self.NewButton.setIcon(build_icon(u':/general/general_new.png'))
|
||||
self.NewButton.setObjectName(u'NewButton')
|
||||
self.ManageButtonLayout.addWidget(self.NewButton)
|
||||
self.SaveButton = QtGui.QPushButton(AlertDialog)
|
||||
self.SaveButton.setEnabled(False)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/general/general_save.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.SaveButton.setIcon(icon2)
|
||||
self.SaveButton.setIcon(build_icon(u':/general/general_save.png'))
|
||||
self.SaveButton.setObjectName(u'SaveButton')
|
||||
self.ManageButtonLayout.addWidget(self.SaveButton)
|
||||
self.DeleteButton = QtGui.QPushButton(AlertDialog)
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(u':/general/general_delete.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DeleteButton.setIcon(icon3)
|
||||
self.DeleteButton.setIcon(build_icon(u':/general/general_delete.png'))
|
||||
self.DeleteButton.setObjectName(u'DeleteButton')
|
||||
self.ManageButtonLayout.addWidget(self.DeleteButton)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
@ -111,22 +99,17 @@ class Ui_AlertDialog(object):
|
||||
spacerItem1 = QtGui.QSpacerItem(181, 0, QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.AlertButtonLayout.addItem(spacerItem1)
|
||||
displayIcon = build_icon(u':/general/general_live.png')
|
||||
self.DisplayButton = QtGui.QPushButton(AlertDialog)
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(u':/general/general_live.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DisplayButton.setIcon(icon4)
|
||||
self.DisplayButton.setIcon(displayIcon)
|
||||
self.DisplayButton.setObjectName(u'DisplayButton')
|
||||
self.AlertButtonLayout.addWidget(self.DisplayButton)
|
||||
self.DisplayCloseButton = QtGui.QPushButton(AlertDialog)
|
||||
self.DisplayCloseButton.setIcon(icon4)
|
||||
self.DisplayCloseButton.setIcon(displayIcon)
|
||||
self.DisplayCloseButton.setObjectName(u'DisplayCloseButton')
|
||||
self.AlertButtonLayout.addWidget(self.DisplayCloseButton)
|
||||
self.CloseButton = QtGui.QPushButton(AlertDialog)
|
||||
icon5 = QtGui.QIcon()
|
||||
icon5.addPixmap(QtGui.QPixmap(u':/system/system_close.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.CloseButton.setIcon(icon5)
|
||||
self.CloseButton.setIcon(build_icon(u':/system/system_close.png'))
|
||||
self.CloseButton.setObjectName(u'CloseButton')
|
||||
self.AlertButtonLayout.addWidget(self.CloseButton)
|
||||
self.AlertDialogLayout.addLayout(self.AlertButtonLayout)
|
||||
|
@ -274,10 +274,6 @@ class AlertsTab(SettingsTab):
|
||||
self.FontComboBox.setCurrentFont(font)
|
||||
self.updateDisplay()
|
||||
|
||||
def onItemSelected(self):
|
||||
self.EditButton.setEnabled(True)
|
||||
self.DeleteButton.setEnabled(True)
|
||||
|
||||
def save(self):
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
|
@ -38,7 +38,8 @@ class BiblePlugin(Plugin):
|
||||
def __init__(self, plugin_helpers):
|
||||
Plugin.__init__(self, u'Bibles', u'1.9.2', plugin_helpers)
|
||||
self.weight = -9
|
||||
self.icon = build_icon(u':/plugins/plugin_bibles.png')
|
||||
self.icon_path = u':/plugins/plugin_bibles.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
#Register the bible Manager
|
||||
self.status = PluginStatus.Active
|
||||
self.manager = None
|
||||
@ -84,8 +85,8 @@ class BiblePlugin(Plugin):
|
||||
self.ExportBibleItem.setVisible(False)
|
||||
|
||||
def onBibleImportClick(self):
|
||||
if self.media_item:
|
||||
self.media_item.onImportClick()
|
||||
if self.mediaItem:
|
||||
self.mediaItem.onImportClick()
|
||||
|
||||
def about(self):
|
||||
about_text = translate('BiblePlugin',
|
||||
|
@ -24,7 +24,8 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_BibleImportWizard(object):
|
||||
def setupUi(self, BibleImportWizard):
|
||||
@ -61,10 +62,10 @@ class Ui_BibleImportWizard(object):
|
||||
BibleImportWizard.addPage(self.WelcomePage)
|
||||
self.SelectPage = QtGui.QWizardPage()
|
||||
self.SelectPage.setObjectName(u'SelectPage')
|
||||
self.SelectPageLayout = QtGui.QVBoxLayout(self.SelectPage)
|
||||
self.SelectPageLayout.setSpacing(8)
|
||||
self.SelectPageLayout.setMargin(20)
|
||||
self.SelectPageLayout.setObjectName(u'SelectPageLayout')
|
||||
self.selectPageLayout = QtGui.QVBoxLayout(self.SelectPage)
|
||||
self.selectPageLayout.setSpacing(8)
|
||||
self.selectPageLayout.setMargin(20)
|
||||
self.selectPageLayout.setObjectName(u'selectPageLayout')
|
||||
self.FormatSelectLayout = QtGui.QHBoxLayout()
|
||||
self.FormatSelectLayout.setSpacing(8)
|
||||
self.FormatSelectLayout.setObjectName(u'FormatSelectLayout')
|
||||
@ -81,7 +82,7 @@ class Ui_BibleImportWizard(object):
|
||||
spacerItem2 = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.FormatSelectLayout.addItem(spacerItem2)
|
||||
self.SelectPageLayout.addLayout(self.FormatSelectLayout)
|
||||
self.selectPageLayout.addLayout(self.FormatSelectLayout)
|
||||
self.FormatWidget = QtGui.QStackedWidget(self.SelectPage)
|
||||
self.FormatWidget.setObjectName(u'FormatWidget')
|
||||
self.OsisPage = QtGui.QWidget()
|
||||
@ -104,10 +105,8 @@ class Ui_BibleImportWizard(object):
|
||||
self.OsisLocationLayout.addWidget(self.OSISLocationEdit)
|
||||
self.OsisFileButton = QtGui.QToolButton(self.OsisPage)
|
||||
self.OsisFileButton.setMaximumSize(QtCore.QSize(32, 16777215))
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.OsisFileButton.setIcon(icon)
|
||||
generalIcon = build_icon(u':/general/general_open.png')
|
||||
self.OsisFileButton.setIcon(generalIcon)
|
||||
self.OsisFileButton.setObjectName(u'OsisFileButton')
|
||||
self.OsisLocationLayout.addWidget(self.OsisFileButton)
|
||||
self.OsisLayout.setLayout(1, QtGui.QFormLayout.FieldRole,
|
||||
@ -137,7 +136,7 @@ class Ui_BibleImportWizard(object):
|
||||
self.CsvBooksLayout.addWidget(self.BooksLocationEdit)
|
||||
self.BooksFileButton = QtGui.QToolButton(self.CsvPage)
|
||||
self.BooksFileButton.setMaximumSize(QtCore.QSize(32, 16777215))
|
||||
self.BooksFileButton.setIcon(icon)
|
||||
self.BooksFileButton.setIcon(generalIcon)
|
||||
self.BooksFileButton.setObjectName(u'BooksFileButton')
|
||||
self.CsvBooksLayout.addWidget(self.BooksFileButton)
|
||||
self.CsvSourceLayout.setLayout(0, QtGui.QFormLayout.FieldRole,
|
||||
@ -154,7 +153,7 @@ class Ui_BibleImportWizard(object):
|
||||
self.CsvVerseLayout.addWidget(self.CsvVerseLocationEdit)
|
||||
self.CsvVersesFileButton = QtGui.QToolButton(self.CsvPage)
|
||||
self.CsvVersesFileButton.setMaximumSize(QtCore.QSize(32, 16777215))
|
||||
self.CsvVersesFileButton.setIcon(icon)
|
||||
self.CsvVersesFileButton.setIcon(generalIcon)
|
||||
self.CsvVersesFileButton.setObjectName(u'CsvVersesFileButton')
|
||||
self.CsvVerseLayout.addWidget(self.CsvVersesFileButton)
|
||||
self.CsvSourceLayout.setLayout(1, QtGui.QFormLayout.FieldRole,
|
||||
@ -177,7 +176,7 @@ class Ui_BibleImportWizard(object):
|
||||
self.OpenSongFileEdit.setObjectName(u'OpenSongFileEdit')
|
||||
self.OpenSongFileLayout.addWidget(self.OpenSongFileEdit)
|
||||
self.OpenSongBrowseButton = QtGui.QToolButton(self.OpenSongPage)
|
||||
self.OpenSongBrowseButton.setIcon(icon)
|
||||
self.OpenSongBrowseButton.setIcon(generalIcon)
|
||||
self.OpenSongBrowseButton.setObjectName(u'OpenSongBrowseButton')
|
||||
self.OpenSongFileLayout.addWidget(self.OpenSongBrowseButton)
|
||||
self.OpenSongLayout.setLayout(0, QtGui.QFormLayout.FieldRole,
|
||||
@ -251,7 +250,7 @@ class Ui_BibleImportWizard(object):
|
||||
self.WebDownloadTabWidget.addTab(self.ProxyServerTab, u'')
|
||||
self.WebDownloadLayout.addWidget(self.WebDownloadTabWidget)
|
||||
self.FormatWidget.addWidget(self.WebDownloadPage)
|
||||
self.SelectPageLayout.addWidget(self.FormatWidget)
|
||||
self.selectPageLayout.addWidget(self.FormatWidget)
|
||||
BibleImportWizard.addPage(self.SelectPage)
|
||||
self.LicenseDetailsPage = QtGui.QWizardPage()
|
||||
self.LicenseDetailsPage.setObjectName(u'LicenseDetailsPage')
|
||||
|
@ -342,7 +342,7 @@ class BibleDB(QtCore.QObject, Manager):
|
||||
verse_list.extend(verses)
|
||||
else:
|
||||
log.debug(u'OpenLP failed to find book %s', book)
|
||||
QtGui.QMessageBox.information(self.bible_plugin.media_item,
|
||||
QtGui.QMessageBox.information(self.bible_plugin.mediaItem,
|
||||
translate('BibleDB', 'Book not found'),
|
||||
translate('BibleDB', u'The book you requested could not '
|
||||
'be found in this bible. Please check your spelling '
|
||||
|
@ -55,6 +55,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
|
||||
def __init__(self, parent, icon, title):
|
||||
self.PluginNameShort = u'Bible'
|
||||
self.pluginNameVisible = translate('BiblesPlugin.MediaItem', 'Bible')
|
||||
self.IconPath = u'songs/song'
|
||||
self.ListViewWithDnD_class = BibleListView
|
||||
self.lastReference = []
|
||||
@ -70,9 +71,6 @@ class BibleMediaItem(MediaManagerItem):
|
||||
obj = obj.toPyObject()
|
||||
return unicode(obj)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = translate('BiblesPlugin.MediaItem', 'Bible')
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
self.hasImportIcon = True
|
||||
@ -131,7 +129,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.QuickClearLabel.setObjectName(u'QuickSearchLabel')
|
||||
self.QuickLayout.addWidget(self.QuickClearLabel, 4, 0, 1, 1)
|
||||
self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab)
|
||||
self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox')
|
||||
self.ClearQuickSearchComboBox.setObjectName(
|
||||
u'ClearQuickSearchComboBox')
|
||||
self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 4, 1, 1, 2)
|
||||
self.QuickSearchButtonLayout = QtGui.QHBoxLayout()
|
||||
self.QuickSearchButtonLayout.setMargin(0)
|
||||
@ -169,7 +168,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.AdvancedVersionComboBox.setObjectName(u'AdvancedVersionComboBox')
|
||||
self.AdvancedLayout.addWidget(self.AdvancedVersionComboBox, 0, 1, 1, 2)
|
||||
self.AdvancedSecondBibleLabel = QtGui.QLabel(self.AdvancedTab)
|
||||
self.AdvancedSecondBibleLabel.setObjectName(u'AdvancedSecondBibleLabel')
|
||||
self.AdvancedSecondBibleLabel.setObjectName(
|
||||
u'AdvancedSecondBibleLabel')
|
||||
self.AdvancedLayout.addWidget(self.AdvancedSecondBibleLabel, 1, 0, 1, 1)
|
||||
self.AdvancedSecondBibleComboBox = QtGui.QComboBox(self.AdvancedTab)
|
||||
self.AdvancedSecondBibleComboBox.setSizeAdjustPolicy(
|
||||
@ -223,7 +223,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
u'AdvancedSearchButtonLayout')
|
||||
self.AdvancedSearchButtonSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.AdvancedSearchButtonLayout.addItem(self.AdvancedSearchButtonSpacer)
|
||||
self.AdvancedSearchButtonLayout.addItem(
|
||||
self.AdvancedSearchButtonSpacer)
|
||||
self.AdvancedSearchButton = QtGui.QPushButton(self.AdvancedTab)
|
||||
self.AdvancedSearchButton.setObjectName(u'AdvancedSearchButton')
|
||||
self.AdvancedSearchButtonLayout.addWidget(self.AdvancedSearchButton)
|
||||
@ -235,7 +236,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.SearchTabWidget.addTab(self.AdvancedTab,
|
||||
translate('BiblesPlugin.MediaItem', 'Advanced'))
|
||||
# Add the search tab widget to the page layout
|
||||
self.PageLayout.addWidget(self.SearchTabWidget)
|
||||
self.pageLayout.addWidget(self.SearchTabWidget)
|
||||
# Combo Boxes
|
||||
QtCore.QObject.connect(self.AdvancedVersionComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedVersionComboBox)
|
||||
@ -271,8 +272,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.SearchProgress.setFormat('')
|
||||
self.SearchProgress.setMinimum(0)
|
||||
self.SearchProgress.setMaximum(0)
|
||||
self.SearchProgress.setGeometry(self.ListView.geometry().left(),
|
||||
self.ListView.geometry().top(), 81, 23)
|
||||
self.SearchProgress.setGeometry(self.listView.geometry().left(),
|
||||
self.listView.geometry().top(), 81, 23)
|
||||
self.SearchProgress.setVisible(False)
|
||||
self.SearchProgress.setObjectName(u'SearchProgress')
|
||||
|
||||
@ -370,9 +371,9 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.initialiseBible(bible)
|
||||
|
||||
def onListViewResize(self, width, height):
|
||||
self.SearchProgress.setGeometry(self.ListView.geometry().x(),
|
||||
(self.ListView.geometry().y() + self.ListView.geometry().height())\
|
||||
- 23, 81, 23)
|
||||
listViewGeometry = self.listView.geometry()
|
||||
self.SearchProgress.setGeometry(listViewGeometry.x(),
|
||||
(listViewGeometry.y() + listViewGeometry.height()) - 23, 81, 23)
|
||||
|
||||
def onSearchProgressShow(self):
|
||||
self.SearchProgress.setVisible(True)
|
||||
@ -436,7 +437,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
chapter_to, verse_to)
|
||||
self.search_results = self.parent.manager.get_verses(bible, versetext)
|
||||
if self.ClearAdvancedSearchComboBox.currentIndex() == 0:
|
||||
self.ListView.clear()
|
||||
self.listView.clear()
|
||||
self.lastReference = []
|
||||
self.lastReference.append(versetext)
|
||||
self.displayResults(bible)
|
||||
@ -456,7 +457,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
bible = unicode(self.QuickVersionComboBox.currentText())
|
||||
text = unicode(self.QuickSearchEdit.text())
|
||||
if self.ClearQuickSearchComboBox.currentIndex() == 0:
|
||||
self.ListView.clear()
|
||||
self.listView.clear()
|
||||
self.lastReference = []
|
||||
self.lastReference.append(text)
|
||||
self.search_results = self.parent.manager.get_verses(bible, text)
|
||||
@ -465,7 +466,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
log.debug(u'generating slide data')
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
if len(items) == 0:
|
||||
return False
|
||||
old_chapter = u''
|
||||
@ -506,7 +507,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
bible2_permission = u''
|
||||
# Let's loop through the main lot, and assemble our verses
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
bitem = self.listView.item(item.row())
|
||||
reference = bitem.data(QtCore.Qt.UserRole)
|
||||
if isinstance(reference, QtCore.QVariant):
|
||||
reference = reference.toPyObject()
|
||||
@ -617,7 +618,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
else:
|
||||
self.AdvancedSearchButton.setEnabled(True)
|
||||
self.AdvancedMessage.setText(u'')
|
||||
self.adjustComboBox(1, self.chapters_from, self.AdvancedFromChapter)
|
||||
self.adjustComboBox(1, self.chapters_from,
|
||||
self.AdvancedFromChapter)
|
||||
self.adjustComboBox(1, self.chapters_from, self.AdvancedToChapter)
|
||||
self.adjustComboBox(1, self.verses, self.AdvancedFromVerse)
|
||||
self.adjustComboBox(1, self.verses, self.AdvancedToVerse)
|
||||
@ -653,8 +655,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
'text': QtCore.QVariant(verse.text)
|
||||
}
|
||||
bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(vdict))
|
||||
self.ListView.addItem(bible_verse)
|
||||
row = self.ListView.setCurrentRow(count)
|
||||
self.listView.addItem(bible_verse)
|
||||
row = self.listView.setCurrentRow(count)
|
||||
if row:
|
||||
row.setSelected(True)
|
||||
|
||||
|
@ -50,7 +50,8 @@ class CustomPlugin(Plugin):
|
||||
self.weight = -5
|
||||
self.custommanager = Manager(u'custom', init_schema)
|
||||
self.edit_custom_form = EditCustomForm(self.custommanager)
|
||||
self.icon = build_icon(u':/plugins/plugin_custom.png')
|
||||
self.icon_path = u':/plugins/plugin_custom.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.status = PluginStatus.Active
|
||||
|
||||
def getSettingsTab(self):
|
||||
|
@ -25,16 +25,14 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_customEditDialog(object):
|
||||
def setupUi(self, customEditDialog):
|
||||
customEditDialog.setObjectName(u'customEditDialog')
|
||||
customEditDialog.resize(590, 541)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
customEditDialog.setWindowIcon(icon)
|
||||
customEditDialog.setWindowIcon(
|
||||
build_icon(u':/icon/openlp.org-icon-32.bmp'))
|
||||
self.gridLayout = QtGui.QGridLayout(customEditDialog)
|
||||
self.gridLayout.setObjectName(u'gridLayout')
|
||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||
@ -56,20 +54,14 @@ class Ui_customEditDialog(object):
|
||||
self.verticalLayout = QtGui.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.UpButton = QtGui.QPushButton(customEditDialog)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/services/service_up.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.UpButton.setIcon(icon1)
|
||||
self.UpButton.setIcon(build_icon(u':/services/service_up.png'))
|
||||
self.UpButton.setObjectName(u'UpButton')
|
||||
self.verticalLayout.addWidget(self.UpButton)
|
||||
spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.DownButton = QtGui.QPushButton(customEditDialog)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/services/service_down.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DownButton.setIcon(icon2)
|
||||
self.DownButton.setIcon(build_icon(u':/services/service_down.png'))
|
||||
self.DownButton.setObjectName(u'DownButton')
|
||||
self.verticalLayout.addWidget(self.DownButton)
|
||||
self.horizontalLayout_4.addLayout(self.verticalLayout)
|
||||
@ -138,7 +130,6 @@ class Ui_customEditDialog(object):
|
||||
QtGui.QDialogButtonBox.Save)
|
||||
self.buttonBox.setObjectName(u'buttonBox')
|
||||
self.gridLayout.addWidget(self.buttonBox, 5, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(customEditDialog)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
||||
customEditDialog.accept)
|
||||
|
@ -47,6 +47,7 @@ class CustomMediaItem(MediaManagerItem):
|
||||
|
||||
def __init__(self, parent, icon, title):
|
||||
self.PluginNameShort = u'Custom'
|
||||
self.pluginNameVisible = translate('CustomPlugin.MediaItem', 'Custom')
|
||||
self.IconPath = u'custom/custom'
|
||||
# this next is a class, not an instance of a class - it will
|
||||
# be instanced by the base MediaManagerItem
|
||||
@ -67,9 +68,6 @@ class CustomMediaItem(MediaManagerItem):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = translate('CustomPlugin.MediaItem', 'Custom')
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
|
||||
@ -86,12 +84,12 @@ class CustomMediaItem(MediaManagerItem):
|
||||
self.onRemoteEditClear()
|
||||
|
||||
def loadCustomListView(self, list):
|
||||
self.ListView.clear()
|
||||
self.listView.clear()
|
||||
for customSlide in list:
|
||||
custom_name = QtGui.QListWidgetItem(customSlide.title)
|
||||
custom_name.setData(
|
||||
QtCore.Qt.UserRole, QtCore.QVariant(customSlide.id))
|
||||
self.ListView.addItem(custom_name)
|
||||
self.listView.addItem(custom_name)
|
||||
|
||||
def onNewClick(self):
|
||||
self.parent.edit_custom_form.loadCustom(0)
|
||||
@ -121,10 +119,10 @@ class CustomMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Edit a custom item
|
||||
"""
|
||||
if check_item_selected(self.ListView,
|
||||
if check_item_selected(self.listView,
|
||||
translate('CustomPlugin.MediaItem',
|
||||
'You must select an item to edit.')):
|
||||
item = self.ListView.currentItem()
|
||||
item = self.listView.currentItem()
|
||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
self.parent.edit_custom_form.loadCustom(item_id, False)
|
||||
self.parent.edit_custom_form.exec_()
|
||||
@ -134,17 +132,17 @@ class CustomMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Remove a custom item from the list and database
|
||||
"""
|
||||
if check_item_selected(self.ListView,
|
||||
if check_item_selected(self.listView,
|
||||
translate('CustomPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
for item in self.ListView.selectedIndexes()]
|
||||
for item in self.listView.selectedIndexes()]
|
||||
for id in id_list:
|
||||
self.parent.custommanager.delete_object(CustomSlide, id)
|
||||
for row in row_list:
|
||||
self.ListView.takeItem(row)
|
||||
self.listView.takeItem(row)
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
raw_slides = []
|
||||
@ -153,7 +151,7 @@ class CustomMediaItem(MediaManagerItem):
|
||||
theme = None
|
||||
if item is None:
|
||||
if self.remoteTriggered is None:
|
||||
item = self.ListView.currentItem()
|
||||
item = self.listView.currentItem()
|
||||
if item is None:
|
||||
return False
|
||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
|
@ -36,7 +36,8 @@ class ImagePlugin(Plugin):
|
||||
def __init__(self, plugin_helpers):
|
||||
Plugin.__init__(self, u'Images', u'1.9.2', plugin_helpers)
|
||||
self.weight = -7
|
||||
self.icon = build_icon(u':/plugins/plugin_images.png')
|
||||
self.icon_path = u':/plugins/plugin_images.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.status = PluginStatus.Active
|
||||
|
||||
def getSettingsTab(self):
|
||||
|
@ -50,15 +50,13 @@ class ImageMediaItem(MediaManagerItem):
|
||||
|
||||
def __init__(self, parent, icon, title):
|
||||
self.PluginNameShort = u'Image'
|
||||
self.pluginNameVisible = translate('ImagePlugin.MediaItem', 'Image')
|
||||
self.IconPath = u'images/image'
|
||||
# this next is a class, not an instance of a class - it will
|
||||
# be instanced by the base MediaManagerItem
|
||||
self.ListViewWithDnD_class = ImageListView
|
||||
MediaManagerItem.__init__(self, parent, icon, title)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = translate('ImagePlugin.MediaItem', 'Image')
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = translate('ImagePlugin.MediaItem',
|
||||
'Select Image(s)')
|
||||
@ -75,10 +73,10 @@ class ImageMediaItem(MediaManagerItem):
|
||||
|
||||
def initialise(self):
|
||||
log.debug(u'initialise')
|
||||
self.ListView.clear()
|
||||
self.ListView.setSelectionMode(
|
||||
self.listView.clear()
|
||||
self.listView.setSelectionMode(
|
||||
QtGui.QAbstractItemView.ExtendedSelection)
|
||||
self.ListView.setIconSize(QtCore.QSize(88, 50))
|
||||
self.listView.setIconSize(QtCore.QSize(88, 50))
|
||||
self.servicePath = os.path.join(
|
||||
AppLocation.get_section_data_path(self.settingsSection),
|
||||
u'thumbnails')
|
||||
@ -89,10 +87,10 @@ class ImageMediaItem(MediaManagerItem):
|
||||
|
||||
def addListViewToToolBar(self):
|
||||
MediaManagerItem.addListViewToToolBar(self)
|
||||
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.ListView.addAction(
|
||||
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.listView.addAction(
|
||||
context_menu_action(
|
||||
self.ListView, u':/slides/slide_blank.png',
|
||||
self.listView, u':/slides/slide_blank.png',
|
||||
translate('ImagePlugin.MediaItem', 'Replace Live Background'),
|
||||
self.onReplaceClick))
|
||||
|
||||
@ -106,23 +104,23 @@ class ImageMediaItem(MediaManagerItem):
|
||||
self.ImageWidget.sizePolicy().hasHeightForWidth())
|
||||
self.ImageWidget.setSizePolicy(sizePolicy)
|
||||
self.ImageWidget.setObjectName(u'ImageWidget')
|
||||
self.blankButton = self.Toolbar.addToolbarButton(
|
||||
self.blankButton = self.toolbar.addToolbarButton(
|
||||
u'Replace Background', u':/slides/slide_blank.png',
|
||||
translate('ImagePlugin.MediaItem', 'Replace Live Background'),
|
||||
self.onReplaceClick, False)
|
||||
# Add the song widget to the page layout
|
||||
self.PageLayout.addWidget(self.ImageWidget)
|
||||
self.pageLayout.addWidget(self.ImageWidget)
|
||||
|
||||
def onDeleteClick(self):
|
||||
"""
|
||||
Remove an image item from the list
|
||||
"""
|
||||
if check_item_selected(self.ListView, translate('ImagePlugin.MediaItem',
|
||||
if check_item_selected(self.listView, translate('ImagePlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
for row in row_list:
|
||||
text = self.ListView.item(row)
|
||||
text = self.listView.item(row)
|
||||
if text:
|
||||
try:
|
||||
os.remove(os.path.join(self.servicePath,
|
||||
@ -130,7 +128,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
except OSError:
|
||||
#if not present do not worry
|
||||
pass
|
||||
self.ListView.takeItem(row)
|
||||
self.listView.takeItem(row)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
|
||||
@ -144,14 +142,14 @@ class ImageMediaItem(MediaManagerItem):
|
||||
else:
|
||||
icon = build_icon(u':/general/general_delete.png')
|
||||
else:
|
||||
icon = self.IconFromFile(file, thumb)
|
||||
icon = self.iconFromFile(file, thumb)
|
||||
item_name = QtGui.QListWidgetItem(filename)
|
||||
item_name.setIcon(icon)
|
||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
||||
self.ListView.addItem(item_name)
|
||||
self.listView.addItem(item_name)
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
if items:
|
||||
service_item.title = unicode(
|
||||
translate('ImagePlugin.MediaItem', 'Image(s)'))
|
||||
@ -160,7 +158,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
service_item.add_capability(ItemCapabilities.AllowsLoop)
|
||||
service_item.add_capability(ItemCapabilities.AllowsAdditions)
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
bitem = self.listView.item(item.row())
|
||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
frame = QtGui.QImage(unicode(filename))
|
||||
(path, name) = os.path.split(filename)
|
||||
@ -170,12 +168,12 @@ class ImageMediaItem(MediaManagerItem):
|
||||
return False
|
||||
|
||||
def onReplaceClick(self):
|
||||
if check_item_selected(self.ListView,
|
||||
if check_item_selected(self.listView,
|
||||
translate('ImagePlugin.MediaItem',
|
||||
'You must select an item to process.')):
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
bitem = self.listView.item(item.row())
|
||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
frame = QtGui.QImage(unicode(filename))
|
||||
self.parent.displayManager.displayImageWithText(frame)
|
||||
|
@ -47,6 +47,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
|
||||
def __init__(self, parent, icon, title):
|
||||
self.PluginNameShort = u'Media'
|
||||
self.pluginNameVisible = translate('MediaPlugin.MediaItem', 'Media')
|
||||
self.IconPath = u'images/image'
|
||||
self.background = False
|
||||
# this next is a class, not an instance of a class - it will
|
||||
@ -56,10 +57,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
u':/media/media_video.png').toImage()
|
||||
MediaManagerItem.__init__(self, parent, icon, title)
|
||||
self.singleServiceItem = False
|
||||
self.ServiceItemIconName = u':/media/media_video.png'
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = translate('MediaPlugin.MediaItem', 'Media')
|
||||
self.serviceItemIconName = u':/media/media_video.png'
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = translate('MediaPlugin.MediaItem', 'Select Media')
|
||||
@ -76,9 +74,9 @@ class MediaMediaItem(MediaManagerItem):
|
||||
|
||||
def addListViewToToolBar(self):
|
||||
MediaManagerItem.addListViewToToolBar(self)
|
||||
self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.ListView.addAction(
|
||||
context_menu_action(self.ListView, u':/slides/slide_blank.png',
|
||||
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.listView.addAction(
|
||||
context_menu_action(self.listView, u':/slides/slide_blank.png',
|
||||
translate('MediaPlugin.MediaItem', 'Replace Live Background'),
|
||||
self.onReplaceClick))
|
||||
|
||||
@ -93,25 +91,25 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.ImageWidget.setSizePolicy(sizePolicy)
|
||||
self.ImageWidget.setObjectName(u'ImageWidget')
|
||||
#Replace backgrounds do not work at present so remove functionality.
|
||||
self.blankButton = self.Toolbar.addToolbarButton(
|
||||
self.blankButton = self.toolbar.addToolbarButton(
|
||||
u'Replace Background', u':/slides/slide_blank.png',
|
||||
translate('MediaPlugin.MediaItem', 'Replace Live Background'),
|
||||
self.onReplaceClick, False)
|
||||
# Add the song widget to the page layout
|
||||
self.PageLayout.addWidget(self.ImageWidget)
|
||||
self.pageLayout.addWidget(self.ImageWidget)
|
||||
|
||||
def onReplaceClick(self):
|
||||
|
||||
if check_item_selected(self.ListView,
|
||||
if check_item_selected(self.listView,
|
||||
translate('ImagePlugin.MediaItem',
|
||||
'You must select an item to process.')):
|
||||
item = self.ListView.currentItem()
|
||||
item = self.listView.currentItem()
|
||||
filename = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
self.parent.displayManager.displayVideo(filename)
|
||||
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
if item is None:
|
||||
item = self.ListView.currentItem()
|
||||
item = self.listView.currentItem()
|
||||
if item is None:
|
||||
return False
|
||||
filename = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
@ -124,9 +122,9 @@ class MediaMediaItem(MediaManagerItem):
|
||||
return True
|
||||
|
||||
def initialise(self):
|
||||
self.ListView.setSelectionMode(
|
||||
self.listView.setSelectionMode(
|
||||
QtGui.QAbstractItemView.ExtendedSelection)
|
||||
self.ListView.setIconSize(QtCore.QSize(88, 50))
|
||||
self.listView.setIconSize(QtCore.QSize(88, 50))
|
||||
self.loadList(SettingsManager.load_list(self.settingsSection,
|
||||
self.settingsSection))
|
||||
|
||||
@ -134,12 +132,12 @@ class MediaMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Remove a media item from the list
|
||||
"""
|
||||
if check_item_selected(self.ListView, translate('MediaPlugin.MediaItem',
|
||||
if check_item_selected(self.listView, translate('MediaPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
for row in row_list:
|
||||
self.ListView.takeItem(row)
|
||||
self.listView.takeItem(row)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
|
||||
@ -150,4 +148,4 @@ class MediaMediaItem(MediaManagerItem):
|
||||
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
|
||||
item_name.setIcon(build_icon(img))
|
||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
||||
self.ListView.addItem(item_name)
|
||||
self.listView.addItem(item_name)
|
||||
|
@ -38,7 +38,8 @@ class MediaPlugin(Plugin):
|
||||
def __init__(self, plugin_helpers):
|
||||
Plugin.__init__(self, u'Media', u'1.9.2', plugin_helpers)
|
||||
self.weight = -6
|
||||
self.icon = build_icon(u':/plugins/plugin_media.png')
|
||||
self.icon_path = u':/plugins/plugin_media.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
# passed with drag and drop messages
|
||||
self.dnd_id = u'Media'
|
||||
self.status = PluginStatus.Active
|
||||
|
@ -59,6 +59,8 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
"""
|
||||
self.controllers = controllers
|
||||
self.PluginNameShort = u'Presentation'
|
||||
self.pluginNameVisible = translate('PresentationPlugin.MediaItem',
|
||||
'Presentation')
|
||||
self.IconPath = u'presentations/presentation'
|
||||
self.Automatic = u''
|
||||
# this next is a class, not an instance of a class - it will
|
||||
@ -67,13 +69,6 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
MediaManagerItem.__init__(self, parent, icon, title)
|
||||
self.message_listener = MessageListener(self)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
"""
|
||||
The name of the plugin media displayed in UI
|
||||
"""
|
||||
self.PluginNameVisible = translate('PresentationPlugin.MediaItem',
|
||||
'Presentation')
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
The name of the plugin media displayed in UI
|
||||
@ -127,13 +122,13 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
self.DisplayTypeLabel.setText(
|
||||
translate('PresentationPlugin.MediaItem', 'Present using:'))
|
||||
# Add the Presentation widget to the page layout
|
||||
self.PageLayout.addWidget(self.PresentationWidget)
|
||||
self.pageLayout.addWidget(self.PresentationWidget)
|
||||
|
||||
def initialise(self):
|
||||
"""
|
||||
Populate the media manager tab
|
||||
"""
|
||||
self.ListView.setIconSize(QtCore.QSize(88, 50))
|
||||
self.listView.setIconSize(QtCore.QSize(88, 50))
|
||||
list = SettingsManager.load_list(
|
||||
self.settingsSection, u'presentations')
|
||||
self.loadList(list)
|
||||
@ -197,10 +192,10 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Remove a presentation item from the list
|
||||
"""
|
||||
if check_item_selected(self.ListView,
|
||||
if check_item_selected(self.listView,
|
||||
translate('PresentationPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
row_list = [item.row() for item in items]
|
||||
row_list.sort(reverse=True)
|
||||
for item in items:
|
||||
@ -211,7 +206,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
doc.presentation_deleted()
|
||||
doc.close_presentation()
|
||||
for row in row_list:
|
||||
self.ListView.takeItem(row)
|
||||
self.listView.takeItem(row)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
|
||||
@ -221,7 +216,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
in the slidecontroller. In the case of powerpoints, an image
|
||||
for each slide
|
||||
"""
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
if len(items) > 1:
|
||||
return False
|
||||
service_item.title = unicode(self.DisplayTypeComboBox.currentText())
|
||||
@ -229,7 +224,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
shortname = service_item.shortname
|
||||
if shortname:
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
bitem = self.listView.item(item.row())
|
||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
if shortname == self.Automatic:
|
||||
service_item.shortname = self.findControllerByType(filename)
|
||||
|
@ -48,7 +48,8 @@ class PresentationPlugin(Plugin):
|
||||
self.controllers = {}
|
||||
Plugin.__init__(self, u'Presentations', u'1.9.2', plugin_helpers)
|
||||
self.weight = -8
|
||||
self.icon = build_icon(u':/plugins/plugin_presentations.png')
|
||||
self.icon_path = u':/plugins/plugin_presentations.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.status = PluginStatus.Active
|
||||
|
||||
def getSettingsTab(self):
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import build_icon, translate
|
||||
from openlp.plugins.songs.lib import VerseType
|
||||
|
||||
class Ui_EditVerseDialog(object):
|
||||
@ -61,10 +61,7 @@ class Ui_EditVerseDialog(object):
|
||||
self.VerseNumberBox.setObjectName(u'VerseNumberBox')
|
||||
self.VerseTypeLayout.addWidget(self.VerseNumberBox)
|
||||
self.InsertButton = QtGui.QPushButton(EditVerseDialog)
|
||||
self.AddIcon = QtGui.QIcon()
|
||||
self.AddIcon.addPixmap(QtGui.QPixmap(u':/general/general_add.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.InsertButton.setIcon(self.AddIcon)
|
||||
self.InsertButton.setIcon(build_icon(u':/general/general_add.png'))
|
||||
self.InsertButton.setObjectName(u'InsertButton')
|
||||
self.VerseTypeLayout.addWidget(self.InsertButton)
|
||||
self.VerseTypeSpacer = QtGui.QSpacerItem(40, 20,
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_SongImportWizard(object):
|
||||
def setupUi(self, SongImportWizard):
|
||||
@ -109,21 +109,16 @@ class Ui_SongImportWizard(object):
|
||||
self.OpenLyricsButtonLayout.setSpacing(8)
|
||||
self.OpenLyricsButtonLayout.setObjectName(u'OpenLyricsButtonLayout')
|
||||
self.OpenLyricsAddButton = QtGui.QPushButton(self.OpenLyricsPage)
|
||||
self.OpenIcon = QtGui.QIcon()
|
||||
self.OpenIcon.addPixmap(QtGui.QPixmap(u':/general/general_open.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.DeleteIcon = QtGui.QIcon()
|
||||
self.DeleteIcon.addPixmap(
|
||||
QtGui.QPixmap(u':/general/general_delete.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.OpenLyricsAddButton.setIcon(self.OpenIcon)
|
||||
self.OpenLyricsAddButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.OpenLyricsAddButton.setObjectName(u'OpenLyricsAddButton')
|
||||
self.OpenLyricsButtonLayout.addWidget(self.OpenLyricsAddButton)
|
||||
self.OpenLyricsButtonSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.OpenLyricsButtonLayout.addItem(self.OpenLyricsButtonSpacer)
|
||||
self.OpenLyricsRemoveButton = QtGui.QPushButton(self.OpenLyricsPage)
|
||||
self.OpenLyricsRemoveButton.setIcon(self.DeleteIcon)
|
||||
self.OpenLyricsRemoveButton.setIcon(
|
||||
build_icon(u':/general/general_delete.png'))
|
||||
self.OpenLyricsRemoveButton.setObjectName(u'OpenLyricsRemoveButton')
|
||||
self.OpenLyricsButtonLayout.addWidget(self.OpenLyricsRemoveButton)
|
||||
self.OpenLyricsLayout.addLayout(self.OpenLyricsButtonLayout)
|
||||
|
@ -49,6 +49,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
|
||||
def __init__(self, parent, icon, title):
|
||||
self.PluginNameShort = u'Song'
|
||||
self.pluginNameVisible = translate('SongsPlugin.MediaItem', 'Song')
|
||||
self.IconPath = u'songs/song'
|
||||
self.ListViewWithDnD_class = SongListView
|
||||
MediaManagerItem.__init__(self, parent, icon, title)
|
||||
@ -61,9 +62,6 @@ class SongMediaItem(MediaManagerItem):
|
||||
# which Song is required.
|
||||
self.remoteSong = -1
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = translate('SongsPlugin.MediaItem', 'Song')
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
|
||||
@ -75,7 +73,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
translate('SongsPlugin.MediaItem',
|
||||
'Maintain the lists of authors, topics and books'),
|
||||
':/songs/song_maintenance.png', self.onSongMaintenanceClick)
|
||||
self.PageLayout.setSpacing(4)
|
||||
self.pageLayout.setSpacing(4)
|
||||
self.SearchLayout = QtGui.QFormLayout()
|
||||
self.SearchLayout.setMargin(0)
|
||||
self.SearchLayout.setSpacing(4)
|
||||
@ -100,7 +98,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.SearchTypeComboBox.setObjectName(u'SearchTypeComboBox')
|
||||
self.SearchLayout.setWidget(
|
||||
1, QtGui.QFormLayout.FieldRole, self.SearchTypeComboBox)
|
||||
self.PageLayout.addLayout(self.SearchLayout)
|
||||
self.pageLayout.addLayout(self.SearchLayout)
|
||||
self.SearchButtonLayout = QtGui.QHBoxLayout()
|
||||
self.SearchButtonLayout.setMargin(0)
|
||||
self.SearchButtonLayout.setSpacing(4)
|
||||
@ -114,7 +112,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.ClearTextButton = QtGui.QPushButton(self)
|
||||
self.ClearTextButton.setObjectName(u'ClearTextButton')
|
||||
self.SearchButtonLayout.addWidget(self.ClearTextButton)
|
||||
self.PageLayout.addLayout(self.SearchButtonLayout)
|
||||
self.pageLayout.addLayout(self.SearchButtonLayout)
|
||||
# Signals and slots
|
||||
QtCore.QObject.connect(self.SearchTextEdit,
|
||||
QtCore.SIGNAL(u'returnPressed()'), self.onSearchTextButtonClick)
|
||||
@ -193,7 +191,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
|
||||
def displayResultsSong(self, searchresults):
|
||||
log.debug(u'display results Song')
|
||||
self.ListView.clear()
|
||||
self.listView.clear()
|
||||
for song in searchresults:
|
||||
author_list = u''
|
||||
for author in song.authors:
|
||||
@ -204,11 +202,11 @@ class SongMediaItem(MediaManagerItem):
|
||||
song_detail = u'%s (%s)' % (song_title, author_list)
|
||||
song_name = QtGui.QListWidgetItem(song_detail)
|
||||
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
|
||||
self.ListView.addItem(song_name)
|
||||
self.listView.addItem(song_name)
|
||||
|
||||
def displayResultsAuthor(self, searchresults):
|
||||
log.debug(u'display results Author')
|
||||
self.ListView.clear()
|
||||
self.listView.clear()
|
||||
for author in searchresults:
|
||||
for song in author.songs:
|
||||
song_detail = unicode(
|
||||
@ -216,7 +214,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
(author.display_name, song.title)
|
||||
song_name = QtGui.QListWidgetItem(song_detail)
|
||||
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
|
||||
self.ListView.addItem(song_name)
|
||||
self.listView.addItem(song_name)
|
||||
|
||||
def onClearTextButtonClick(self):
|
||||
"""
|
||||
@ -247,18 +245,6 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.edit_song_form.newSong()
|
||||
self.edit_song_form.exec_()
|
||||
|
||||
def onEditAuthorClick(self):
|
||||
self.authors_form.load_form()
|
||||
self.authors_form.exec_()
|
||||
|
||||
def onEditTopicClick(self):
|
||||
self.topics_form.load_form()
|
||||
self.topics_form.exec_()
|
||||
|
||||
def onEditBookClick(self):
|
||||
self.song_book_form.load_form()
|
||||
self.song_book_form.exec_()
|
||||
|
||||
def onSongMaintenanceClick(self):
|
||||
self.song_maintenance_form.exec_()
|
||||
|
||||
@ -284,9 +270,9 @@ class SongMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Edit a song
|
||||
"""
|
||||
if check_item_selected(self.ListView, translate('SongsPlugin.MediaItem',
|
||||
if check_item_selected(self.listView, translate('SongsPlugin.MediaItem',
|
||||
'You must select an item to edit.')):
|
||||
item = self.ListView.currentItem()
|
||||
item = self.listView.currentItem()
|
||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
self.edit_song_form.loadSong(item_id, False)
|
||||
self.edit_song_form.exec_()
|
||||
@ -295,9 +281,9 @@ class SongMediaItem(MediaManagerItem):
|
||||
"""
|
||||
Remove a song from the list and database
|
||||
"""
|
||||
if check_item_selected(self.ListView, translate('SongsPlugin.MediaItem',
|
||||
if check_item_selected(self.listView, translate('SongsPlugin.MediaItem',
|
||||
'You must select an item to delete.')):
|
||||
items = self.ListView.selectedIndexes()
|
||||
items = self.listView.selectedIndexes()
|
||||
if len(items) == 1:
|
||||
del_message = translate('SongsPlugin.MediaItem',
|
||||
'Delete song?')
|
||||
@ -325,7 +311,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
ccli = u''
|
||||
if item is None:
|
||||
if self.remoteTriggered is None:
|
||||
item = self.ListView.currentItem()
|
||||
item = self.listView.currentItem()
|
||||
if item is None:
|
||||
return False
|
||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
|
@ -58,7 +58,8 @@ class SongsPlugin(Plugin):
|
||||
Plugin.__init__(self, u'Songs', u'1.9.2', plugin_helpers)
|
||||
self.weight = -10
|
||||
self.manager = Manager(u'songs', init_schema)
|
||||
self.icon = build_icon(u':/plugins/plugin_songs.png')
|
||||
self.icon_path = u':/plugins/plugin_songs.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.status = PluginStatus.Active
|
||||
|
||||
def getSettingsTab(self):
|
||||
@ -150,8 +151,8 @@ class SongsPlugin(Plugin):
|
||||
pass
|
||||
|
||||
def onSongImportItemClicked(self):
|
||||
if self.media_item:
|
||||
self.media_item.onImportClick()
|
||||
if self.mediaItem:
|
||||
self.mediaItem.onImportClick()
|
||||
|
||||
def onImportSofItemClick(self):
|
||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||
|
@ -24,7 +24,8 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_SongUsageDetailDialog(object):
|
||||
def setupUi(self, SongUsageDetailDialog):
|
||||
@ -60,10 +61,8 @@ class Ui_SongUsageDetailDialog(object):
|
||||
self.FileLineEdit.setObjectName(u'FileLineEdit')
|
||||
self.horizontalLayout.addWidget(self.FileLineEdit)
|
||||
self.SaveFilePushButton = QtGui.QPushButton(self.FileGroupBox)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/general/general_load.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.SaveFilePushButton.setIcon(icon)
|
||||
self.SaveFilePushButton.setIcon(
|
||||
build_icon(u':/general/general_load.png'))
|
||||
self.SaveFilePushButton.setObjectName(u'SaveFilePushButton')
|
||||
self.horizontalLayout.addWidget(self.SaveFilePushButton)
|
||||
self.verticalLayout_4.addLayout(self.horizontalLayout)
|
||||
|
@ -23,7 +23,7 @@
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="AboutDialogLayout">
|
||||
<layout class="QVBoxLayout" name="aboutDialogLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
@ -47,11 +47,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="AboutNotebook">
|
||||
<widget class="QTabWidget" name="aboutNotebook">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="AboutTab">
|
||||
<widget class="QWidget" name="aboutTab">
|
||||
<attribute name="title">
|
||||
<string>About</string>
|
||||
</attribute>
|
||||
@ -63,7 +63,7 @@
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="AboutTextEdit">
|
||||
<widget class="QPlainTextEdit" name="aboutTextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -80,11 +80,11 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="CreditsTab">
|
||||
<widget class="QWidget" name="creditsTab">
|
||||
<attribute name="title">
|
||||
<string>Credits</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="CreditsTabLayout">
|
||||
<layout class="QVBoxLayout" name="creditsTabLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -92,7 +92,7 @@ OpenLP is written and maintained by volunteers. If you would like to see more fr
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="CreditsTextEdit">
|
||||
<widget class="QPlainTextEdit" name="creditsTextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -116,11 +116,11 @@ Testers
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="LicenseTab">
|
||||
<widget class="QWidget" name="licenseTab">
|
||||
<attribute name="title">
|
||||
<string>License</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="LicenseTabLayout">
|
||||
<layout class="QVBoxLayout" name="licenseTabLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
@ -128,7 +128,7 @@ Testers
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="LicenseTextEdit">
|
||||
<widget class="QPlainTextEdit" name="licenseTextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -272,8 +272,8 @@ This General Public License does not permit incorporating your program into prop
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="ButtonWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="ButtonWidgetLayout">
|
||||
<widget class="QWidget" name="buttonWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="buttonWidgetLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
@ -294,7 +294,7 @@ This General Public License does not permit incorporating your program into prop
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ContributeButton">
|
||||
<widget class="QPushButton" name="contributeButton">
|
||||
<property name="text">
|
||||
<string>Contribute</string>
|
||||
</property>
|
||||
@ -305,7 +305,7 @@ This General Public License does not permit incorporating your program into prop
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="CloseButton">
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
@ -326,14 +326,14 @@ This General Public License does not permit incorporating your program into prop
|
||||
</action>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>ContributeButton</tabstop>
|
||||
<tabstop>contributeButton</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../images/openlp-2.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>CloseButton</sender>
|
||||
<sender>closeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutDialog</receiver>
|
||||
<slot>close()</slot>
|
||||
|
Loading…
Reference in New Issue
Block a user