Merge lp:~trb143/openlp/servicing2 into lp:openlp

Proposed by Tim Bentley
Status: Merged
Merged at revision: not available
Proposed branch: lp:~trb143/openlp/servicing2
Merge into: lp:openlp
Diff against target: None lines
To merge this branch: bzr merge lp:~trb143/openlp/servicing2
Reviewer Review Type Date Requested Status
Martin Thompson (community) Approve
Review via email: mp+8210@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

It's big.
Includes Martins changes - followed by changes to get things working
Highlights of this merge.
- New SlideController with plugable toolbars
- New Live toolbar for Images with working timer loop.
- Martin's changes to MediamanagerItem
- Removal of the need to use listitemswithpreview.
- Removal of duplicate methods.

Various other bug fixes.

Test run all plugins and add display situations.
Tested no gsm installed! Hummmm.

Revision history for this message
Martin Thompson (mjthompson) wrote :

Some nitpicks and queries:
8 + #replace the quotes with quotes
9 + line, replace("''", "'")
Do you need a "u" in front of the strings? Also, I find it easier to see what's going on in strings that are pure quote marks to actually escape the quotes (even though it's unnecessary).
Also, should it be line=line.replace(...)?

808 + self.SlidePreview.setFixedSize(QtCore.QSize(250, 210))
Should the slide preview be of fixed size? Does this cause it to be too big on lo-res screen?

