forked from openlp/openlp
More from Operation Cleanup
Fix spelling of Maintenance
This commit is contained in:
parent
2dfbe1dcfc
commit
190a371f56
@ -517,7 +517,7 @@ class Ui_AmendThemeDialog(object):
|
||||
AmendThemeDialog.setTabOrder(self.HorizontalComboBox, self.VerticalComboBox)
|
||||
|
||||
def retranslateUi(self, AmendThemeDialog):
|
||||
AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintance", None, QtGui.QApplication.UnicodeUTF8))
|
||||
AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintenance", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.ThemeNameLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Theme Name:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.BackgroundLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.BackgroundComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Opaque", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
@ -21,10 +21,8 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import Plugin, Event
|
||||
from openlp.core.lib import EventType
|
||||
from forms import EditCustomForm
|
||||
from openlp.core.lib import Plugin, Event, EventType
|
||||
from openlp.plugins.custom.lib import CustomManager, CustomTab, CustomMediaItem, CustomServiceItem
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class Ui_customEditDialog(object):
|
||||
def setupUi(self, customEditDialog):
|
||||
|
@ -19,6 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
from PyQt4 import QtCore, QtGui
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import ServiceItem
|
||||
|
||||
from openlp.plugins.custom.lib import TextListData
|
||||
@ -40,12 +41,12 @@ class CustomServiceItem(ServiceItem):
|
||||
it simply tells the slide controller to use it???
|
||||
|
||||
It contains 1 or more images
|
||||
|
||||
|
||||
"""
|
||||
global log
|
||||
log=logging.getLogger(u'CustomServiceItem')
|
||||
log.info(u'CustomServiceItem loaded')
|
||||
|
||||
|
||||
def __init__(self, controller):
|
||||
"""
|
||||
Init Method
|
||||
@ -58,7 +59,7 @@ class CustomServiceItem(ServiceItem):
|
||||
# c.uniformItemSizes=True
|
||||
# c.setModel(self.imgs)
|
||||
# c.setGeometry(0,0,200,200)
|
||||
|
||||
|
||||
def render(self):
|
||||
"""
|
||||
The render method is what the plugin uses to render its meda to the
|
||||
@ -66,7 +67,7 @@ class CustomServiceItem(ServiceItem):
|
||||
"""
|
||||
# render the "image chooser first"
|
||||
# for f in self.imgs:
|
||||
# fl , nm = os.path.split(str(f))
|
||||
# fl , nm = os.path.split(str(f))
|
||||
# c = self.slide_controller.rowCount()
|
||||
# self.slide_controller.setRowCount(c+1)
|
||||
# twi = QtGui.QTableWidgetItem(str(f))
|
||||
@ -74,7 +75,7 @@ class CustomServiceItem(ServiceItem):
|
||||
# twi = QtGui.QTableWidgetItem(str(nm))
|
||||
# self.slide_controller.setItem(c , 1, twi)
|
||||
# self.slide_controller.setRowHeight(c, 80)
|
||||
|
||||
|
||||
# render the preview screen here
|
||||
|
||||
def get_parent_node(self):
|
||||
@ -83,7 +84,7 @@ class CustomServiceItem(ServiceItem):
|
||||
Manager.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def add(self, data):
|
||||
"""
|
||||
append an image to the list
|
||||
@ -95,7 +96,7 @@ class CustomServiceItem(ServiceItem):
|
||||
log.info("add Item..."+str(data))
|
||||
for filename in data.imgs.get_file_list():
|
||||
self.add(filename)
|
||||
|
||||
|
||||
|
||||
def get_oos_text(self):
|
||||
"""
|
||||
@ -114,4 +115,4 @@ class CustomServiceItem(ServiceItem):
|
||||
files=text.split('\n')
|
||||
for f in files:
|
||||
self.imgs.addRow(f)
|
||||
|
||||
|
||||
|
@ -20,9 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class CustomTab(SettingsTab):
|
||||
"""
|
||||
|
@ -21,11 +21,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import MediaManagerItem
|
||||
from openlp.core.lib import SongXMLParser
|
||||
from openlp.core.lib import ServiceItem
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, SongXMLParser, ServiceItem, translate
|
||||
from openlp.plugins.custom.lib import TextListData
|
||||
|
||||
class CustomList(QtGui.QListView):
|
||||
|
@ -1,55 +1,50 @@
|
||||
import logging
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
|
||||
class TextListData(QAbstractListModel):
|
||||
class TextListData(QtCore.QAbstractListModel):
|
||||
"""
|
||||
An abstract list of strings
|
||||
An abstract list of strings
|
||||
"""
|
||||
global log
|
||||
log=logging.getLogger(u'TextListData')
|
||||
log.info(u'started')
|
||||
|
||||
def __init__(self):
|
||||
QAbstractListModel.__init__(self)
|
||||
QtCore.QAbstractListModel.__init__(self)
|
||||
self.items=[] # will be a list of (database id , title) tuples
|
||||
|
||||
def resetStore(self):
|
||||
#reset list so can be reloaded
|
||||
self.items=[]
|
||||
|
||||
self.items=[]
|
||||
|
||||
def rowCount(self, parent):
|
||||
return len(self.items)
|
||||
|
||||
def insertRow(self, row, id, title):
|
||||
self.beginInsertRows(QModelIndex(),row,row)
|
||||
log.debug("insert row %d:%s for id %d"%(row,title, id))
|
||||
self.beginInsertRows(QtCore.QModelIndex(),row,row)
|
||||
log.debug("insert row %d:%s for id %d" % (row,title, id))
|
||||
self.items.insert(row, (id, title))
|
||||
self.endInsertRows()
|
||||
|
||||
def removeRow(self, row):
|
||||
self.beginRemoveRows(QModelIndex(), row,row)
|
||||
self.beginRemoveRows(QtCore.QModelIndex(), row,row)
|
||||
self.items.pop(row)
|
||||
self.endRemoveRows()
|
||||
|
||||
def addRow(self, id, title):
|
||||
self.insertRow(len(self.items), id, title)
|
||||
|
||||
|
||||
def data(self, index, role):
|
||||
row=index.row()
|
||||
if row > len(self.items): # if the last row is selected and deleted, we then get called with an empty row!
|
||||
return QVariant()
|
||||
if role==Qt.DisplayRole:
|
||||
retval= self.items[row][1]
|
||||
# elif role == Qt.ToolTipRole: #not sure if need as it shows the database row number
|
||||
# retval= self.items[row][0]
|
||||
return QtCore.QVariant()
|
||||
if role == QtCore.Qt.DisplayRole:
|
||||
retval = self.items[row][1]
|
||||
else:
|
||||
retval= QVariant()
|
||||
# log.info("Returning"+ str(retval))
|
||||
if type(retval) is not type(QVariant):
|
||||
return QVariant(retval)
|
||||
retval = QtCore.QVariant()
|
||||
if type(retval) is not type(QtCore.QVariant):
|
||||
return QtCore.QVariant(retval)
|
||||
else:
|
||||
return retval
|
||||
|
||||
@ -60,10 +55,7 @@ class TextListData(QAbstractListModel):
|
||||
def getId(self, index):
|
||||
row = index.row()
|
||||
return self.items[row][0]
|
||||
|
||||
|
||||
def deleteRow(self, index):
|
||||
row = index.row()
|
||||
self.removeRow(row)
|
||||
|
||||
if __name__=="__main__":
|
||||
sxml=TextListData()
|
||||
|
@ -21,14 +21,12 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, Event
|
||||
from openlp.core.lib import EventType
|
||||
|
||||
from openlp.core.lib import Plugin, Event, EventType
|
||||
from openlp.plugins.images.lib import ImageMediaItem, ImageServiceItem
|
||||
|
||||
class ImagePlugin(Plugin):
|
||||
global log
|
||||
log=logging.getLogger(u'ImagePlugin')
|
||||
log = logging.getLogger(u'ImagePlugin')
|
||||
log.info(u'Image Plugin loaded')
|
||||
|
||||
def __init__(self, plugin_helpers):
|
||||
|
@ -22,10 +22,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import MediaManagerItem
|
||||
from openlp.core.lib import ServiceItem
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, ServiceItem, translate
|
||||
from openlp.plugins.images.lib import ListWithPreviews
|
||||
|
||||
class ImageList(QtGui.QListView):
|
||||
|
@ -22,9 +22,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import MediaManagerItem
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import MediaManagerItem, translate
|
||||
|
||||
from openlp.plugins.presentations.lib import FileListData
|
||||
|
||||
|
@ -21,9 +21,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import MediaManagerItem
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import MediaManagerItem, translate
|
||||
|
||||
from openlp.plugins.songs.forms import EditSongForm
|
||||
|
||||
|
@ -20,9 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core import translate
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class SongsTab(SettingsTab):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user