Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~trb143/openlp/servicing |
Merge into: | lp:openlp |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~trb143/openlp/servicing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Gorven (community) | Approve | ||
Tim Bentley | Approve | ||
Raoul Snyman | Approve | ||
Review via email: mp+6161@code.launchpad.net |
Commit message
Description of the change
Tim Bentley (trb143) wrote : | # |
Raoul Snyman (raoul-snyman) wrote : | # |
880 + self.PreviewCon
881 + self.LiveController = SlideController
Just a note: I started naming things on forms before we had decided on a standard, so they're a little out of sync with the proper naming convention. I am cleaning them up in a cleanup branch, but just for reference, those two should probably be called "self.previewCo
982 + self.Toolbar.
983 + translate(
Not sure what the difference is between the first and second "move to top" strings is, but the first isn't u''
966 - self.Layout = QtGui.QVBoxLayo
967 + self.Layout = QVBoxLayout(self)
Please rather use "from PyQt4 import QtCore, QtGui" as it pollutes the local namespace less. (I'm also cleaning this up in my local cleanup branch).
970 self.Toolbar = OpenLPToolbar(self)
1002 + self.ThemeComboBox = QComboBox(
1004 + self.ThemeWidget = QWidgetAction(
As noted before, my bad, these should be camelCase not PascalCase - also busy cleaning up in my branch.
Apart from those few minor things, everything looks fine. I'll still have to see these things in action to get a real understanding of what's going on though...
review approve
Tim Bentley (trb143) : | # |
Michael Gorven (mgorven) wrote : | # |
Eric4 files are gone! Awesome branch! :-P
+ log.debug(
+ log.debug(
May I be extremely pedantic and ask why there are trailing spaces?
+ if self.displayBlank == False:
I prefer code like "if not self.displayBlank" (unless displayBlank could
legitimately be None and needs to be treated differently).
review approve
Martin Thompson (mjthompson) wrote : | # |
On Mon, May 04, 2009 at 06:35:06PM -0000 or thereabouts, Raoul Snyman wrote:
>
> 966 - self.Layout = QtGui.QVBoxLayo
> 967 + self.Layout = QVBoxLayout(self)
>
> Please rather use "from PyQt4 import QtCore, QtGui" as it pollutes
> the local namespace less. (I'm also cleaning this up in my local
> cleanup branch).
If I can throw in my 2p worth here... it appears to me to be more
Qt-like to *not* prefix everything with the, and it certainly reduces
the amount of typing, and faffing around remembering whether something
is Core, or Gui.
In addition, I found that the endless prefixes got in the way of my
understanding of the code, which is why I stopped using them in my
later code (after I'd seen somewhere suggesting it - can't recall
where though). This might be (yet another) case of Tim getting the
blame for my coding - sorry!
From the point of view of namespace pollution, all the Qt calls have a
Q on the front to avoid collisions, and I think that's likely to be
pretty successful...
Anyway, that was my thinking when I started doing it, but I'll go with
the consensus in future!
--
<email address hidden>
A man leaves his darkness when he follows the Son
- The Great American Novel (Larry Norman)
%
Preview Diff
1 | === added file '.bzrignore' |
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 |
3 | +++ .bzrignore 2009-05-04 08:56:46 +0000 |
4 | @@ -0,0 +1,10 @@ |
5 | +*.pyc |
6 | +*.*~ |
7 | +*.log |
8 | +\#*\# |
9 | +*.eric4project |
10 | +*.ropeproject |
11 | +*.e4* |
12 | +.eric4project |
13 | +list |
14 | +openlp.org 2.0.e4* |
15 | |
16 | === removed file '.eric4project/openlp.org 2.0.e4q' |
17 | --- .eric4project/openlp.org 2.0.e4q 2009-05-03 15:35:34 +0000 |
18 | +++ .eric4project/openlp.org 2.0.e4q 1970-01-01 00:00:00 +0000 |
19 | @@ -1,7 +0,0 @@ |
20 | -<?xml version="1.0" encoding="UTF-8"?> |
21 | -<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd"> |
22 | -<!-- eric4 user project file for project openlp.org 2.0 --> |
23 | -<!-- Saved: 2009-05-03, 17:33:30 --> |
24 | -<!-- Copyright (C) 2009 Raoul Snyman, raoulsnyman@openlp.org --> |
25 | -<UserProject version="4.0"> |
26 | -</UserProject> |
27 | \ No newline at end of file |
28 | |
29 | === removed file '.eric4project/openlp.org 2.0.e4s' |
30 | --- .eric4project/openlp.org 2.0.e4s 2008-11-21 18:58:03 +0000 |
31 | +++ .eric4project/openlp.org 2.0.e4s 1970-01-01 00:00:00 +0000 |
32 | @@ -1,32 +0,0 @@ |
33 | -<?xml version="1.0" encoding="UTF-8"?> |
34 | -<!DOCTYPE Session SYSTEM "Session-4.0.dtd"> |
35 | -<!-- eric4 session file for project openlp.org 2.0 --> |
36 | -<!-- This file was generated automatically, do not edit. --> |
37 | -<!-- Saved: 2008-11-03, 22:49:15 --> |
38 | -<Session version="4.0"> |
39 | - <Filenames> |
40 | - <Filename cline="24" cindex="13">/home/raoul/Projects/openlp-2/openlp.pyw</Filename> |
41 | - <Filename cline="30" cindex="0">/home/raoul/Projects/openlp-2/openlp/ui/forms/splashscreen.py</Filename> |
42 | - <Filename cline="31" cindex="30">/home/raoul/Projects/openlp-2/openlp/ui/forms/mainwindow.py</Filename> |
43 | - <Filename cline="22" cindex="53">/home/raoul/Projects/openlp-2/openlp/ui/forms/__init__.py</Filename> |
44 | - </Filenames> |
45 | - <ActiveWindow cline="24" cindex="13">/home/raoul/Projects/openlp-2/openlp.pyw</ActiveWindow> |
46 | - <Breakpoints> |
47 | - </Breakpoints> |
48 | - <Watchpoints> |
49 | - </Watchpoints> |
50 | - <DebugInfo> |
51 | - <CommandLine></CommandLine> |
52 | - <WorkingDirectory></WorkingDirectory> |
53 | - <Environment></Environment> |
54 | - <ReportExceptions value="True" /> |
55 | - <Exceptions> |
56 | - </Exceptions> |
57 | - <AutoClearShell value="True" /> |
58 | - <TracePython value="False" /> |
59 | - <AutoContinue value="True" /> |
60 | - <CovexcPattern></CovexcPattern> |
61 | - </DebugInfo> |
62 | - <Bookmarks> |
63 | - </Bookmarks> |
64 | -</Session> |
65 | \ No newline at end of file |
66 | |
67 | === removed file '.eric4project/openlp.org 2.0.e4t' |
68 | --- .eric4project/openlp.org 2.0.e4t 2009-05-03 15:35:34 +0000 |
69 | +++ .eric4project/openlp.org 2.0.e4t 1970-01-01 00:00:00 +0000 |
70 | @@ -1,132 +0,0 @@ |
71 | -<?xml version="1.0" encoding="UTF-8"?> |
72 | -<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd"> |
73 | -<!-- eric4 tasks file for project openlp.org 2.0 --> |
74 | -<!-- Saved: 2009-05-03, 17:33:30 --> |
75 | -<Tasks version="4.2"> |
76 | - <Task priority="1" completed="False" bugfix="False"> |
77 | - <Summary>TODO: what is the tags for bridge, pre-chorus?</Summary> |
78 | - <Description></Description> |
79 | - <Created>2008-11-26, 21:10:45</Created> |
80 | - <Resource> |
81 | - <Filename>openlp/song/song.py</Filename> |
82 | - <Linenumber>138</Linenumber> |
83 | - </Resource> |
84 | - </Task> |
85 | - <Task priority="1" completed="False" bugfix="False"> |
86 | - <Summary>TODO: check font formatting</Summary> |
87 | - <Description></Description> |
88 | - <Created>2008-11-26, 21:10:45</Created> |
89 | - <Resource> |
90 | - <Filename>openlp/song/song.py</Filename> |
91 | - <Linenumber>523</Linenumber> |
92 | - </Resource> |
93 | - </Task> |
94 | - <Task priority="1" completed="False" bugfix="False"> |
95 | - <Summary>TODO: Song: Logging - not all, but enough</Summary> |
96 | - <Description></Description> |
97 | - <Created>2008-12-07, 10:06:59</Created> |
98 | - <Resource> |
99 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
100 | - <Linenumber>39</Linenumber> |
101 | - </Resource> |
102 | - </Task> |
103 | - <Task priority="1" completed="False" bugfix="False"> |
104 | - <Summary>TODO: Song: Handle OpenLP2 format</Summary> |
105 | - <Description></Description> |
106 | - <Created>2008-12-07, 10:06:59</Created> |
107 | - <Resource> |
108 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
109 | - <Linenumber>40</Linenumber> |
110 | - </Resource> |
111 | - </Task> |
112 | - <Task priority="1" completed="False" bugfix="False"> |
113 | - <Summary>TODO: Song: Import OpenLP1</Summary> |
114 | - <Description></Description> |
115 | - <Created>2008-12-07, 10:06:59</Created> |
116 | - <Resource> |
117 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
118 | - <Linenumber>41</Linenumber> |
119 | - </Resource> |
120 | - </Task> |
121 | - <Task priority="1" completed="False" bugfix="False"> |
122 | - <Summary>TODO: Song: Export OpenLP1</Summary> |
123 | - <Description></Description> |
124 | - <Created>2008-12-07, 10:07:00</Created> |
125 | - <Resource> |
126 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
127 | - <Linenumber>42</Linenumber> |
128 | - </Resource> |
129 | - </Task> |
130 | - <Task priority="1" completed="False" bugfix="False"> |
131 | - <Summary>TODO: Song: Export Song to CCLI</Summary> |
132 | - <Description></Description> |
133 | - <Created>2008-12-07, 10:07:00</Created> |
134 | - <Resource> |
135 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
136 | - <Linenumber>43</Linenumber> |
137 | - </Resource> |
138 | - </Task> |
139 | - <Task priority="1" completed="False" bugfix="False"> |
140 | - <Summary>TODO: Song: Export Song to OpenSong</Summary> |
141 | - <Description></Description> |
142 | - <Created>2008-12-07, 10:07:00</Created> |
143 | - <Resource> |
144 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
145 | - <Linenumber>44</Linenumber> |
146 | - </Resource> |
147 | - </Task> |
148 | - <Task priority="1" completed="False" bugfix="False"> |
149 | - <Summary>TODO: Song: Import ChangingSong</Summary> |
150 | - <Description></Description> |
151 | - <Created>2008-12-07, 10:07:00</Created> |
152 | - <Resource> |
153 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
154 | - <Linenumber>45</Linenumber> |
155 | - </Resource> |
156 | - </Task> |
157 | - <Task priority="1" completed="False" bugfix="False"> |
158 | - <Summary>TODO: Song: Export ChangingSong</Summary> |
159 | - <Description></Description> |
160 | - <Created>2008-12-07, 10:07:00</Created> |
161 | - <Resource> |
162 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
163 | - <Linenumber>46</Linenumber> |
164 | - </Resource> |
165 | - </Task> |
166 | - <Task priority="1" completed="False" bugfix="False"> |
167 | - <Summary>TODO: what is the tags for bridge, pre-chorus?</Summary> |
168 | - <Description></Description> |
169 | - <Created>2008-12-07, 10:07:00</Created> |
170 | - <Resource> |
171 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
172 | - <Linenumber>149</Linenumber> |
173 | - </Resource> |
174 | - </Task> |
175 | - <Task priority="1" completed="False" bugfix="False"> |
176 | - <Summary>TODO: check font formatting</Summary> |
177 | - <Description></Description> |
178 | - <Created>2008-12-07, 10:07:00</Created> |
179 | - <Resource> |
180 | - <Filename>openlp/plugins/songs/songxml.py</Filename> |
181 | - <Linenumber>534</Linenumber> |
182 | - </Resource> |
183 | - </Task> |
184 | - <Task priority="1" completed="False" bugfix="False"> |
185 | - <Summary>TODO: need to get rid of this once all plugins are up to date</Summary> |
186 | - <Description></Description> |
187 | - <Created>2009-03-01, 01:10:29</Created> |
188 | - <Resource> |
189 | - <Filename>openlp/core/pluginmanager.py</Filename> |
190 | - <Linenumber>86</Linenumber> |
191 | - </Resource> |
192 | - </Task> |
193 | - <Task priority="1" completed="False" bugfix="False"> |
194 | - <Summary>TODO: These shouldn't be called here...</Summary> |
195 | - <Description></Description> |
196 | - <Created>2009-03-01, 01:10:29</Created> |
197 | - <Resource> |
198 | - <Filename>openlp/core/pluginmanager.py</Filename> |
199 | - <Linenumber>108</Linenumber> |
200 | - </Resource> |
201 | - </Task> |
202 | -</Tasks> |
203 | \ No newline at end of file |
204 | |
205 | === removed file '.gitignore' |
206 | --- .gitignore 2009-02-14 08:33:32 +0000 |
207 | +++ .gitignore 1970-01-01 00:00:00 +0000 |
208 | @@ -1,7 +0,0 @@ |
209 | -*.pyc |
210 | -*.*~ |
211 | -*.log |
212 | -\#*\# |
213 | -*.eric4project |
214 | -*.ropeproject |
215 | -*.e4* |
216 | |
217 | === removed file 'openlp.org 2.0.e4p' |
218 | --- openlp.org 2.0.e4p 2009-05-01 22:26:43 +0000 |
219 | +++ openlp.org 2.0.e4p 1970-01-01 00:00:00 +0000 |
220 | @@ -1,330 +0,0 @@ |
221 | -<?xml version="1.0" encoding="UTF-8"?> |
222 | -<!DOCTYPE Project SYSTEM "Project-4.6.dtd"> |
223 | -<!-- eric4 project file for project openlp.org 2.0 --> |
224 | -<!-- Saved: 2009-05-02, 00:15:57 --> |
225 | -<!-- Copyright (C) 2009 Raoul Snyman, raoulsnyman@openlp.org --> |
226 | -<Project version="4.6"> |
227 | - <Language>en</Language> |
228 | - <ProgLanguage mixed="0">Python</ProgLanguage> |
229 | - <ProjectType>Qt4</ProjectType> |
230 | - <Description></Description> |
231 | - <Version>1.9.0</Version> |
232 | - <Author>Raoul Snyman</Author> |
233 | - <Email>raoulsnyman@openlp.org</Email> |
234 | - <Sources> |
235 | - <Source>openlp.pyw</Source> |
236 | - <Source>openlp/controls/__init__.py</Source> |
237 | - <Source>openlp/core/test/test_render_theme.py</Source> |
238 | - <Source>openlp/core/test/test_render.py</Source> |
239 | - <Source>openlp/core/__init__.py</Source> |
240 | - <Source>openlp/__init__.py</Source> |
241 | - <Source>demo.py</Source> |
242 | - <Source>openlp/core/settingsmanager.py</Source> |
243 | - <Source>openlp/plugins/__init__.py</Source> |
244 | - <Source>openlp/core/ui/__init__.py</Source> |
245 | - <Source>openlp/core/ui/mainwindow.py</Source> |
246 | - <Source>openlp/core/ui/splashscreen.py</Source> |
247 | - <Source>openlp/core/ui/alertform.py</Source> |
248 | - <Source>openlp/core/ui/about.py</Source> |
249 | - <Source>openlp/plugins/songs/songsplugin.py</Source> |
250 | - <Source>openlp/plugins/songs/__init__.py</Source> |
251 | - <Source>openlp/plugins/songs/forms/__init__.py</Source> |
252 | - <Source>openlp/plugins/songs/forms/openlpimportform.py</Source> |
253 | - <Source>openlp/plugins/songs/forms/editsongform.py</Source> |
254 | - <Source>openlp/plugins/songs/forms/opensongexportform.py</Source> |
255 | - <Source>openlp/plugins/songs/forms/openlpexportform.py</Source> |
256 | - <Source>openlp/plugins/songs/forms/opensongimportform.py</Source> |
257 | - <Source>openlp/core/utils/__init__.py</Source> |
258 | - <Source>openlp/core/theme/__init__.py</Source> |
259 | - <Source>openlp/core/theme/theme.py</Source> |
260 | - <Source>openlp/plugins/songs/test/test_song_opensong.py</Source> |
261 | - <Source>openlp/plugins/songs/test/test_song_basic.py</Source> |
262 | - <Source>openlp/plugins/songs/test/test_song_verse.py</Source> |
263 | - <Source>openlp/plugins/songs/test/test_song_text.py</Source> |
264 | - <Source>openlp/core/theme/test/test_theme.py</Source> |
265 | - <Source>openlp/core/resources.py</Source> |
266 | - <Source>openlp/core/lib/__init__.py</Source> |
267 | - <Source>openlp/core/lib/xmlrootclass.py</Source> |
268 | - <Source>openlp/core/lib/plugin.py</Source> |
269 | - <Source>openlp/core/lib/mediamanageritem.py</Source> |
270 | - <Source>openlp/core/lib/event.py</Source> |
271 | - <Source>openlp/core/utils/confighelper.py</Source> |
272 | - <Source>openlp/core/utils/winregistry.py</Source> |
273 | - <Source>openlp/core/utils/registry.py</Source> |
274 | - <Source>openlp/core/utils/linregistry.py</Source> |
275 | - <Source>setup.py</Source> |
276 | - <Source>openlp/core/lib/pluginconfig.py</Source> |
277 | - <Source>openlp/core/test/test_plugin_manager.py</Source> |
278 | - <Source>openlp/core/test/test_mediamanageritem.py</Source> |
279 | - <Source>openlp/core/test/testplugins/testplugin1.py</Source> |
280 | - <Source>openlp/core/test/testplugins/testplugin2/__init__.py</Source> |
281 | - <Source>openlp/core/test/testplugins/testplugin2/testplugin2.py</Source> |
282 | - <Source>openlp/plugins/bibles/bibleplugin.py</Source> |
283 | - <Source>openlp/plugins/bibles/forms/bibleimportdialog.py</Source> |
284 | - <Source>openlp/plugins/bibles/forms/bibleimportform.py</Source> |
285 | - <Source>openlp/plugins/bibles/lib/bibleDBimpl.py</Source> |
286 | - <Source>openlp/plugins/bibles/lib/bibleOSISimpl.py</Source> |
287 | - <Source>openlp/plugins/bibles/lib/bibleHTTPimpl.py</Source> |
288 | - <Source>openlp/plugins/bibles/lib/bibleCSVimpl.py</Source> |
289 | - <Source>openlp/plugins/bibles/__init__.py</Source> |
290 | - <Source>openlp/plugins/bibles/lib/__init__.py</Source> |
291 | - <Source>openlp/plugins/bibles/forms/__init__.py</Source> |
292 | - <Source>openlp/plugins/songs/lib/__init__.py</Source> |
293 | - <Source>openlp/plugins/songs/lib/songxml.py</Source> |
294 | - <Source>openlp/plugins/songs/lib/models.py</Source> |
295 | - <Source>openlp/plugins/bibles/test/__init__.py</Source> |
296 | - <Source>openlp/plugins/bibles/test/test_bibleManagerAPI.py</Source> |
297 | - <Source>openlp/plugins/bibles/test/test_bibleManager.py</Source> |
298 | - <Source>openlp/plugins/bibles/test/test_bibleManagerOSIS.py</Source> |
299 | - <Source>openlp/plugins/bibles/test/test_bibleManagerCSV.py</Source> |
300 | - <Source>openlp/plugins/presentations/lib/pptview.py</Source> |
301 | - <Source>openlp/plugins/presentations/lib/impresscom.py</Source> |
302 | - <Source>openlp/plugins/presentations/lib/powerpoint.py</Source> |
303 | - <Source>openlp/plugins/presentations/lib/pptviewlib/ppttest.py</Source> |
304 | - <Source>openlp/plugins/presentations/__init__.py</Source> |
305 | - <Source>openlp/plugins/presentations/presentationplugin.py</Source> |
306 | - <Source>openlp/plugins/videos/__init__.py</Source> |
307 | - <Source>openlp/plugins/videos/videoplugin.py</Source> |
308 | - <Source>openlp/plugins/images/__init__.py</Source> |
309 | - <Source>openlp/plugins/images/imageplugin.py</Source> |
310 | - <Source>openlp/plugins/songs/forms/editsongdialog.py</Source> |
311 | - <Source>openlpcnv.pyw</Source> |
312 | - <Source>openlp/plugins/songs/forms/songbookdialog.py</Source> |
313 | - <Source>openlp/plugins/songs/forms/topicsdialog.py</Source> |
314 | - <Source>openlp/plugins/songs/forms/authorsdialog.py</Source> |
315 | - <Source>openlp/plugins/songs/forms/topicsform.py</Source> |
316 | - <Source>openlp/plugins/songs/forms/authorsform.py</Source> |
317 | - <Source>openlp/plugins/songs/forms/songbookform.py</Source> |
318 | - <Source>openlp/migration/__init__.py</Source> |
319 | - <Source>openlp/migration/migratefiles.py</Source> |
320 | - <Source>openlp/migration/migratesongs.py</Source> |
321 | - <Source>openlp/migration/display.py</Source> |
322 | - <Source>openlp/migration/migratebibles.py</Source> |
323 | - <Source>openlp/plugins/songs/lib/tables.py</Source> |
324 | - <Source>openlp/plugins/songs/lib/classes.py</Source> |
325 | - <Source>openlp/plugins/songs/lib/manager.py</Source> |
326 | - <Source>openlp/plugins/bibles/lib/classes.py</Source> |
327 | - <Source>openlp/plugins/bibles/lib/tables.py</Source> |
328 | - <Source>openlp/plugins/bibles/lib/manager.py</Source> |
329 | - <Source>openlp/plugins/bibles/lib/common.py</Source> |
330 | - <Source>openlp/plugins/songs/lib/meta.py</Source> |
331 | - <Source>openlp/core/test/testplugins/deeper/__init__.py</Source> |
332 | - <Source>openlp/core/test/testplugins/deeper/toodeep/__init__.py</Source> |
333 | - <Source>openlp/core/test/testplugins/deeper/toodeep/plugin3toodeep.py</Source> |
334 | - <Source>openlp/core/lib/serviceitem.py</Source> |
335 | - <Source>openlp/core/ui/slidecontroller.py</Source> |
336 | - <Source>openlp/core/lib/eventreceiver.py</Source> |
337 | - <Source>openlp/core/ui/servicemanager.py</Source> |
338 | - <Source>openlp/core/lib/toolbar.py</Source> |
339 | - <Source>openlp/core/ui/settingsform.py</Source> |
340 | - <Source>openlp/core/ui/generaltab.py</Source> |
341 | - <Source>openlp/core/ui/themestab.py</Source> |
342 | - <Source>openlp/core/ui/alertstab.py</Source> |
343 | - <Source>openlp/core/ui/settingsdialog.py</Source> |
344 | - <Source>openlp/core/lib/settingstab.py</Source> |
345 | - <Source>openlp/plugins/bibles/lib/biblestab.py</Source> |
346 | - <Source>openlp/plugins/songs/lib/songstab.py</Source> |
347 | - <Source>openlp/plugins/videos/lib/__init__.py</Source> |
348 | - <Source>openlp/plugins/videos/lib/videotab.py</Source> |
349 | - <Source>openlp/core/ui/test/test_service_manager.py</Source> |
350 | - <Source>openlp/plugins/images/lib/__init__.py</Source> |
351 | - <Source>openlp/plugins/images/lib/imageserviceitem.py</Source> |
352 | - <Source>openlp/plugins/images/lib/listwithpreviews.py</Source> |
353 | - <Source>openlp/plugins/songs/forms/editverseform.py</Source> |
354 | - <Source>openlp/plugins/songs/forms/editversedialog.py</Source> |
355 | - <Source>openlp/plugins/custom/__init__.py</Source> |
356 | - <Source>openlp/plugins/custom/customplugin.py</Source> |
357 | - <Source>openlp/plugins/custom/forms/__init__.py</Source> |
358 | - <Source>openlp/plugins/custom/forms/editcustomform.py</Source> |
359 | - <Source>openlp/plugins/custom/forms/editcustomdialog.py</Source> |
360 | - <Source>openlp/plugins/custom/lib/__init__.py</Source> |
361 | - <Source>openlp/plugins/custom/lib/customtab.py</Source> |
362 | - <Source>openlp/plugins/custom/lib/classes.py</Source> |
363 | - <Source>openlp/plugins/custom/lib/tables.py</Source> |
364 | - <Source>openlp/plugins/custom/lib/meta.py</Source> |
365 | - <Source>openlp/plugins/custom/lib/models.py</Source> |
366 | - <Source>openlp/plugins/custom/lib/manager.py</Source> |
367 | - <Source>openlp/plugins/images/lib/mediaitem.py</Source> |
368 | - <Source>openlp/plugins/songs/lib/mediaitem.py</Source> |
369 | - <Source>openlp/core/ui/maindisplay.py</Source> |
370 | - <Source>openlp/core/ui/amendthemedialog.py</Source> |
371 | - <Source>openlp/core/ui/thememanager.py</Source> |
372 | - <Source>openlp/core/ui/amendthemeform.py</Source> |
373 | - <Source>openlp/core/lib/eventmanager.py</Source> |
374 | - <Source>openlp/core/lib/rendermanager.py</Source> |
375 | - <Source>openlp/core/lib/renderer.py</Source> |
376 | - <Source>openlp/core/lib/songxmlhandler.py</Source> |
377 | - <Source>openlp/core/lib/pluginmanager.py</Source> |
378 | - <Source>openlp/core/lib/themexmlhandler.py</Source> |
379 | - <Source>openlp/plugins/bibles/lib/mediaitem.py</Source> |
380 | - <Source>openlp/plugins/bibles/lib/textlistdata.py</Source> |
381 | - <Source>openlp/plugins/presentations/lib/__init__.py</Source> |
382 | - <Source>openlp/plugins/presentations/lib/mediaitem.py</Source> |
383 | - <Source>openlp/plugins/presentations/lib/filelistdata.py</Source> |
384 | - <Source>openlp/plugins/videos/lib/mediaitem.py</Source> |
385 | - <Source>openlp/plugins/videos/lib/filelistdata.py</Source> |
386 | - <Source>openlp/plugins/custom/lib/mediaitem.py</Source> |
387 | - <Source>openlp/plugins/custom/lib/textlistdata.py</Source> |
388 | - <Source>openlp/plugins/custom/lib/customserviceitem.py</Source> |
389 | - <Source>resources/images/openlp-2_rc.py</Source> |
390 | - </Sources> |
391 | - <Forms> |
392 | - <Form>resources/forms/openlpexportform.ui</Form> |
393 | - <Form>resources/forms/opensongexportform.ui</Form> |
394 | - <Form>resources/forms/about.ui</Form> |
395 | - <Form>resources/forms/settings.ui</Form> |
396 | - <Form>resources/forms/themewizard.ui</Form> |
397 | - <Form>resources/forms/opensongimportform.ui</Form> |
398 | - <Form>resources/forms/alertform.ui</Form> |
399 | - <Form>resources/forms/mainwindow.ui</Form> |
400 | - <Form>resources/forms/songexport.ui</Form> |
401 | - <Form>resources/forms/openlpimportform.ui</Form> |
402 | - <Form>resources/forms/splashscreen.ui</Form> |
403 | - <Form>resources/forms/authorsdialog.ui</Form> |
404 | - <Form>resources/forms/bibleimportdialog.ui</Form> |
405 | - <Form>resources/forms/songbookdialog.ui</Form> |
406 | - <Form>resources/forms/topicsdialog.ui</Form> |
407 | - <Form>resources/forms/editsongdialog.ui</Form> |
408 | - <Form>resources/forms/editversedialog.ui</Form> |
409 | - <Form>resources/forms/editcustomdialog.ui</Form> |
410 | - <Form>resources/forms/amendthemedialog.ui</Form> |
411 | - </Forms> |
412 | - <Translations> |
413 | - </Translations> |
414 | - <Resources> |
415 | - <Resource>resources/images/openlp-2.qrc</Resource> |
416 | - </Resources> |
417 | - <Interfaces> |
418 | - </Interfaces> |
419 | - <Others> |
420 | - <Other>copyright.txt</Other> |
421 | - <Other>documentation/SongFormat.txt</Other> |
422 | - <Other>documentation/pyqt-sql-py2exe.txt</Other> |
423 | - <Other>documentation/PluginDevelopersGuide.txt</Other> |
424 | - </Others> |
425 | - <MainScript>openlp.pyw</MainScript> |
426 | - <Vcs> |
427 | - <VcsType>None</VcsType> |
428 | - <VcsOptions> |
429 | - <dict> |
430 | - <key> |
431 | - <string>add</string> |
432 | - </key> |
433 | - <value> |
434 | - <list> |
435 | - <string></string> |
436 | - </list> |
437 | - </value> |
438 | - <key> |
439 | - <string>checkout</string> |
440 | - </key> |
441 | - <value> |
442 | - <list> |
443 | - <string></string> |
444 | - </list> |
445 | - </value> |
446 | - <key> |
447 | - <string>commit</string> |
448 | - </key> |
449 | - <value> |
450 | - <list> |
451 | - <string></string> |
452 | - </list> |
453 | - </value> |
454 | - <key> |
455 | - <string>diff</string> |
456 | - </key> |
457 | - <value> |
458 | - <list> |
459 | - <string></string> |
460 | - </list> |
461 | - </value> |
462 | - <key> |
463 | - <string>export</string> |
464 | - </key> |
465 | - <value> |
466 | - <list> |
467 | - <string></string> |
468 | - </list> |
469 | - </value> |
470 | - <key> |
471 | - <string>global</string> |
472 | - </key> |
473 | - <value> |
474 | - <list> |
475 | - <string></string> |
476 | - </list> |
477 | - </value> |
478 | - <key> |
479 | - <string>history</string> |
480 | - </key> |
481 | - <value> |
482 | - <list> |
483 | - <string></string> |
484 | - </list> |
485 | - </value> |
486 | - <key> |
487 | - <string>log</string> |
488 | - </key> |
489 | - <value> |
490 | - <list> |
491 | - <string></string> |
492 | - </list> |
493 | - </value> |
494 | - <key> |
495 | - <string>remove</string> |
496 | - </key> |
497 | - <value> |
498 | - <list> |
499 | - <string></string> |
500 | - </list> |
501 | - </value> |
502 | - <key> |
503 | - <string>status</string> |
504 | - </key> |
505 | - <value> |
506 | - <list> |
507 | - <string></string> |
508 | - </list> |
509 | - </value> |
510 | - <key> |
511 | - <string>tag</string> |
512 | - </key> |
513 | - <value> |
514 | - <list> |
515 | - <string></string> |
516 | - </list> |
517 | - </value> |
518 | - <key> |
519 | - <string>update</string> |
520 | - </key> |
521 | - <value> |
522 | - <list> |
523 | - <string></string> |
524 | - </list> |
525 | - </value> |
526 | - </dict> |
527 | - </VcsOptions> |
528 | - <VcsOtherData> |
529 | - <dict> |
530 | - <key> |
531 | - <string>standardLayout</string> |
532 | - </key> |
533 | - <value> |
534 | - <bool>True</bool> |
535 | - </value> |
536 | - </dict> |
537 | - </VcsOtherData> |
538 | - </Vcs> |
539 | - <FiletypeAssociations> |
540 | - <FiletypeAssociation pattern="*.ui" type="FORMS" /> |
541 | - <FiletypeAssociation pattern="*.idl" type="INTERFACES" /> |
542 | - <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS" /> |
543 | - <FiletypeAssociation pattern="*.ptl" type="SOURCES" /> |
544 | - <FiletypeAssociation pattern="*.pyw" type="SOURCES" /> |
545 | - <FiletypeAssociation pattern="*.ui.h" type="FORMS" /> |
546 | - <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS" /> |
547 | - <FiletypeAssociation pattern="*.py" type="SOURCES" /> |
548 | - <FiletypeAssociation pattern="*.qrc" type="RESOURCES" /> |
549 | - </FiletypeAssociations> |
550 | -</Project> |
551 | \ No newline at end of file |
552 | |
553 | === removed file 'openlp.org 2.0.e4x' |
554 | --- openlp.org 2.0.e4x 2008-11-03 19:32:54 +0000 |
555 | +++ openlp.org 2.0.e4x 1970-01-01 00:00:00 +0000 |
556 | @@ -1,45 +0,0 @@ |
557 | -SOURCES = openlp/theme/test/test_theme.py \ |
558 | - openlp/theme/__init__.py \ |
559 | - openlp/theme/theme.py \ |
560 | - openlp/controls/__init__.py \ |
561 | - openlp/core/test/test_render_theme.py \ |
562 | - openlp/core/test/test_render.py \ |
563 | - openlp/core/interpolate.py \ |
564 | - openlp/core/__init__.py \ |
565 | - openlp/core/render.py \ |
566 | - openlp/ui/__init__.py \ |
567 | - openlp/ui/forms/__init__.py \ |
568 | - openlp/__init__.py \ |
569 | - openlp/utils/ConfigHelper.py \ |
570 | - openlp/utils/__init__.py \ |
571 | - demo.py \ |
572 | - openlp/core/settingsmanager.py \ |
573 | - openlp/resources/openlp_rc.py \ |
574 | - openlp/resources/__init__.py \ |
575 | - openlp/ui/forms/about.py \ |
576 | - openlp/ui/forms/mainwindow.py \ |
577 | - openlp/core/plugin.py \ |
578 | - openlp/core/xmlrootclass.py \ |
579 | - openlp/song/__init__.py \ |
580 | - openlp/song/song.py \ |
581 | - openlp/song/test/test_song_opensong.py \ |
582 | - openlp/song/test/test_song_basic.py \ |
583 | - openlp/song/test/test_song_text.py \ |
584 | - openlp/plugins/biblemanager/__init__.py \ |
585 | - openlp/plugins/biblemanager/BibleDBImpl.py \ |
586 | - openlp/plugins/biblemanager/BibleManager.py \ |
587 | - openlp/plugins/biblemanager/BibleHTTPImpl.py \ |
588 | - openlp/plugins/biblemanager/test/__init__.py \ |
589 | - openlp/plugins/biblemanager/test/test_bibleManager.py |
590 | - |
591 | -FORMS = openlp/resources/forms/mainwindow.ui \ |
592 | - openlp/resources/forms/settings.ui \ |
593 | - openlp/resources/forms/themewizard.ui \ |
594 | - openlp/resources/forms/about.ui \ |
595 | - openlp/resources/forms/editsongform.ui \ |
596 | - openlp/resources/forms/alertform.ui \ |
597 | - openlp/resources/forms/openlpimportform.ui \ |
598 | - openlp/resources/forms/openlpexportform.ui |
599 | - |
600 | -TRANSLATIONS = openlp_en.ts |
601 | - |
602 | |
603 | === modified file 'openlp.pyw' |
604 | --- openlp.pyw 2009-05-01 11:50:09 +0000 |
605 | +++ openlp.pyw 2009-05-04 13:48:12 +0000 |
606 | @@ -27,7 +27,7 @@ |
607 | |
608 | logging.basicConfig(level=logging.DEBUG, |
609 | format=u'%(asctime)s %(name)-12s %(levelname)-8s %(message)s', |
610 | - datefmt=u'%m-%d %H:%M', |
611 | + datefmt=u'%m-%d %H:%M:%S', |
612 | filename=u'openlp.log', |
613 | filemode=u'w') |
614 | |
615 | |
616 | === modified file 'openlp/core/lib/renderer.py' |
617 | --- openlp/core/lib/renderer.py 2009-05-01 05:02:53 +0000 |
618 | +++ openlp/core/lib/renderer.py 2009-05-04 13:48:12 +0000 |
619 | @@ -114,7 +114,6 @@ |
620 | |
621 | def render_screen(self, screennum): |
622 | log.debug(u'render screen\n %s %s ', screennum, self.words[screennum]) |
623 | - import time |
624 | t=0.0 |
625 | words=self.words[screennum] |
626 | retval=self._render_lines(words) |
627 | @@ -173,7 +172,6 @@ |
628 | else: |
629 | p.fillRect(self._paint.rect(), QtGui.QColor(u'#000000')) |
630 | p.end() |
631 | - log.debug(u'render background done') |
632 | |
633 | def split_set_of_lines(self, lines, footer): |
634 | |
635 | @@ -252,7 +250,7 @@ |
636 | |
637 | def render_lines(self, lines, footer_lines=None): |
638 | """render a set of lines according to the theme, return bounding box""" |
639 | - #log.debug(u'_render_lines %s', lines) |
640 | + log.debug(u'_render_lines %s', lines) |
641 | |
642 | bbox=self._render_lines_unaligned(lines, False) # Main font |
643 | if footer_lines is not None: |
644 | @@ -264,11 +262,8 @@ |
645 | bbox=self._render_lines_unaligned(lines, False, (x, y)) |
646 | |
647 | if footer_lines is not None: |
648 | - #x, y = self._correctAlignment(self._rect_footer, bbox1) |
649 | bbox=self._render_lines_unaligned(footer_lines, True, (self._rect_footer.left(), self._rect_footer.top()) ) |
650 | |
651 | - log.debug(u'render lines DONE') |
652 | - |
653 | return bbox |
654 | |
655 | def _render_lines_unaligned(self, lines, footer, tlcorner=(0,0)): |
656 | @@ -279,7 +274,7 @@ |
657 | than a screenful (eg. by using split_set_of_lines) |
658 | |
659 | Returns the bounding box of the text as QRect""" |
660 | - log.debug(u'render unaligned %s', lines) |
661 | + log.debug(u'render lines unaligned %s', lines) |
662 | x, y=tlcorner |
663 | brx=x |
664 | bry=y |
665 | @@ -298,7 +293,7 @@ |
666 | p.setPen(QtGui.QPen(QtGui.QColor(0,0,255))) |
667 | p.drawRect(retval) |
668 | p.end() |
669 | - log.debug(u'render unaligned DONE') |
670 | + |
671 | |
672 | return retval |
673 | |
674 | @@ -410,7 +405,7 @@ |
675 | |
676 | return width and height of text as a tuple (w,h)""" |
677 | # setup defaults |
678 | - #log.debug(u"_get_extent_and_render %s %s %s ", [line], tlcorner, draw) |
679 | + log.debug(u'_get_extent_and_render %s %s %s ', [line], tlcorner, draw) |
680 | p=QtGui.QPainter() |
681 | p.begin(self._paint) |
682 | # 'twould be more efficient to set this once when theme changes |
683 | |
684 | === modified file 'openlp/core/lib/rendermanager.py' |
685 | --- openlp/core/lib/rendermanager.py 2009-05-02 11:16:08 +0000 |
686 | +++ openlp/core/lib/rendermanager.py 2009-05-04 13:48:12 +0000 |
687 | @@ -18,6 +18,7 @@ |
688 | Place, Suite 330, Boston, MA 02111-1307 USA |
689 | """ |
690 | import logging |
691 | +import time |
692 | import os, os.path |
693 | import sys |
694 | from PyQt4 import QtGui, QtCore, Qt |
695 | @@ -41,21 +42,20 @@ |
696 | self.current_display = 0 |
697 | self.renderer = Renderer(None) |
698 | self.calculate_default(self.screen_list[self.current_display]['size']) |
699 | - self.frame = None |
700 | |
701 | def set_override_theme(self, theme): |
702 | - log.debug("set override theme to %s", theme) |
703 | + log.debug(u'set override theme to %s', theme) |
704 | if theme is not None: |
705 | self.theme = theme |
706 | else: |
707 | self.theme = self.default_theme |
708 | - log.debug("theme is now %s", self.theme) |
709 | + log.debug(u'theme is now %s', self.theme) |
710 | self.themedata = self.theme_manager.getThemeData(self.theme) |
711 | self.renderer.set_theme(self.themedata) |
712 | self.build_text_rectangle(self.themedata) |
713 | |
714 | def build_text_rectangle(self, theme): |
715 | - |
716 | + log.debug(u'build_text_rectangle ') |
717 | main_rect = None |
718 | footer_rect = None |
719 | |
720 | @@ -74,6 +74,7 @@ |
721 | self.renderer.set_text_rectangle(main_rect,footer_rect) |
722 | |
723 | def generate_preview(self, themedata): |
724 | + log.debug(u'generate preview ') |
725 | self.calculate_default(QtCore.QSize(800,600)) |
726 | self.renderer.set_theme(themedata) |
727 | self.build_text_rectangle(themedata) |
728 | @@ -94,25 +95,23 @@ |
729 | return frame |
730 | |
731 | def format_slide(self, words, footer): |
732 | - self.calculate_default(QtCore.QSize(800,600)) |
733 | - frame = QtGui.QPixmap(self.width, self.height) |
734 | - self.renderer.set_paint_dest(frame) |
735 | + log.debug(u'format slide') |
736 | + self.calculate_default(self.screen_list[self.current_display]['size']) |
737 | + self.renderer.set_paint_dest(QtGui.QPixmap(self.width, self.height)) |
738 | return self.renderer.format_slide(words, footer) |
739 | |
740 | - def generate_slide(self,main_text, footer_text, preview=True): |
741 | - if preview == True: |
742 | - self.calculate_default(QtCore.QSize(800,600)) |
743 | + def generate_slide(self,main_text, footer_text): |
744 | + log.debug(u'generate slide') |
745 | + self.calculate_default(self.screen_list[self.current_display]['size']) |
746 | |
747 | frame = QtGui.QPixmap(self.width, self.height) |
748 | self.renderer.set_paint_dest(frame) |
749 | - |
750 | answer=self.renderer.render_lines(main_text, footer_text) |
751 | return frame |
752 | |
753 | def calculate_default(self, screen): |
754 | + log.debug(u'calculate default %s' , screen) |
755 | self.width = screen.width() |
756 | self.height = screen.height() |
757 | + log.debug(u'calculate default %d,%d' , self.width, self.height) |
758 | self.footer_start = int(self.height*0.95) # 95% is start of footer |
759 | - #update the rederer frame |
760 | - self.frame = QtGui.QPixmap(self.width, self.height) |
761 | - self.renderer.set_paint_dest(self.frame) |
762 | |
763 | === modified file 'openlp/core/lib/serviceitem.py' |
764 | --- openlp/core/lib/serviceitem.py 2009-05-02 18:56:27 +0000 |
765 | +++ openlp/core/lib/serviceitem.py 2009-05-04 13:48:12 +0000 |
766 | @@ -19,7 +19,8 @@ |
767 | """ |
768 | import logging |
769 | import types |
770 | -from PyQt4 import QtCore, QtGui |
771 | +import time |
772 | + |
773 | from PyQt4.QtCore import * |
774 | from PyQt4.QtGui import * |
775 | |
776 | @@ -51,34 +52,34 @@ |
777 | |
778 | def addIcon(self, icon): |
779 | ButtonIcon = None |
780 | - if type(icon) is QtGui.QIcon: |
781 | + if type(icon) is QIcon: |
782 | ButtonIcon = icon |
783 | elif type(icon) is types.StringType or type(icon) is types.UnicodeType: |
784 | - ButtonIcon = QtGui.QIcon() |
785 | + ButtonIcon = QIcon() |
786 | if icon.startswith(u':/'): |
787 | - ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal, |
788 | - QtGui.QIcon.Off) |
789 | + ButtonIcon.addPixmap(QPixmap(icon), QIcon.Normal, |
790 | + QIcon.Off) |
791 | else: |
792 | - ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)), |
793 | - QtGui.QIcon.Normal, QtGui.QIcon.Off) |
794 | + ButtonIcon.addPixmap(QPixmap.fromImage(QImage(icon)), |
795 | + QIcon.Normal, QIcon.Off) |
796 | self.iconic_representation = ButtonIcon |
797 | |
798 | def render(self): |
799 | """ |
800 | - The render method is what the plugin uses to render it's meda to the |
801 | - screen. |
802 | + The render method is what renders the frames for the screen. |
803 | """ |
804 | log.debug(u'Render called') |
805 | if self.theme == None: |
806 | self.render_manager.set_override_theme(None) |
807 | else: |
808 | self.render_manager.set_override_theme(self.theme) |
809 | - |
810 | + log.debug(u'Formatting slides') |
811 | for slide in self.raw_slides: |
812 | self.format_slides.append(self.render_manager.format_slide(slide, False)) |
813 | + log.debug(u'Rendering slides') |
814 | for slide in self.format_slides: |
815 | + self.frames.append(self.render_manager.generate_slide(slide, self.raw_footer)) |
816 | |
817 | - self.frames.append(self.render_manager.generate_slide(slide, self.raw_footer, False)) |
818 | |
819 | def get_parent_node(self): |
820 | """ |
821 | |
822 | === modified file 'openlp/core/ui/maindisplay.py' |
823 | --- openlp/core/ui/maindisplay.py 2009-05-03 07:20:15 +0000 |
824 | +++ openlp/core/ui/maindisplay.py 2009-05-04 13:51:56 +0000 |
825 | @@ -29,6 +29,9 @@ |
826 | self.setWindowTitle(u'OpenLP Display') |
827 | self.screens = screens |
828 | self.display = QtGui.QLabel(self) |
829 | + self.display.setScaledContents(True) |
830 | + self.displayBlank = False |
831 | + self.blankFrame= None |
832 | |
833 | def setup(self, screenNumber): |
834 | """ |
835 | @@ -51,8 +54,24 @@ |
836 | else: |
837 | self.showMinimized() |
838 | |
839 | + painter=QtGui.QPainter() |
840 | + self.blankFrame = QtGui.QPixmap(800, 600) |
841 | + painter.begin(self.blankFrame) |
842 | + painter.fillRect(self.blankFrame.rect(), QtGui.QColor(u'#000000')) |
843 | + |
844 | def frameView(self, frame): |
845 | - self.display.setPixmap(frame) |
846 | + if self.displayBlank == False: |
847 | + self.display.setPixmap(frame) |
848 | + self.frame = frame |
849 | + |
850 | + def blankDisplay(self): |
851 | + if self.displayBlank == False: |
852 | + self.displayBlank = True |
853 | + self.display.setPixmap(self.blankFrame) |
854 | + else: |
855 | + self.displayBlank = False |
856 | + self.frameView(self.frame) |
857 | + |
858 | |
859 | def kill(self): |
860 | pass |
861 | |
862 | === modified file 'openlp/core/ui/mainwindow.py' |
863 | --- openlp/core/ui/mainwindow.py 2009-05-03 07:20:15 +0000 |
864 | +++ openlp/core/ui/mainwindow.py 2009-05-04 08:15:48 +0000 |
865 | @@ -97,8 +97,6 @@ |
866 | |
867 | # Initialise SlideControllers |
868 | log.info(u'Set Up SlideControllers') |
869 | - self.PreviewController.isLive = False |
870 | - self.LiveController.isLive = True |
871 | self.LiveController.mainDisplay = self.main_display |
872 | |
873 | def setupUi(self): |
874 | @@ -130,8 +128,8 @@ |
875 | self.ControlSplitter.setOrientation(QtCore.Qt.Horizontal) |
876 | self.ControlSplitter.setObjectName(u'ControlSplitter') |
877 | self.MainContentLayout.addWidget(self.ControlSplitter) |
878 | - self.PreviewController = SlideController(self.ControlSplitter) |
879 | - self.LiveController = SlideController(self.ControlSplitter) |
880 | + self.PreviewController = SlideController(self.ControlSplitter, False) |
881 | + self.LiveController = SlideController(self.ControlSplitter, True) |
882 | self.MenuBar = QtGui.QMenuBar(self.main_window) |
883 | self.MenuBar.setGeometry(QtCore.QRect(0, 0, 1087, 27)) |
884 | self.MenuBar.setObjectName(u'MenuBar') |
885 | @@ -296,10 +294,10 @@ |
886 | QtGui.QIcon.Normal, QtGui.QIcon.Off) |
887 | self.ToolsAddToolItem.setIcon(AddToolIcon) |
888 | self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem') |
889 | - self.action_Preview_Pane = QtGui.QAction(self.main_window) |
890 | - self.action_Preview_Pane.setCheckable(True) |
891 | - self.action_Preview_Pane.setChecked(True) |
892 | - self.action_Preview_Pane.setObjectName(u'action_Preview_Pane') |
893 | + self.action_Preview_Panel = QtGui.QAction(self.main_window) |
894 | + self.action_Preview_Panel.setCheckable(True) |
895 | + self.action_Preview_Panel.setChecked(True) |
896 | + self.action_Preview_Panel.setObjectName(u'action_Preview_Panel') |
897 | self.ModeLiveItem = QtGui.QAction(self.main_window) |
898 | self.ModeLiveItem.setObjectName(u'ModeLiveItem') |
899 | self.FileImportMenu.addAction(self.ImportThemeItem) |
900 | @@ -322,7 +320,7 @@ |
901 | self.OptionsViewMenu.addAction(self.ViewServiceManagerItem) |
902 | self.OptionsViewMenu.addAction(self.ViewThemeManagerItem) |
903 | self.OptionsViewMenu.addSeparator() |
904 | - self.OptionsViewMenu.addAction(self.action_Preview_Pane) |
905 | + self.OptionsViewMenu.addAction(self.action_Preview_Panel) |
906 | self.OptionsLanguageMenu.addAction(self.LanguageEnglishItem) |
907 | self.OptionsLanguageMenu.addSeparator() |
908 | self.OptionsLanguageMenu.addAction(self.LanguageTranslateItem) |
909 | @@ -353,8 +351,8 @@ |
910 | QtCore.SIGNAL(u'triggered(bool)'), self.ServiceManagerDock.setVisible) |
911 | QtCore.QObject.connect(self.ViewThemeManagerItem, |
912 | QtCore.SIGNAL(u'triggered(bool)'), self.ThemeManagerDock.setVisible) |
913 | - QtCore.QObject.connect(self.action_Preview_Pane, |
914 | - QtCore.SIGNAL(u'toggled(bool)'), self.PreviewController.Pane.setVisible) |
915 | + QtCore.QObject.connect(self.action_Preview_Panel, |
916 | + QtCore.SIGNAL(u'toggled(bool)'), self.PreviewController.Panel.setVisible) |
917 | QtCore.QObject.connect(self.MediaManagerDock, |
918 | QtCore.SIGNAL(u'visibilityChanged(bool)'), self.ViewMediaManagerItem.setChecked) |
919 | QtCore.QObject.connect(self.ServiceManagerDock, |
920 | @@ -451,7 +449,7 @@ |
921 | self.LanguageEnglishItem.setStatusTip(translate(u'main_window', u'Set the interface language to English')) |
922 | self.ToolsAddToolItem.setText(translate(u'main_window', u'&Add Tool...')) |
923 | self.ToolsAddToolItem.setStatusTip(translate(u'main_window', u'Add an application to the list of tools')) |
924 | - self.action_Preview_Pane.setText(translate(u'main_window', u'&Preview Pane')) |
925 | + self.action_Preview_Panel.setText(translate(u'main_window', u'&Preview Pane')) |
926 | self.ModeLiveItem.setText(translate(u'main_window', u'&Live')) |
927 | |
928 | def show(self): |
929 | |
930 | === modified file 'openlp/core/ui/servicemanager.py' |
931 | --- openlp/core/ui/servicemanager.py 2009-05-02 18:56:27 +0000 |
932 | +++ openlp/core/ui/servicemanager.py 2009-05-04 08:15:48 +0000 |
933 | @@ -21,15 +21,16 @@ |
934 | |
935 | from time import sleep |
936 | from copy import deepcopy |
937 | -from PyQt4 import * |
938 | -from PyQt4 import QtCore, QtGui |
939 | + |
940 | from PyQt4.QtCore import * |
941 | from PyQt4.QtGui import * |
942 | + |
943 | # from openlp.core.resources import * |
944 | # from openlp.core.ui import AboutForm, AlertForm, SettingsForm, SlideController |
945 | from openlp.core.lib import OpenLPToolbar |
946 | from openlp.core.lib import ServiceItem |
947 | from openlp.core.lib import RenderManager |
948 | +from openlp.core import translate |
949 | |
950 | # from openlp.core import PluginManager |
951 | import logging |
952 | @@ -47,6 +48,9 @@ |
953 | self.items=[] |
954 | log.info("Starting") |
955 | |
956 | + def clearItems(self): |
957 | + self.items = [] |
958 | + |
959 | def columnCount(self, parent): |
960 | return 1; # always only a single column (for now) |
961 | |
962 | @@ -122,33 +126,73 @@ |
963 | def __init__(self, parent): |
964 | QWidget.__init__(self) |
965 | self.parent=parent |
966 | - self.Layout = QtGui.QVBoxLayout(self) |
967 | + self.Layout = QVBoxLayout(self) |
968 | self.Layout.setSpacing(0) |
969 | self.Layout.setMargin(0) |
970 | self.Toolbar = OpenLPToolbar(self) |
971 | - self.Toolbar.addToolbarButton("Move to top", ":/services/service_top.png") |
972 | - self.Toolbar.addToolbarButton("Move up", ":/services/service_up.png") |
973 | - self.Toolbar.addToolbarButton("Move down", ":/services/service_down.png") |
974 | - self.Toolbar.addToolbarButton("Move to bottom", ":/services/service_bottom.png") |
975 | - self.Toolbar.addSeparator() |
976 | - self.Toolbar.addToolbarButton("New Service", ":/services/service_new.png") |
977 | - self.Toolbar.addToolbarButton("Save Service", ":/services/service_save.png") |
978 | - self.Toolbar.addSeparator() |
979 | - self.ThemeComboBox = QtGui.QComboBox(self.Toolbar) |
980 | - self.ThemeComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) |
981 | - self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar) |
982 | + self.Toolbar.addToolbarButton("Move to top", ":/services/service_top.png", |
983 | + translate(u'ServiceManager', u'Move to start'), self.onServiceTop) |
984 | + self.Toolbar.addToolbarButton("Move up", ":/services/service_up.png", |
985 | + translate(u'ServiceManager', u'Move up order'), self.onServiceUp) |
986 | + self.Toolbar.addToolbarButton("Move down", ":/services/service_down.png", |
987 | + translate(u'ServiceManager', u'Move down order'), self.onServiceDown) |
988 | + self.Toolbar.addToolbarButton("Move to bottom", ":/services/service_bottom.png", |
989 | + translate(u'ServiceManager', u'Move to end'), self.onServiceEnd) |
990 | + self.Toolbar.addSeparator() |
991 | + self.Toolbar.addToolbarButton("New Service", ":/services/service_new.png", |
992 | + translate(u'ServiceManager', u'Create a new Service'), self.onNewService) |
993 | + self.Toolbar.addToolbarButton("Delete From Service", ":/services/service_delete.png", |
994 | + translate(u'ServiceManager', u'Delete From Service'), self.onDeleteFromService) |
995 | + self.Toolbar.addSeparator() |
996 | + self.Toolbar.addToolbarButton("Save Service", ":/services/service_save.png", |
997 | + translate(u'ServiceManager', u'Save Service'), self.onSaveService) |
998 | + self.Toolbar.addToolbarButton("Load Service", ":/services/service_open.png", |
999 | + translate(u'ServiceManager', u'Load Existing'), self.onLoadService) |
1000 | + |
1001 | + self.Toolbar.addSeparator() |
1002 | + self.ThemeComboBox = QComboBox(self.Toolbar) |
1003 | + self.ThemeComboBox.setSizeAdjustPolicy(QComboBox.AdjustToContents) |
1004 | + self.ThemeWidget = QWidgetAction(self.Toolbar) |
1005 | self.ThemeWidget.setDefaultWidget(self.ThemeComboBox) |
1006 | self.Toolbar.addAction(self.ThemeWidget) |
1007 | |
1008 | self.Layout.addWidget(self.Toolbar) |
1009 | |
1010 | - self.TreeView = QtGui.QTreeView(self) |
1011 | + self.TreeView = QTreeView(self) |
1012 | self.service_data=ServiceData() |
1013 | self.TreeView.setModel(self.service_data) |
1014 | + self.TreeView.setAlternatingRowColors(True) |
1015 | self.Layout.addWidget(self.TreeView) |
1016 | |
1017 | - QtCore.QObject.connect(self.ThemeComboBox, |
1018 | - QtCore.SIGNAL("activated(int)"), self.onThemeComboBoxSelected) |
1019 | + QObject.connect(self.ThemeComboBox, |
1020 | + SIGNAL("activated(int)"), self.onThemeComboBoxSelected) |
1021 | + |
1022 | + def onServiceTop(self): |
1023 | + pass |
1024 | + |
1025 | + def onServiceUp(self): |
1026 | + pass |
1027 | + |
1028 | + def onServiceDown(self): |
1029 | + pass |
1030 | + |
1031 | + def onServiceEnd(self): |
1032 | + pass |
1033 | + |
1034 | + def onNewService(self): |
1035 | + self.service_data.clearItems() |
1036 | + |
1037 | + def onDeleteFromService(self): |
1038 | + pass |
1039 | + |
1040 | + def onSaveService(self): |
1041 | + Pass |
1042 | + |
1043 | + def onLoadService(self): |
1044 | + Pass |
1045 | + |
1046 | + |
1047 | + |
1048 | |
1049 | def onThemeComboBoxSelected(self, currentIndex): |
1050 | self.renderManager.default_theme = self.ThemeComboBox.currentText() |
1051 | |
1052 | === modified file 'openlp/core/ui/slidecontroller.py' |
1053 | --- openlp/core/ui/slidecontroller.py 2009-05-03 07:20:15 +0000 |
1054 | +++ openlp/core/ui/slidecontroller.py 2009-05-04 13:48:12 +0000 |
1055 | @@ -20,10 +20,12 @@ |
1056 | import logging |
1057 | import os |
1058 | |
1059 | -from PyQt4 import QtCore, QtGui |
1060 | from PyQt4.QtCore import * |
1061 | from PyQt4.QtGui import * |
1062 | |
1063 | +from openlp.core.lib import OpenLPToolbar |
1064 | +from openlp.core import translate |
1065 | + |
1066 | class SlideData(QAbstractListModel): |
1067 | """ |
1068 | Tree of items for an order of Theme. |
1069 | @@ -46,14 +48,14 @@ |
1070 | def columnCount(self, parent): |
1071 | return 1 |
1072 | |
1073 | - def rowCount(self, parent): |
1074 | + def rowCount(self, parent=None): |
1075 | return len(self.items) |
1076 | |
1077 | def insertRow(self, row, frame): |
1078 | self.beginInsertRows(QModelIndex(),row,row) |
1079 | log.info(u'insert row %d' % row) |
1080 | # create a preview image |
1081 | - frame1 = frame.scaled(QtCore.QSize(350,260)) |
1082 | + frame1 = frame.scaled(QSize(350,260)) |
1083 | self.items.insert(row,(frame1)) |
1084 | log.info(u'Items: %s' % self.items) |
1085 | self.endInsertRows() |
1086 | @@ -99,48 +101,112 @@ |
1087 | return filelist |
1088 | |
1089 | |
1090 | -class SlideController(QtGui.QWidget): |
1091 | +class SlideController(QWidget): |
1092 | global log |
1093 | log=logging.getLogger(u'SlideController') |
1094 | |
1095 | - def __init__(self, control_splitter): |
1096 | - QtGui.QWidget.__init__(self) |
1097 | - self.Pane = QtGui.QWidget(control_splitter) |
1098 | - self.Splitter = QtGui.QSplitter(self.Pane) |
1099 | - self.Splitter.setOrientation(QtCore.Qt.Vertical) |
1100 | - |
1101 | - self.PaneLayout = QtGui.QVBoxLayout(self.Pane) |
1102 | - self.PaneLayout.addWidget(self.Splitter) |
1103 | - self.PaneLayout.setSpacing(50) |
1104 | - self.PaneLayout.setMargin(0) |
1105 | - |
1106 | - self.Controller = QtGui.QScrollArea(self.Splitter) |
1107 | + def __init__(self, control_splitter, isLive): |
1108 | + QWidget.__init__(self) |
1109 | + self.isLive = isLive |
1110 | + self.Panel = QWidget(control_splitter) |
1111 | + self.Splitter = QSplitter(self.Panel) |
1112 | + self.Splitter.setOrientation(Qt.Vertical) |
1113 | + |
1114 | + self.PanelLayout = QVBoxLayout(self.Panel) |
1115 | + self.PanelLayout.addWidget(self.Splitter) |
1116 | + self.PanelLayout.setSpacing(50) |
1117 | + self.PanelLayout.setMargin(0) |
1118 | + |
1119 | + self.Controller = QScrollArea(self.Splitter) |
1120 | self.Controller.setWidgetResizable(True) |
1121 | |
1122 | - self.PreviewListView = QtGui.QListView(self.Splitter) |
1123 | + self.PreviewListView = QListView(self.Splitter) |
1124 | self.PreviewListView.setAlternatingRowColors(True) |
1125 | self.PreviewListData = SlideData() |
1126 | self.PreviewListView.setModel(self.PreviewListData) |
1127 | - self.Controller.setGeometry(QtCore.QRect(0, 0, 828, 536)) |
1128 | |
1129 | + self.Controller.setGeometry(QRect(0, 0, 828, 536)) |
1130 | self.Controller.setWidget(self.PreviewListView) |
1131 | |
1132 | - self.SlidePreview = QtGui.QLabel(self.Splitter) |
1133 | - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) |
1134 | + self.Toolbar = OpenLPToolbar(self.Splitter) |
1135 | + sizeToolbarPolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) |
1136 | + sizeToolbarPolicy.setHorizontalStretch(0) |
1137 | + sizeToolbarPolicy.setVerticalStretch(0) |
1138 | + sizeToolbarPolicy.setHeightForWidth(self.Toolbar.sizePolicy().hasHeightForWidth()) |
1139 | + |
1140 | + if self.isLive: |
1141 | + self.Toolbar.addToolbarButton("First Slide", ":/slides/slide_first.png", |
1142 | + translate(u'SlideController', u'Move to first'), self.onSlideSelectedFirst) |
1143 | + self.Toolbar.addToolbarButton("Last Slide", ":/slides/slide_previous.png", |
1144 | + translate(u'SlideController', u'Move to previous'), self.onSlideSelectedPrevious) |
1145 | + self.Toolbar.addToolbarButton("First Slide", ":/slides/slide_next.png", |
1146 | + translate(u'SlideController', u'Move to next'), self.onSlideSelectedNext) |
1147 | + if self.isLive: |
1148 | + self.Toolbar.addToolbarButton("Last Slide", ":/slides/slide_last.png", |
1149 | + translate(u'SlideController', u'Move to last'), self.onSlideSelectedLast) |
1150 | + self.Toolbar.addSeparator() |
1151 | + self.Toolbar.addToolbarButton("Close Sscreen", ":/slides/slide_close.png", |
1152 | + translate(u'SlideController', u'Close Screen'), self.onBlankScreen) |
1153 | + |
1154 | + self.Toolbar.setSizePolicy(sizeToolbarPolicy) |
1155 | + |
1156 | + self.SlidePreview = QLabel(self.Splitter) |
1157 | + sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) |
1158 | sizePolicy.setHorizontalStretch(0) |
1159 | sizePolicy.setVerticalStretch(0) |
1160 | sizePolicy.setHeightForWidth(self.SlidePreview.sizePolicy().hasHeightForWidth()) |
1161 | self.SlidePreview.setSizePolicy(sizePolicy) |
1162 | - self.SlidePreview.setMinimumSize(QtCore.QSize(250, 190)) |
1163 | - self.SlidePreview.setFrameShape(QtGui.QFrame.WinPanel) |
1164 | - self.SlidePreview.setFrameShadow(QtGui.QFrame.Sunken) |
1165 | + self.SlidePreview.setMinimumSize(QSize(250, 190)) |
1166 | + self.SlidePreview.setFrameShape(QFrame.WinPanel) |
1167 | + self.SlidePreview.setFrameShadow(QFrame.Sunken) |
1168 | self.SlidePreview.setLineWidth(1) |
1169 | self.SlidePreview.setScaledContents(True) |
1170 | self.SlidePreview.setObjectName("SlidePreview") |
1171 | |
1172 | - QtCore.QObject.connect(self.PreviewListView, |
1173 | - QtCore.SIGNAL("clicked(QModelIndex)"), self.onSlideSelected) |
1174 | - |
1175 | + QObject.connect(self.PreviewListView, |
1176 | + SIGNAL("clicked(QModelIndex)"), self.onSlideSelected) |
1177 | + |
1178 | + def onSlideSelectedFirst(self): |
1179 | + row = self.PreviewListData.createIndex(0, 0) |
1180 | + if row.isValid(): |
1181 | + self.PreviewListView.selectionModel().setCurrentIndex(row, QItemSelectionModel.SelectCurrent) |
1182 | + self.onSlideSelected(row) |
1183 | + |
1184 | + def onSlideSelectedNext(self): |
1185 | + indexes = self.PreviewListView.selectedIndexes() |
1186 | + rowNumber = 0 |
1187 | + for index in indexes: |
1188 | + if index.row() == self.PreviewListData.rowCount() - 1: |
1189 | + rowNumber = 0 |
1190 | + else: |
1191 | + rowNumber = index.row() + 1 |
1192 | + row = self.PreviewListData.createIndex(rowNumber , 0) |
1193 | + if row.isValid(): |
1194 | + self.PreviewListView.selectionModel().setCurrentIndex(row, QItemSelectionModel.SelectCurrent) |
1195 | + self.onSlideSelected(row) |
1196 | + |
1197 | + |
1198 | + def onSlideSelectedPrevious(self): |
1199 | + indexes = self.PreviewListView.selectedIndexes() |
1200 | + rowNumber = 0 |
1201 | + for index in indexes: |
1202 | + if index.row() == 0: |
1203 | + rowNumber = self.PreviewListData.rowCount() - 1 |
1204 | + else: |
1205 | + rowNumber = index.row() - 1 |
1206 | + row = self.PreviewListData.createIndex(rowNumber , 0) |
1207 | + if row.isValid(): |
1208 | + self.PreviewListView.selectionModel().setCurrentIndex(row, QItemSelectionModel.SelectCurrent) |
1209 | + self.onSlideSelected(row) |
1210 | + |
1211 | + def onSlideSelectedLast(self): |
1212 | + row = self.PreviewListData.createIndex(self.PreviewListData.rowCount() - 1 , 0) |
1213 | + if row.isValid(): |
1214 | + self.PreviewListView.selectionModel().setCurrentIndex(row, QItemSelectionModel.SelectCurrent) |
1215 | + self.onSlideSelected(row) |
1216 | + |
1217 | + def onBlankScreen(self): |
1218 | + self.mainDisplay.blankDisplay() |
1219 | |
1220 | def onSlideSelected(self, index): |
1221 | frame = self.PreviewListData.getValue(index) |
1222 | @@ -152,11 +218,17 @@ |
1223 | self.mainDisplay.frameView(frame) |
1224 | |
1225 | def addServiceItem(self, serviceitem): |
1226 | + log.debug(u'addServiceItem') |
1227 | self.serviceitem = serviceitem |
1228 | self.serviceitem.render() |
1229 | self.PreviewListData.clearItems() |
1230 | for frame in self.serviceitem.frames: |
1231 | self.PreviewListData.addRow(frame) |
1232 | |
1233 | + row = self.PreviewListData.createIndex(0, 0) |
1234 | + if row.isValid(): |
1235 | + self.PreviewListView.selectionModel().setCurrentIndex(row, QItemSelectionModel.SelectCurrent) |
1236 | + self.onSlideSelected(row) |
1237 | + |
1238 | def render(self): |
1239 | pass |
1240 | |
1241 | === modified file 'openlp/core/ui/thememanager.py' |
1242 | --- openlp/core/ui/thememanager.py 2009-05-02 18:56:27 +0000 |
1243 | +++ openlp/core/ui/thememanager.py 2009-05-04 08:15:48 +0000 |
1244 | @@ -164,12 +164,13 @@ |
1245 | translate(u'ThemeManager', u'Export a theme'), self.onExportTheme) |
1246 | self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar) |
1247 | self.Layout.addWidget(self.Toolbar) |
1248 | + |
1249 | self.ThemeListView = QtGui.QListView(self) |
1250 | self.themeData = ThemeData() |
1251 | self.ThemeListView.setModel(self.themeData) |
1252 | self.ThemeListView.setAlternatingRowColors(True) |
1253 | self.Layout.addWidget(self.ThemeListView) |
1254 | - self.ThemeListView.setAlternatingRowColors(True) |
1255 | + |
1256 | self.themelist = [] |
1257 | self.path = os.path.join(ConfigHelper.get_data_path(), u'themes') |
1258 | self.checkThemesExists(self.path) |
1259 | |
1260 | === modified file 'openlp/plugins/bibles/lib/mediaitem.py' |
1261 | --- openlp/plugins/bibles/lib/mediaitem.py 2009-05-02 18:56:27 +0000 |
1262 | +++ openlp/plugins/bibles/lib/mediaitem.py 2009-05-04 08:15:48 +0000 |
1263 | @@ -371,10 +371,10 @@ |
1264 | if len(raw_footer) <= 1: |
1265 | raw_footer.append(book) |
1266 | |
1267 | - service_item.theme = None |
1268 | - |
1269 | - service_item.raw_slides = raw_slides |
1270 | - service_item.raw_footer = raw_footer |
1271 | + if len(raw_slides) > 0: |
1272 | + service_item.theme = None |
1273 | + service_item.raw_slides = raw_slides |
1274 | + service_item.raw_footer = raw_footer |
1275 | |
1276 | def formatVerse(self, old_chapter, chapter, verse, opening, closing): |
1277 | loc = opening |
1278 | |
1279 | === modified file 'openlp/plugins/custom/lib/mediaitem.py' |
1280 | --- openlp/plugins/custom/lib/mediaitem.py 2009-05-02 18:56:27 +0000 |
1281 | +++ openlp/plugins/custom/lib/mediaitem.py 2009-05-04 13:48:12 +0000 |
1282 | @@ -187,6 +187,7 @@ |
1283 | self.CustomListData.deleteRow(index) |
1284 | |
1285 | def onCustomPreviewClick(self): |
1286 | + log.debug(u'Custom Preview Requested') |
1287 | service_item = ServiceItem(self.parent) |
1288 | service_item.addIcon( ":/media/media_song.png") |
1289 | service_item.render_manager = self.parent.render_manager |
1290 | @@ -194,6 +195,7 @@ |
1291 | self.parent.preview_controller.addServiceItem(service_item) |
1292 | |
1293 | def onCustomLiveClick(self): |
1294 | + log.debug(u'Custom Live Requested') |
1295 | service_item = ServiceItem(self.parent) |
1296 | service_item.addIcon( ":/media/media_song.png") |
1297 | service_item.render_manager = self.parent.render_manager |
1298 | @@ -201,6 +203,7 @@ |
1299 | self.parent.live_controller.addServiceItem(service_item) |
1300 | |
1301 | def onCustomAddClick(self): |
1302 | + log.debug(u'Custom Add Requested') |
1303 | service_item = ServiceItem(self.parent) |
1304 | service_item.addIcon( ":/media/media_song.png") |
1305 | service_item.render_manager = self.parent.render_manager |
1306 | @@ -226,6 +229,7 @@ |
1307 | for verse in verseList: |
1308 | raw_slides.append(verse[1]) |
1309 | raw_footer.append(title + u' '+ credit) |
1310 | - service_item.title = title |
1311 | - service_item.raw_slides = raw_slides |
1312 | - service_item.raw_footer = raw_footer |
1313 | + if theme is not None: |
1314 | + service_item.title = title |
1315 | + service_item.raw_slides = raw_slides |
1316 | + service_item.raw_footer = raw_footer |
Added buttons, paging and screen closure
Added more logging to tray and see why the 4 page screen was slow.
Cleanups and fixes.