openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00753
[Merge] lp:~openlp-core/openlp/video into lp:openlp
Tim Bentley has proposed merging lp:~openlp-core/openlp/video into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Lets see what this looks like.
Cleaned up the video tree and brought it up to date.
Made the Plugin work like the others
Added Toolbar options for live
Play , Pause , Stop work
New track plays the original.
--
https://code.launchpad.net/~openlp-core/openlp/video/+merge/14288
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2009-10-25 16:26:03 +0000
+++ openlp/core/lib/__init__.py 2009-11-01 19:45:24 +0000
@@ -137,7 +137,7 @@
from mediamanageritem import MediaManagerItem
from xmlrootclass import XmlRootClass
from serviceitem import ServiceItem
-from serviceitem import ServiceType
+from serviceitem import ServiceItemType
from serviceitem import ServiceItem
from toolbar import OpenLPToolbar
from dockwidget import OpenLPDockWidget
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2009-10-31 20:27:08 +0000
+++ openlp/core/lib/mediamanageritem.py 2009-11-01 19:45:24 +0000
@@ -388,7 +388,8 @@
if self.ServiceItemIconName is not None:
service_item.addIcon(self.ServiceItemIconName)
else:
- service_item.addIcon(self.icon)
+ service_item.addIcon(
+ u':/media/media_' + self.PluginNameShort.lower() + u'.png')
if self.generateSlideData(service_item):
self.ListView.clearSelection()
return service_item
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2009-10-29 09:18:26 +0000
+++ openlp/core/lib/serviceitem.py 2009-11-01 19:45:24 +0000
@@ -30,13 +30,14 @@
from openlp.core.lib import buildIcon
-class ServiceType(object):
+class ServiceItemType(object):
"""
Defines the type of service item
"""
Text = 1
Image = 2
Command = 3
+ Video = 4
class ServiceItem(object):
"""
@@ -91,7 +92,7 @@
"""
log.debug(u'Render called')
self.frames = []
- if self.service_item_type == ServiceType.Text:
+ if self.service_item_type == ServiceItemType.Text:
log.debug(u'Formatting slides')
if self.theme is None:
self.RenderManager.set_override_theme(None)
@@ -109,9 +110,9 @@
self.frames.append({u'title': title, u'text': lines,
u'image': frame})
log.info(u'Formatting took %4s' % (time.time() - before))
- elif self.service_item_type == ServiceType.Command:
+ elif self.service_item_type == ServiceItemType.Command:
self.frames = self.service_frames
- elif self.service_item_type == ServiceType.Image:
+ elif self.service_item_type == ServiceItemType.Image:
for slide in self.service_frames:
slide[u'image'] = \
self.RenderManager.resize_image(slide[u'image'])
@@ -148,10 +149,16 @@
``image``
The actual image file name.
"""
- self.service_item_type = ServiceType.Image
- self.service_item_path = path
- self.service_frames.append(
- {u'title': frame_title, u'text':None, u'image': image})
+ self.service_item_type = ServiceItemType.Image
+ self.service_item_path = path
+ self.service_frames.append(
+ {u'title': frame_title, u'text': None, u'image': image})
+
+ def add_from_media(self, path, frame_title, image):
+ self.service_item_type = ServiceItemType.Video
+ self.service_item_path = path
+ self.service_frames.append(
+ {u'title': frame_title, u'text': None, u'image': image})
def add_from_text(self, frame_title, raw_slide):
"""
@@ -163,7 +170,7 @@
``raw_slide``
The raw text of the slide.
"""
- self.service_item_type = ServiceType.Text
+ self.service_item_type = ServiceItemType.Text
frame_title = frame_title.split(u'\n')[0]
self.service_frames.append(
{u'title': frame_title, u'raw_slide': raw_slide})
@@ -178,7 +185,7 @@
``command``
The command of/for the slide.
"""
- self.service_item_type = ServiceType.Command
+ self.service_item_type = ServiceItemType.Command
self.service_item_path = path
self.service_frames.append(
{u'title': frame_title, u'command': None, u'text':None, u'image': image})
@@ -199,13 +206,16 @@
u'audit':self.audit
}
service_data = []
- if self.service_item_type == ServiceType.Text:
+ if self.service_item_type == ServiceItemType.Text:
for slide in self.service_frames:
service_data.append(slide)
- elif self.service_item_type == ServiceType.Image:
- for slide in self.service_frames:
- service_data.append(slide[u'title'])
- elif self.service_item_type == ServiceType.Command:
+ elif self.service_item_type == ServiceItemType.Image:
+ for slide in self.service_frames:
+ service_data.append(slide[u'title'])
+ elif self.service_item_type == ServiceItemType.Command:
+ for slide in self.service_frames:
+ service_data.append(slide[u'title'])
+ elif self.service_item_type == ServiceItemType.Video:
for slide in self.service_frames:
service_data.append(slide[u'title'])
return {u'header': service_header, u'data': service_data}
@@ -230,15 +240,17 @@
self.addIcon(header[u'icon'])
self.raw_footer = header[u'footer']
self.audit = header[u'audit']
- if self.service_item_type == ServiceType.Text:
+ if self.service_item_type == ServiceItemType.Text:
for slide in serviceitem[u'serviceitem'][u'data']:
self.service_frames.append(slide)
- elif self.service_item_type == ServiceType.Image:
+ elif self.service_item_type == ServiceItemType.Image:
for text_image in serviceitem[u'serviceitem'][u'data']:
filename = os.path.join(path, text_image)
real_image = QtGui.QImage(unicode(filename))
self.add_from_image(path, text_image, real_image)
- elif self.service_item_type == ServiceType.Command:
+ elif self.service_item_type == ServiceItemType.Command:
for text_image in serviceitem[u'serviceitem'][u'data']:
filename = os.path.join(path, text_image)
self.add_from_command(path, text_image)
+ elif self.service_item_type == ServiceItemType.Video:
+ pass
=== modified file 'openlp/core/resources.py'
--- openlp/core/resources.py 2009-09-17 18:24:13 +0000
+++ openlp/core/resources.py 2009-11-01 19:45:24 +0000
@@ -1,26 +1,11 @@
# -*- coding: utf-8 -*-
-# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
-###############################################################################
-# OpenLP - Open Source Lyrics Projection #
-# --------------------------------------------------------------------------- #
-# Copyright (c) 2008-2009 Raoul Snyman #
-# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
-# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
-# --------------------------------------------------------------------------- #
-# 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 #
-###############################################################################
+# Resource object code
+#
+# Created: Sun Nov 1 18:56:53 2009
+# by: The Resource Compiler for PyQt (Qt v4.5.2)
+#
+# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
@@ -54130,6 +54115,40 @@
\x1f\x00\xf7\xed\xe4\x0a\x00\x92\x24\x02\x70\x1c\xc7\x3f\xb4\x2c\
\x21\xd5\x80\x04\x87\x89\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\
\x60\x82\
+\x00\x00\x01\xf3\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x10\x00\x00\x00\x10\x08\x04\x00\x00\x00\xb5\xfa\x37\xea\
+\x00\x00\x00\x02\x73\x42\x49\x54\x08\x08\x55\xec\x46\x04\x00\x00\
+\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\x01\x3a\
+\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\
+\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\
+\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\x72\x49\x44\x41\x54\
+\x28\xcf\x45\x91\x4f\x2b\x04\x71\x1c\xc6\xbf\xf3\x32\xe4\x6c\xde\
+\x80\xa2\x44\x39\xbb\xec\x1f\xb3\x23\x6d\x9b\x25\x8b\x10\xfd\x76\
+\x36\xec\xa2\x31\x89\x13\x0e\x2e\xca\xfb\x98\x4d\x7b\xf0\x12\xb4\
+\x85\x83\x36\x17\x97\xb1\xa2\xe9\x47\xfd\x0e\x63\xb6\x8f\x83\xb5\
+\x9e\xe7\xf6\xf4\xf4\x1c\x9e\x8f\x20\xbf\x3e\xb1\x8f\x83\x20\xf4\
+\x23\x3f\x0a\xc2\xe3\xe0\xc4\xfe\xcb\x05\x41\x7c\xeb\x50\xd5\x4d\
+\x95\x1a\x3e\x3e\x35\xaa\xd4\xcd\xa1\xf2\xad\x7e\xa1\x61\xd5\x9b\
+\xdb\xec\xd2\xa2\xcd\x13\x1d\x1e\x68\xb1\xc3\x36\xf5\x66\xc3\x42\
+\x04\xf1\xd4\x06\x17\xdc\xf3\x4a\xcc\x27\x5f\x68\xde\x78\xe6\x9c\
+\x0d\x3c\x85\x88\xb2\x37\x8d\xc7\x23\x1f\x18\xbe\xe9\xd1\x23\x25\
+\x41\xf3\x42\x8d\x4d\xa3\x6c\x59\x0f\x16\xb9\xe5\x1d\xc3\x15\x67\
+\x1c\xa0\xd8\x42\x91\xa2\x69\xb3\xc8\xfa\x91\x54\xc2\x15\xee\xd0\
+\xa4\x5c\xd2\xa0\x82\x4b\x8e\x59\x20\xa1\xcb\x1a\x95\x50\xca\x91\
+\x47\x9b\x98\x94\x3d\x96\xc9\x31\xc5\x38\xd3\x40\x4a\xcc\x3e\xe5\
+\x48\x4a\x51\x95\x47\x34\x3d\xb2\x8c\x32\x84\x30\xc4\x28\xd0\x43\
+\x73\x40\x29\x92\x62\x58\xee\x2f\xb8\x4c\x30\xc2\x30\x23\x4c\xf4\
+\x17\x96\x29\x86\x52\x0c\x1c\x6e\xe8\x92\xb0\xc4\x0c\x93\x8c\x31\
+\xc9\x0c\x90\xd0\xc1\xa1\x78\x24\xf3\x76\xc1\xac\xf2\x8c\x26\xe5\
+\x5f\x29\x1a\x8f\x82\x99\xb7\x05\x71\x55\x96\x53\x5e\xd0\x24\xa4\
+\x83\x1f\xae\xc9\xe2\x2a\x44\x90\x39\xcb\x6d\x66\x58\xa3\x4d\x97\
+\x18\x4d\x4c\x87\x2a\x19\xdc\xe6\x9c\xd5\x87\xe5\x5a\x8e\xca\x9b\
+\x0c\x25\x76\xd8\x63\x81\x0c\x79\xe3\x28\xd7\x1a\xd0\x44\x90\x82\
+\xed\x04\xf9\x30\x17\xe5\xa2\x7c\xe8\x04\x85\x01\xee\x1f\x8d\x42\
+\x66\xb3\xf5\x8b\xfe\x99\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\
+\x60\x82\
\x00\x00\x02\x9a\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -54174,6 +54193,40 @@
\x84\xde\x6f\x14\xfa\x92\x5a\xc4\x3c\x0e\xef\xe8\x85\x5d\xbd\x1f\
\x0f\xfc\x9d\xff\x00\x31\x95\xf8\x05\x21\xa4\x9a\x59\x00\x00\x00\
\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x01\xf5\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x10\x00\x00\x00\x10\x08\x04\x00\x00\x00\xb5\xfa\x37\xea\
+\x00\x00\x00\x02\x73\x42\x49\x54\x08\x08\x55\xec\x46\x04\x00\x00\
+\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\x01\x3a\
+\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\
+\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\
+\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\x74\x49\x44\x41\x54\
+\x18\x19\x05\xc1\x41\x4b\x53\x01\x1c\x00\xf0\xff\x3b\xf5\x11\xea\
+\xda\xa1\x7d\x84\x2e\x5d\x3c\x46\x17\x75\x6d\xb3\x18\x96\x42\x9a\
+\xa8\x20\x6f\x13\x6b\x96\xcc\x87\xe8\xcd\xba\x74\xea\x63\x04\x6f\
+\x84\x41\x5f\xa0\xa8\x41\x79\x08\xf1\xe2\x65\x19\xc5\x7a\x06\xef\
+\x30\xde\xf8\xf5\xfb\x85\x10\x42\x1c\xd6\x0e\xb2\x2c\xef\x8f\xfa\
+\xa3\x2c\x3f\xc8\x0e\x6b\x42\x08\x11\x42\xf4\x93\xbd\xb4\x57\x76\
+\x6c\xeb\xeb\xdb\xd6\xd1\x2b\xf7\xd2\x7e\x22\x44\x88\xdd\xa4\x37\
+\xd8\xf2\xcc\x89\xa1\x1f\xce\x7c\x77\x62\xc7\x96\xde\x60\x37\x11\
+\x21\xba\xe9\x86\x57\xbe\xf9\x69\xec\xca\x3f\x85\x5f\xce\x1d\xdb\
+\xd0\x4d\x45\xa4\xb5\xcd\xb2\xeb\xd4\x1f\xa5\x77\xae\x4c\x55\x26\
+\x0a\x17\xb6\x6d\x96\x69\x2d\xd6\xb3\x65\x1f\xfd\x56\x9a\x3a\x76\
+\xe4\x2b\xa8\x14\x86\x96\xad\xef\xc7\x4a\xbe\xea\x8b\x42\x85\x3d\
+\xab\x1e\x78\xed\x0a\x13\x97\xd6\xac\xe4\xb1\x34\xea\x1a\x1a\xab\
+\xb0\x6a\xde\x8c\x19\x8f\x7c\x56\x19\x7b\x61\x69\x14\x8b\xa3\x8e\
+\x53\x85\x29\x6e\xbb\xee\x9a\x5b\xee\xfb\x64\xaa\xf0\xd2\xe2\x28\
+\xda\xf9\x92\xa1\xb1\x0a\x77\xdc\x74\x43\xc7\x5f\x54\xc6\x9e\x68\
+\xe7\xd1\xce\x1a\xde\xbb\x34\xc1\x3d\x77\x7d\x00\x4c\x9c\x69\x68\
+\xef\xc7\xc3\x5a\xb3\x7c\xea\x5c\xa1\xf2\x46\x01\xa8\x14\xba\x9a\
+\xe5\xc3\x5a\x88\x56\x3a\xe7\xc8\x85\xc2\x44\x65\xaa\x32\x51\x78\
+\x6b\x4e\x2b\x15\x21\x16\x92\xd6\x60\xd6\x9a\xa1\x4b\x63\x85\xb1\
+\x33\x1d\xb3\x5a\x83\x85\x44\x84\x10\xad\xa4\x91\xd6\xcb\x59\x8b\
+\x76\x3c\xf7\xd8\xac\x7a\xd9\x48\x5b\x89\x10\x21\x84\x10\xcd\x5a\
+\x23\xab\xe7\xf3\xa3\xf9\x51\x3d\x6f\x64\xcd\x9a\x10\x42\xfc\x07\
+\x7b\x2d\x6e\x9f\x2f\x2d\x37\x8c\x00\x00\x00\x00\x49\x45\x4e\x44\
+\xae\x42\x60\x82\
\x00\x00\x02\x8d\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -54305,6 +54358,39 @@
\x9b\xfc\x8b\x0a\x04\x36\x0b\x91\x40\xaa\x9b\x96\x7a\xa2\x23\xcc\
\x94\x59\x40\x16\x25\x00\xf8\x0f\x80\xa0\xff\x98\xbb\x5a\x5b\x51\
\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x01\xe4\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x10\x00\x00\x00\x10\x08\x04\x00\x00\x00\xb5\xfa\x37\xea\
+\x00\x00\x00\x02\x73\x42\x49\x54\x08\x08\x55\xec\x46\x04\x00\x00\
+\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\x01\x3a\
+\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\
+\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\
+\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x01\x63\x49\x44\x41\x54\
+\x28\xcf\x45\x91\xbd\x4a\xc3\x60\x14\x86\x4f\xae\xc3\xcd\x21\x97\
+\xe0\xec\x2e\x52\x0d\x69\x44\x4a\xb5\x05\xff\xd0\x42\xf9\x9a\x62\
+\xad\x3f\xc4\x20\x75\xd3\xc1\x49\xbc\x8f\x14\x71\xf0\x12\xa4\xa0\
+\x0e\x52\x5c\x5c\x62\x45\x09\x9f\xc2\x37\xc4\xaf\x3c\x0e\xc6\x7a\
+\xde\xe1\x81\xc3\xe1\x1d\xce\x23\xc8\x6f\x7a\xee\x49\x1c\x27\x51\
+\x1a\xa5\x71\x72\x12\xf7\xdc\xbf\xbd\x20\x48\xe4\x1c\xa9\xae\x69\
+\xd1\x26\x22\xa2\x4d\x8b\xae\x39\x52\x91\x53\x1c\xec\x3b\xdd\x7e\
+\x93\x0e\x37\x0c\x78\x62\xc8\x03\x37\xec\xd2\xa4\xdb\xdf\x77\x10\
+\x41\x42\xb5\xc3\x39\xf7\xbc\x92\xf1\xc9\x17\x9a\x37\x9e\x39\x63\
+\x87\x50\x21\xa2\xdc\x86\x09\x79\xe4\x03\xc3\x37\x63\xc6\x58\x72\
+\x34\x2f\xb4\x69\x18\xe5\xca\x76\x5c\xe7\x96\x77\x0c\x97\xf4\x00\
+\xe8\x50\xc7\xa2\x19\x50\x67\xfb\x58\xd6\x93\x0d\xee\xd0\x58\x2e\
+\x68\x00\xd0\x64\x16\xc8\x19\xb1\xc5\x7a\x22\xb5\x34\x64\x40\x86\
+\xa5\xc3\x1c\x00\x35\xa6\x01\x4b\xc6\x01\xb5\x54\xaa\x69\x8b\x47\
+\x34\x63\xe6\x11\x80\x82\x63\x34\x87\x54\x53\xa9\x24\xb5\xa2\xc1\
+\x63\x0a\xa0\xa0\x25\x63\x8d\x4a\x22\x95\xd8\xe7\x9a\x11\x39\x2b\
+\xcc\x00\x14\xcc\x19\xe2\x53\x39\x96\x65\xb7\x6c\x36\x79\x46\x63\
+\xf9\x1f\x8b\x26\xa4\x6c\x96\x5d\x41\x02\xb5\xc0\x29\x2f\x68\x72\
+\xec\xe4\x0f\x57\x2c\x10\x28\x44\x90\x25\x27\xe8\x97\xd8\x62\xc0\
+\x88\x0c\x4d\xc6\x90\x16\x25\x82\xfe\x92\x53\xc8\x0a\x1c\x5f\x79\
+\xa6\x44\x95\x5d\xf6\x58\xa5\x84\x67\x7c\x15\x38\x13\x9b\x08\x52\
+\x76\xfd\xd8\x4b\x16\xd3\xc5\xd4\x4b\xfc\xb8\x3c\xd1\xfd\x03\x12\
+\x89\x6f\x33\xf6\x68\xda\x37\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
+\x42\x60\x82\
\x00\x00\x02\x00\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -54904,10 +54990,20 @@
\x0b\xa5\xa8\xe7\
\x00\x65\
\x00\x78\x00\x70\x00\x6f\x00\x72\x00\x74\x00\x5f\x00\x6c\x00\x6f\x00\x61\x00\x64\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x17\
+\x05\x96\x0e\x47\
+\x00\x6d\
+\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x70\x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x5f\x00\x73\x00\x74\
+\x00\x6f\x00\x70\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x0e\
\x0d\x52\x2d\x87\
\x00\x73\
\x00\x6c\x00\x69\x00\x64\x00\x65\x00\x5f\x00\x6c\x00\x61\x00\x73\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x18\
+\x07\xc2\xc7\xc7\
+\x00\x6d\
+\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x70\x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x5f\x00\x73\x00\x74\
+\x00\x61\x00\x72\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x0f\
\x06\xf0\x05\xe7\
\x00\x73\
@@ -54920,6 +55016,11 @@
\x09\xc3\x0b\x87\
\x00\x73\
\x00\x6c\x00\x69\x00\x64\x00\x65\x00\x5f\x00\x63\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x18\
+\x03\xc5\xdf\x87\
+\x00\x6d\
+\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x70\x00\x6c\x00\x61\x00\x79\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x5f\x00\x70\x00\x61\
+\x00\x75\x00\x73\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x12\
\x04\xc0\x24\x27\
\x00\x73\
@@ -54942,15 +55043,15 @@
qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x11\x00\x00\x00\x01\
-\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x66\
-\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x62\
-\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x5a\
-\x00\x00\x00\x5c\x00\x02\x00\x00\x00\x14\x00\x00\x00\x46\
-\x00\x00\x00\x4c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x44\
-\x00\x00\x01\x12\x00\x02\x00\x00\x00\x02\x00\x00\x00\x42\
-\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x3f\
-\x00\x00\x00\x6c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x3d\
-\x00\x00\x00\x12\x00\x02\x00\x00\x00\x05\x00\x00\x00\x38\
+\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x69\
+\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x65\
+\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x5d\
+\x00\x00\x00\x5c\x00\x02\x00\x00\x00\x14\x00\x00\x00\x49\
+\x00\x00\x00\x4c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x47\
+\x00\x00\x01\x12\x00\x02\x00\x00\x00\x02\x00\x00\x00\x45\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x42\
+\x00\x00\x00\x6c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x40\
+\x00\x00\x00\x12\x00\x02\x00\x00\x00\x08\x00\x00\x00\x38\
\x00\x00\x00\xb4\x00\x02\x00\x00\x00\x05\x00\x00\x00\x33\
\x00\x00\x00\xf0\x00\x02\x00\x00\x00\x0a\x00\x00\x00\x29\
\x00\x00\x00\x94\x00\x02\x00\x00\x00\x02\x00\x00\x00\x27\
@@ -54997,16 +55098,19 @@
\x00\x00\x06\xd0\x00\x00\x00\x00\x00\x01\x00\x02\xfc\x9c\
\x00\x00\x06\xf6\x00\x00\x00\x00\x00\x01\x00\x02\xff\x14\
\x00\x00\x06\x8a\x00\x00\x00\x00\x00\x01\x00\x02\xf6\x21\
-\x00\x00\x0f\x0e\x00\x00\x00\x00\x00\x01\x00\x0d\x34\xdc\
-\x00\x00\x0e\xa4\x00\x00\x00\x00\x00\x01\x00\x0d\x2d\x07\
-\x00\x00\x0e\xc8\x00\x00\x00\x00\x00\x01\x00\x0d\x2f\x98\
-\x00\x00\x0e\xea\x00\x00\x00\x00\x00\x01\x00\x0d\x31\xab\
+\x00\x00\x0f\x78\x00\x00\x00\x00\x00\x01\x00\x0d\x38\xcc\
+\x00\x00\x0f\xae\x00\x00\x00\x00\x00\x01\x00\x0d\x3a\xb4\
\x00\x00\x0e\x82\x00\x00\x00\x00\x00\x01\x00\x0d\x2a\x69\
+\x00\x00\x0f\x0e\x00\x00\x00\x00\x00\x01\x00\x0d\x30\xf7\
+\x00\x00\x0e\xd8\x00\x00\x00\x00\x00\x01\x00\x0d\x2e\xfe\
+\x00\x00\x0f\x32\x00\x00\x00\x00\x00\x01\x00\x0d\x33\x88\
+\x00\x00\x0f\x54\x00\x00\x00\x00\x00\x01\x00\x0d\x35\x9b\
+\x00\x00\x0e\xb6\x00\x00\x00\x00\x00\x01\x00\x0d\x2c\x60\
\x00\x00\x09\xc0\x00\x00\x00\x00\x00\x01\x00\x0c\xc1\x6c\
\x00\x00\x09\x9a\x00\x00\x00\x00\x00\x01\x00\x0c\xbe\xce\
-\x00\x00\x0f\x5c\x00\x00\x00\x00\x00\x01\x00\x0d\x39\x80\
-\x00\x00\x0f\x84\x00\x00\x00\x00\x00\x01\x00\x0d\x3c\x1e\
-\x00\x00\x0f\x38\x00\x00\x00\x00\x00\x01\x00\x0d\x36\xe0\
+\x00\x00\x0f\xfc\x00\x00\x00\x00\x00\x01\x00\x0d\x3f\x58\
+\x00\x00\x10\x24\x00\x00\x00\x00\x00\x01\x00\x0d\x41\xf6\
+\x00\x00\x0f\xd8\x00\x00\x00\x00\x00\x01\x00\x0d\x3c\xb8\
\x00\x00\x01\xde\x00\x00\x00\x00\x00\x01\x00\x00\x09\x05\
\x00\x00\x02\x12\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xa3\
\x00\x00\x0c\xe2\x00\x00\x00\x00\x00\x01\x00\x0d\x0e\x92\
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2009-10-19 16:18:32 +0000
+++ openlp/core/ui/maindisplay.py 2009-11-01 19:45:24 +0000
@@ -23,7 +23,10 @@
###############################################################################
import logging
+import os
+
from PyQt4 import QtCore, QtGui
+from PyQt4.phonon import Phonon
from openlp.core.lib import Receiver, str_to_bool
@@ -85,15 +88,23 @@
self.layout.setSpacing(0)
self.layout.setMargin(0)
self.layout.setObjectName(u'layout')
+ self.mediaObject = Phonon.MediaObject(self)
+ self.video = Phonon.VideoWidget()
+ self.audio = Phonon.AudioOutput(Phonon.VideoCategory, self.mediaObject)
+ self.video.setFullScreen(True)
+ Phonon.createPath(self.mediaObject, self.video)
+ Phonon.createPath(self.mediaObject, self.audio)
+ self.layout.insertWidget(0, self.video)
self.display = QtGui.QLabel(self)
self.display.setScaledContents(True)
- self.layout.addWidget(self.display)
+ self.layout.insertWidget(0, self.display)
self.displayBlank = False
self.blankFrame = None
self.frame = None
self.alertactive = False
self.alertTab = None
self.timer_id = 0
+ self.firstTime = True
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'live_slide_blank'), self.blankDisplay)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -102,6 +113,17 @@
QtCore.SIGNAL(u'presentations_start'), self.hideDisplay)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'presentations_stop'), self.showDisplay)
+ QtCore.QObject.connect(self.mediaObject,
+ QtCore.SIGNAL(u'finished()'), self.onMediaFinish)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'media_start'), self.onMediaQueue)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'media_play'), self.onMediaPlay)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'media_pause'), self.onMediaPaws)
+ QtCore.QObject.connect(Receiver.get_receiver(),
+ QtCore.SIGNAL(u'media_stop'), self.onMediaFinish)
+
def setup(self, screenNumber):
"""
@@ -221,3 +243,28 @@
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame))
self.killTimer(self.timer_id)
self.timer_id = 0
+
+ def onMediaQueue(self, message):
+ self.display.close()
+ file = os.path.join(message[1], message[2])
+ if self.firstTime:
+ self.mediaObject.setCurrentSource(Phonon.MediaSource(file))
+ self.firstTime = False
+ else:
+ self.mediaObject.enqueue(Phonon.MediaSource(file))
+ self.onMediaPlay()
+
+ def onMediaPlay(self):
+ self.display.hide()
+ self.mediaObject.play()
+ self.setVisible(True)
+
+ def onMediaPaws(self):
+ self.mediaObject.pause()
+
+ def onMediaFinish(self):
+ self.setVisible(False)
+ self.mediaObject.stop()
+ self.mediaObject.clearQueue()
+ self.video.close()
+ self.display.show()
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2009-10-31 20:27:08 +0000
+++ openlp/core/ui/servicemanager.py 2009-11-01 19:45:24 +0000
@@ -30,8 +30,8 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \
- ServiceType, contextMenuAction, contextMenuSeparator, Receiver, \
- contextMenu, str_to_bool
+ ServiceItemType, contextMenuAction, contextMenuSeparator, contextMenu, \
+ Receiver, contextMenu, str_to_bool
class ServiceManagerList(QtGui.QTreeWidget):
@@ -443,8 +443,8 @@
for item in self.serviceItems:
service.append(
{u'serviceitem':item[u'data'].get_service_repr()})
- if item[u'data'].service_item_type == ServiceType.Image or \
- item[u'data'].service_item_type == ServiceType.Command:
+ if item[u'data'].service_item_type == ServiceItemType.Image or \
+ item[u'data'].service_item_type == ServiceItemType.Command:
for frame in item[u'data'].frames:
path_from = unicode(os.path.join(
item[u'data'].service_item_path, frame[u'title']))
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-10-31 20:27:08 +0000
+++ openlp/core/ui/slidecontroller.py 2009-11-01 19:45:24 +0000
@@ -26,7 +26,8 @@
import time
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import OpenLPToolbar, Receiver, ServiceType, str_to_bool, PluginConfig
+from openlp.core.lib import OpenLPToolbar, Receiver, ServiceItemType, \
+ str_to_bool, PluginConfig
class SlideList(QtGui.QTableWidget):
"""
@@ -79,6 +80,11 @@
u'Loop Separator',
u'Image SpinBox'
]
+ self.media_list = [
+ u'Media Start',
+ u'Media Stop',
+ u'Media Pause'
+ ]
self.song_list = [
u'Edit Song',
]
@@ -171,6 +177,16 @@
u'Image SpinBox', self.DelaySpinBox)
self.DelaySpinBox.setSuffix(self.trUtf8(u's'))
self.DelaySpinBox.setToolTip(self.trUtf8(u'Delay between slides in seconds'))
+ self.Toolbar.addToolbarButton(
+ u'Media Start', u':/slides/media_playback_start.png',
+ self.trUtf8(u'Start playing media'), self.onMediaPlay)
+ self.Toolbar.addToolbarButton(
+ u'Media Pause', u':/slides/media_playback_pause.png',
+ self.trUtf8(u'Start playing media'), self.onMediaPause)
+ self.Toolbar.addToolbarButton(
+ u'Media Stop', u':/slides/media_playback_stop.png',
+ self.trUtf8(u'Start playing media'), self.onMediaStop)
+
self.ControllerLayout.addWidget(self.Toolbar)
# Build the Song Toolbar
if isLive:
@@ -231,6 +247,7 @@
Receiver().send_message(u'request_spin_delay')
if isLive:
self.Toolbar.makeWidgetsInvisible(self.image_list)
+ self.Toolbar.makeWidgetsInvisible(self.media_list)
else:
self.Toolbar.makeWidgetsInvisible(self.song_list)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -278,7 +295,8 @@
"""
self.Songbar.setVisible(False)
self.Toolbar.makeWidgetsInvisible(self.image_list)
- if item.service_item_type == ServiceType.Text:
+ self.Toolbar.makeWidgetsInvisible(self.media_list)
+ if item.service_item_type == ServiceItemType.Text:
self.Toolbar.makeWidgetsInvisible(self.image_list)
if item.name == u'Songs' and \
str_to_bool(self.songsconfig.get_config(u'display songbar', True)):
@@ -293,10 +311,13 @@
#More than 20 verses hard luck
pass
self.Songbar.setVisible(True)
- elif item.service_item_type == ServiceType.Image:
+ elif item.service_item_type == ServiceItemType.Image:
#Not sensible to allow loops with 1 frame
if len(item.frames) > 1:
self.Toolbar.makeWidgetsVisible(self.image_list)
+ elif item.service_item_type == ServiceItemType.Command and \
+ item.name == u'Media':
+ self.Toolbar.makeWidgetsVisible(self.media_list)
def enablePreviewToolBar(self, item):
"""
@@ -316,14 +337,14 @@
log.debug(u'addServiceItem')
#If old item was a command tell it to stop
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_stop'% self.commandItem.name.lower())
self.commandItem = item
before = time.time()
item.render()
log.info(u'Rendering took %4s' % (time.time() - before))
self.enableToolBar(item)
- if item.service_item_type == ServiceType.Command:
+ if item.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_start' % item.name.lower(), \
[item.shortname, item.service_item_path,
item.service_frames[0][u'title']])
@@ -350,11 +371,11 @@
log.debug(u'addServiceManagerItem')
#If old item was a command tell it to stop
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_stop'% self.commandItem.name.lower())
self.commandItem = item
self.enableToolBar(item)
- if item.service_item_type == ServiceType.Command:
+ if item.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_start' % item.name.lower(), \
[item.shortname, item.service_item_path,
item.service_frames[0][u'title'], slideno])
@@ -413,7 +434,7 @@
Go to the first slide.
"""
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_first'% self.commandItem.name.lower())
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
else:
@@ -425,7 +446,7 @@
Blank the screen.
"""
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
if blanked:
Receiver().send_message(u'%s_blank'% self.commandItem.name.lower())
else:
@@ -441,9 +462,9 @@
row = self.PreviewListWidget.currentRow()
self.row = 0
if row > -1 and row < self.PreviewListWidget.rowCount():
- if self.commandItem.service_item_type == ServiceType.Command:
+ if self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
- if isLive:
+ if self.isLive:
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
else:
frame = self.serviceitem.frames[row][u'image']
@@ -479,7 +500,7 @@
Go to the next slide.
"""
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_next'% self.commandItem.name.lower())
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
else:
@@ -494,7 +515,7 @@
Go to the previous slide.
"""
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(
u'%s_previous'% self.commandItem.name.lower())
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
@@ -510,7 +531,7 @@
Go to the last slide.
"""
if self.commandItem is not None and \
- self.commandItem.service_item_type == ServiceType.Command:
+ self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_last'% self.commandItem.name.lower())
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
else:
@@ -550,3 +571,12 @@
if row > -1 and row < self.PreviewListWidget.rowCount():
self.parent.LiveController.addServiceManagerItem(
self.commandItem, row)
+
+ def onMediaPause(self):
+ Receiver().send_message(u'%s_pause'% self.commandItem.name.lower())
+
+ def onMediaPlay(self):
+ Receiver().send_message(u'%s_play'% self.commandItem.name.lower())
+
+ def onMediaStop(self):
+ Receiver().send_message(u'%s_stop'% self.commandItem.name.lower())
=== modified file 'openlp/plugins/media/lib/filelistdata.py'
--- openlp/plugins/media/lib/filelistdata.py 2009-09-12 17:24:16 +0000
+++ openlp/plugins/media/lib/filelistdata.py 2009-11-01 19:45:24 +0000
@@ -22,70 +22,70 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-import os
-import logging
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-
-class FileListData(QAbstractListModel):
- """
- An abstract list of strings and the preview icon to go with them
- """
- global log
- log=logging.getLogger(u'FileListData')
- log.info(u'started')
-
- def __init__(self):
- QAbstractListModel.__init__(self)
- self.items = [] # will be a list of (full filename shortname) tuples
-
- def rowCount(self, parent):
- return len(self.items)
-
- def insertRow(self, row, filename):
- self.beginInsertRows(QModelIndex(),row,row)
- log.info(u'insert row %d:%s'%(row,filename))
- # get short filename to display next to image
- (prefix, shortfilename) = os.path.split(unicode(filename))
- log.info(u'shortfilename=%s'%(shortfilename))
- # create a preview image
- self.items.insert(row, (filename, shortfilename))
- self.endInsertRows()
-
- def removeRow(self, row):
- self.beginRemoveRows(QModelIndex(), row,row)
- self.items.pop(row)
- self.endRemoveRows()
-
- def addRow(self, filename):
- self.insertRow(len(self.items), filename)
-
- 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.DecorationRole:
+#import os
+#import logging
+#from PyQt4.QtCore import *
+#from PyQt4.QtGui import *
+#
+#class FileListData(QAbstractListModel):
+# """
+# An abstract list of strings and the preview icon to go with them
+# """
+# global log
+# log=logging.getLogger(u'FileListData')
+# log.info(u'started')
+#
+# def __init__(self):
+# QAbstractListModel.__init__(self)
+# self.items = [] # will be a list of (full filename shortname) tuples
+#
+# def rowCount(self, parent):
+# return len(self.items)
+#
+# def insertRow(self, row, filename):
+# self.beginInsertRows(QModelIndex(),row,row)
+# log.info(u'insert row %d:%s'%(row,filename))
+# # get short filename to display next to image
+# (prefix, shortfilename) = os.path.split(unicode(filename))
+# log.info(u'shortfilename=%s'%(shortfilename))
+# # create a preview image
+# self.items.insert(row, (filename, shortfilename))
+# self.endInsertRows()
+#
+# def removeRow(self, row):
+# self.beginRemoveRows(QModelIndex(), row,row)
+# self.items.pop(row)
+# self.endRemoveRows()
+#
+# def addRow(self, filename):
+# self.insertRow(len(self.items), filename)
+#
+# 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:
- retval= self.items[row][0]
- else:
- retval= QVariant()
-# log.info(u'Returning"+ unicode(retval))
- if type(retval) is not type(QVariant):
- return QVariant(retval)
- else:
- return retval
-
- def getFileList(self):
- filelist = [item[0] for item in self.items];
- return filelist
-
- def getFilename(self, index):
- row = index.row()
- return self.items[row][0]
-
- def getValue(self, index):
- row = index.row()
- return self.items[row][0]
+## elif role == Qt.DecorationRole:
+## retval= self.items[row][1]
+# elif role == Qt.ToolTipRole:
+# retval= self.items[row][0]
+# else:
+# retval= QVariant()
+## log.info(u'Returning"+ unicode(retval))
+# if type(retval) is not type(QVariant):
+# return QVariant(retval)
+# else:
+# return retval
+#
+# def getFileList(self):
+# filelist = [item[0] for item in self.items];
+# return filelist
+#
+# def getFilename(self, index):
+# row = index.row()
+# return self.items[row][0]
+#
+# def getValue(self, index):
+# row = index.row()
+# return self.items[row][0]
=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py 2009-10-31 16:17:26 +0000
+++ openlp/plugins/media/lib/mediaitem.py 2009-11-01 19:45:24 +0000
@@ -45,14 +45,15 @@
def __init__(self, parent, icon, title):
self.PluginNameShort = u'Media'
self.IconPath = u'images/image'
+ self.ConfigSection = u'media'
self.ConfigSection = title
- self.OnNewFileMasks = \
- u'Videos (*.avi *.mpeg *.mpg *.mp4);;Audio (*.ogg *.mp3 *.wma);;All files (*)'
# this next is a class, not an instance of a class - it will
# be instanced by the base MediaManagerItem
self.ListViewWithDnD_class = MediaListView
+ self.ServiceItemIconName = u':/media/media_video.png'
self.PreviewFunction = self.video_get_preview
MediaManagerItem.__init__(self, parent, icon, title)
+ self.MainDisplay = self.parent.live_controller.parent.mainDisplay
def initPluginNameVisible(self):
self.PluginNameVisible = self.trUtf8(u'Media')
@@ -60,40 +61,61 @@
def retranslateUi(self):
self.OnNewPrompt = self.trUtf8(u'Select Media')
+ def reTranslateUI(self):
+ self.OnNewPrompt = self.trUtf8(u'Select Media')
+ self.OnNewFileMasks = self.trUtf8(u'Videos (*.avi *.mpeg *.mpg'
+ '*.mp4);;Audio (*.ogg *.mp3 *.wma);;All files (*)')
+
def requiredIcons(self):
MediaManagerItem.requiredIcons(self)
self.hasFileIcon = True
self.hasNewIcon = False
self.hasEditIcon = False
- def video_get_preview(self, filename):
+ def video_get_preview(self):
# For now cross platform is an icon. Phonon does not support
# individual frame access (yet?) and GStreamer is not available
# on Windows
return QtGui.QPixmap(u':/media/media_video.png').toImage()
def generateSlideData(self, service_item):
- indexes = self.ListView.selectedIndexes()
- if len(indexes) > 1:
+ items = self.ListView.selectedIndexes()
+ if len(items) > 1:
return False
- service_item.title = u'Media'
- for index in indexes:
- filename = self.ListData.getFilename(index)
- frame = QtGui.QImage(unicode(filename))
+ service_item.title = self.trUtf8(u'Media')
+ for item in items:
+ bitem = self.ListView.item(item.row())
+ filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
+ frame = u':/media/media_video.png'
(path, name) = os.path.split(filename)
- service_item.add_from_image(path, name, frame)
+ #service_item.add_from_image(path, name, frame)
+ print path
+ print name
+ service_item.add_from_command(path, name, frame)
return True
- def onPreviewClick(self):
- log.debug(u'Media Preview Button pressed')
- items = self.ListView.selectedIndexes()
- for item in items:
- text = self.ListData.getValue(item)
- print text
-
- def onMediaLiveClick(self):
- log.debug(u'Media Live Button pressed')
- pass
+# def onPreviewClick(self):
+# log.debug(u'Media Preview Button pressed')
+# items = self.ListView.selectedIndexes()
+# for item in items:
+# baseItem = self.ListView.item(item.row())
+# itemText = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
+# print itemText
+#
+# def onLiveClick(self):
+# log.debug(u'Media Live Button pressed')
+# items = self.ListView.selectedIndexes()
+# if len(items) > 0:
+# firstPass = True
+# for item in items:
+# baseItem = self.ListView.item(item.row())
+# filename = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
+# if firstPass:
+# self.MainDisplay.queueMedia(filename, firstPass)
+# firstPass = False
+# else:
+# self.MainDisplay.queueMedia(filename, firstPass)
+# self.MainDisplay.playMedia()
def initialise(self):
self.ListView.setSelectionMode(
@@ -113,7 +135,7 @@
for file in list:
(path, filename) = os.path.split(unicode(file))
item_name = QtGui.QListWidgetItem(filename)
- img = self.video_get_preview(file)
+ img = self.video_get_preview()
item_name.setIcon(buildIcon(img))
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
self.ListView.addItem(item_name)
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2009-10-31 16:17:26 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2009-11-01 19:45:24 +0000
@@ -51,7 +51,6 @@
self.PluginNameShort = u'Presentation'
self.ConfigSection = title
self.IconPath = u'presentations/presentation'
- self.OnNewFileMasks = u'Presentations (*.ppt *.pps *.odp)'
# this next is a class, not an instance of a class - it will
# be instanced by the base MediaManagerItem
self.ListViewWithDnD_class = PresentationListView
@@ -64,6 +63,10 @@
def retranslateUi(self):
self.OnNewPrompt = self.trUtf8(u'Select Presentation(s)')
+ def reTranslateUI(self):
+ self.OnNewPrompt = self.trUtf8(u'Select Presentation(s)')
+ self.OnNewFileMasks = self.trUtf8(u'Presentations (*.ppt *.pps *.odp)')
+
def requiredIcons(self):
MediaManagerItem.requiredIcons(self)
self.hasFileIcon = True
=== added file 'resources/images/media_playback_pause.png'
Binary files resources/images/media_playback_pause.png 1970-01-01 00:00:00 +0000 and resources/images/media_playback_pause.png 2009-11-01 19:45:24 +0000 differ
=== added file 'resources/images/media_playback_start.png'
Binary files resources/images/media_playback_start.png 1970-01-01 00:00:00 +0000 and resources/images/media_playback_start.png 2009-11-01 19:45:24 +0000 differ
=== added file 'resources/images/media_playback_stop.png'
Binary files resources/images/media_playback_stop.png 1970-01-01 00:00:00 +0000 and resources/images/media_playback_stop.png 2009-11-01 19:45:24 +0000 differ
=== modified file 'resources/images/openlp-2.qrc'
--- resources/images/openlp-2.qrc 2009-09-19 17:56:26 +0000
+++ resources/images/openlp-2.qrc 2009-11-01 19:45:24 +0000
@@ -27,6 +27,9 @@
<file>slide_last.png</file>
<file>slide_next.png</file>
<file>slide_previous.png</file>
+ <file>media_playback_start.png</file>
+ <file>media_playback_stop.png</file>
+ <file>media_playback_pause.png</file>
</qresource>
<qresource prefix="icon" >
<file>openlp-logo-16x16.png</file>
Follow ups