forked from openlp/openlp
head
This commit is contained in:
commit
1a8ad648ad
@ -54,7 +54,17 @@ def file_to_xml(xmlfile):
|
|||||||
``xmlfile``
|
``xmlfile``
|
||||||
The name of the file.
|
The name of the file.
|
||||||
"""
|
"""
|
||||||
return open(xmlfile).read()
|
file = None
|
||||||
|
xml = None
|
||||||
|
try:
|
||||||
|
file = open(xmlfile, u'r')
|
||||||
|
xml = file.read()
|
||||||
|
except IOError:
|
||||||
|
log.exception(u'Failed to open XML file')
|
||||||
|
finally:
|
||||||
|
if file:
|
||||||
|
file.close()
|
||||||
|
return xml
|
||||||
|
|
||||||
def str_to_bool(stringvalue):
|
def str_to_bool(stringvalue):
|
||||||
"""
|
"""
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib.toolbar import *
|
|
||||||
|
|
||||||
class BaseListWithDnD(QtGui.QListWidget):
|
class BaseListWithDnD(QtGui.QListWidget):
|
||||||
"""
|
"""
|
||||||
Please put a short description of what this class does in here.
|
Please put a short description of what this class does in here.
|
||||||
|
@ -125,3 +125,15 @@ class OpenLPToolbar(QtGui.QToolBar):
|
|||||||
"""
|
"""
|
||||||
for widget in widgets:
|
for widget in widgets:
|
||||||
self.actions[widget].setVisible(True)
|
self.actions[widget].setVisible(True)
|
||||||
|
|
||||||
|
def addPushButton(self, imageFile=None, text=u''):
|
||||||
|
"""
|
||||||
|
Adds a push button to the toolbar.
|
||||||
|
|
||||||
|
Returns the push button
|
||||||
|
"""
|
||||||
|
pushButton = QtGui.QPushButton(buildIcon(imageFile), text)
|
||||||
|
pushButton.setCheckable(True)
|
||||||
|
pushButton.setFlat(True)
|
||||||
|
self.addWidget(pushButton)
|
||||||
|
return pushButton
|
@ -31,7 +31,7 @@ class AlertForm(QtGui.QDialog):
|
|||||||
log = logging.getLogger(u'AlertForm')
|
log = logging.getLogger(u'AlertForm')
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
QtGui.QDialog.__init__(self, None)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
log.debug(u'Defined')
|
log.debug(u'Defined')
|
||||||
|
@ -120,8 +120,6 @@ class Ui_AmendThemeDialog(object):
|
|||||||
self.ImageToolButton.setObjectName(u'ImageToolButton')
|
self.ImageToolButton.setObjectName(u'ImageToolButton')
|
||||||
self.horizontalLayout_2.addWidget(self.ImageToolButton)
|
self.horizontalLayout_2.addWidget(self.ImageToolButton)
|
||||||
self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.ImageFilenameWidget)
|
self.BackgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.ImageFilenameWidget)
|
||||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
#self.BackgroundLayout.addItem(spacerItem, 7, 1, 1, 1)
|
|
||||||
self.ThemeTabWidget.addTab(self.BackgroundTab, u'')
|
self.ThemeTabWidget.addTab(self.BackgroundTab, u'')
|
||||||
self.FontMainTab = QtGui.QWidget()
|
self.FontMainTab = QtGui.QWidget()
|
||||||
self.FontMainTab.setObjectName(u'FontMainTab')
|
self.FontMainTab.setObjectName(u'FontMainTab')
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import translate, PluginStatus
|
from openlp.core.lib import translate, PluginStatus, buildIcon
|
||||||
|
|
||||||
class PluginForm(QtGui.QDialog):
|
class PluginForm(QtGui.QDialog):
|
||||||
global log
|
global log
|
||||||
log = logging.getLogger(u'PluginForm')
|
log = logging.getLogger(u'PluginForm')
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
QtGui.QDialog.__init__(self, None)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
log.debug(u'Defined')
|
log.debug(u'Defined')
|
||||||
@ -24,6 +24,8 @@ class PluginForm(QtGui.QDialog):
|
|||||||
def setupUi(self, PluginForm):
|
def setupUi(self, PluginForm):
|
||||||
PluginForm.setObjectName(u'PluginForm')
|
PluginForm.setObjectName(u'PluginForm')
|
||||||
PluginForm.resize(400, 568)
|
PluginForm.resize(400, 568)
|
||||||
|
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||||
|
PluginForm.setWindowIcon(icon)
|
||||||
self.PluginViewList = QtGui.QTableWidget(PluginForm)
|
self.PluginViewList = QtGui.QTableWidget(PluginForm)
|
||||||
self.PluginViewList.setGeometry(QtCore.QRect(20, 10, 371, 261))
|
self.PluginViewList.setGeometry(QtCore.QRect(20, 10, 371, 261))
|
||||||
self.PluginViewList.setObjectName(u'PluginViewList')
|
self.PluginViewList.setObjectName(u'PluginViewList')
|
||||||
@ -59,7 +61,7 @@ class PluginForm(QtGui.QDialog):
|
|||||||
QtCore.SIGNAL(u'accepted()'), PluginForm.close)
|
QtCore.SIGNAL(u'accepted()'), PluginForm.close)
|
||||||
QtCore.QMetaObject.connectSlotsByName(PluginForm)
|
QtCore.QMetaObject.connectSlotsByName(PluginForm)
|
||||||
QtCore.QObject.connect(self.PluginViewList,
|
QtCore.QObject.connect(self.PluginViewList,
|
||||||
QtCore.SIGNAL(u'itemDoubleClicked(QTableWidgetItem*)'), self.displayAbout)
|
QtCore.SIGNAL(u'itemClicked(QTableWidgetItem*)'), self.displayAbout)
|
||||||
|
|
||||||
def retranslateUi(self, PluginForm):
|
def retranslateUi(self, PluginForm):
|
||||||
PluginForm.setWindowTitle(translate(u'PluginForm', u'Plugin list'))
|
PluginForm.setWindowTitle(translate(u'PluginForm', u'Plugin list'))
|
||||||
|
@ -131,10 +131,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.onSlideSelectedLast)
|
self.onSlideSelectedLast)
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
self.Toolbar.addToolbarButton(u'Close Screen',
|
self.blackPushButton = self.Toolbar.addPushButton(
|
||||||
u':/slides/slide_close.png',
|
u':/slides/slide_close.png')
|
||||||
translate(u'SlideController', u'Close Screen'),
|
|
||||||
self.onBlankScreen)
|
|
||||||
if not self.isLive:
|
if not self.isLive:
|
||||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
self.Toolbar.addToolbarButton(u'Go Live',
|
self.Toolbar.addToolbarButton(u'Go Live',
|
||||||
@ -190,6 +188,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.QObject.connect(self.PreviewListWidget,
|
QtCore.QObject.connect(self.PreviewListWidget,
|
||||||
QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
|
QtCore.SIGNAL(u'activated(QModelIndex)'), self.onSlideSelected)
|
||||||
if isLive:
|
if isLive:
|
||||||
|
QtCore.QObject.connect(self.blackPushButton,
|
||||||
|
QtCore.SIGNAL(u'toggled(bool)'), self.onBlankScreen)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'update_spin_delay'), self.receiveSpinDelay)
|
QtCore.SIGNAL(u'update_spin_delay'), self.receiveSpinDelay)
|
||||||
Receiver().send_message(u'request_spin_delay')
|
Receiver().send_message(u'request_spin_delay')
|
||||||
@ -337,7 +337,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
row = self.PreviewListWidget.currentRow()
|
row = self.PreviewListWidget.currentRow()
|
||||||
if row > -1 and row < self.PreviewListWidget.rowCount():
|
if row > -1 and row < self.PreviewListWidget.rowCount():
|
||||||
label = self.PreviewListWidget.cellWidget(row, 0)
|
#label = self.PreviewListWidget.cellWidget(row, 0)
|
||||||
frame = self.serviceitem.frames[row][u'image']
|
frame = self.serviceitem.frames[row][u'image']
|
||||||
before = time.time()
|
before = time.time()
|
||||||
if frame is None:
|
if frame is None:
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SettingsTab, translate
|
from openlp.core.lib import SettingsTab, translate
|
||||||
|
Loading…
Reference in New Issue
Block a user