873 +class MasterToolbar(QtCore.QObject):
874 + """
875 + Class from which all tollbars should extend
typo - tollbars -> toolbars.

1096 + #check to see file is in route directory
*root* directory?

The timer for the image lists: should the timeout be configurable as part of the OOS (different per service item), rather than in the plugin? Or is the settings tab just for a default?

review: Approve
Revision history for this message
Michael Gorven (mgorven) wrote :

On Sunday 05 July 2009 21:36:54 Martin Thompson wrote:
> Do you need a "u" in front of the strings?

YES! It makes it a Unicode string instead of a bytestring. All strings should
be Unicode unless they are entering or leaving the application. (Python 3
makes Unicode strings the default, by the way.)

Revision history for this message
Martin Thompson (mjthompson) wrote :

On Mon, Jul 06, 2009 at 04:12:09PM -0000 or thereabouts, Michael Gorven wrote:
> On Sunday 05 July 2009 21:36:54 Martin Thompson wrote:
> > Do you need a "u" in front of the strings?
>
> YES! It makes it a Unicode string instead of a bytestring. All strings should
> be Unicode unless they are entering or leaving the application. (Python 3
> makes Unicode strings the default, by the way.)

It was more of the "It think you *do* need a unicode string, but I'm
not sure if something weird is going on as it looks like 'old-stuff'
import code" - hence the query rather than a statement :)

Cheers,
Martin

--
<email address hidden>
  int deep_thought(void) {
    sleep (7.5e6*365*24*60*60); return 42;
  }

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cnvdb.py'
2--- cnvdb.py 2009-06-25 19:42:22 +0000
3+++ cnvdb.py 2009-07-02 19:10:14 +0000
4@@ -30,6 +30,8 @@
5 infile = codecs.open(inname, 'r', encoding='iso-8859-1')
6 writefile = codecs.open(outname, 'w', encoding='utf-8')
7 for line in infile:
8+ #replace the quotes with quotes
9+ line, replace("''", "'")
10 writefile.write(line)
11 infile.close()
12 writefile.close()
13
14=== modified file 'openlp/core/lib/listwithpreviews.py'
15--- openlp/core/lib/listwithpreviews.py 2009-06-23 20:59:38 +0000
16+++ openlp/core/lib/listwithpreviews.py 2009-06-30 20:35:53 +0000
17@@ -35,14 +35,18 @@
18 self.items = []
19 self.rowheight = 50
20 self.maximagewidth = self.rowheight * 16 / 9.0;
21- if new_preview_function is not None:
22- self.make_preview=new_preview_function
23- else:
24- self.make_preview=self.preview_function
25+ self.preview_function = new_preview_function
26
27- def preview_function(self, filename):
28+ def make_preview(self, filename):
29 if os.path.exists(filename):
30- preview = QtGui.QImage(filename)
31+ if self.preview_function is not None:
32+ preview=self.preview_function(filename)
33+ else:
34+ preview = QtGui.QImage(filename)
35+ else:
36+ preview = None
37+
38+ if preview is not None:
39 w = self.maximagewidth;
40 h = self.rowheight
41 preview = preview.scaled(w, h, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
42
43=== modified file 'openlp/core/lib/mediamanageritem.py'
44--- openlp/core/lib/mediamanageritem.py 2009-06-29 05:07:32 +0000
45+++ openlp/core/lib/mediamanageritem.py 2009-07-04 05:52:30 +0000
46@@ -23,14 +23,38 @@
47 from PyQt4 import QtCore, QtGui
48
49 from openlp.core.lib.toolbar import *
50-from openlp.core.lib import translate
51-from listwithpreviews import ListWithPreviews
52+from openlp.core.lib import translate, contextMenuAction, contextMenuSeparator
53 from serviceitem import ServiceItem
54
55 class MediaManagerItem(QtGui.QWidget):
56 """
57 MediaManagerItem is a helper widget for plugins.
58+
59+ None of the following *need* to be used, feel free to override
60+ them cmopletely in your plugin's implementation. Alternatively, call them from your
61+ plugin before or after you've done etra things that you need to.
62+
63+ The plugin will be assigned an icon called u':/media/media_' + 'self.ShortPluginName + u'image.png'
64+ which needs to be available in the main resources in order for them to work, you need to have setup
65+
66+ self.TranslationContext
67+ self.PluginTextShort # eg 'Image' for the image plugin
68+ self.ConfigSection - where the items in the media manager are stored
69+ this could potentially be self.PluginTextShort.lower()
70+
71+ self.OnNewPrompt=u'Select Image(s)'
72+ self.OnNewFileMasks=u'Images (*.jpg *jpeg *.gif *.png *.bmp)'
73+ assumes that the new action is to load a file. If not, override onnew
74+
75+ self.ListViewWithDnD_class - there is a base list class with DnD assigned to it (openlp.core.lib.BaseListWithDnD())
76+ each plugin needs to inherit a class from this and pass that *class* (not an instance) to here
77+ via the ListViewWithDnD_class member
78+
79+ self.PreviewFunction - a function which returns a QImage to represent the item (a preview usually)
80+ - no scaling required - that's done later
81+ If this fn is not defined, a default will be used (treat the filename as an image)
82 """
83+
84 global log
85 log = logging.getLogger(u'MediaManagerItem')
86 log.info(u'Media Item loaded')
87@@ -84,61 +108,6 @@
88 """
89 self.Toolbar.addSeparator()
90
91- def contextMenuSeparator(self, base):
92- action = QtGui.QAction(u'', base)
93- action.setSeparator(True)
94- return action
95-
96- def contextMenuAction(self, base, icon, text, slot):
97- """
98- Utility method to help build context menus for plugins
99- """
100- if type(icon) is QtGui.QIcon:
101- ButtonIcon = icon
102- elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
103- ButtonIcon = QtGui.QIcon()
104- if icon.startswith(u':/'):
105- ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
106- QtGui.QIcon.Off)
107- else:
108- ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
109- QtGui.QIcon.Normal, QtGui.QIcon.Off)
110-
111- action = QtGui.QAction(text, base)
112- action .setIcon(ButtonIcon)
113- QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
114- return action
115-
116- ###########################################################################
117- ### None of the following *need* to be used, feel free to override
118- ### them cmopletely in your plugin's implementation. Alternatively, call them from your
119- ### plugin before or after you've done etra things that you need to.
120- ### in order for them to work, you need to have setup
121- # self.TranslationContext
122- # self.PluginTextShort # eg "Image" for the image plugin
123- # self.ConfigSection - where the items in the media manager are stored
124- # this could potentially be self.PluginTextShort.lower()
125- # self.IconPath=u'images/images' - allows specific icons to be used
126- # self.hasFileIcon - Is the file Icon required
127- # self.hasEditIcon - Is the edit Icon required
128- # self.hasNewIcon - Is the new Icon required
129- #
130- # self.OnNewPrompt=u'Select Image(s)'
131- # self.OnNewFileMasks=u'Images (*.jpg *jpeg *.gif *.png *.bmp)'
132- # assumes that the new action is to load a file. If not, override onnew
133- # self.ListViewWithDnD_class - there is a base list class with DnD assigned to it (openlp.core.lib.BaseListWithDnD())
134- # each plugin needs to inherit a class from this and pass that *class* (not an instance) to here
135- # via the ListViewWithDnD_class member
136- # The assumption is that given that at least two plugins are of the form
137- # "text with an icon" then all this will help
138- # even for plugins of another sort, the setup of the right-click menu, common toolbar
139- # will help to keep things consistent and ease the creation of new plugins
140-
141- # also a set of completely consistent action anesm then exist
142- # (onPreviewClick() is always called that, rather than having the
143- # name of the plugin added in as well... I regard that as a
144- # feature, I guess others might differ!)
145-
146 def setupUi(self):
147 # Add a toolbar
148 self.addToolbar()
149@@ -168,7 +137,7 @@
150 u':'+self.IconPath+ u'_delete.png', self.onDeleteClick, self.PluginTextShort+u'DeleteItem')
151 ## Separator Line ##
152 self.addToolbarSeparator()
153- ## Preview Button ##
154+ ## Preview ##
155 self.addToolbarButton(
156 translate(self.TranslationContext, u'Preview '+self.PluginTextShort),
157 translate(self.TranslationContext, u'Preview the selected item'),
158@@ -178,7 +147,7 @@
159 translate(self.TranslationContext, u'Go Live'),
160 translate(self.TranslationContext, u'Send the selected item live'),
161 u':/system/system_live.png', self.onLiveClick, u'LiveItem')
162- ## Add Button ##
163+ ## Add to service Button ##
164 self.addToolbarButton(
165 translate(self.TranslationContext, u'Add '+self.PluginTextShort+u' To Service'),
166 translate(self.TranslationContext, u'Add the selected item(s) to the service'),
167@@ -199,26 +168,29 @@
168 #define and add the context menu
169 self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
170 if self.hasEditIcon:
171- self.ListView.addAction(self.contextMenuAction(self.ListView,
172+ self.ListView.addAction(contextMenuAction(self.ListView,
173 ':' +self.IconPath+u'_new.png',
174 translate(self.TranslationContext, u'&Edit '+self.PluginTextShort),
175 self.onEditClick))
176 self.ListView.addAction(self.contextMenuSeparator(self.SongListWidget))
177- self.ListView.addAction(self.contextMenuAction(
178+ self.ListView.addAction(contextMenuAction(
179 self.ListView, ':/system/system_preview.png',
180 translate(self.TranslationContext, u'&Preview '+self.PluginTextShort),
181 self.onPreviewClick))
182- self.ListView.addAction(self.contextMenuAction(
183+ self.ListView.addAction(contextMenuAction(
184 self.ListView, ':/system/system_live.png',
185 translate(self.TranslationContext, u'&Show Live'),
186 self.onLiveClick))
187- self.ListView.addAction(self.contextMenuAction(
188+ self.ListView.addAction(contextMenuAction(
189 self.ListView, ':/system/system_add.png',
190 translate(self.TranslationContext, u'&Add to Service'),
191 self.onAddClick))
192 QtCore.QObject.connect(self.ListView,
193 QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onPreviewClick)
194
195+ def initialise(self):
196+ pass
197+
198 def addHeaderBar(self):
199 pass
200
201@@ -232,12 +204,15 @@
202 self.loadList(files)
203 dir, filename = os.path.split(unicode(files[0]))
204 self.parent.config.set_last_dir(dir)
205- #self.parent.config.set_list(self.ConfigSection, self.ListData.getFileList())
206+ self.parent.config.set_list(self.ConfigSection, self.getFileList())
207
208 def getFileList(self):
209 count = 0
210- while count < len(self.ListView):
211- filelist = [set.ListView.item(count).text()]
212+ filelist = []
213+ while count < self.ListView.count():
214+ bitem = self.ListView.item(count)
215+ filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())
216+ filelist.append(filename)
217 count += 1
218 return filelist
219
220@@ -257,7 +232,7 @@
221 raise NotImplementedError(u'MediaManagerItem.generateSlideData needs to be defined by the plugin')
222
223 def onPreviewClick(self):
224- log.debug(self.PluginTextShort+u'Preview Requested')
225+ log.debug(self.PluginTextShort+u' Preview Requested')
226 service_item = ServiceItem(self.parent)
227 service_item.addIcon(u':/media/media_'+self.PluginTextShort.lower()+u'.png')
228 self.generateSlideData(service_item)
229
230=== modified file 'openlp/core/lib/rendermanager.py'
231--- openlp/core/lib/rendermanager.py 2009-06-20 11:23:34 +0000
232+++ openlp/core/lib/rendermanager.py 2009-07-02 19:04:50 +0000
233@@ -155,8 +155,12 @@
234
235 def calculate_default(self, screen):
236 log.debug(u'calculate default %s' , screen)
237- self.width = screen.width()
238- self.height = screen.height()
239+ if self.current_display == 0:
240+ self.width = 1024
241+ self.height = 768
242+ else:
243+ self.width = screen.width()
244+ self.height = screen.height()
245 log.debug(u'calculate default %d,%d' , self.width, self.height)
246 # 90% is start of footer
247 self.footer_start = int(self.height * 0.90)
248
249=== modified file 'openlp/core/resources.py'
250--- openlp/core/resources.py 2009-05-03 15:35:34 +0000
251+++ openlp/core/resources.py 2009-07-03 19:08:21 +0000
252@@ -2,8 +2,8 @@
253
254 # Resource object code
255 #
256-# Created: Sun May 3 17:32:20 2009
257-# by: The Resource Compiler for PyQt (Qt v4.4.3)
258+# Created: Fri Jul 3 19:41:53 2009
259+# by: The Resource Compiler for PyQt (Qt v4.5.0)
260 #
261 # WARNING! All changes made in this file will be lost!
262
263@@ -316,6 +316,69 @@
264 \x18\x56\x6a\x9d\x81\x33\x40\x02\x7c\xfb\x53\xca\xd4\x39\x03\xa8\
265 \x5f\xd3\x56\x89\xec\x63\x12\x58\x4f\x00\x00\x00\x00\x49\x45\x4e\
266 \x44\xae\x42\x60\x82\
267+\x00\x00\x03\xcf\
268+\x89\
269+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
270+\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
271+\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
272+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\
273+\x01\x3a\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
274+\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
275+\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x03\x4c\x49\x44\
276+\x41\x54\x78\xda\x75\x53\x4d\x48\x5b\x69\x14\x3d\xdf\xcb\x33\xe6\
277+\x47\x13\x4d\x34\x71\x14\x89\x12\xa5\xa9\x05\xed\xc6\x38\x95\x31\
278+\xa2\x03\xaf\x2a\x43\x70\x53\xb5\x60\x53\x5a\x90\xb6\x48\x97\xa9\
279+\xa5\xed\xa2\x5d\x76\x31\x1d\x98\x42\x5b\xc6\xc5\xd0\x01\x45\xe3\
280+\x60\x19\x28\x48\xa3\xcc\x80\x53\xc4\x2e\x52\xa5\xf5\x17\x34\xd1\
281+\x1a\x11\x6d\xcc\x7f\x62\x34\x3f\xaf\x97\xb7\x90\x76\xd1\x03\x1f\
282+\xef\x2d\xbe\x7b\xee\x3d\xe7\x9e\x8f\x89\xa2\x88\xef\xa1\xb9\xb9\
283+\xd9\x30\x37\x37\x77\x80\xaf\x30\x30\x30\xf0\x50\xad\x56\xff\x18\
284+\x89\x44\xe2\x54\x7b\xfb\x1b\x82\xe9\xe9\x69\xb9\xdb\xed\x9e\x09\
285+\x04\x02\xe7\x73\xb9\x5c\x81\xc1\x60\x60\xf4\xcd\x06\x83\xc1\x50\
286+\x32\x99\x74\x8d\x8f\x8f\x0f\xfe\x31\x3c\x9c\xfc\xa9\xa9\x69\xa1\
287+\x5d\x10\x2e\xda\x6c\xb6\x5f\x4f\x09\xba\xbb\xbb\x7f\x29\x2e\x2e\
288+\x76\x59\xad\x56\xa5\x56\xa3\x11\xb7\xb7\xb7\x73\xd1\x48\x04\x2a\
289+\xb5\x1a\x96\x33\x16\xae\xc5\x66\x63\x4f\x7e\x7b\xf2\xf9\x72\x6f\
290+\x6f\x49\x95\xc9\xc4\x9c\x77\xee\xee\xce\xfc\x3b\xf3\xa7\x44\x30\
291+\x38\x38\x68\xdd\xd9\xd9\x99\x7f\x70\xef\x3e\x7b\xfb\xf6\xff\xac\
292+\x51\xa7\x93\xe5\xab\x54\xd0\x68\x34\x08\x85\x42\x88\x46\xa3\x58\
293+\x5b\x5f\xcf\x5c\xee\xef\xe7\x7d\x5e\x9f\x38\x39\x39\x39\x27\x42\
294+\x1c\x1d\x1b\x1b\x7b\x26\x11\x38\x1c\x8e\xe8\xad\x1b\x37\x0b\xbd\
295+\x9b\x1b\x62\x43\x7d\x3d\x2b\xcc\x64\xa0\x2a\x2f\xc7\x29\x18\xc3\
296+\xc7\xa5\x25\x2c\x2e\x2e\xe6\x7e\x16\x04\x6e\x6f\x6f\x6f\xa5\xa3\
297+\xa3\xe3\x1c\x08\x5c\x5b\x5b\xdb\xa3\x6c\x36\x5b\x18\x09\x05\xd3\
298+\x17\x05\x81\x29\x94\x4a\x28\x0c\x06\xc4\xd6\xd6\xc0\xc9\x64\xd2\
299+\x09\xd2\x14\x0a\x85\x02\x8e\x2b\x57\xb8\xbf\x5e\xbe\x3c\x69\xb2\
300+\x36\xd5\xb5\xb7\xb7\x9f\x07\x41\xd6\xda\xda\x3a\xec\xe8\x77\xe8\
301+\xaa\xaa\x4c\x32\x9e\xe7\x11\x0d\x06\x91\x4f\xba\x63\x2b\x2b\xd0\
302+\x9a\xcd\xd8\x3f\x38\x40\x98\xbc\x38\x4a\xa5\xb0\xfd\xe9\x13\xaa\
303+\xab\xab\xd9\x1b\xb7\x9b\xf5\xf5\xf5\x71\xf4\xff\x9a\x0f\x87\xc3\
304+\xe5\x99\x6c\x46\x34\x1a\x8d\x2c\x1e\x8f\xa3\x98\x74\x2b\xa9\x5b\
305+\xea\xec\x59\x3c\xbf\x7a\x15\x3a\xbb\x1d\x3b\x7e\x3f\xf4\x7a\x3d\
306+\xe4\x72\x39\x68\x43\x5c\x2c\x16\x83\x4a\xa1\xba\x44\x0d\x23\x3c\
307+\x99\x24\x26\x12\x71\x70\x1c\x27\x99\x96\x21\xfd\x7c\x5e\x1e\xd6\
308+\x77\x77\x91\x28\x2b\x43\x1e\x91\xf6\xf4\xf4\xa0\xb4\xb4\x54\x92\
309+\x91\x4e\xa7\xe1\xf1\x78\xf0\xea\x9f\x57\x45\x95\x95\x95\x39\x2e\
310+\x95\x4a\xed\x52\x28\xd8\x21\x8d\xce\x88\x44\x9e\x9f\x2f\x91\x95\
311+\x57\x54\x20\xa5\xd3\xa1\xb3\xb3\x13\x35\x35\x35\x98\x9a\x9a\x42\
312+\x22\x91\x00\x65\x03\xe4\x1b\x2c\x16\x0b\xb3\xdb\xed\x15\xdc\xe1\
313+\xe1\xe1\x7f\x89\x44\x12\xef\x17\x16\x4e\x64\x64\xd8\xf1\xf1\xb1\
314+\x44\xb0\xb5\xb5\x85\x92\x92\x12\xa9\xb3\x92\x8c\xf5\x7a\xbd\x18\
315+\x1a\x1a\xc2\xc8\xc8\x08\x68\x74\x08\x82\x00\x6a\x7e\x81\xdf\xd8\
316+\xd8\xb8\x49\x46\x5e\xa3\x20\xc9\x3f\x07\x02\xe0\x18\x83\xba\xa0\
317+\x00\xd4\x4d\xba\x48\x64\xd2\x99\x9d\x9d\xc5\xf2\xf2\xb2\x94\x89\
318+\x96\x96\x16\xc9\x13\x92\xab\xe7\x40\xf0\xfb\xfd\x8e\x78\x2c\x8e\
319+\xdf\x9f\x3e\x15\x43\xe1\x70\x86\x0a\x60\x24\xfd\xfb\xfb\xfb\x92\
320+\x27\x94\x15\x89\x8c\x02\x87\x89\x89\x09\x98\x4c\x26\xac\xd1\x9a\
321+\xc9\x0f\xcf\x69\x94\xcd\x66\xf3\xe3\xeb\xd7\xae\x3b\xd3\x99\x34\
322+\x4b\x1d\x1d\xe5\x6a\x6b\x6b\xb3\xf3\xef\xde\xf1\x34\x19\xa3\x9d\
323+\xc3\xe7\xf3\xa1\xae\xae\x0e\x20\x50\x6e\xe0\x74\x3a\x41\x81\xba\
324+\xf4\xcd\x63\xa2\xa2\x1f\xa8\xe0\x43\x91\xb6\x48\xaf\x50\x2a\xd8\
325+\xe6\xe6\xa6\x34\x32\x49\x44\x57\x57\x17\xb4\x5a\x2d\x56\x57\x57\
326+\x31\x3a\x3a\x0a\x2a\x7e\x41\x51\xbe\xf5\xdd\xe7\xdc\xd8\xd8\x58\
327+\xd6\xd0\xd0\xd0\x49\x5e\xcc\x53\xc7\x7b\x00\x2e\x30\xc6\xf4\x74\
328+\xdf\x03\xe0\x85\xcb\xe5\xfa\x1b\x84\x2f\x2c\xec\x8e\x1c\x74\xf5\
329+\x29\x98\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
330 \x00\x00\x02\x02\
331 \x89\
332 \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
333@@ -488,6 +551,54 @@
334 \x8c\xb1\x50\x08\xd9\x60\x8c\x45\xd6\x9a\x08\x00\xfe\x06\x5b\x7b\
335 \x9e\x53\x59\xbb\x17\xfa\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\
336 \x60\x82\
337+\x00\x00\x02\xd2\
338+\x89\
339+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
340+\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
341+\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
342+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x01\xbb\x00\x00\x01\xbb\
343+\x01\x3a\xec\xe3\xe2\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\
344+\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\
345+\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x02\x4f\x49\x44\
346+\x41\x54\x78\xda\xa5\x93\xcb\x4f\x13\x51\x14\x87\xbf\x3b\x33\x1d\
347+\x5a\x5b\x0c\x19\xc0\x42\xa0\xe5\x61\x13\x17\x24\xa8\x71\x65\x8c\
348+\x1b\x8d\x89\x3b\x57\xee\x64\xa7\x0b\x1f\x7b\x48\x7c\x9b\xe0\x42\
349+\x4d\x8c\x8f\x3f\x42\x57\x2e\x5d\x68\x74\x61\x0a\xa8\x41\x40\x5d\
350+\xb0\xd0\x50\x1e\xa2\xb5\x0d\x8f\x4e\xa1\x32\x33\x9d\xeb\x1d\x26\
351+\x4e\x0a\x5b\x4f\x72\x72\xef\xe6\xfb\xf2\x3b\x77\xce\x08\x29\x25\
352+\xff\x53\x06\xbb\x6a\x4e\x88\xc1\x55\x78\x66\xe6\x72\xc9\xa6\x5c\
353+\x2e\x16\x4b\xa7\x75\xb7\x58\xac\x3b\xb3\xb3\xf6\x9e\x42\xe1\x6c\
354+\x9f\x94\x9f\x77\x08\x76\xc3\xa5\x6c\x36\xdf\x79\x77\x34\xd5\x64\
355+\x59\x08\xa1\x81\xa6\x21\x3d\x17\xa7\x62\x77\x2e\x0f\x0f\xe7\x11\
356+\xe2\x58\xa3\x24\x18\x21\x82\x17\xbb\xbb\xf2\x3d\x37\x6e\xa6\xcc\
357+\x8d\x2a\xb2\x5e\x07\xcf\xc3\x57\xa7\xef\xba\xd4\x7d\x1f\x69\xb5\
358+\xb2\x74\xff\x5e\x35\xf3\x63\x39\x92\x68\xff\xe0\xb9\x8e\xf4\x58\
359+\xcf\xed\x5b\x29\xbd\x5c\x42\x28\x48\x57\x2d\x2a\x15\x74\xd5\x86\
360+\x82\x0d\x29\x91\xdf\xbf\x91\x1d\x19\x4e\x15\x3a\x3a\xc6\x02\x86\
361+\x48\x60\x18\xcf\x7b\xaf\x5f\x4d\x6a\xf3\x0b\xe8\xbe\x4f\xdb\xb9\
362+\x21\x5a\x87\x86\xd4\x3d\x10\x79\xb4\x9f\xbf\x40\xe7\xc5\x4b\x98\
363+\x02\xdc\xc9\x49\x7a\xaf\x8d\x24\x03\x26\x7a\x83\x9a\xe7\x25\xaa\
364+\x1f\x26\x68\x69\x69\x43\x98\x26\x38\x0e\x46\x26\x83\x75\xf9\x0a\
365+\xc1\x88\x31\x75\x77\x0b\x73\xe8\xab\xab\x18\x2a\xd1\xc6\xfb\x89\
366+\x6d\x26\x4a\xe0\x80\x60\xb3\x8a\x56\x59\x47\x2f\xfe\x62\x65\xf4\
367+\x0e\xee\xc2\x3c\x46\x77\x46\xc1\x59\xdc\xc5\x05\xd6\x9f\x3c\x26\
368+\xae\x44\xcd\x03\x03\x18\xba\xd8\x66\xa2\x04\x1e\x88\x95\xfc\x5b\
369+\x9a\x8c\x66\xea\xc9\x24\x7a\x36\x1b\x3e\x22\x61\x49\xd7\x65\x63\
370+\xfa\x13\xde\xf4\x14\x75\xdb\x66\x2d\x11\x32\x8d\x09\x90\x9b\x36\
371+\xfc\x5c\xc6\x5d\x5f\xa3\xfd\xc1\x43\xcc\xbe\x7e\xfe\x7c\xfd\xb2\
372+\xdd\x66\xff\x7e\xd2\x8f\x9e\xe2\x27\xe2\x88\x00\xd2\x43\x26\x4a\
373+\x20\x61\xab\xa6\xb3\xa3\xb6\x14\xb8\x78\xfa\x24\xbe\xef\xd3\xf3\
374+\xf2\x35\x9a\x69\x22\x01\x01\x54\xf4\x90\x89\xf6\x60\x4a\x88\x83\
375+\xef\x62\x8c\x0f\x36\x93\xe8\xb2\x41\xdb\xd7\x1e\xda\x83\x4f\x0a\
376+\xb8\x96\x05\x7a\x0c\x7e\x17\x59\x4a\xc1\x8c\x4d\xed\xb8\xcb\xd1\
377+\xc3\x52\xce\x44\x8b\x14\x48\xde\x98\x8c\x1f\xd9\x4b\x22\x53\x21\
378+\x8c\x2a\xc2\x53\x02\xbe\x84\xa5\x16\xc1\xc7\x35\x59\x3b\xe1\x84\
379+\x70\xe3\x26\x46\x92\x57\x4a\x72\xc0\x57\x49\x52\x49\x62\xf1\x38\
380+\xba\x61\x50\xf7\x3c\xca\x08\x26\x57\xca\xb5\x53\x0d\xf0\x6e\x41\
381+\x24\x19\x87\x17\xea\x27\x4a\xc4\x2d\x4b\x0b\x66\xf7\x1d\x07\xaf\
382+\x54\xaa\x1d\x2a\x97\xcf\x44\x70\xa3\xe0\x7f\xea\x2f\xb2\x2a\x1f\
383+\x46\x55\x40\xa7\x1e\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
384+\x82\
385 \x00\x00\x02\xf9\
386 \x89\
387 \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
388@@ -53362,13 +53473,17 @@
389 \x00\x72\x00\x65\x00\x73\x00\x65\x00\x6e\x00\x74\x00\x61\x00\x74\x00\x69\x00\x6f\x00\x6e\x00\x5f\x00\x6c\x00\x6f\x00\x61\x00\x64\
390 \x00\x2e\x00\x70\x00\x6e\x00\x67\
391 \x00\x0f\
392-\x0c\x7b\x40\x27\
393+\x0c\xcb\x28\x47\
394 \x00\x6d\
395-\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x76\x00\x65\x00\x72\x00\x73\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
396+\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x62\x00\x69\x00\x62\x00\x6c\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
397 \x00\x0f\
398 \x02\x3b\x21\xc7\
399 \x00\x6d\
400 \x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x69\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
401+\x00\x0e\
402+\x0b\x6a\xa6\xe7\
403+\x00\x6d\
404+\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x74\x00\x69\x00\x6d\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
405 \x00\x10\
406 \x05\xab\xe0\xa7\
407 \x00\x6d\
408@@ -53387,6 +53502,10 @@
409 \x00\x6d\
410 \x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x76\x00\x69\x00\x64\x00\x65\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\
411 \x00\x0e\
412+\x0c\x3d\xa6\xe7\
413+\x00\x6d\
414+\x00\x65\x00\x64\x00\x69\x00\x61\x00\x5f\x00\x73\x00\x74\x00\x6f\x00\x70\x00\x2e\x00\x70\x00\x6e\x00\x67\
415+\x00\x0e\
416 \x06\xf2\xcf\x27\
417 \x00\x73\
418 \x00\x79\x00\x73\x00\x74\x00\x65\x00\x6d\x00\x5f\x00\x61\x00\x64\x00\x64\x00\x2e\x00\x70\x00\x6e\x00\x67\
419@@ -53661,9 +53780,9 @@
420
421 qt_resource_struct = "\
422 \x00\x00\x00\x00\x00\x02\x00\x00\x00\x11\x00\x00\x00\x01\
423-\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x54\
424-\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x50\
425-\x00\x00\x01\x02\x00\x02\x00\x00\x00\x06\x00\x00\x00\x4a\
426+\x00\x00\x00\xa6\x00\x02\x00\x00\x00\x06\x00\x00\x00\x56\
427+\x00\x00\x00\x38\x00\x02\x00\x00\x00\x04\x00\x00\x00\x52\
428+\x00\x00\x01\x02\x00\x02\x00\x00\x00\x08\x00\x00\x00\x4a\
429 \x00\x00\x00\x5c\x00\x02\x00\x00\x00\x04\x00\x00\x00\x46\
430 \x00\x00\x00\x4c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x44\
431 \x00\x00\x01\x12\x00\x02\x00\x00\x00\x02\x00\x00\x00\x42\
432@@ -53678,78 +53797,80 @@
433 \x00\x00\x00\xda\x00\x02\x00\x00\x00\x08\x00\x00\x00\x17\
434 \x00\x00\x00\x24\x00\x02\x00\x00\x00\x04\x00\x00\x00\x13\
435 \x00\x00\x00\xc6\x00\x02\x00\x00\x00\x01\x00\x00\x00\x12\
436-\x00\x00\x06\x14\x00\x00\x00\x00\x00\x01\x00\x00\x4e\x96\
437-\x00\x00\x0b\x16\x00\x00\x00\x00\x00\x01\x00\x0c\xd7\x8d\
438-\x00\x00\x0b\x4a\x00\x00\x00\x00\x00\x01\x00\x0c\xda\xef\
439-\x00\x00\x0b\x72\x00\x00\x00\x00\x00\x01\x00\x0c\xdd\x8d\
440-\x00\x00\x0b\xa0\x00\x00\x00\x00\x00\x01\x00\x0c\xe0\xa1\
441-\x00\x00\x05\x78\x00\x00\x00\x00\x00\x01\x00\x00\x44\x52\
442-\x00\x00\x05\x9e\x00\x00\x00\x00\x00\x01\x00\x00\x46\x89\
443-\x00\x00\x05\xea\x00\x00\x00\x00\x00\x01\x00\x00\x4b\xcb\
444-\x00\x00\x05\x54\x00\x00\x00\x00\x00\x01\x00\x00\x42\x0b\
445-\x00\x00\x04\xe4\x00\x00\x00\x00\x00\x01\x00\x00\x3a\xda\
446-\x00\x00\x05\x08\x00\x00\x00\x00\x00\x01\x00\x00\x3d\x81\
447-\x00\x00\x05\x2e\x00\x00\x00\x00\x00\x01\x00\x00\x3f\xf4\
448-\x00\x00\x05\xc8\x00\x00\x00\x00\x00\x01\x00\x00\x49\x27\
449+\x00\x00\x06\x58\x00\x00\x00\x00\x00\x01\x00\x00\x55\x3f\
450+\x00\x00\x0b\x5a\x00\x00\x00\x00\x00\x01\x00\x0c\xde\x36\
451+\x00\x00\x0b\x8e\x00\x00\x00\x00\x00\x01\x00\x0c\xe1\x98\
452+\x00\x00\x0b\xb6\x00\x00\x00\x00\x00\x01\x00\x0c\xe4\x36\
453+\x00\x00\x0b\xe4\x00\x00\x00\x00\x00\x01\x00\x0c\xe7\x4a\
454+\x00\x00\x05\xbc\x00\x00\x00\x00\x00\x01\x00\x00\x4a\xfb\
455+\x00\x00\x05\xe2\x00\x00\x00\x00\x00\x01\x00\x00\x4d\x32\
456+\x00\x00\x06\x2e\x00\x00\x00\x00\x00\x01\x00\x00\x52\x74\
457+\x00\x00\x05\x98\x00\x00\x00\x00\x00\x01\x00\x00\x48\xb4\
458+\x00\x00\x05\x28\x00\x00\x00\x00\x00\x01\x00\x00\x41\x83\
459+\x00\x00\x05\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x44\x2a\
460+\x00\x00\x05\x72\x00\x00\x00\x00\x00\x01\x00\x00\x46\x9d\
461+\x00\x00\x06\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x4f\xd0\
462 \x00\x00\x01\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
463 \x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x05\xe6\
464 \x00\x00\x01\x7e\x00\x00\x00\x00\x00\x01\x00\x00\x02\xfe\
465-\x00\x00\x08\xa0\x00\x00\x00\x00\x00\x01\x00\x04\x89\xa2\
466-\x00\x00\x09\x00\x00\x00\x00\x00\x00\x01\x00\x0a\x79\x20\
467-\x00\x00\x08\xd0\x00\x00\x00\x00\x00\x01\x00\x04\xfa\xa6\
468-\x00\x00\x09\x20\x00\x00\x00\x00\x00\x01\x00\x0b\xa7\x3a\
469-\x00\x00\x08\x6a\x00\x00\x00\x00\x00\x01\x00\x04\x4e\xd1\
470-\x00\x00\x08\x22\x00\x00\x00\x00\x00\x01\x00\x04\x4a\x1c\
471-\x00\x00\x08\x48\x00\x00\x00\x00\x00\x01\x00\x04\x4c\xba\
472-\x00\x00\x04\x9a\x00\x00\x00\x00\x00\x01\x00\x00\x34\x45\
473-\x00\x00\x03\x4a\x00\x00\x00\x00\x00\x01\x00\x00\x1f\x4e\
474-\x00\x00\x03\xde\x00\x00\x00\x00\x00\x01\x00\x00\x26\x32\
475-\x00\x00\x04\x3a\x00\x00\x00\x00\x00\x01\x00\x00\x2b\x5c\
476-\x00\x00\x03\x28\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x51\
477-\x00\x00\x03\x7e\x00\x00\x00\x00\x00\x01\x00\x00\x21\x1e\
478-\x00\x00\x04\x66\x00\x00\x00\x00\x00\x01\x00\x00\x30\x68\
479-\x00\x00\x04\xc0\x00\x00\x00\x00\x00\x01\x00\x00\x37\x27\
480-\x00\x00\x04\x02\x00\x00\x00\x00\x00\x01\x00\x00\x28\xe6\
481-\x00\x00\x03\xa8\x00\x00\x00\x00\x00\x01\x00\x00\x23\x82\
482-\x00\x00\x06\x6c\x00\x00\x00\x00\x00\x01\x00\x02\xf2\x16\
483-\x00\x00\x06\xd4\x00\x00\x00\x00\x00\x01\x00\x02\xfb\xa5\
484-\x00\x00\x06\x8c\x00\x00\x00\x00\x00\x01\x00\x02\xf5\xf3\
485-\x00\x00\x06\xb2\x00\x00\x00\x00\x00\x01\x00\x02\xf8\x6b\
486-\x00\x00\x06\x46\x00\x00\x00\x00\x00\x01\x00\x02\xef\x78\
487-\x00\x00\x0c\x50\x00\x00\x00\x00\x00\x01\x00\x0c\xed\x2b\
488-\x00\x00\x0b\xe6\x00\x00\x00\x00\x00\x01\x00\x0c\xe5\x56\
489-\x00\x00\x0c\x0a\x00\x00\x00\x00\x00\x01\x00\x0c\xe7\xe7\
490-\x00\x00\x0c\x2c\x00\x00\x00\x00\x00\x01\x00\x0c\xe9\xfa\
491-\x00\x00\x0b\xc4\x00\x00\x00\x00\x00\x01\x00\x0c\xe2\xb8\
492-\x00\x00\x09\x7c\x00\x00\x00\x00\x00\x01\x00\x0c\xba\xc3\
493-\x00\x00\x09\x56\x00\x00\x00\x00\x00\x01\x00\x0c\xb8\x25\
494-\x00\x00\x0c\x9e\x00\x00\x00\x00\x00\x01\x00\x0c\xf1\xcf\
495-\x00\x00\x0c\xc6\x00\x00\x00\x00\x00\x01\x00\x0c\xf4\x6d\
496-\x00\x00\x0c\x7a\x00\x00\x00\x00\x00\x01\x00\x0c\xef\x2f\
497+\x00\x00\x08\xe4\x00\x00\x00\x00\x00\x01\x00\x04\x90\x4b\
498+\x00\x00\x09\x44\x00\x00\x00\x00\x00\x01\x00\x0a\x7f\xc9\
499+\x00\x00\x09\x14\x00\x00\x00\x00\x00\x01\x00\x05\x01\x4f\
500+\x00\x00\x09\x64\x00\x00\x00\x00\x00\x01\x00\x0b\xad\xe3\
501+\x00\x00\x08\xae\x00\x00\x00\x00\x00\x01\x00\x04\x55\x7a\
502+\x00\x00\x08\x66\x00\x00\x00\x00\x00\x01\x00\x04\x50\xc5\
503+\x00\x00\x08\x8c\x00\x00\x00\x00\x00\x01\x00\x04\x53\x63\
504+\x00\x00\x04\xde\x00\x00\x00\x00\x00\x01\x00\x00\x3a\xee\
505+\x00\x00\x03\x8e\x00\x00\x00\x00\x00\x01\x00\x00\x25\xf7\
506+\x00\x00\x04\x22\x00\x00\x00\x00\x00\x01\x00\x00\x2c\xdb\
507+\x00\x00\x04\x7e\x00\x00\x00\x00\x00\x01\x00\x00\x32\x05\
508+\x00\x00\x03\x6c\x00\x00\x00\x00\x00\x01\x00\x00\x22\xfa\
509+\x00\x00\x03\xc2\x00\x00\x00\x00\x00\x01\x00\x00\x27\xc7\
510+\x00\x00\x04\xaa\x00\x00\x00\x00\x00\x01\x00\x00\x37\x11\
511+\x00\x00\x05\x04\x00\x00\x00\x00\x00\x01\x00\x00\x3d\xd0\
512+\x00\x00\x04\x46\x00\x00\x00\x00\x00\x01\x00\x00\x2f\x8f\
513+\x00\x00\x03\xec\x00\x00\x00\x00\x00\x01\x00\x00\x2a\x2b\
514+\x00\x00\x06\xb0\x00\x00\x00\x00\x00\x01\x00\x02\xf8\xbf\
515+\x00\x00\x07\x18\x00\x00\x00\x00\x00\x01\x00\x03\x02\x4e\
516+\x00\x00\x06\xd0\x00\x00\x00\x00\x00\x01\x00\x02\xfc\x9c\
517+\x00\x00\x06\xf6\x00\x00\x00\x00\x00\x01\x00\x02\xff\x14\
518+\x00\x00\x06\x8a\x00\x00\x00\x00\x00\x01\x00\x02\xf6\x21\
519+\x00\x00\x0c\x94\x00\x00\x00\x00\x00\x01\x00\x0c\xf3\xd4\
520+\x00\x00\x0c\x2a\x00\x00\x00\x00\x00\x01\x00\x0c\xeb\xff\
521+\x00\x00\x0c\x4e\x00\x00\x00\x00\x00\x01\x00\x0c\xee\x90\
522+\x00\x00\x0c\x70\x00\x00\x00\x00\x00\x01\x00\x0c\xf0\xa3\
523+\x00\x00\x0c\x08\x00\x00\x00\x00\x00\x01\x00\x0c\xe9\x61\
524+\x00\x00\x09\xc0\x00\x00\x00\x00\x00\x01\x00\x0c\xc1\x6c\
525+\x00\x00\x09\x9a\x00\x00\x00\x00\x00\x01\x00\x0c\xbe\xce\
526+\x00\x00\x0c\xe2\x00\x00\x00\x00\x00\x01\x00\x0c\xf8\x78\
527+\x00\x00\x0d\x0a\x00\x00\x00\x00\x00\x01\x00\x0c\xfb\x16\
528+\x00\x00\x0c\xbe\x00\x00\x00\x00\x00\x01\x00\x0c\xf5\xd8\
529 \x00\x00\x01\xde\x00\x00\x00\x00\x00\x01\x00\x00\x09\x05\
530 \x00\x00\x02\x12\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xa3\
531-\x00\x00\x0a\x24\x00\x00\x00\x00\x00\x01\x00\x0c\xc6\xe1\
532-\x00\x00\x0a\x48\x00\x00\x00\x00\x00\x01\x00\x0c\xc9\xdf\
533-\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x01\x00\x0c\xc4\x43\
534-\x00\x00\x09\x9e\x00\x00\x00\x00\x00\x01\x00\x0c\xbc\xda\
535-\x00\x00\x09\xdc\x00\x00\x00\x00\x00\x01\x00\x0c\xc1\xc1\
536-\x00\x00\x09\xbc\x00\x00\x00\x00\x00\x01\x00\x0c\xbf\x21\
537+\x00\x00\x0a\x68\x00\x00\x00\x00\x00\x01\x00\x0c\xcd\x8a\
538+\x00\x00\x0a\x8c\x00\x00\x00\x00\x00\x01\x00\x0c\xd0\x88\
539+\x00\x00\x0a\x44\x00\x00\x00\x00\x00\x01\x00\x0c\xca\xec\
540+\x00\x00\x09\xe2\x00\x00\x00\x00\x00\x01\x00\x0c\xc3\x83\
541+\x00\x00\x0a\x20\x00\x00\x00\x00\x00\x01\x00\x0c\xc8\x6a\
542+\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x01\x00\x0c\xc5\xca\
543 \x00\x00\x02\x66\x00\x00\x00\x00\x00\x01\x00\x00\x10\x0c\
544-\x00\x00\x02\xb0\x00\x00\x00\x00\x00\x01\x00\x00\x14\x2c\
545-\x00\x00\x02\xe2\x00\x00\x00\x00\x00\x01\x00\x00\x16\x57\
546+\x00\x00\x02\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x17\xff\
547+\x00\x00\x03\x04\x00\x00\x00\x00\x00\x01\x00\x00\x1a\x2a\
548+\x00\x00\x02\xac\x00\x00\x00\x00\x00\x01\x00\x00\x15\xf9\
549 \x00\x00\x02\x8a\x00\x00\x00\x00\x00\x01\x00\x00\x12\x26\
550+\x00\x00\x03\x4a\x00\x00\x00\x00\x00\x01\x00\x00\x20\x24\
551 \x00\x00\x02\x42\x00\x00\x00\x00\x00\x01\x00\x00\x0d\xba\
552-\x00\x00\x03\x04\x00\x00\x00\x00\x00\x01\x00\x00\x18\xba\
553-\x00\x00\x0a\x68\x00\x00\x00\x00\x00\x01\x00\x0c\xcc\x62\
554-\x00\x00\x0a\xca\x00\x00\x00\x00\x00\x01\x00\x0c\xd2\xd8\
555-\x00\x00\x0a\x9c\x00\x00\x00\x00\x00\x01\x00\x0c\xcf\xc4\
556-\x00\x00\x0a\xf2\x00\x00\x00\x00\x00\x01\x00\x0c\xd5\x76\
557-\x00\x00\x07\x8a\x00\x00\x00\x00\x00\x01\x00\x03\x37\xfb\
558-\x00\x00\x07\x2a\x00\x00\x00\x00\x00\x01\x00\x03\x08\xbb\
559-\x00\x00\x06\xfa\x00\x00\x00\x00\x00\x01\x00\x02\xfe\x27\
560-\x00\x00\x07\x5a\x00\x00\x00\x00\x00\x01\x00\x03\x1d\xf0\
561-\x00\x00\x07\xba\x00\x00\x00\x00\x00\x01\x00\x03\x3c\x18\
562-\x00\x00\x07\xee\x00\x00\x00\x00\x00\x01\x00\x04\x04\xb1\
563+\x00\x00\x03\x26\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x8d\
564+\x00\x00\x0a\xac\x00\x00\x00\x00\x00\x01\x00\x0c\xd3\x0b\
565+\x00\x00\x0b\x0e\x00\x00\x00\x00\x00\x01\x00\x0c\xd9\x81\
566+\x00\x00\x0a\xe0\x00\x00\x00\x00\x00\x01\x00\x0c\xd6\x6d\
567+\x00\x00\x0b\x36\x00\x00\x00\x00\x00\x01\x00\x0c\xdc\x1f\
568+\x00\x00\x07\xce\x00\x00\x00\x00\x00\x01\x00\x03\x3e\xa4\
569+\x00\x00\x07\x6e\x00\x00\x00\x00\x00\x01\x00\x03\x0f\x64\
570+\x00\x00\x07\x3e\x00\x00\x00\x00\x00\x01\x00\x03\x04\xd0\
571+\x00\x00\x07\x9e\x00\x00\x00\x00\x00\x01\x00\x03\x24\x99\
572+\x00\x00\x07\xfe\x00\x00\x00\x00\x00\x01\x00\x03\x42\xc1\
573+\x00\x00\x08\x32\x00\x00\x00\x00\x00\x01\x00\x04\x0b\x5a\
574 "
575
576 def qInitResources():
577
578=== modified file 'openlp/core/ui/__init__.py'
579--- openlp/core/ui/__init__.py 2009-06-29 05:07:32 +0000
580+++ openlp/core/ui/__init__.py 2009-07-03 19:08:21 +0000
581@@ -17,7 +17,7 @@
582 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
583 Place, Suite 330, Boston, MA 02111-1307 USA
584 """
585-from slidecontroller import BaseToolbar
586+from slidecontroller import MasterToolbar
587 from slidecontrollermanager import SlideControllerManager
588 from maindisplay import MainDisplay
589 from amendthemeform import AmendThemeForm
590@@ -33,5 +33,5 @@
591 from thememanager import ThemeManager
592 from mainwindow import MainWindow
593
594-__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'BaseToolbar'
595+__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MasterToolbar'
596 'MainWindow', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeManager', 'AmendThemeForm']
597
598=== modified file 'openlp/core/ui/maindisplay.py'
599--- openlp/core/ui/maindisplay.py 2009-06-17 05:11:16 +0000
600+++ openlp/core/ui/maindisplay.py 2009-07-03 19:08:21 +0000
601@@ -78,7 +78,7 @@
602 def blankDisplay(self):
603 if not self.displayBlank:
604 self.displayBlank = True
605- self.display.setPixmap(self.blankFrame)
606+ self.display.setPixmap(QtGui.QPixmap.fromImage(self.blankFrame))
607 else:
608 self.displayBlank = False
609 self.frameView(self.frame)
610
611=== modified file 'openlp/core/ui/mainwindow.py'
612--- openlp/core/ui/mainwindow.py 2009-06-29 05:07:32 +0000
613+++ openlp/core/ui/mainwindow.py 2009-07-03 19:08:21 +0000
614@@ -205,7 +205,7 @@
615 self.MediaManagerDock.setWindowIcon(icon)
616 self.MediaManagerDock.setFloating(False)
617 self.MediaManagerDock.setObjectName(u'MediaManagerDock')
618- self.MediaManagerDock.setMinimumWidth(250)
619+ self.MediaManagerDock.setMinimumWidth(300)
620 self.MediaManagerContents = QtGui.QWidget()
621 self.MediaManagerContents.setObjectName(u'MediaManagerContents')
622 self.MediaManagerLayout = QtGui.QHBoxLayout(self.MediaManagerContents)
623@@ -227,7 +227,7 @@
624 self.ServiceManagerDock.setFeatures(
625 QtGui.QDockWidget.AllDockWidgetFeatures)
626 self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
627- self.ServiceManagerDock.setMinimumWidth(250)
628+ self.ServiceManagerDock.setMinimumWidth(300)
629 self.ServiceManagerContents = ServiceManager(self)
630 self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
631 self.mainWindow.addDockWidget(
632
633=== modified file 'openlp/core/ui/slidecontroller.py'
634--- openlp/core/ui/slidecontroller.py 2009-06-29 05:07:32 +0000
635+++ openlp/core/ui/slidecontroller.py 2009-07-03 20:32:33 +0000
636@@ -21,100 +21,28 @@
637 import os
638
639 from PyQt4 import QtCore, QtGui
640-from openlp.core.lib import OpenLPToolbar, translate
641-
642-class SlideData(QtCore.QAbstractListModel):
643- """
644- List of frames to be displayed on the list and the main display.
645- """
646- global log
647- log = logging.getLogger(u'SlideData')
648-
649- def __init__(self):
650- QtCore.QAbstractListModel.__init__(self)
651- self.items = []
652- self.rowheight = 50
653- self.maximagewidth = self.rowheight * 16 / 9.0;
654- log.info(u'Starting')
655-
656- def clear(self):
657- self.items = []
658-
659- def columnCount(self, parent):
660- return 1
661-
662- def rowCount(self, parent=None):
663- return len(self.items)
664-
665- def insertRow(self, row, frame, framenumber):
666- self.beginInsertRows(QtCore.QModelIndex(), row, row)
667- log.info(u'insert row %d' % row)
668- # create a preview image
669- frame1 = frame.scaled(QtCore.QSize(280, 210), QtCore.Qt.KeepAspectRatio,
670- QtCore.Qt.SmoothTransformation)
671- self.items.insert(row, (frame1, framenumber))
672- log.info(u'Item loaded')
673- self.endInsertRows()
674-
675- def removeRow(self, row):
676- self.beginRemoveRows(QtCore.QModelIndex(), row, row)
677- self.items.pop(row)
678- self.endRemoveRows()
679-
680- def addRow(self, frame, framenumber):
681- self.insertRow(len(self.items), frame, framenumber)
682-
683- def data(self, index, role):
684- row = index.row()
685- if row > len(self.items):
686- # if the last row is selected and deleted, we then get called with
687- # an empty row!
688- return QtCore.QVariant()
689- if role == QtCore.Qt.DecorationRole:
690- retval = self.items[row][0]
691- else:
692- retval = QtCore.QVariant()
693- if type(retval) is not type(QtCore.QVariant):
694- return QtCore.QVariant(retval)
695- else:
696- return retval
697-
698- def __iter__(self):
699- for item in self.items:
700- yield item
701-
702- def getValue(self, index):
703- row = index.row()
704- return self.items[row]
705-
706- def getItem(self, row):
707- log.info(u'Get Item:%d -> %s' %(row, unicode(self.items)))
708- return self.items[row]
709-
710- def getList(self):
711- filelist = [item[3] for item in self.items];
712- return filelist
713-
714-class SlideList(QtGui.QListView):
715+from openlp.core.lib import OpenLPToolbar, translate, buildIcon
716+
717+class SlideList(QtGui.QTableWidget):
718
719 def __init__(self,parent=None,name=None):
720- QtGui.QListView.__init__(self,parent.Controller)
721+ QtGui.QTableWidget.__init__(self,parent.Controller)
722 self.parent = parent
723
724 def keyPressEvent(self, event):
725 if type(event) == QtGui.QKeyEvent:
726 #here accept the event and do something
727 if event.key() == QtCore.Qt.Key_Up:
728- self.parent.onSlideSelectedPrevious()
729+ self.parent.BaseToolbar.onSlideSelectedPrevious()
730 event.accept()
731 elif event.key() == QtCore.Qt.Key_Down:
732- self.parent.onSlideSelectedNext()
733+ self.parent.BaseToolbar.onSlideSelectedNext()
734 event.accept()
735 elif event.key() == QtCore.Qt.Key_PageUp:
736- self.parent.onSlideSelectedFirst()
737+ self.parent.BaseToolbar.onSlideSelectedFirst()
738 event.accept()
739 elif event.key() == QtCore.Qt.Key_PageDown:
740- self.parent.onSlideSelectedLast()
741+ self.parent.BaseToolbar.onSlideSelectedLast()
742 event.accept()
743 event.ignore()
744 else:
745@@ -132,6 +60,7 @@
746 """
747 Set up the Slide Controller.
748 """
749+ self.toolbarList = {}
750 QtGui.QWidget.__init__(self, parent.mainWindow)
751 self.isLive = isLive
752 self.parent = parent
753@@ -145,7 +74,7 @@
754 self.PanelLayout.setMargin(0)
755 # Actual controller section
756 self.Controller = QtGui.QWidget(self.Splitter)
757- self.Controller.setGeometry(QtCore.QRect(0, 0, 800, 536))
758+ self.Controller.setGeometry(QtCore.QRect(0, 0, 100, 536))
759 self.Controller.setSizePolicy(
760 QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
761 QtGui.QSizePolicy.Maximum))
762@@ -153,21 +82,17 @@
763 self.ControllerLayout.setSpacing(0)
764 self.ControllerLayout.setMargin(0)
765 # Controller list view
766- self.PreviewListView = SlideList(self)
767- self.PreviewListView.setUniformItemSizes(True)
768- self.PreviewListView.setIconSize(QtCore.QSize(250, 190))
769- self.PreviewListData = SlideData()
770- self.PreviewListView.isLive = self.isLive
771- if QtCore.QT_VERSION_STR > u'4.4.0':
772- self.PreviewListView.setFlow(1)
773- self.PreviewListView.setViewMode(1)
774- self.PreviewListView.setWrapping(False)
775- self.PreviewListView.setModel(self.PreviewListData)
776- self.PreviewListView.setSpacing(0)
777- self.PreviewListView.setObjectName(u'PreviewListView')
778- self.ControllerLayout.addWidget(self.PreviewListView)
779+ self.PreviewListWidget = SlideList(self)
780+ self.PreviewListWidget.setColumnCount(1)
781+ self.PreviewListWidget.horizontalHeader().setVisible(False)
782+ self.PreviewListWidget.verticalHeader().setVisible(False)
783+ self.PreviewListWidget.setColumnWidth(1, self.Controller.width())
784+ self.PreviewListWidget.isLive = self.isLive
785+ self.PreviewListWidget.setObjectName(u'PreviewListWidget')
786+ self.ControllerLayout.addWidget(self.PreviewListWidget)
787 # Plugin the Base Toolbar class
788- self.BaseToolbar = BaseToolbar(self.isLive)
789+ self.BaseToolbar = MasterToolbar(self.isLive)
790+ self.registerToolbar(u'master', self.BaseToolbar)
791 self.Toolbar = self.BaseToolbar.getToolbar()
792 self.ControllerLayout.addWidget(self.Toolbar)
793 sizeToolbarPolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
794@@ -179,7 +104,7 @@
795 self.Toolbar.setSizePolicy(sizeToolbarPolicy)
796 # Screen preview area
797 self.PreviewFrame = QtGui.QFrame(self.Splitter)
798- self.PreviewFrame.setGeometry(QtCore.QRect(0, 0, 250, 190))
799+ self.PreviewFrame.setGeometry(QtCore.QRect(0, 0, 280, 190))
800 self.PreviewFrame.setSizePolicy(QtGui.QSizePolicy(
801 QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum))
802 self.PreviewFrame.setFrameShape(QtGui.QFrame.StyledPanel)
803@@ -197,44 +122,83 @@
804 sizePolicy.setHeightForWidth(
805 self.SlidePreview.sizePolicy().hasHeightForWidth())
806 self.SlidePreview.setSizePolicy(sizePolicy)
807- self.SlidePreview.setMinimumSize(QtCore.QSize(280, 210))
808+ self.SlidePreview.setFixedSize(QtCore.QSize(250, 210))
809 self.SlidePreview.setFrameShape(QtGui.QFrame.Box)
810 self.SlidePreview.setFrameShadow(QtGui.QFrame.Plain)
811 self.SlidePreview.setLineWidth(1)
812 self.SlidePreview.setScaledContents(True)
813 self.SlidePreview.setObjectName(u'SlidePreview')
814 self.grid.addWidget(self.SlidePreview, 0, 0, 1, 1)
815- QtCore.QObject.connect(self.PreviewListView,
816+ # Signals
817+ QtCore.QObject.connect(self.PreviewListWidget,
818 QtCore.SIGNAL(u'clicked(QModelIndex)'), self.BaseToolbar.onSlideSelected)
819- QtCore.QObject.connect(self.PreviewListView,
820+ QtCore.QObject.connect(self.PreviewListWidget,
821 QtCore.SIGNAL(u'activated(QModelIndex)'), self.BaseToolbar.onSlideSelected)
822 # Add Late Arrivals
823- self.BaseToolbar.PreviewListView = self.PreviewListView
824- self.BaseToolbar.PreviewListData = self.PreviewListData
825+ self.BaseToolbar.PreviewListWidget = self.PreviewListWidget
826 self.BaseToolbar.SlidePreview = self.SlidePreview
827 self.BaseToolbar.mainDisplay = self.parent.mainDisplay
828
829+ def registerToolbar(self, handle,controller):
830+ #store the handle name in lower case so no probems later
831+ self.toolbarList[handle.lower()] = controller
832+
833+ def retrieveToolbar(self, handle):
834+ """
835+ Find the toolbar and return master if none present
836+ Add extra information back into toolbar class
837+ """
838+ try:
839+ toolbar = self.toolbarList[handle.lower()]
840+ except:
841+ toolbar = self.toolbarList[u'master']
842+ toolbar.PreviewListWidget = self.PreviewListWidget
843+ toolbar.SlidePreview = self.SlidePreview
844+ toolbar.mainDisplay = self.parent.mainDisplay
845+ return toolbar
846+
847 def addServiceItem(self, item):
848+ """
849+ helper method to pass item to correct toolbar
850+ """
851+ self.BaseToolbar = self.retrieveToolbar(item.shortname)
852+ self.ControllerLayout.removeWidget(self.Toolbar)
853+ #remove the old toolbar
854+ self.Toolbar.clear()
855+ self.Toolbar = self.BaseToolbar.getToolbar()
856+ self.ControllerLayout.addWidget(self.Toolbar)
857 self.BaseToolbar.addServiceItem(item)
858
859 def addServiceManagerItem(self, item, slideno):
860+ """
861+ helper method to pass item to correct toolbar
862+ """
863+ self.BaseToolbar = self.retrieveToolbar(item.shortname)
864+ self.ControllerLayout.removeWidget(self.Toolbar)
865+ #remove the old toolbar
866+ self.Toolbar.clear()
867+ self.Toolbar = self.BaseToolbar.getToolbar()
868+ self.ControllerLayout.addWidget(self.Toolbar)
869 self.BaseToolbar.addServiceManagerItem(item, slideno)
870
871-class BaseToolbar(object):
872-
873+class MasterToolbar(QtCore.QObject):
874+ """
875+ Class from which all tollbars should extend
876+ """
877 def __init__(self, isLive):
878 self.Toolbar = None
879- self.PreviewListView = QtGui.QListWidget()
880- self.PreviewListData = None
881+ QtCore.QObject.__init__(self)
882+ self.PreviewListWidget = QtGui.QListWidget()
883 self.isLive = isLive
884+
885+ def getToolbar(self):
886+ #define toolbar here as it needs to be redefined each time
887+ #as the clear destroys it.
888 self.defineToolbar()
889-
890- def getToolbar(self):
891 return self.Toolbar
892
893 def defineToolbar(self):
894 # Controller toolbar
895- #self.Toolbar = OpenLPToolbar(self.Controller)
896 self.Toolbar = OpenLPToolbar(self)
897 sizeToolbarPolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
898 QtGui.QSizePolicy.Fixed)
899@@ -249,11 +213,11 @@
900 u':/slides/slide_first.png',
901 translate(u'SlideController', u'Move to first'),
902 self.onSlideSelectedFirst)
903- self.Toolbar.addToolbarButton(u'Last Slide',
904+ self.Toolbar.addToolbarButton(u'Previous Slide',
905 u':/slides/slide_previous.png',
906 translate(u'SlideController', u'Move to previous'),
907 self.onSlideSelectedPrevious)
908- self.Toolbar.addToolbarButton(u'First Slide',
909+ self.Toolbar.addToolbarButton(u'Next Slide',
910 u':/slides/slide_next.png',
911 translate(u'SlideController', u'Move to next'),
912 self.onSlideSelectedNext)
913@@ -272,56 +236,35 @@
914 """
915 Go to the first slide.
916 """
917- row = self.PreviewListData.createIndex(0, 0)
918- if row.isValid():
919- self.PreviewListView.selectionModel().setCurrentIndex(row,
920- QtGui.QItemSelectionModel.SelectCurrent)
921- self.onSlideSelected(row)
922+ self.PreviewListWidget.selectRow(0)
923+ self.onSlideSelected()
924
925 def onSlideSelectedNext(self):
926 """
927 Go to the next slide.
928 """
929- indexes = self.PreviewListView.selectedIndexes()
930- rowNumber = 0
931- for index in indexes:
932- if index.row() == self.PreviewListData.rowCount() - 1:
933- rowNumber = 0
934- else:
935- rowNumber = index.row() + 1
936- row = self.PreviewListData.createIndex(rowNumber, 0)
937- if row.isValid():
938- self.PreviewListView.selectionModel().setCurrentIndex(row,
939- QtGui.QItemSelectionModel.SelectCurrent)
940- self.onSlideSelected(row)
941+ row = self.PreviewListWidget.currentRow() + 1
942+ if row == self.PreviewListWidget.rowCount():
943+ row = 0
944+ self.PreviewListWidget.selectRow(row)
945+ self.onSlideSelected()
946
947 def onSlideSelectedPrevious(self):
948 """
949 Go to the previous slide.
950 """
951- indexes = self.PreviewListView.selectedIndexes()
952- rowNumber = 0
953- for index in indexes:
954- if index.row() == 0:
955- rowNumber = self.PreviewListData.rowCount() - 1
956- else:
957- rowNumber = index.row() - 1
958- row = self.PreviewListData.createIndex(rowNumber, 0)
959- if row.isValid():
960- self.PreviewListView.selectionModel().setCurrentIndex(row,
961- QtGui.QItemSelectionModel.SelectCurrent)
962- self.onSlideSelected(row)
963+ row = self.PreviewListWidget.currentRow() - 1
964+ if row == -1:
965+ row = self.PreviewListWidget.rowCount() - 1
966+ self.PreviewListWidget.selectRow(row)
967+ self.onSlideSelected()
968
969 def onSlideSelectedLast(self):
970 """
971 Go to the last slide.
972 """
973- row = self.PreviewListData.createIndex(
974- self.PreviewListData.rowCount() - 1, 0)
975- if row.isValid():
976- self.PreviewListView.selectionModel().setCurrentIndex(row,
977- QtGui.QItemSelectionModel.SelectCurrent)
978- self.onSlideSelected(row)
979+ self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount() - 1)
980+ self.onSlideSelected()
981
982 def onBlankScreen(self):
983 """
984@@ -329,54 +272,56 @@
985 """
986 self.mainDisplay.blankDisplay()
987
988- def onSlideSelected(self, index):
989+ def onSlideSelected(self):
990 """
991 Generate the preview when you click on a slide.
992- """
993- frame = self.PreviewListData.getValue(index)
994- self.previewFrame(frame)
995-
996- def previewFrame(self, frame):
997- """
998- Generates a preview of the current slide.
999- """
1000- self.SlidePreview.setPixmap(QtGui.QPixmap.fromImage(frame[0]))
1001- if self.isLive:
1002- no = frame[1]
1003- LiveFrame = self.serviceitem.frames[no][u'image']
1004- self.mainDisplay.frameView(LiveFrame)
1005-
1006- def addServiceItem(self, serviceitem):
1007- """
1008- Loads a ServiceItem.
1009+ if this is the Live Controller also display on the screen
1010+ """
1011+ row = self.PreviewListWidget.currentRow()
1012+ if row > -1 and row < self.PreviewListWidget.rowCount():
1013+ label = self.PreviewListWidget.cellWidget(row, 0)
1014+ smallframe = label.pixmap()
1015+ frame = self.serviceitem.frames[row][u'image']
1016+ self.SlidePreview.setPixmap(smallframe)
1017+ if self.isLive:
1018+ self.mainDisplay.frameView(frame)
1019+
1020+ def addServiceItem(self, serviceitem, slideno = 1):
1021+ """
1022+ Loads a ServiceItem into the system from plugins
1023+ Display the first slide
1024 """
1025 log.debug(u'add Service Item')
1026- self.serviceitem = serviceitem
1027- self.serviceitem.render()
1028- self.PreviewListData.clear()
1029- framenumber = 0
1030- for frame in self.serviceitem.frames:
1031- self.PreviewListData.addRow(frame[u'image'], framenumber)
1032- framenumber += 1
1033- row = self.PreviewListData.createIndex(0, 0)
1034- if row.isValid():
1035- self.PreviewListView.selectionModel().setCurrentIndex(row,
1036- QtGui.QItemSelectionModel.SelectCurrent)
1037- self.onSlideSelected(row)
1038+ serviceitem.render()
1039+ self.addServiceManagerItem(serviceitem, 0)
1040
1041 def addServiceManagerItem(self, serviceitem, slideno):
1042 """
1043- Loads a ServiceManagerItem.
1044+ Loads a ServiceItem into the system from ServiceManager
1045+ Display the Slide Passed
1046 """
1047 log.debug(u'add Service Manager Item')
1048- self.PreviewListData.clear()
1049+ self.PreviewListWidget.clear()
1050+ self.PreviewListWidget.setRowCount(0)
1051 self.serviceitem = serviceitem
1052 framenumber = 0
1053 for frame in self.serviceitem.frames:
1054- self.PreviewListData.addRow(frame[u'image'], framenumber)
1055+ self.PreviewListWidget.setRowCount(self.PreviewListWidget.rowCount() + 1)
1056+ pixmap = QtGui.QPixmap.fromImage(frame[u'image'])
1057+ item = QtGui.QTableWidgetItem()
1058+ label = QtGui.QLabel()
1059+ label.setMargin(15)
1060+ label.setScaledContents(True)
1061+ width = 300
1062+ height = width * pixmap.height() / pixmap.width()
1063+ label.setPixmap(pixmap)
1064+ self.PreviewListWidget.setCellWidget(framenumber, 0,label)
1065+ self.PreviewListWidget.setItem( framenumber, 0, item)
1066+ self.PreviewListWidget.setRowHeight(framenumber, height)
1067+ self.PreviewListWidget.setColumnWidth(0, width)
1068 framenumber += 1
1069- row = self.PreviewListData.createIndex(slideno, 0)
1070- if row.isValid():
1071- self.PreviewListView.selectionModel().setCurrentIndex(row,
1072- QtGui.QItemSelectionModel.SelectCurrent)
1073- self.onSlideSelected(row)
1074+ if slideno > self.PreviewListWidget.rowCount():
1075+ self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount())
1076+ else:
1077+ self.PreviewListWidget.selectRow(slideno)
1078+ self.onSlideSelected()
1079
1080=== modified file 'openlp/core/ui/thememanager.py'
1081--- openlp/core/ui/thememanager.py 2009-06-29 05:07:32 +0000
1082+++ openlp/core/ui/thememanager.py 2009-07-02 19:04:50 +0000
1083@@ -177,7 +177,6 @@
1084 items = self.ThemeListView.selectedIndexes()
1085 if len(items) > 0:
1086 for item in items:
1087- print item
1088 data = self.themeData.getValue(item)
1089 self.amendThemeForm.loadTheme(data[3])
1090 self.amendThemeForm.exec_()
1091@@ -222,7 +221,10 @@
1092 for root, dirs, files in os.walk(self.path):
1093 for name in files:
1094 if name.endswith(u'.png'):
1095- self.themeData.addRow(os.path.join(self.path, name))
1096+ #check to see file is in route directory
1097+ theme = os.path.join(self.path, name)
1098+ if os.path.exists(theme):
1099+ self.themeData.addRow(theme)
1100 self.parent.EventManager.post_event(Event(EventType.ThemeListChanged))
1101 self.parent.ServiceManagerContents.updateThemeList(self.getThemes())
1102 self.parent.settingsForm.ThemesTab.updateThemeList(self.getThemes())
1103
1104=== modified file 'openlp/plugins/bibles/bibleplugin.py'
1105--- openlp/plugins/bibles/bibleplugin.py 2009-06-26 17:51:43 +0000
1106+++ openlp/plugins/bibles/bibleplugin.py 2009-07-03 20:32:33 +0000
1107@@ -37,7 +37,7 @@
1108 self.weight = -9
1109 # Create the plugin icon
1110 self.icon = QtGui.QIcon()
1111- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_verse.png'),
1112+ self.icon.addPixmap(QtGui.QPixmap(u':/media/media_bible.png'),
1113 QtGui.QIcon.Normal, QtGui.QIcon.Off)
1114 #Register the bible Manager
1115 self.biblemanager = BibleManager(self.config)
1116
1117=== modified file 'openlp/plugins/bibles/lib/manager.py'
1118--- openlp/plugins/bibles/lib/manager.py 2009-06-20 19:11:17 +0000
1119+++ openlp/plugins/bibles/lib/manager.py 2009-07-03 20:32:33 +0000
1120@@ -245,7 +245,7 @@
1121 log.debug(u'get_verse_text : new book')
1122 for chapter in range(schapter, echapter+1):
1123 search_results = self.bible_http_cache [bible].get_bible_chapter(bible, 0, bookname, chapter)
1124- if search_results.has_verse_list() :
1125+ if search_results.has_verselist() :
1126 ## We have found a book of the bible lets check to see if it was there.
1127 ## By reusing the returned book name we get a correct book.
1128 ## For example it is possible to request ac and get Acts back.
1129
1130=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
1131--- openlp/plugins/bibles/lib/mediaitem.py 2009-06-29 05:07:32 +0000
1132+++ openlp/plugins/bibles/lib/mediaitem.py 2009-07-04 05:52:30 +0000
1133@@ -21,7 +21,7 @@
1134
1135 from PyQt4 import QtCore, QtGui
1136
1137-from openlp.core.lib import ServiceItem, MediaManagerItem, Receiver, translate
1138+from openlp.core.lib import ServiceItem, MediaManagerItem, Receiver, translate, contextMenuAction, contextMenuSeparator
1139 from openlp.plugins.bibles.forms import BibleImportForm
1140
1141 class BibleList(QtGui.QListWidget):
1142@@ -215,13 +215,13 @@
1143 QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onPreviewClick)
1144 # Context Menus
1145 self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
1146- self.ListView.addAction(self.contextMenuAction(
1147+ self.ListView.addAction(contextMenuAction(
1148 self.ListView, u':/system/system_preview.png',
1149 translate(u'BibleMediaItem',u'&Preview Verse'), self.onPreviewClick))
1150- self.ListView.addAction(self.contextMenuAction(
1151+ self.ListView.addAction(contextMenuAction(
1152 self.ListView, u':/system/system_live.png',
1153 translate(u'BibleMediaItem',u'&Show Live'), self.onLiveClick))
1154- self.ListView.addAction(self.contextMenuAction(
1155+ self.ListView.addAction(contextMenuAction(
1156 self.ListView, u':/system/system_add.png',
1157 translate(u'BibleMediaItem',u'&Add to Service'), self.onAddClick))
1158
1159
1160=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
1161--- openlp/plugins/custom/lib/mediaitem.py 2009-06-27 19:55:55 +0000
1162+++ openlp/plugins/custom/lib/mediaitem.py 2009-07-04 05:52:30 +0000
1163@@ -21,7 +21,7 @@
1164
1165 from PyQt4 import QtCore, QtGui
1166
1167-from openlp.core.lib import MediaManagerItem, SongXMLParser, ServiceItem, translate
1168+from openlp.core.lib import MediaManagerItem, SongXMLParser, ServiceItem, translate, contextMenuAction, contextMenuSeparator
1169
1170 class CustomList(QtGui.QListWidget):
1171
1172@@ -114,17 +114,17 @@
1173 QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onCustomPreviewClick)
1174 #define and add the context menu
1175 self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
1176- self.ListView.addAction(self.contextMenuAction(self.ListView,
1177+ self.ListView.addAction(contextMenuAction(self.ListView,
1178 ':/custom/custom_edit.png', translate(u'CustomMediaItem', u'&Edit Custom'),
1179 self.onCustomEditClick))
1180- self.ListView.addAction(self.contextMenuSeparator(self.ListView))
1181- self.ListView.addAction(self.contextMenuAction(
1182+ self.ListView.addAction(contextMenuSeparator(self.ListView))
1183+ self.ListView.addAction(contextMenuAction(
1184 self.ListView, ':/system/system_preview.png',
1185 translate(u'CustomMediaItem',u'&Preview Custom'), self.onCustomPreviewClick))
1186- self.ListView.addAction(self.contextMenuAction(
1187+ self.ListView.addAction(contextMenuAction(
1188 self.ListView, ':/system/system_live.png',
1189 translate(u'CustomMediaItem',u'&Show Live'), self.onCustomLiveClick))
1190- self.ListView.addAction(self.contextMenuAction(
1191+ self.ListView.addAction(contextMenuAction(
1192 self.ListView, ':/system/system_add.png',
1193 translate(u'CustomMediaItem',u'&Add to Service'), self.onCustomAddClick))
1194
1195
1196=== modified file 'openlp/plugins/images/imageplugin.py'
1197--- openlp/plugins/images/imageplugin.py 2009-06-27 15:33:03 +0000
1198+++ openlp/plugins/images/imageplugin.py 2009-07-03 20:32:33 +0000
1199@@ -22,7 +22,7 @@
1200 from PyQt4 import QtCore, QtGui
1201
1202 from openlp.core.lib import Plugin, Event, EventType
1203-from openlp.plugins.images.lib import ImageMediaItem
1204+from openlp.plugins.images.lib import ImageMediaItem, ImageTab
1205
1206 class ImagePlugin(Plugin):
1207 global log
1208@@ -40,6 +40,10 @@
1209 # passed with drag and drop messages
1210 self.dnd_id = u'Image'
1211
1212+ def get_settings_tab(self):
1213+ self.ImageTab = ImageTab()
1214+ return self.ImageTab
1215+
1216 def get_media_manager_item(self):
1217 # Create the MediaManagerItem object
1218 self.media_item = ImageMediaItem(self, self.icon, u'Images')
1219
1220=== modified file 'openlp/plugins/images/lib/__init__.py'
1221--- openlp/plugins/images/lib/__init__.py 2009-06-29 05:07:32 +0000
1222+++ openlp/plugins/images/lib/__init__.py 2009-07-03 20:32:33 +0000
1223@@ -19,3 +19,4 @@
1224 """
1225 from mediaitem import ImageMediaItem
1226 from imageslidecontroller import ImageToolbar
1227+from imagetab import ImageTab
1228
1229=== modified file 'openlp/plugins/images/lib/imageslidecontroller.py'
1230--- openlp/plugins/images/lib/imageslidecontroller.py 2009-06-29 05:07:32 +0000
1231+++ openlp/plugins/images/lib/imageslidecontroller.py 2009-07-03 20:32:33 +0000
1232@@ -22,23 +22,20 @@
1233
1234 from PyQt4 import QtCore, QtGui
1235 from openlp.core.lib import OpenLPToolbar, translate
1236-from openlp.core.ui.slidecontroller import BaseToolbar
1237-
1238-class ImageToolbar(BaseToolbar):
1239-
1240- def __init__(self, isLive):
1241+from openlp.core.ui.slidecontroller import MasterToolbar
1242+
1243+class ImageToolbar(MasterToolbar):
1244+
1245+ def __init__(self, parent, isLive):
1246+ MasterToolbar.__init__(self, isLive)
1247+ self.parent = parent
1248 self.Toolbar = None
1249- self.PreviewListView = QtGui.QListWidget()
1250- self.PreviewListData = None
1251 self.isLive = isLive
1252 self.defineToolbar()
1253
1254- def getToolbar(self):
1255- return self.Toolbar
1256-
1257 def defineToolbar(self):
1258 # Controller toolbar
1259- #self.Toolbar = OpenLPToolbar(self.Controller)
1260+ self.Toolbar = OpenLPToolbar(self)
1261 sizeToolbarPolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
1262 QtGui.QSizePolicy.Fixed)
1263 sizeToolbarPolicy.setHorizontalStretch(0)
1264@@ -50,11 +47,11 @@
1265 u':/slides/slide_first.png',
1266 translate(u'SlideController', u'Move to first'),
1267 self.onSlideSelectedFirst)
1268- self.Toolbar.addToolbarButton(u'Last Slide',
1269+ self.Toolbar.addToolbarButton(u'Previous Slide',
1270 u':/slides/slide_previous.png',
1271 translate(u'SlideController', u'Move to previous'),
1272 self.onSlideSelectedPrevious)
1273- self.Toolbar.addToolbarButton(u'First Slide',
1274+ self.Toolbar.addToolbarButton(u'Next Slide',
1275 u':/slides/slide_next.png',
1276 translate(u'SlideController', u'Move to next'),
1277 self.onSlideSelectedNext)
1278@@ -70,34 +67,29 @@
1279 self.onBlankScreen)
1280 self.Toolbar.addSeparator()
1281 self.Toolbar.addToolbarButton(u'Start Loop',
1282- u':/slides/slide_last.png',
1283+ u':/media/media_time.png',
1284 translate(u'SlideController', u'Start continuous loop'),
1285 self.onStartLoop)
1286 self.Toolbar.addToolbarButton(u'Stop Loop',
1287- u':/slides/slide_last.png',
1288- translate(u'SlideController', u'Start continuous loop'),
1289+ u':/media/media_stop.png',
1290+ translate(u'SlideController', u'Stop continuous loop'),
1291 self.onStopLoop)
1292 self.Toolbar.setSizePolicy(sizeToolbarPolicy)
1293- self.ControllerLayout.addWidget(self.Toolbar)
1294
1295 def onStartLoop(self):
1296 """
1297 Go to the last slide.
1298 """
1299- row = self.PreviewListData.createIndex(
1300- self.PreviewListData.rowCount() - 1, 0)
1301- if row.isValid():
1302- self.PreviewListView.selectionModel().setCurrentIndex(row,
1303- QtGui.QItemSelectionModel.SelectCurrent)
1304- self.onSlideSelected(row)
1305+ delay = self.parent.parent.ImageTab.loop_delay
1306+ self.timer_id = self.startTimer(delay * 1000)
1307
1308 def onStopLoop(self):
1309 """
1310 Go to the last slide.
1311 """
1312- row = self.PreviewListData.createIndex(
1313- self.PreviewListData.rowCount() - 1, 0)
1314- if row.isValid():
1315- self.PreviewListView.selectionModel().setCurrentIndex(row,
1316- QtGui.QItemSelectionModel.SelectCurrent)
1317- self.onSlideSelected(row)
1318+ self.killTimer(self.timer_id)
1319+
1320+ def timerEvent(self, event):
1321+ if event.timerId() == self.timer_id:
1322+ self.onSlideSelectedNext()
1323+
1324
1325=== added file 'openlp/plugins/images/lib/imagetab.py'
1326--- openlp/plugins/images/lib/imagetab.py 1970-01-01 00:00:00 +0000
1327+++ openlp/plugins/images/lib/imagetab.py 2009-07-03 20:33:41 +0000
1328@@ -0,0 +1,69 @@
1329+# -*- coding: utf-8 -*-
1330+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
1331+"""
1332+OpenLP - Open Source Lyrics Projection
1333+Copyright (c) 2008 Raoul Snyman
1334+Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley,
1335+
1336+This program is free software; you can redistribute it and/or modify it under
1337+the terms of the GNU General Public License as published by the Free Software
1338+Foundation; version 2 of the License.
1339+
1340+This program is distributed in the hope that it will be useful, but WITHOUT ANY
1341+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1342+PARTICULAR PURPOSE. See the GNU General Public License for more details.
1343+
1344+You should have received a copy of the GNU General Public License along with
1345+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
1346+Place, Suite 330, Boston, MA 02111-1307 USA
1347+"""
1348+
1349+from PyQt4 import QtCore, QtGui
1350+
1351+from openlp.core.lib import SettingsTab, str_to_bool, translate
1352+
1353+class ImageTab(SettingsTab):
1354+ """
1355+ ImageTab is the Image settings tab in the settings dialog.
1356+ """
1357+ def __init__(self):
1358+ SettingsTab.__init__(self, translate(u'ImageTab', u'Image'), u'Image')
1359+
1360+ def setupUi(self):
1361+ self.setObjectName(u'ImageTab')
1362+ self.ImageLayout = QtGui.QFormLayout(self)
1363+ self.ImageLayout.setObjectName(u'ImageLayout')
1364+ self.ImageModeGroupBox = QtGui.QGroupBox(self)
1365+ self.ImageModeGroupBox.setObjectName(u'ImageModeGroupBox')
1366+ self.TimeoutLayout = QtGui.QHBoxLayout(self.ImageModeGroupBox)
1367+ self.TimeoutLayout.setSpacing(8)
1368+ self.TimeoutLayout.setMargin(0)
1369+ self.TimeoutLayout.setObjectName(u'TimeoutLayout')
1370+ self.TimeoutLabel = QtGui.QLabel(self.ImageModeGroupBox)
1371+ self.TimeoutLabel.setObjectName(u'TimeoutLabel')
1372+ self.TimeoutLayout.addWidget(self.TimeoutLabel)
1373+ self.TimeoutSpinBox = QtGui.QSpinBox(self.ImageModeGroupBox)
1374+ self.TimeoutSpinBox.setMaximum(180)
1375+ self.TimeoutSpinBox.setObjectName(u'TimeoutSpinBox')
1376+ self.TimeoutLayout.addWidget(self.TimeoutSpinBox)
1377+ self.TimeoutSpacer = QtGui.QSpacerItem(147, 20,
1378+ QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
1379+ self.TimeoutLayout.addItem(self.TimeoutSpacer)
1380+
1381+ self.ImageLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.ImageModeGroupBox)
1382+ # Signals and slots
1383+ QtCore.QObject.connect(self.TimeoutSpinBox,
1384+ QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
1385+
1386+ def retranslateUi(self):
1387+ self.TimeoutLabel.setText(translate(u'ImageTab', u'Slide Loop Delay:'))
1388+
1389+ def onTimeoutSpinBoxChanged(self):
1390+ self.loop_delay = self.TimeoutSpinBox.value()
1391+
1392+ def load(self):
1393+ self.loop_delay = int(self.config.get_config(u'loop delay', 5))
1394+ self.TimeoutSpinBox.setValue(self.loop_delay)
1395+
1396+ def save(self):
1397+ self.config.set_config(u'loop delay', self.loop_delay)
1398
1399=== modified file 'openlp/plugins/images/lib/mediaitem.py'
1400--- openlp/plugins/images/lib/mediaitem.py 2009-06-29 05:13:06 +0000
1401+++ openlp/plugins/images/lib/mediaitem.py 2009-07-04 05:52:30 +0000
1402@@ -53,12 +53,12 @@
1403 # this next is a class, not an instance of a class - it will
1404 # be instanced by the base MediaManagerItem
1405 self.ListViewWithDnD_class = ImageListView
1406+ self.ServiceItemIconName = u':/media/media_image.png'
1407+
1408 MediaManagerItem.__init__(self, parent, icon, title)
1409- #create and install our own slide controllers
1410- #a=c
1411-# live_controller = ImageSlideController(self.parent.slideManager.parent, True)
1412-# preview_controller = ImageSlideController(self.parent.slideManager.parent)
1413-# self.parent.slideManager.add_controllers(u'image', preview_controller, live_controller)
1414+ #create and install our own slide controller toolbar
1415+ imageToolbar = ImageToolbar(self, True)
1416+ parent.live_controller.registerToolbar(self.ConfigSection, imageToolbar)
1417
1418 def initialise(self):
1419 self.ListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
1420
1421=== modified file 'openlp/plugins/media/lib/mediaitem.py'
1422--- openlp/plugins/media/lib/mediaitem.py 2009-06-16 18:21:24 +0000
1423+++ openlp/plugins/media/lib/mediaitem.py 2009-07-04 05:52:30 +0000
1424@@ -19,6 +19,12 @@
1425 """
1426 import logging
1427 import os
1428+import tempfile
1429+try:
1430+ import gst
1431+except:
1432+ log = logging.getLogger(u'MediaMediaItemSetup')
1433+ log.warning(u'Can\'t generate Videos previews - import gst failed');
1434
1435 from PyQt4 import QtCore, QtGui
1436
1437@@ -26,6 +32,13 @@
1438
1439 from openlp.plugins.media.lib import MediaTab
1440 from openlp.plugins.media.lib import FileListData
1441+# from listwithpreviews import ListWithPreviews
1442+from openlp.core.lib import MediaManagerItem, ServiceItem, translate, BaseListWithDnD, buildIcon
1443+
1444+class MediaListView(BaseListWithDnD):
1445+ def __init__(self, parent=None):
1446+ self.PluginName = u'Media'
1447+ BaseListWithDnD.__init__(self, parent)
1448
1449 class MediaMediaItem(MediaManagerItem):
1450 """
1451@@ -36,100 +49,98 @@
1452 log.info(u'Media Media Item loaded')
1453
1454 def __init__(self, parent, icon, title):
1455+ self.TranslationContext = u'MediaPlugin'
1456+ self.hasFileIcon = True
1457+ self.hasNewIcon = False
1458+ self.hasEditIcon = False
1459+ self.IconPath = u'images/image'
1460+ self.PluginTextShort = u'Media'
1461+ self.ConfigSection = u'images'
1462+ self.OnNewPrompt = u'Select Media(s)'
1463+ self.OnNewFileMasks = u'Videos (*.avi *.mpeg *.mpg *.mp4);;Audio (*.ogg *.mp3 *.wma);;All files (*)'
1464+ # this next is a class, not an instance of a class - it will
1465+ # be instanced by the base MediaManagerItem
1466+ self.ListViewWithDnD_class = MediaListView
1467+ #self.ServiceItemIconName = u':/media/media_image.png'
1468+ self.PreviewFunction = self.video_get_preview
1469 MediaManagerItem.__init__(self, parent, icon, title)
1470
1471- def setupUi(self):
1472- # Add a toolbar
1473- self.addToolbar()
1474- # Create buttons for the toolbar
1475- ## New Media Button ##
1476- self.addToolbarButton(
1477- translate(u'MediaMediaItem',u'New Media'),
1478- translate(u'MediaMediaItem',u'Load Media into openlp.org'),
1479- ':/videos/video_load.png', self.onMediaNewClick, 'MediaNewItem')
1480- ## Delete Media Button ##
1481- self.addToolbarButton(
1482- translate(u'MediaMediaItem',u'Delete Media'),
1483- translate(u'MediaMediaItem',u'Delete the selected Media item'),
1484- ':/videos/video_delete.png', self.onMediaDeleteClick, 'MediaDeleteItem')
1485- ## Separator Line ##
1486- self.addToolbarSeparator()
1487- ## Preview Media Button ##
1488- self.addToolbarButton(
1489- translate(u'MediaMediaItem',u'Preview Media'),
1490- translate(u'MediaMediaItem',u'Preview the selected Media item'),
1491- ':/system/system_preview.png', self.onMediaPreviewClick, 'MediaPreviewItem')
1492- ## Live Media Button ##
1493- self.addToolbarButton(
1494- translate(u'MediaMediaItem',u'Go Live'),
1495- translate(u'MediaMediaItem',u'Send the selected Media item live'),
1496- ':/system/system_live.png', self.onMediaLiveClick, 'MediaLiveItem')
1497- ## Add Media Button ##
1498- self.addToolbarButton(
1499- translate(u'MediaMediaItem',u'Add Media To Service'),
1500- translate(u'MediaMediaItem',u'Add the selected Media items(s) to the service'),
1501- ':/system/system_add.png',self.onMediaAddClick, 'MediaAddItem')
1502- ## Add the Medialist widget ##
1503-
1504- self.MediaListView = QtGui.QListView()
1505- self.MediaListView.setAlternatingRowColors(True)
1506- self.MediaListData = FileListData()
1507- self.MediaListView.setModel(self.MediaListData)
1508-
1509- self.PageLayout.addWidget(self.MediaListView)
1510-
1511- #define and add the context menu
1512- self.MediaListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
1513-
1514- self.MediaListView.addAction(self.contextMenuAction(
1515- self.MediaListView, ':/system/system_preview.png',
1516- translate(u'MediaMediaItem',u'&Preview Media'), self.onMediaPreviewClick))
1517- self.MediaListView.addAction(self.contextMenuAction(
1518- self.MediaListView, ':/system/system_live.png',
1519- translate(u'MediaMediaItem',u'&Show Live'), self.onMediaLiveClick))
1520- self.MediaListView.addAction(self.contextMenuAction(
1521- self.MediaListView, ':/system/system_add.png',
1522- translate(u'MediaMediaItem',u'&Add to Service'), self.onMediaAddClick))
1523-
1524- def initialise(self):
1525- list = self.parent.config.load_list(u'Media')
1526- self.loadMediaList(list)
1527-
1528- def onMediaNewClick(self):
1529- files = QtGui.QFileDialog.getOpenFileNames(None,
1530- translate(u'MediaMediaItem', u'Select Media(s) items'),
1531- self.parent.config.get_last_dir(),
1532- u'Videos (*.avi *.mpeg);;Audio (*.mp3 *.ogg *.wma);;All files (*)')
1533- if len(files) > 0:
1534- self.loadMediaList(files)
1535- dir, filename = os.path.split(unicode(files[0]))
1536- self.parent.config.set_last_dir(dir)
1537- self.parent.config.set_list(u'media', self.MediaListData.getFileList())
1538-
1539- def getFileList(self):
1540- filelist = [item[0] for item in self.MediaListView];
1541- return filelist
1542-
1543- def loadMediaList(self, list):
1544- for files in list:
1545- self.MediaListData.addRow(files)
1546-
1547- def onMediaDeleteClick(self):
1548- indexes = self.MediaListView.selectedIndexes()
1549+ def video_get_preview(self, filename):
1550+ """Gets a preview of the first frame of a video file using
1551+ GSTREAMER (non-portable??? - Can't figure out how to do with
1552+ Phonon - returns a QImage"""
1553+ try:
1554+ # Define your pipeline, just as you would at the command prompt.
1555+ # This is much easier than trying to create and link each gstreamer element in Python.
1556+ # This is great for pipelines that end with a filesink (i.e. there is no audible or visual output)
1557+ log.info ("Video preview %s"%( filename))
1558+ outfile=tempfile.NamedTemporaryFile(suffix='.png')
1559+ cmd=u'filesrc location="%s" ! decodebin ! ffmpegcolorspace ! pngenc ! filesink location="%s"'% (filename, outfile.name)
1560+ pipe = gst.parse_launch(cmd)
1561+ # Get a reference to the pipeline's bus
1562+ bus = pipe.get_bus()
1563+
1564+ # Set the pipeline's state to PLAYING
1565+ pipe.set_state(gst.STATE_PLAYING)
1566+
1567+ # Listen to the pipeline's bus indefinitely until we receive a EOS (end of stream) message.
1568+ # This is a super important step, or the pipeline might not work as expected. For example,
1569+ # in my example pipeline above, the pngenc will not export an actual image unless you have
1570+ # this line of code. It just exports a 0 byte png file. So... don't forget this step.
1571+ bus.poll(gst.MESSAGE_EOS, -1)
1572+ img = QtGui.QImage(outfile.name)
1573+ outfile.close()
1574+# os.unlink(outfile.name)
1575+ pipe.set_state(gst.STATE_NULL)
1576+ return img
1577+ except:
1578+ log.info("Can't generate video preview for some reason");
1579+ import sys
1580+ print sys.exc_info()
1581+ return None
1582+
1583+ def generateSlideData(self, service_item):
1584+ indexes = self.ListView.selectedIndexes()
1585+ service_item.title = u'Media'
1586 for index in indexes:
1587- current_row = int(index.row())
1588- self.MediaListData.removeRow(current_row)
1589- self.parent.config.set_list(u'media', self.MediaListData.getFileList())
1590+ filename = self.ListData.getFilename(index)
1591+ frame = QtGui.QImage(unicode(filename))
1592+ (path, name) = os.path.split(filename)
1593+ service_item.add_from_image(path, name, frame)
1594
1595- def onMediaPreviewClick(self):
1596+ def onPreviewClick(self):
1597 log.debug(u'Media Preview Button pressed')
1598- items = self.MediaListView.selectedIndexes()
1599+ items = self.ListView.selectedIndexes()
1600 for item in items:
1601- text = self.MediaListData.getValue(item)
1602+ text = self.ListData.getValue(item)
1603 print text
1604
1605 def onMediaLiveClick(self):
1606+ log.debug(u'Media Live Button pressed')
1607 pass
1608
1609- def onMediaAddClick(self):
1610- pass
1611\ No newline at end of file
1612+ def initialise(self):
1613+ self.ListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
1614+ self.ListView.setIconSize(QtCore.QSize(88,50))
1615+ self.loadList(self.parent.config.load_list(self.ConfigSection))
1616+
1617+ def onDeleteClick(self):
1618+ item = self.ListView.currentItem()
1619+ if item is not None:
1620+ item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
1621+ row = self.ListView.row(item)
1622+ self.ListView.takeItem(row)
1623+ self.parent.config.set_list(self.ConfigSection, self.ListData.getFileList())
1624+
1625+ def loadList(self, list):
1626+ for file in list:
1627+ (path, filename) = os.path.split(unicode(file))
1628+ item_name = QtGui.QListWidgetItem(filename)
1629+ img = self.video_get_preview(file)
1630+ #item_name.setIcon(buildIcon(file))
1631+ item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
1632+ self.ListView.addItem(item_name)
1633+
1634+# def onMediaAddClick(self):
1635+# log.debug(u'Media Add Button pressed')
1636+# pass
1637
1638=== modified file 'openlp/plugins/media/mediaplugin.py'
1639--- openlp/plugins/media/mediaplugin.py 2009-06-26 17:51:43 +0000
1640+++ openlp/plugins/media/mediaplugin.py 2009-07-04 05:52:30 +0000
1641@@ -22,7 +22,6 @@
1642
1643 from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab
1644 from openlp.plugins.media.lib import MediaTab,MediaMediaItem
1645-
1646 class MediaPlugin(Plugin):
1647
1648 def __init__(self, plugin_helpers):
1649
1650=== removed file 'openlp/plugins/media/video_render.py'
1651--- openlp/plugins/media/video_render.py 2009-06-22 20:44:35 +0000
1652+++ openlp/plugins/media/video_render.py 1970-01-01 00:00:00 +0000
1653@@ -1,70 +0,0 @@
1654-# -*- coding: utf-8 -*-
1655-# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
1656-"""
1657-OpenLP - Open Source Lyrics Projection
1658-Copyright (c) 2008 Raoul Snyman
1659-Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
1660-
1661-This program is free software; you can redistribute it and/or modify it under
1662-the terms of the GNU General Public License as published by the Free Software
1663-Foundation; version 2 of the License.
1664-
1665-This program is distributed in the hope that it will be useful, but WITHOUT ANY
1666-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1667-PARTICULAR PURPOSE. See the GNU General Public License for more details.
1668-
1669-You should have received a copy of the GNU General Public License along with
1670-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
1671-Place, Suite 330, Boston, MA 02111-1307 USA
1672-"""
1673-import os
1674-from PyQt4 import QtCore, QtGui
1675-
1676-# xxx this needs a try, except once we've decided what to do if it fails
1677-from PyQt4.phonon import Phonon
1678-
1679-# from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab
1680-# from openlp.plugins.media.lib import MediaTab,MediaMediaItem
1681-
1682-"""Renders a video to some surface or other """
1683-
1684-class w(QtGui.QMainWindow):
1685- def __init__(self, parent=None):
1686- super(QtGui.QMainWindow, self).__init__(parent)
1687- self.resize(640,480)
1688- self.setWindowTitle(u'simple media player')
1689- self.show()
1690-
1691-if __name__==u'__main__':
1692- app = QtGui.QApplication([])
1693-# widget = QtGui.QWidget()
1694-# widget.resize(320, 240)
1695-# widget.setWindowTitle(u'simple')
1696-# widget.show()
1697-# QCore.QCoreApplication.setApplicationName(u'OpenLP')
1698- mainwindow=w()
1699- widget=QtGui.QWidget(mainwindow)
1700- mainwindow.setCentralWidget(widget)
1701- widget.setLayout(QtGui.QVBoxLayout(widget))
1702-# videofile=u'r-128.rm'
1703- videofile=u'/extra_space/Download/coa360download56Kbps240x160.mpg'
1704- source=Phonon.MediaSource(videofile)
1705-
1706- media=Phonon.MediaObject(widget)
1707- media.setCurrentSource(source)
1708-
1709- video=Phonon.VideoWidget(widget)
1710- audio=Phonon.AudioOutput(Phonon.MusicCategory)
1711-# controller=Phonon.MediaController(media)
1712- Phonon.createPath(media, video);
1713- Phonon.createPath(media, audio);
1714-# player=Phonon.VideoPlayer(Phonon.VideoCategory, widget)
1715- slider=Phonon.SeekSlider(media, mainwindow)
1716- widget.layout().addWidget(slider)
1717- widget.layout().addWidget(video)
1718- slider.show()
1719-
1720- video.show()
1721- media.play()
1722- app.exec_()
1723-
1724
1725=== modified file 'openlp/plugins/presentations/lib/impresscom.py'
1726--- openlp/plugins/presentations/lib/impresscom.py 2009-06-26 19:06:28 +0000
1727+++ openlp/plugins/presentations/lib/impresscom.py 2009-07-02 19:04:50 +0000
1728@@ -57,7 +57,7 @@
1729 self.createApp()
1730
1731 def startOpenoffice(self):
1732- cmd = u'openoffice.org -nologo -norestore -minimized -impress' + u'"' + u'-accept=socket,host=localhost,port=2002;urp;'+ u'"'
1733+ cmd = u'openoffice.org -nologo -norestore -invisible -minimized -impress' + u'"' + u'-accept=socket,host=localhost,port=2002;urp;'+ u'"'
1734 retval = subprocess.Popen(cmd, shell=True)
1735 self.oopid = retval.pid
1736
1737
1738=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
1739--- openlp/plugins/songs/lib/mediaitem.py 2009-06-27 19:55:55 +0000
1740+++ openlp/plugins/songs/lib/mediaitem.py 2009-07-04 05:52:30 +0000
1741@@ -20,7 +20,7 @@
1742 import logging
1743
1744 from PyQt4 import QtCore, QtGui
1745-from openlp.core.lib import MediaManagerItem, translate, ServiceItem, SongXMLParser
1746+from openlp.core.lib import MediaManagerItem, translate, ServiceItem, SongXMLParser , contextMenuAction, contextMenuSeparator
1747
1748 from openlp.plugins.songs.forms import EditSongForm
1749
1750@@ -138,17 +138,17 @@
1751 QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onSongPreviewClick)
1752 #define and add the context menu
1753 self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
1754- self.ListView.addAction(self.contextMenuAction(self.ListView,
1755+ self.ListView.addAction(contextMenuAction(self.ListView,
1756 ':/songs/song_new.png', translate(u'SongMediaItem', u'&Edit Song'),
1757 self.onSongEditClick))
1758- self.ListView.addAction(self.contextMenuSeparator(self.ListView))
1759- self.ListView.addAction(self.contextMenuAction(self.ListView,
1760+ self.ListView.addAction(contextMenuSeparator(self.ListView))
1761+ self.ListView.addAction(contextMenuAction(self.ListView,
1762 ':/system/system_preview.png', translate(u'SongMediaItem', u'&Preview Song'),
1763 self.onSongPreviewClick))
1764- self.ListView.addAction(self.contextMenuAction(self.ListView,
1765+ self.ListView.addAction(contextMenuAction(self.ListView,
1766 ':/system/system_live.png', translate(u'SongMediaItem', u'&Show Live'),
1767 self.onSongLiveClick))
1768- self.ListView.addAction(self.contextMenuAction(self.ListView,
1769+ self.ListView.addAction(contextMenuAction(self.ListView,
1770 ':/system/system_add.png', translate(u'SongMediaItem', u'&Add to Service'),
1771 self.onSongAddClick))
1772
1773
1774=== renamed file 'resources/images/media_verse.png' => 'resources/images/media_bible.png'
1775=== added file 'resources/images/media_stop.png'
1776Binary files resources/images/media_stop.png 1970-01-01 00:00:00 +0000 and resources/images/media_stop.png 2009-07-03 19:08:21 +0000 differ
1777=== added file 'resources/images/media_time.png'
1778Binary files resources/images/media_time.png 1970-01-01 00:00:00 +0000 and resources/images/media_time.png 2009-07-03 19:08:21 +0000 differ
1779=== modified file 'resources/images/openlp-2.qrc'
1780--- resources/images/openlp-2.qrc 2009-05-03 15:35:34 +0000
1781+++ resources/images/openlp-2.qrc 2009-07-03 19:08:21 +0000
1782@@ -86,8 +86,10 @@
1783 <file>media_presentation.png</file>
1784 <file>media_image.png</file>
1785 <file>media_song.png</file>
1786- <file>media_verse.png</file>
1787+ <file>media_bible.png</file>
1788 <file>media_video.png</file>
1789+ <file>media_time.png</file>
1790+ <file>media_stop.png</file>
1791 </qresource>
1792 <qresource prefix="messagebox" >
1793 <file>messagebox_critical.png</file>