Start of about Text

bzr-revno: 583
This commit is contained in:
Tim Bentley 2009-10-02 05:42:56 +01:00
commit 3fc5e76fac
11 changed files with 57 additions and 4 deletions

View File

@ -149,6 +149,14 @@ class Plugin(object):
"""
return True
def can_be_disabled(self):
"""
Indicates whether the plugin can be disabled by the plugin list.
Returns True or False.
"""
return False
def get_media_manager_item(self):
"""
Construct a MediaManagerItem object with all the buttons and things

View File

@ -48,6 +48,8 @@ class PluginForm(QtGui.QDialog):
QtCore.QObject.connect(self.ButtonBox,
QtCore.SIGNAL(u'accepted()'), PluginForm.close)
QtCore.QMetaObject.connectSlotsByName(PluginForm)
QtCore.QObject.connect(self.PluginViewList,
QtCore.SIGNAL(u'itemDoubleClicked(QTableWidgetItem*)'), self.displayAbout)
def retranslateUi(self, PluginForm):
PluginForm.setWindowTitle(translate(u'PluginForm', u'Plugin list'))
@ -62,15 +64,16 @@ class PluginForm(QtGui.QDialog):
"""
Load the plugin details into the screen
"""
#self.PluginViewList.clear()
self.PluginViewList.setRowCount(0)
for plugin in self.parent.plugin_manager.plugins:
row = self.PluginViewList.rowCount()
self.PluginViewList.setRowCount(row + 1)
item1 = QtGui.QTableWidgetItem(plugin.name)
item1.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
item1.setTextAlignment(QtCore.Qt.AlignVCenter)
item2 = QtGui.QTableWidgetItem(plugin.version)
item2.setTextAlignment(QtCore.Qt.AlignVCenter)
item2.setFlags(QtCore.Qt.ItemIsSelectable)
if plugin.status == PluginStatus.Active:
item3 = QtGui.QTableWidgetItem(
translate(u'PluginForm', u'Active'))
@ -78,8 +81,21 @@ class PluginForm(QtGui.QDialog):
item3 = QtGui.QTableWidgetItem(
translate(u'PluginForm', u'Inactive'))
item3.setTextAlignment(QtCore.Qt.AlignVCenter)
item3.setFlags(QtCore.Qt.ItemIsSelectable)
self.PluginViewList.setItem(row, 0, item1)
self.PluginViewList.setItem(row, 1, item2)
self.PluginViewList.setItem(row, 2, item3)
self.PluginViewList.setRowHeight(row, 15)
def displayAbout(self, item):
if item is None:
return False
row = self.PluginViewList.row(item)
text = self.parent.plugin_manager.plugins[row].about()
if text is not None:
ret = QtGui.QMessageBox.information(self,
translate(u'PluginList', u'Plugin Information'),
translate(u'PluginList', text),
QtGui.QMessageBox.StandardButtons(
QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)

View File

@ -35,7 +35,7 @@ from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \
class ServiceManagerList(QtGui.QTreeWidget):
def __init__(self,parent=None,name=None):
QtGui.QListView.__init__(self,parent)
QtGui.QTreeWidget.__init__(self,parent)
self.parent = parent
def keyPressEvent(self, event):
@ -402,7 +402,7 @@ class ServiceManager(QtGui.QWidget):
name = filename.split(os.path.sep)
self.serviceName = name[-1]
self.parent.serviceChanged(True, self.serviceName)
def onQuickSaveService(self):
self.onSaveService(True)

View File

@ -185,3 +185,6 @@ class AuditPlugin(Plugin):
def onAuditReport(self):
self.auditdetailform.exec_()
def about(self):
return u'<b>Audit Plugin</b> <br>This plugin records the use of songs and when they have been used during a live service'

View File

@ -70,3 +70,5 @@ class BiblePlugin(Plugin):
def onBibleNewClick(self):
self.media_item.onBibleNewClick()
def about(self):
return u'<b>Bible Plugin</b> <br>This plugin allows bible verse from different sources to be displayed on the screen during the service.<br><br>This is a core plugin and cannot be made inactive</b>'

View File

@ -56,3 +56,6 @@ class CustomPlugin(Plugin):
# Create the CustomManagerItem object
self.media_item = CustomMediaItem(self, self.icon, u'Custom Slides')
return self.media_item
def about(self):
return u'<b>Custom Plugin</b> <br>This plugin allows slides to be displayed on the screen in the same way songs are. The difference between this plugin and songs is this plugin provides greater freedom.<br><br>This is a core plugin and cannot be made inactive</b>'

View File

@ -47,3 +47,6 @@ class ImagePlugin(Plugin):
# Create the MediaManagerItem object
self.media_item = ImageMediaItem(self, self.icon, u'Images')
return self.media_item
def about(self):
return u'<b>Image Plugin</b><br>Allows images of all types to be displayed. If a number of images are selected together and presented on the live controller it is possible to turn them into a timed loop.<br> From the plugin if the <i>Override background</i> is chosen and an image is selected any somgs which are rendered will use the selected image from the background instead of the one provied by the theme.<br>'

View File

@ -44,3 +44,6 @@ class MediaPlugin(Plugin):
# Create the MediaManagerItem object
self.media_item = MediaMediaItem(self, self.icon, u'Media')
return self.media_item
def about(self):
return u'<b>Media Plugin</b> <br> One day this may provide access to video and audio clips'

View File

@ -101,3 +101,6 @@ class PresentationPlugin(Plugin):
controller = self.controllers[key]
if controller.enabled:
controller.kill()
def about(self):
return u'<b>Presentation Plugin</b> <br> Delivers the ability to show presentations using a number of different programs. The choice of available presentaion programs is available in a drop down.'

View File

@ -21,7 +21,7 @@ import logging
from PyQt4 import QtNetwork, QtCore
from openlp.core.lib import Plugin, Receiver
from openlp.core.lib import Plugin, Receiver, translate
from openlp.plugins.remotes.lib import RemoteTab
class RemotesPlugin(Plugin):
@ -35,6 +35,9 @@ class RemotesPlugin(Plugin):
Plugin.__init__(self, u'Remotes', u'1.9.0', plugin_helpers)
self.weight = -1
def can_be_disabled(self):
return True
def check_pre_conditions(self):
"""
Check to see if remotes is required
@ -52,6 +55,12 @@ class RemotesPlugin(Plugin):
QtCore.QObject.connect(self.server,
QtCore.SIGNAL(u'readyRead()'), self.readData)
def finalise(self):
pass
def about(self):
return u'<b>Remote Plugin</b> <br>This plugin provides the ability to send messages to a running version of openlp on a different computer.<br> The Primary use for this would be to send alerts from a creche'
def get_settings_tab(self):
"""
Create the settings Tab

View File

@ -159,3 +159,6 @@ class SongsPlugin(Plugin):
def onExportOpenSongItemClicked(self):
self.opensong_export_form.show()
def about(self):
return u'<b>Song Plugin</b> <br>This plugin allows Songs to be managed and displayed.<br><br>This is a core plugin and cannot be made inactive</b>'