Merge lp:~trb143/openlp/ThemeManager2 into lp:openlp
- ThemeManager2
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~trb143/openlp/ThemeManager2 |
Merge into: | lp:openlp |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~trb143/openlp/ThemeManager2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raoul Snyman | Approve | ||
Review via email:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Tim Bentley (trb143) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Michael Gorven (mgorven) wrote : | # |
+ log=logging.
I'd just use getLogger(''), which is the root logger.
+ for i in range (0 , self.desktop(
Doesn't really make a difference here, but you should rather use xrange
instead of range.
+#from interpolate import interpolate
If the import isn't needed just delete it.
+ def getValue(self, index):
+ row = index.row()
+ return self.items[row]
I'd just use self.items[
be a good reason for the abstraction).
+ log.debug(u'Handle event called with event %s'%event.
Pass event_type as a parameter.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Raoul Snyman (raoul-snyman) wrote : | # |
Watch your spaces, and preferably name your counter something interesting:
for i in range (0 , self.desktop(
screens.
log.
should be:
for screen in range(0, self.desktop(
screens.
log.
XML is flexible, please don't use "color1" and "color2" as they undescriptive. If it's a single background colour, "color" will suffice, if it's a gradient, "startColor" and "endColor."
if background_type == u'color':
backgroun
backgroun
color = self.theme_
# do the rest of your "color" stuff here
elif background_type == u'gradient':
backgroun
backgroun
startColor = self.theme_
endColor = self.theme_
# do the rest of your "gradient" stuff here
...
Underscores are used to separate words in variables and parameters:
def add_font(self, fontname, fontcolor, fontproportion, override, fonttype=u'main', xpos=0, ypos=0 ,width=0, height=0)
should read:
def add_font(self, font_name, font_color, font_proportion, override, font_type=u'main', xpos=0, ypos=0, width=0, height=0)
however, since we're dealing with a font (as denoted by the method name "add_font"), you can drop the "font" in the parameter names (and since "type" is a reserved word, we append the _):
def add_font(self, name, color, proportion, override, type_=u'main', xpos=0, ypos=0, width=0, height=0)
Spaces:
bbox=
=> bbox = self._render_
bbox=
=> bbox = self._render_
(plenty other places)
- 431. By Tim Bentley
-
<email address hidden>
Preview Diff
1 | === modified file 'openlp.pyw' | |||
2 | --- openlp.pyw 2009-03-10 16:46:25 +0000 | |||
3 | +++ openlp.pyw 2009-04-10 05:59:40 +0000 | |||
4 | @@ -26,29 +26,37 @@ | |||
5 | 26 | from openlp.core.lib import Receiver | 26 | from openlp.core.lib import Receiver |
6 | 27 | 27 | ||
7 | 28 | logging.basicConfig(level=logging.DEBUG, | 28 | logging.basicConfig(level=logging.DEBUG, |
12 | 29 | format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', | 29 | format=u'%(asctime)s %(name)-12s %(levelname)-8s %(message)s', |
13 | 30 | datefmt='%m-%d %H:%M', | 30 | datefmt=u'%m-%d %H:%M', |
14 | 31 | filename='openlp.log', | 31 | filename=u'openlp.log', |
15 | 32 | filemode='w') | 32 | filemode=u'w') |
16 | 33 | 33 | ||
17 | 34 | from openlp.core.resources import * | 34 | from openlp.core.resources import * |
18 | 35 | from openlp.core.ui import MainWindow, SplashScreen | 35 | from openlp.core.ui import MainWindow, SplashScreen |
19 | 36 | 36 | ||
20 | 37 | class OpenLP(QtGui.QApplication): | 37 | class OpenLP(QtGui.QApplication): |
21 | 38 | global log | ||
22 | 39 | log=logging.getLogger(u'OpenLP Application') | ||
23 | 40 | log.info(u'Application Loaded') | ||
24 | 38 | 41 | ||
25 | 39 | def run(self): | 42 | def run(self): |
26 | 40 | #provide a listener for widgets to reqest a screen update. | 43 | #provide a listener for widgets to reqest a screen update. |
27 | 41 | QtCore.QObject.connect(Receiver.get_receiver(), | 44 | QtCore.QObject.connect(Receiver.get_receiver(), |
29 | 42 | QtCore.SIGNAL('openlpprocessevents'), self.processEvents) | 45 | QtCore.SIGNAL(u'openlpprocessevents'), self.processEvents) |
30 | 43 | 46 | ||
33 | 44 | self.setApplicationName('openlp.org') | 47 | self.setApplicationName(u'openlp.org') |
34 | 45 | self.setApplicationVersion('1.9.0') | 48 | self.setApplicationVersion(u'1.9.0') |
35 | 46 | self.splash = SplashScreen() | 49 | self.splash = SplashScreen() |
36 | 47 | self.splash.show() | 50 | self.splash.show() |
37 | 48 | # make sure Qt really display the splash screen | 51 | # make sure Qt really display the splash screen |
38 | 49 | self.processEvents() | 52 | self.processEvents() |
41 | 50 | # start tha main app window | 53 | screens = [] |
42 | 51 | self.main_window = MainWindow() | 54 | # Decide how many screens we have and their size |
43 | 55 | for i in range (0 , self.desktop().numScreens()): | ||
44 | 56 | screens.insert(i, (i+1, self.desktop().availableGeometry(i+1))) | ||
45 | 57 | log.info(u'Screen %d found with resolution %s', i+1, self.desktop().availableGeometry(i+1)) | ||
46 | 58 | # start the main app window | ||
47 | 59 | self.main_window = MainWindow(screens) | ||
48 | 52 | self.main_window.show() | 60 | self.main_window.show() |
49 | 53 | # now kill the splashscreen | 61 | # now kill the splashscreen |
50 | 54 | self.splash.finish(self.main_window.main_window) | 62 | self.splash.finish(self.main_window.main_window) |
51 | 55 | 63 | ||
52 | === modified file 'openlp/core/lib/themexmlhandler.py' | |||
53 | --- openlp/core/lib/themexmlhandler.py 2009-04-07 19:45:21 +0000 | |||
54 | +++ openlp/core/lib/themexmlhandler.py 2009-04-11 07:33:45 +0000 | |||
55 | @@ -52,23 +52,30 @@ | |||
56 | 52 | background.setAttribute(u'type', u'solid') | 52 | background.setAttribute(u'type', u'solid') |
57 | 53 | self.theme.appendChild(background) | 53 | self.theme.appendChild(background) |
58 | 54 | 54 | ||
60 | 55 | color = self.theme_xml.createElement(u'color') | 55 | color = self.theme_xml.createElement(u'color1') |
61 | 56 | bkc = self.theme_xml.createTextNode(bkcolor) | 56 | bkc = self.theme_xml.createTextNode(bkcolor) |
62 | 57 | color.appendChild(bkc) | 57 | color.appendChild(bkc) |
63 | 58 | background.appendChild(color) | 58 | background.appendChild(color) |
64 | 59 | 59 | ||
65 | 60 | color = self.theme_xml.createElement(u'color2') | ||
66 | 61 | background.appendChild(color) | ||
67 | 62 | |||
68 | 63 | color = self.theme_xml.createElement(u'direction') | ||
69 | 64 | background.appendChild(color) | ||
70 | 65 | |||
71 | 66 | |||
72 | 60 | def add_background_gradient(self, startcolor, endcolor, direction): | 67 | def add_background_gradient(self, startcolor, endcolor, direction): |
73 | 61 | background = self.theme_xml.createElement(u'background') | 68 | background = self.theme_xml.createElement(u'background') |
74 | 62 | background.setAttribute(u'mode', u'opaque') | 69 | background.setAttribute(u'mode', u'opaque') |
76 | 63 | background.setAttribute(u'type', u'Gradient') | 70 | background.setAttribute(u'type', u'gradient') |
77 | 64 | self.theme.appendChild(background) | 71 | self.theme.appendChild(background) |
78 | 65 | 72 | ||
80 | 66 | color = self.theme_xml.createElement(u'startColor') | 73 | color = self.theme_xml.createElement(u'color1') |
81 | 67 | bkc = self.theme_xml.createTextNode(startcolor) | 74 | bkc = self.theme_xml.createTextNode(startcolor) |
82 | 68 | color.appendChild(bkc) | 75 | color.appendChild(bkc) |
83 | 69 | background.appendChild(color) | 76 | background.appendChild(color) |
84 | 70 | 77 | ||
86 | 71 | color = self.theme_xml.createElement(u'endColor') | 78 | color = self.theme_xml.createElement(u'color2') |
87 | 72 | bkc = self.theme_xml.createTextNode(endcolor) | 79 | bkc = self.theme_xml.createTextNode(endcolor) |
88 | 73 | color.appendChild(bkc) | 80 | color.appendChild(bkc) |
89 | 74 | background.appendChild(color) | 81 | background.appendChild(color) |
90 | @@ -89,7 +96,7 @@ | |||
91 | 89 | color.appendChild(bkc) | 96 | color.appendChild(bkc) |
92 | 90 | background.appendChild(color) | 97 | background.appendChild(color) |
93 | 91 | 98 | ||
95 | 92 | def add_font(self, fontname, fontcolor, fontproportion, fonttype=u'main'): | 99 | def add_font(self, fontname, fontcolor, fontproportion, override, fonttype=u'main', xpos=0, ypos=0 ,width=0, height=0): |
96 | 93 | background = self.theme_xml.createElement(u'font') | 100 | background = self.theme_xml.createElement(u'font') |
97 | 94 | background.setAttribute(u'type',fonttype) | 101 | background.setAttribute(u'type',fonttype) |
98 | 95 | self.theme.appendChild(background) | 102 | self.theme.appendChild(background) |
99 | @@ -109,6 +116,14 @@ | |||
100 | 109 | name.appendChild(fn) | 116 | name.appendChild(fn) |
101 | 110 | background.appendChild(name) | 117 | background.appendChild(name) |
102 | 111 | 118 | ||
103 | 119 | name = self.theme_xml.createElement(u'location') | ||
104 | 120 | name.setAttribute(u'override',override) | ||
105 | 121 | name.setAttribute(u'x',str(xpos)) | ||
106 | 122 | name.setAttribute(u'y',str(ypos)) | ||
107 | 123 | name.setAttribute(u'width',str(width)) | ||
108 | 124 | name.setAttribute(u'height',str(height)) | ||
109 | 125 | background.appendChild(name) | ||
110 | 126 | |||
111 | 112 | def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap): | 127 | def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap): |
112 | 113 | background = self.theme_xml.createElement(u'display') | 128 | background = self.theme_xml.createElement(u'display') |
113 | 114 | self.theme.appendChild(background) | 129 | self.theme.appendChild(background) |
114 | 115 | 130 | ||
115 | === modified file 'openlp/core/render.py' | |||
116 | --- openlp/core/render.py 2009-04-06 18:45:45 +0000 | |||
117 | +++ openlp/core/render.py 2009-04-11 07:33:45 +0000 | |||
118 | @@ -23,7 +23,7 @@ | |||
119 | 23 | from PyQt4 import QtGui, QtCore, Qt | 23 | from PyQt4 import QtGui, QtCore, Qt |
120 | 24 | 24 | ||
121 | 25 | from copy import copy | 25 | from copy import copy |
123 | 26 | from interpolate import interpolate | 26 | #from interpolate import interpolate |
124 | 27 | 27 | ||
125 | 28 | class Renderer: | 28 | class Renderer: |
126 | 29 | 29 | ||
127 | @@ -116,9 +116,10 @@ | |||
128 | 116 | retval=self._render_lines(words) | 116 | retval=self._render_lines(words) |
129 | 117 | return retval | 117 | return retval |
130 | 118 | 118 | ||
132 | 119 | def set_text_rectangle(self, rect): | 119 | def set_text_rectangle(self, rect_main, rect_footer): |
133 | 120 | """ Sets the rectangle within which text should be rendered""" | 120 | """ Sets the rectangle within which text should be rendered""" |
135 | 121 | self._rect=rect | 121 | self._rect=rect_main |
136 | 122 | self._rect_footer=rect_footer | ||
137 | 122 | 123 | ||
138 | 123 | def _render_background(self): | 124 | def _render_background(self): |
139 | 124 | assert(self._theme) | 125 | assert(self._theme) |
140 | @@ -127,8 +128,8 @@ | |||
141 | 127 | p=QtGui.QPainter() | 128 | p=QtGui.QPainter() |
142 | 128 | p.begin(self._paint) | 129 | p.begin(self._paint) |
143 | 129 | if self._theme.background_type == u'solid': | 130 | if self._theme.background_type == u'solid': |
146 | 130 | p.fillRect(self._paint.rect(), QtGui.QColor(self._theme.background_color)) | 131 | p.fillRect(self._paint.rect(), QtGui.QColor(self._theme.background_color1)) |
147 | 131 | elif self._theme.background_type == u'Gradient' : # gradient | 132 | elif self._theme.background_type == u'gradient' : # gradient |
148 | 132 | gradient = None | 133 | gradient = None |
149 | 133 | if self._theme.background_direction == u'vertical': | 134 | if self._theme.background_direction == u'vertical': |
150 | 134 | w = int(self._paint.width())/2 | 135 | w = int(self._paint.width())/2 |
151 | @@ -141,8 +142,8 @@ | |||
152 | 141 | h = int(self._paint.height())/2 | 142 | h = int(self._paint.height())/2 |
153 | 142 | gradient = QtGui.QRadialGradient(w, h, w) # Circular | 143 | gradient = QtGui.QRadialGradient(w, h, w) # Circular |
154 | 143 | 144 | ||
157 | 144 | gradient.setColorAt(0, QtGui.QColor(self._theme.background_startColor)) | 145 | gradient.setColorAt(0, QtGui.QColor(self._theme.background_color1)) |
158 | 145 | gradient.setColorAt(1, QtGui.QColor(self._theme.background_endColor)) | 146 | gradient.setColorAt(1, QtGui.QColor(self._theme.background_color2)) |
159 | 146 | 147 | ||
160 | 147 | p.setBrush(QtGui.QBrush(gradient)) | 148 | p.setBrush(QtGui.QBrush(gradient)) |
161 | 148 | rectPath = QtGui.QPainterPath() | 149 | rectPath = QtGui.QPainterPath() |
162 | @@ -230,29 +231,40 @@ | |||
163 | 230 | 231 | ||
164 | 231 | return retval | 232 | return retval |
165 | 232 | 233 | ||
167 | 233 | def _render_lines(self, lines): | 234 | def _correctAlignment(self, rect, bbox): |
168 | 235 | x=rect.left() | ||
169 | 236 | if int(self._theme.display_verticalAlign) == 0: # top align | ||
170 | 237 | y = rect.top() | ||
171 | 238 | elif int(self._theme.display_verticalAlign) == 1: # bottom align | ||
172 | 239 | y=rect.bottom()-bbox.height() | ||
173 | 240 | elif int(t.display_verticalAlign) == 2: # centre align | ||
174 | 241 | y=rect.top()+(rect.height()-bbox.height())/2 | ||
175 | 242 | else: | ||
176 | 243 | assert(0, u'Invalid value for theme.VerticalAlign:%s' % self._theme.display_verticalAlign) | ||
177 | 244 | return x, y | ||
178 | 245 | |||
179 | 246 | def _render_lines(self, lines, lines1=None): | ||
180 | 234 | """render a set of lines according to the theme, return bounding box""" | 247 | """render a set of lines according to the theme, return bounding box""" |
181 | 235 | #log.debug(u'_render_lines %s', lines) | 248 | #log.debug(u'_render_lines %s', lines) |
182 | 236 | 249 | ||
184 | 237 | bbox=self._render_lines_unaligned(lines) | 250 | bbox=self._render_lines_unaligned(lines, False) # Main font |
185 | 251 | if lines1 is not None: | ||
186 | 252 | bbox1=self._render_lines_unaligned(lines1, True) # Footer Font | ||
187 | 238 | 253 | ||
198 | 239 | t=self._theme | 254 | # put stuff on background so need to reset before doing the job properly. |
189 | 240 | x=self._rect.left() | ||
190 | 241 | if int(t.display_verticalAlign) == 0: # top align | ||
191 | 242 | y = self._rect.top() | ||
192 | 243 | elif int(t.display_verticalAlign) == 1: # bottom align | ||
193 | 244 | y=self._rect.bottom()-bbox.height() | ||
194 | 245 | elif int(t.display_verticalAlign) == 2: # centre align | ||
195 | 246 | y=self._rect.top()+(self._rect.height()-bbox.height())/2 | ||
196 | 247 | else: | ||
197 | 248 | assert(0, u'Invalid value for theme.VerticalAlign:%s' % t.display_verticalAlign) | ||
199 | 249 | self._render_background() | 255 | self._render_background() |
201 | 250 | bbox=self._render_lines_unaligned(lines, (x,y)) | 256 | x, y = self._correctAlignment(self._rect, bbox) |
202 | 257 | bbox=self._render_lines_unaligned(lines, False, (x,y)) | ||
203 | 258 | |||
204 | 259 | if lines1 is not None: | ||
205 | 260 | x, y = self._correctAlignment(self._rect_footer, bbox1) | ||
206 | 261 | bbox=self._render_lines_unaligned(lines1, True, (x,y) ) | ||
207 | 262 | |||
208 | 251 | log.debug(u'render lines DONE') | 263 | log.debug(u'render lines DONE') |
209 | 252 | 264 | ||
210 | 253 | return bbox | 265 | return bbox |
211 | 254 | 266 | ||
213 | 255 | def _render_lines_unaligned(self, lines, tlcorner=(0,0)): | 267 | def _render_lines_unaligned(self, lines, footer, tlcorner=(0,0)): |
214 | 256 | 268 | ||
215 | 257 | """Given a list of lines to render, render each one in turn | 269 | """Given a list of lines to render, render each one in turn |
216 | 258 | (using the _render_single_line fn - which may result in going | 270 | (using the _render_single_line fn - which may result in going |
217 | @@ -269,7 +281,7 @@ | |||
218 | 269 | continue | 281 | continue |
219 | 270 | # render after current bottom, but at original left edge | 282 | # render after current bottom, but at original left edge |
220 | 271 | # keep track of right edge to see which is biggest | 283 | # keep track of right edge to see which is biggest |
222 | 272 | (thisx, bry) = self._render_single_line(line, (x,bry)) | 284 | (thisx, bry) = self._render_single_line(line, footer, (x,bry)) |
223 | 273 | if (thisx > brx): | 285 | if (thisx > brx): |
224 | 274 | brx=thisx | 286 | brx=thisx |
225 | 275 | retval=QtCore.QRect(x,y,brx-x, bry-y) | 287 | retval=QtCore.QRect(x,y,brx-x, bry-y) |
226 | @@ -283,7 +295,7 @@ | |||
227 | 283 | 295 | ||
228 | 284 | return retval | 296 | return retval |
229 | 285 | 297 | ||
231 | 286 | def _render_single_line(self, line, tlcorner=(0,0)): | 298 | def _render_single_line(self, line, footer, tlcorner=(0,0)): |
232 | 287 | 299 | ||
233 | 288 | """render a single line of words onto the DC, top left corner | 300 | """render a single line of words onto the DC, top left corner |
234 | 289 | specified. | 301 | specified. |
235 | @@ -307,7 +319,7 @@ | |||
236 | 307 | lines=[] | 319 | lines=[] |
237 | 308 | maxx=self._rect.width(); maxy=self._rect.height(); | 320 | maxx=self._rect.width(); maxy=self._rect.height(); |
238 | 309 | while (len(words)>0): | 321 | while (len(words)>0): |
240 | 310 | w,h=self._get_extent_and_render(thisline) | 322 | w,h=self._get_extent_and_render(thisline, footer) |
241 | 311 | rhs=w+x | 323 | rhs=w+x |
242 | 312 | if rhs < maxx-self._right_margin: | 324 | if rhs < maxx-self._right_margin: |
243 | 313 | lines.append(thisline) | 325 | lines.append(thisline) |
244 | @@ -327,7 +339,7 @@ | |||
245 | 327 | for linenum in range(len(lines)): | 339 | for linenum in range(len(lines)): |
246 | 328 | line=lines[linenum] | 340 | line=lines[linenum] |
247 | 329 | #find out how wide line is | 341 | #find out how wide line is |
249 | 330 | w,h=self._get_extent_and_render(line, tlcorner=(x,y), draw=False) | 342 | w,h=self._get_extent_and_render(line, footer, tlcorner=(x,y), draw=False) |
250 | 331 | 343 | ||
251 | 332 | if t.display_shadow: | 344 | if t.display_shadow: |
252 | 333 | w+=self._shadow_offset | 345 | w+=self._shadow_offset |
253 | @@ -351,20 +363,20 @@ | |||
254 | 351 | rightextent=x+w | 363 | rightextent=x+w |
255 | 352 | # now draw the text, and any outlines/shadows | 364 | # now draw the text, and any outlines/shadows |
256 | 353 | if t.display_shadow: | 365 | if t.display_shadow: |
258 | 354 | self._get_extent_and_render(line, tlcorner=(x+self._shadow_offset,y+self._shadow_offset), | 366 | self._get_extent_and_render(line, footer,tlcorner=(x+self._shadow_offset,y+self._shadow_offset), |
259 | 355 | draw=True, color = t.display_shadow_color) | 367 | draw=True, color = t.display_shadow_color) |
260 | 356 | if t.display_outline: | 368 | if t.display_outline: |
265 | 357 | self._get_extent_and_render(line, (x+self._outline_offset,y), draw=True, color = t.display_outline_color) | 369 | self._get_extent_and_render(line, footer,(x+self._outline_offset,y), draw=True, color = t.display_outline_color) |
266 | 358 | self._get_extent_and_render(line, (x,y+self._outline_offset), draw=True, color = t.display_outline_color) | 370 | self._get_extent_and_render(line, footer,(x,y+self._outline_offset), draw=True, color = t.display_outline_color) |
267 | 359 | self._get_extent_and_render(line, (x,y-self._outline_offset), draw=True, color = t.display_outline_color) | 371 | self._get_extent_and_render(line, footer,(x,y-self._outline_offset), draw=True, color = t.display_outline_color) |
268 | 360 | self._get_extent_and_render(line, (x-self._outline_offset,y), draw=True, color = t.display_outline_color) | 372 | self._get_extent_and_render(line, footer,(x-self._outline_offset,y), draw=True, color = t.display_outline_color) |
269 | 361 | if self._outline_offset > 1: | 373 | if self._outline_offset > 1: |
274 | 362 | self._get_extent_and_render(line, (x+self._outline_offset,y+self._outline_offset), draw=True, color = t.display_outline_color) | 374 | self._get_extent_and_render(line, footer,(x+self._outline_offset,y+self._outline_offset), draw=True, color = t.display_outline_color) |
275 | 363 | self._get_extent_and_render(line, (x-self._outline_offset,y+self._outline_offset), draw=True, color = t.display_outline_color) | 375 | self._get_extent_and_render(line, footer,(x-self._outline_offset,y+self._outline_offset), draw=True, color = t.display_outline_color) |
276 | 364 | self._get_extent_and_render(line, (x+self._outline_offset,y-self._outline_offset), draw=True, color = t.display_outline_color) | 376 | self._get_extent_and_render(line, footer,(x+self._outline_offset,y-self._outline_offset), draw=True, color = t.display_outline_color) |
277 | 365 | self._get_extent_and_render(line, (x-self._outline_offset,y-self._outline_offset), draw=True, color = t.display_outline_color) | 377 | self._get_extent_and_render(line, footer,(x-self._outline_offset,y-self._outline_offset), draw=True, color = t.display_outline_color) |
278 | 366 | 378 | ||
280 | 367 | self._get_extent_and_render(line, tlcorner=(x,y), draw=True) | 379 | self._get_extent_and_render(line, footer,tlcorner=(x,y), draw=True) |
281 | 368 | # log.debug(u'Line %2d: Render '%s' at (%d, %d) wh=(%d,%d)' % ( linenum, line, x, y,w,h) | 380 | # log.debug(u'Line %2d: Render '%s' at (%d, %d) wh=(%d,%d)' % ( linenum, line, x, y,w,h) |
282 | 369 | y += h | 381 | y += h |
283 | 370 | if linenum == 0: | 382 | if linenum == 0: |
284 | @@ -381,7 +393,7 @@ | |||
285 | 381 | return brcorner | 393 | return brcorner |
286 | 382 | 394 | ||
287 | 383 | # xxx this is what to override for an SDL version | 395 | # xxx this is what to override for an SDL version |
289 | 384 | def _get_extent_and_render(self, line, tlcorner=(0,0), draw=False, color=None, footer=False): | 396 | def _get_extent_and_render(self, line, footer, tlcorner=(0,0), draw=False, color=None): |
290 | 385 | """Find bounding box of text - as render_single_line. | 397 | """Find bounding box of text - as render_single_line. |
291 | 386 | If draw is set, actually draw the text to the current DC as well | 398 | If draw is set, actually draw the text to the current DC as well |
292 | 387 | 399 | ||
293 | 388 | 400 | ||
294 | === added file 'openlp/core/ui/amendthemedialog.py' | |||
295 | --- openlp/core/ui/amendthemedialog.py 1970-01-01 00:00:00 +0000 | |||
296 | +++ openlp/core/ui/amendthemedialog.py 2009-04-11 05:43:52 +0000 | |||
297 | @@ -0,0 +1,392 @@ | |||
298 | 1 | # -*- coding: utf-8 -*- | ||
299 | 2 | |||
300 | 3 | # Form implementation generated from reading ui file 'amendthemedialog.ui' | ||
301 | 4 | # | ||
302 | 5 | # Created: Fri Apr 10 20:38:33 2009 | ||
303 | 6 | # by: PyQt4 UI code generator 4.4.4 | ||
304 | 7 | # | ||
305 | 8 | # WARNING! All changes made in this file will be lost! | ||
306 | 9 | |||
307 | 10 | from PyQt4 import QtCore, QtGui | ||
308 | 11 | |||
309 | 12 | class Ui_AmendThemeDialog(object): | ||
310 | 13 | def setupUi(self, AmendThemeDialog): | ||
311 | 14 | AmendThemeDialog.setObjectName("AmendThemeDialog") | ||
312 | 15 | AmendThemeDialog.resize(752, 533) | ||
313 | 16 | icon = QtGui.QIcon() | ||
314 | 17 | icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off) | ||
315 | 18 | AmendThemeDialog.setWindowIcon(icon) | ||
316 | 19 | self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog) | ||
317 | 20 | self.ThemeButtonBox.setGeometry(QtCore.QRect(580, 500, 156, 26)) | ||
318 | 21 | self.ThemeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) | ||
319 | 22 | self.ThemeButtonBox.setObjectName("ThemeButtonBox") | ||
320 | 23 | self.layoutWidget = QtGui.QWidget(AmendThemeDialog) | ||
321 | 24 | self.layoutWidget.setGeometry(QtCore.QRect(50, 20, 441, 41)) | ||
322 | 25 | self.layoutWidget.setObjectName("layoutWidget") | ||
323 | 26 | self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget) | ||
324 | 27 | self.horizontalLayout.setObjectName("horizontalLayout") | ||
325 | 28 | self.ThemeNameLabel = QtGui.QLabel(self.layoutWidget) | ||
326 | 29 | self.ThemeNameLabel.setObjectName("ThemeNameLabel") | ||
327 | 30 | self.horizontalLayout.addWidget(self.ThemeNameLabel) | ||
328 | 31 | self.ThemeNameEdit = QtGui.QLineEdit(self.layoutWidget) | ||
329 | 32 | self.ThemeNameEdit.setObjectName("ThemeNameEdit") | ||
330 | 33 | self.horizontalLayout.addWidget(self.ThemeNameEdit) | ||
331 | 34 | self.widget = QtGui.QWidget(AmendThemeDialog) | ||
332 | 35 | self.widget.setGeometry(QtCore.QRect(31, 71, 721, 411)) | ||
333 | 36 | self.widget.setObjectName("widget") | ||
334 | 37 | self.horizontalLayout_2 = QtGui.QHBoxLayout(self.widget) | ||
335 | 38 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") | ||
336 | 39 | self.LeftSide = QtGui.QWidget(self.widget) | ||
337 | 40 | self.LeftSide.setObjectName("LeftSide") | ||
338 | 41 | self.tabWidget = QtGui.QTabWidget(self.LeftSide) | ||
339 | 42 | self.tabWidget.setGeometry(QtCore.QRect(0, 0, 341, 401)) | ||
340 | 43 | self.tabWidget.setObjectName("tabWidget") | ||
341 | 44 | self.BackgroundTab = QtGui.QWidget() | ||
342 | 45 | self.BackgroundTab.setObjectName("BackgroundTab") | ||
343 | 46 | self.layoutWidget1 = QtGui.QWidget(self.BackgroundTab) | ||
344 | 47 | self.layoutWidget1.setGeometry(QtCore.QRect(10, 10, 321, 351)) | ||
345 | 48 | self.layoutWidget1.setObjectName("layoutWidget1") | ||
346 | 49 | self.gridLayout = QtGui.QGridLayout(self.layoutWidget1) | ||
347 | 50 | self.gridLayout.setObjectName("gridLayout") | ||
348 | 51 | self.BackgroundLabel = QtGui.QLabel(self.layoutWidget1) | ||
349 | 52 | self.BackgroundLabel.setObjectName("BackgroundLabel") | ||
350 | 53 | self.gridLayout.addWidget(self.BackgroundLabel, 0, 0, 1, 2) | ||
351 | 54 | self.BackgroundComboBox = QtGui.QComboBox(self.layoutWidget1) | ||
352 | 55 | self.BackgroundComboBox.setObjectName("BackgroundComboBox") | ||
353 | 56 | self.BackgroundComboBox.addItem(QtCore.QString()) | ||
354 | 57 | self.BackgroundComboBox.addItem(QtCore.QString()) | ||
355 | 58 | self.gridLayout.addWidget(self.BackgroundComboBox, 0, 2, 1, 2) | ||
356 | 59 | self.BackgroundTypeLabel = QtGui.QLabel(self.layoutWidget1) | ||
357 | 60 | self.BackgroundTypeLabel.setObjectName("BackgroundTypeLabel") | ||
358 | 61 | self.gridLayout.addWidget(self.BackgroundTypeLabel, 1, 0, 1, 2) | ||
359 | 62 | self.BackgroundTypeComboBox = QtGui.QComboBox(self.layoutWidget1) | ||
360 | 63 | self.BackgroundTypeComboBox.setObjectName("BackgroundTypeComboBox") | ||
361 | 64 | self.BackgroundTypeComboBox.addItem(QtCore.QString()) | ||
362 | 65 | self.BackgroundTypeComboBox.addItem(QtCore.QString()) | ||
363 | 66 | self.BackgroundTypeComboBox.addItem(QtCore.QString()) | ||
364 | 67 | self.gridLayout.addWidget(self.BackgroundTypeComboBox, 1, 2, 1, 2) | ||
365 | 68 | self.Color1Label = QtGui.QLabel(self.layoutWidget1) | ||
366 | 69 | self.Color1Label.setObjectName("Color1Label") | ||
367 | 70 | self.gridLayout.addWidget(self.Color1Label, 2, 0, 1, 1) | ||
368 | 71 | self.Color1PushButton = QtGui.QPushButton(self.layoutWidget1) | ||
369 | 72 | self.Color1PushButton.setObjectName("Color1PushButton") | ||
370 | 73 | self.gridLayout.addWidget(self.Color1PushButton, 2, 2, 1, 2) | ||
371 | 74 | self.Color2Label = QtGui.QLabel(self.layoutWidget1) | ||
372 | 75 | self.Color2Label.setObjectName("Color2Label") | ||
373 | 76 | self.gridLayout.addWidget(self.Color2Label, 3, 0, 1, 1) | ||
374 | 77 | self.Color2PushButton = QtGui.QPushButton(self.layoutWidget1) | ||
375 | 78 | self.Color2PushButton.setObjectName("Color2PushButton") | ||
376 | 79 | self.gridLayout.addWidget(self.Color2PushButton, 3, 2, 1, 2) | ||
377 | 80 | self.ImageLabel = QtGui.QLabel(self.layoutWidget1) | ||
378 | 81 | self.ImageLabel.setObjectName("ImageLabel") | ||
379 | 82 | self.gridLayout.addWidget(self.ImageLabel, 4, 0, 1, 1) | ||
380 | 83 | self.ImageLineEdit = QtGui.QLineEdit(self.layoutWidget1) | ||
381 | 84 | self.ImageLineEdit.setObjectName("ImageLineEdit") | ||
382 | 85 | self.gridLayout.addWidget(self.ImageLineEdit, 4, 1, 1, 2) | ||
383 | 86 | self.ImagePushButton = QtGui.QPushButton(self.layoutWidget1) | ||
384 | 87 | icon1 = QtGui.QIcon() | ||
385 | 88 | icon1.addPixmap(QtGui.QPixmap(":/services/service_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) | ||
386 | 89 | self.ImagePushButton.setIcon(icon1) | ||
387 | 90 | self.ImagePushButton.setObjectName("ImagePushButton") | ||
388 | 91 | self.gridLayout.addWidget(self.ImagePushButton, 4, 3, 1, 1) | ||
389 | 92 | self.GradientLabel = QtGui.QLabel(self.layoutWidget1) | ||
390 | 93 | self.GradientLabel.setObjectName("GradientLabel") | ||
391 | 94 | self.gridLayout.addWidget(self.GradientLabel, 5, 0, 1, 1) | ||
392 | 95 | self.GradientComboBox = QtGui.QComboBox(self.layoutWidget1) | ||
393 | 96 | self.GradientComboBox.setObjectName("GradientComboBox") | ||
394 | 97 | self.GradientComboBox.addItem(QtCore.QString()) | ||
395 | 98 | self.GradientComboBox.addItem(QtCore.QString()) | ||
396 | 99 | self.GradientComboBox.addItem(QtCore.QString()) | ||
397 | 100 | self.gridLayout.addWidget(self.GradientComboBox, 5, 2, 1, 2) | ||
398 | 101 | self.tabWidget.addTab(self.BackgroundTab, "") | ||
399 | 102 | self.FontMainTab = QtGui.QWidget() | ||
400 | 103 | self.FontMainTab.setObjectName("FontMainTab") | ||
401 | 104 | self.MainFontGroupBox = QtGui.QGroupBox(self.FontMainTab) | ||
402 | 105 | self.MainFontGroupBox.setGeometry(QtCore.QRect(20, 10, 307, 119)) | ||
403 | 106 | self.MainFontGroupBox.setObjectName("MainFontGroupBox") | ||
404 | 107 | self.gridLayout_2 = QtGui.QGridLayout(self.MainFontGroupBox) | ||
405 | 108 | self.gridLayout_2.setObjectName("gridLayout_2") | ||
406 | 109 | self.MainFontlabel = QtGui.QLabel(self.MainFontGroupBox) | ||
407 | 110 | self.MainFontlabel.setObjectName("MainFontlabel") | ||
408 | 111 | self.gridLayout_2.addWidget(self.MainFontlabel, 0, 0, 1, 1) | ||
409 | 112 | self.MainFontComboBox = QtGui.QFontComboBox(self.MainFontGroupBox) | ||
410 | 113 | self.MainFontComboBox.setObjectName("MainFontComboBox") | ||
411 | 114 | self.gridLayout_2.addWidget(self.MainFontComboBox, 0, 1, 1, 2) | ||
412 | 115 | self.MainFontColorLabel = QtGui.QLabel(self.MainFontGroupBox) | ||
413 | 116 | self.MainFontColorLabel.setObjectName("MainFontColorLabel") | ||
414 | 117 | self.gridLayout_2.addWidget(self.MainFontColorLabel, 1, 0, 1, 1) | ||
415 | 118 | self.MainFontColorPushButton = QtGui.QPushButton(self.MainFontGroupBox) | ||
416 | 119 | self.MainFontColorPushButton.setObjectName("MainFontColorPushButton") | ||
417 | 120 | self.gridLayout_2.addWidget(self.MainFontColorPushButton, 1, 2, 1, 1) | ||
418 | 121 | self.MainFontSize = QtGui.QLabel(self.MainFontGroupBox) | ||
419 | 122 | self.MainFontSize.setObjectName("MainFontSize") | ||
420 | 123 | self.gridLayout_2.addWidget(self.MainFontSize, 2, 0, 1, 1) | ||
421 | 124 | self.MainFontSizeLineEdit = QtGui.QLineEdit(self.MainFontGroupBox) | ||
422 | 125 | self.MainFontSizeLineEdit.setObjectName("MainFontSizeLineEdit") | ||
423 | 126 | self.gridLayout_2.addWidget(self.MainFontSizeLineEdit, 2, 1, 1, 1) | ||
424 | 127 | self.MainFontlSlider = QtGui.QSlider(self.MainFontGroupBox) | ||
425 | 128 | self.MainFontlSlider.setProperty("value", QtCore.QVariant(15)) | ||
426 | 129 | self.MainFontlSlider.setMaximum(40) | ||
427 | 130 | self.MainFontlSlider.setOrientation(QtCore.Qt.Horizontal) | ||
428 | 131 | self.MainFontlSlider.setTickPosition(QtGui.QSlider.TicksBelow) | ||
429 | 132 | self.MainFontlSlider.setTickInterval(5) | ||
430 | 133 | self.MainFontlSlider.setObjectName("MainFontlSlider") | ||
431 | 134 | self.gridLayout_2.addWidget(self.MainFontlSlider, 2, 2, 1, 1) | ||
432 | 135 | self.FooterFontGroupBox = QtGui.QGroupBox(self.FontMainTab) | ||
433 | 136 | self.FooterFontGroupBox.setGeometry(QtCore.QRect(20, 160, 301, 190)) | ||
434 | 137 | self.FooterFontGroupBox.setObjectName("FooterFontGroupBox") | ||
435 | 138 | self.verticalLayout = QtGui.QVBoxLayout(self.FooterFontGroupBox) | ||
436 | 139 | self.verticalLayout.setObjectName("verticalLayout") | ||
437 | 140 | self.FontMainUseDefault = QtGui.QCheckBox(self.FooterFontGroupBox) | ||
438 | 141 | self.FontMainUseDefault.setTristate(False) | ||
439 | 142 | self.FontMainUseDefault.setObjectName("FontMainUseDefault") | ||
440 | 143 | self.verticalLayout.addWidget(self.FontMainUseDefault) | ||
441 | 144 | self.horizontalLayout_3 = QtGui.QHBoxLayout() | ||
442 | 145 | self.horizontalLayout_3.setObjectName("horizontalLayout_3") | ||
443 | 146 | self.FontMainXLabel = QtGui.QLabel(self.FooterFontGroupBox) | ||
444 | 147 | self.FontMainXLabel.setObjectName("FontMainXLabel") | ||
445 | 148 | self.horizontalLayout_3.addWidget(self.FontMainXLabel) | ||
446 | 149 | self.FontMainXEdit = QtGui.QLineEdit(self.FooterFontGroupBox) | ||
447 | 150 | self.FontMainXEdit.setObjectName("FontMainXEdit") | ||
448 | 151 | self.horizontalLayout_3.addWidget(self.FontMainXEdit) | ||
449 | 152 | self.verticalLayout.addLayout(self.horizontalLayout_3) | ||
450 | 153 | self.horizontalLayout_4 = QtGui.QHBoxLayout() | ||
451 | 154 | self.horizontalLayout_4.setObjectName("horizontalLayout_4") | ||
452 | 155 | self.FontMainYLabel = QtGui.QLabel(self.FooterFontGroupBox) | ||
453 | 156 | self.FontMainYLabel.setObjectName("FontMainYLabel") | ||
454 | 157 | self.horizontalLayout_4.addWidget(self.FontMainYLabel) | ||
455 | 158 | self.FontMainYEdit = QtGui.QLineEdit(self.FooterFontGroupBox) | ||
456 | 159 | self.FontMainYEdit.setObjectName("FontMainYEdit") | ||
457 | 160 | self.horizontalLayout_4.addWidget(self.FontMainYEdit) | ||
458 | 161 | self.verticalLayout.addLayout(self.horizontalLayout_4) | ||
459 | 162 | self.horizontalLayout_5 = QtGui.QHBoxLayout() | ||
460 | 163 | self.horizontalLayout_5.setObjectName("horizontalLayout_5") | ||
461 | 164 | self.FontMainWidthLabel = QtGui.QLabel(self.FooterFontGroupBox) | ||
462 | 165 | self.FontMainWidthLabel.setObjectName("FontMainWidthLabel") | ||
463 | 166 | self.horizontalLayout_5.addWidget(self.FontMainWidthLabel) | ||
464 | 167 | self.FontMainWidthEdit = QtGui.QLineEdit(self.FooterFontGroupBox) | ||
465 | 168 | self.FontMainWidthEdit.setObjectName("FontMainWidthEdit") | ||
466 | 169 | self.horizontalLayout_5.addWidget(self.FontMainWidthEdit) | ||
467 | 170 | self.verticalLayout.addLayout(self.horizontalLayout_5) | ||
468 | 171 | self.horizontalLayout_6 = QtGui.QHBoxLayout() | ||
469 | 172 | self.horizontalLayout_6.setObjectName("horizontalLayout_6") | ||
470 | 173 | self.FontMainHeightLabel = QtGui.QLabel(self.FooterFontGroupBox) | ||
471 | 174 | self.FontMainHeightLabel.setObjectName("FontMainHeightLabel") | ||
472 | 175 | self.horizontalLayout_6.addWidget(self.FontMainHeightLabel) | ||
473 | 176 | self.FontMainHeightEdit = QtGui.QLineEdit(self.FooterFontGroupBox) | ||
474 | 177 | self.FontMainHeightEdit.setObjectName("FontMainHeightEdit") | ||
475 | 178 | self.horizontalLayout_6.addWidget(self.FontMainHeightEdit) | ||
476 | 179 | self.verticalLayout.addLayout(self.horizontalLayout_6) | ||
477 | 180 | self.tabWidget.addTab(self.FontMainTab, "") | ||
478 | 181 | self.FontFooterTab = QtGui.QWidget() | ||
479 | 182 | self.FontFooterTab.setObjectName("FontFooterTab") | ||
480 | 183 | self.FooterFontGroupBox_2 = QtGui.QGroupBox(self.FontFooterTab) | ||
481 | 184 | self.FooterFontGroupBox_2.setGeometry(QtCore.QRect(20, 160, 301, 190)) | ||
482 | 185 | self.FooterFontGroupBox_2.setObjectName("FooterFontGroupBox_2") | ||
483 | 186 | self.verticalLayout_2 = QtGui.QVBoxLayout(self.FooterFontGroupBox_2) | ||
484 | 187 | self.verticalLayout_2.setObjectName("verticalLayout_2") | ||
485 | 188 | self.FontMainUseDefault_2 = QtGui.QCheckBox(self.FooterFontGroupBox_2) | ||
486 | 189 | self.FontMainUseDefault_2.setTristate(False) | ||
487 | 190 | self.FontMainUseDefault_2.setObjectName("FontMainUseDefault_2") | ||
488 | 191 | self.verticalLayout_2.addWidget(self.FontMainUseDefault_2) | ||
489 | 192 | self.horizontalLayout_7 = QtGui.QHBoxLayout() | ||
490 | 193 | self.horizontalLayout_7.setObjectName("horizontalLayout_7") | ||
491 | 194 | self.FontFooterXLabel = QtGui.QLabel(self.FooterFontGroupBox_2) | ||
492 | 195 | self.FontFooterXLabel.setObjectName("FontFooterXLabel") | ||
493 | 196 | self.horizontalLayout_7.addWidget(self.FontFooterXLabel) | ||
494 | 197 | self.FontFooterXEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) | ||
495 | 198 | self.FontFooterXEdit.setObjectName("FontFooterXEdit") | ||
496 | 199 | self.horizontalLayout_7.addWidget(self.FontFooterXEdit) | ||
497 | 200 | self.verticalLayout_2.addLayout(self.horizontalLayout_7) | ||
498 | 201 | self.horizontalLayout_8 = QtGui.QHBoxLayout() | ||
499 | 202 | self.horizontalLayout_8.setObjectName("horizontalLayout_8") | ||
500 | 203 | self.FontFooterYLabel = QtGui.QLabel(self.FooterFontGroupBox_2) | ||
501 | 204 | self.FontFooterYLabel.setObjectName("FontFooterYLabel") | ||
502 | 205 | self.horizontalLayout_8.addWidget(self.FontFooterYLabel) | ||
503 | 206 | self.FontFooterYEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) | ||
504 | 207 | self.FontFooterYEdit.setObjectName("FontFooterYEdit") | ||
505 | 208 | self.horizontalLayout_8.addWidget(self.FontFooterYEdit) | ||
506 | 209 | self.verticalLayout_2.addLayout(self.horizontalLayout_8) | ||
507 | 210 | self.horizontalLayout_9 = QtGui.QHBoxLayout() | ||
508 | 211 | self.horizontalLayout_9.setObjectName("horizontalLayout_9") | ||
509 | 212 | self.FontFooterWidthLabel = QtGui.QLabel(self.FooterFontGroupBox_2) | ||
510 | 213 | self.FontFooterWidthLabel.setObjectName("FontFooterWidthLabel") | ||
511 | 214 | self.horizontalLayout_9.addWidget(self.FontFooterWidthLabel) | ||
512 | 215 | self.FontFooterWidthEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) | ||
513 | 216 | self.FontFooterWidthEdit.setObjectName("FontFooterWidthEdit") | ||
514 | 217 | self.horizontalLayout_9.addWidget(self.FontFooterWidthEdit) | ||
515 | 218 | self.verticalLayout_2.addLayout(self.horizontalLayout_9) | ||
516 | 219 | self.horizontalLayout_10 = QtGui.QHBoxLayout() | ||
517 | 220 | self.horizontalLayout_10.setObjectName("horizontalLayout_10") | ||
518 | 221 | self.FontFooterHeightLabel = QtGui.QLabel(self.FooterFontGroupBox_2) | ||
519 | 222 | self.FontFooterHeightLabel.setObjectName("FontFooterHeightLabel") | ||
520 | 223 | self.horizontalLayout_10.addWidget(self.FontFooterHeightLabel) | ||
521 | 224 | self.FontFooterHeightEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) | ||
522 | 225 | self.FontFooterHeightEdit.setObjectName("FontFooterHeightEdit") | ||
523 | 226 | self.horizontalLayout_10.addWidget(self.FontFooterHeightEdit) | ||
524 | 227 | self.verticalLayout_2.addLayout(self.horizontalLayout_10) | ||
525 | 228 | self.FooterFontGroupBox_3 = QtGui.QGroupBox(self.FontFooterTab) | ||
526 | 229 | self.FooterFontGroupBox_3.setGeometry(QtCore.QRect(20, 10, 307, 119)) | ||
527 | 230 | self.FooterFontGroupBox_3.setObjectName("FooterFontGroupBox_3") | ||
528 | 231 | self.gridLayout_3 = QtGui.QGridLayout(self.FooterFontGroupBox_3) | ||
529 | 232 | self.gridLayout_3.setObjectName("gridLayout_3") | ||
530 | 233 | self.FontFooterlabel = QtGui.QLabel(self.FooterFontGroupBox_3) | ||
531 | 234 | self.FontFooterlabel.setObjectName("FontFooterlabel") | ||
532 | 235 | self.gridLayout_3.addWidget(self.FontFooterlabel, 0, 0, 1, 1) | ||
533 | 236 | self.FontFooterComboBox = QtGui.QFontComboBox(self.FooterFontGroupBox_3) | ||
534 | 237 | self.FontFooterComboBox.setObjectName("FontFooterComboBox") | ||
535 | 238 | self.gridLayout_3.addWidget(self.FontFooterComboBox, 0, 1, 1, 2) | ||
536 | 239 | self.FontFooterColorLabel = QtGui.QLabel(self.FooterFontGroupBox_3) | ||
537 | 240 | self.FontFooterColorLabel.setObjectName("FontFooterColorLabel") | ||
538 | 241 | self.gridLayout_3.addWidget(self.FontFooterColorLabel, 1, 0, 1, 1) | ||
539 | 242 | self.FontFooterColorPushButton = QtGui.QPushButton(self.FooterFontGroupBox_3) | ||
540 | 243 | self.FontFooterColorPushButton.setObjectName("FontFooterColorPushButton") | ||
541 | 244 | self.gridLayout_3.addWidget(self.FontFooterColorPushButton, 1, 2, 1, 1) | ||
542 | 245 | self.FontFooterSizeLabel = QtGui.QLabel(self.FooterFontGroupBox_3) | ||
543 | 246 | self.FontFooterSizeLabel.setObjectName("FontFooterSizeLabel") | ||
544 | 247 | self.gridLayout_3.addWidget(self.FontFooterSizeLabel, 2, 0, 1, 1) | ||
545 | 248 | self.FontFooterSizeLineEdit = QtGui.QLineEdit(self.FooterFontGroupBox_3) | ||
546 | 249 | self.FontFooterSizeLineEdit.setObjectName("FontFooterSizeLineEdit") | ||
547 | 250 | self.gridLayout_3.addWidget(self.FontFooterSizeLineEdit, 2, 1, 1, 1) | ||
548 | 251 | self.FontFooterSlider = QtGui.QSlider(self.FooterFontGroupBox_3) | ||
549 | 252 | self.FontFooterSlider.setProperty("value", QtCore.QVariant(15)) | ||
550 | 253 | self.FontFooterSlider.setMaximum(40) | ||
551 | 254 | self.FontFooterSlider.setOrientation(QtCore.Qt.Horizontal) | ||
552 | 255 | self.FontFooterSlider.setTickPosition(QtGui.QSlider.TicksBelow) | ||
553 | 256 | self.FontFooterSlider.setTickInterval(5) | ||
554 | 257 | self.FontFooterSlider.setObjectName("FontFooterSlider") | ||
555 | 258 | self.gridLayout_3.addWidget(self.FontFooterSlider, 2, 2, 1, 1) | ||
556 | 259 | self.tabWidget.addTab(self.FontFooterTab, "") | ||
557 | 260 | self.OptionsTab = QtGui.QWidget() | ||
558 | 261 | self.OptionsTab.setObjectName("OptionsTab") | ||
559 | 262 | self.ShadowGroupBox = QtGui.QGroupBox(self.OptionsTab) | ||
560 | 263 | self.ShadowGroupBox.setGeometry(QtCore.QRect(20, 10, 301, 80)) | ||
561 | 264 | self.ShadowGroupBox.setObjectName("ShadowGroupBox") | ||
562 | 265 | self.layoutWidget2 = QtGui.QWidget(self.ShadowGroupBox) | ||
563 | 266 | self.layoutWidget2.setGeometry(QtCore.QRect(10, 20, 281, 58)) | ||
564 | 267 | self.layoutWidget2.setObjectName("layoutWidget2") | ||
565 | 268 | self.formLayout = QtGui.QFormLayout(self.layoutWidget2) | ||
566 | 269 | self.formLayout.setObjectName("formLayout") | ||
567 | 270 | self.ShadowCheckBox = QtGui.QCheckBox(self.layoutWidget2) | ||
568 | 271 | self.ShadowCheckBox.setObjectName("ShadowCheckBox") | ||
569 | 272 | self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.ShadowCheckBox) | ||
570 | 273 | self.ShadowColorLabel = QtGui.QLabel(self.layoutWidget2) | ||
571 | 274 | self.ShadowColorLabel.setObjectName("ShadowColorLabel") | ||
572 | 275 | self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.ShadowColorLabel) | ||
573 | 276 | self.ShadowColorPushButton = QtGui.QPushButton(self.layoutWidget2) | ||
574 | 277 | self.ShadowColorPushButton.setObjectName("ShadowColorPushButton") | ||
575 | 278 | self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ShadowColorPushButton) | ||
576 | 279 | self.AlignmentGroupBox = QtGui.QGroupBox(self.OptionsTab) | ||
577 | 280 | self.AlignmentGroupBox.setGeometry(QtCore.QRect(10, 200, 321, 161)) | ||
578 | 281 | self.AlignmentGroupBox.setObjectName("AlignmentGroupBox") | ||
579 | 282 | self.gridLayout_4 = QtGui.QGridLayout(self.AlignmentGroupBox) | ||
580 | 283 | self.gridLayout_4.setObjectName("gridLayout_4") | ||
581 | 284 | self.HorizontalLabel = QtGui.QLabel(self.AlignmentGroupBox) | ||
582 | 285 | self.HorizontalLabel.setObjectName("HorizontalLabel") | ||
583 | 286 | self.gridLayout_4.addWidget(self.HorizontalLabel, 0, 0, 1, 1) | ||
584 | 287 | self.HorizontalComboBox = QtGui.QComboBox(self.AlignmentGroupBox) | ||
585 | 288 | self.HorizontalComboBox.setObjectName("HorizontalComboBox") | ||
586 | 289 | self.HorizontalComboBox.addItem(QtCore.QString()) | ||
587 | 290 | self.HorizontalComboBox.addItem(QtCore.QString()) | ||
588 | 291 | self.HorizontalComboBox.addItem(QtCore.QString()) | ||
589 | 292 | self.gridLayout_4.addWidget(self.HorizontalComboBox, 0, 1, 1, 1) | ||
590 | 293 | self.VerticalLabel = QtGui.QLabel(self.AlignmentGroupBox) | ||
591 | 294 | self.VerticalLabel.setObjectName("VerticalLabel") | ||
592 | 295 | self.gridLayout_4.addWidget(self.VerticalLabel, 1, 0, 1, 1) | ||
593 | 296 | self.VerticalComboBox = QtGui.QComboBox(self.AlignmentGroupBox) | ||
594 | 297 | self.VerticalComboBox.setObjectName("VerticalComboBox") | ||
595 | 298 | self.VerticalComboBox.addItem(QtCore.QString()) | ||
596 | 299 | self.VerticalComboBox.addItem(QtCore.QString()) | ||
597 | 300 | self.VerticalComboBox.addItem(QtCore.QString()) | ||
598 | 301 | self.gridLayout_4.addWidget(self.VerticalComboBox, 1, 1, 1, 1) | ||
599 | 302 | self.OutlineGroupBox = QtGui.QGroupBox(self.OptionsTab) | ||
600 | 303 | self.OutlineGroupBox.setGeometry(QtCore.QRect(20, 110, 301, 80)) | ||
601 | 304 | self.OutlineGroupBox.setObjectName("OutlineGroupBox") | ||
602 | 305 | self.layoutWidget_3 = QtGui.QWidget(self.OutlineGroupBox) | ||
603 | 306 | self.layoutWidget_3.setGeometry(QtCore.QRect(10, 20, 281, 58)) | ||
604 | 307 | self.layoutWidget_3.setObjectName("layoutWidget_3") | ||
605 | 308 | self.OutlineformLayout = QtGui.QFormLayout(self.layoutWidget_3) | ||
606 | 309 | self.OutlineformLayout.setObjectName("OutlineformLayout") | ||
607 | 310 | self.OutlineCheckBox = QtGui.QCheckBox(self.layoutWidget_3) | ||
608 | 311 | self.OutlineCheckBox.setObjectName("OutlineCheckBox") | ||
609 | 312 | self.OutlineformLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.OutlineCheckBox) | ||
610 | 313 | self.OutlineColorLabel = QtGui.QLabel(self.layoutWidget_3) | ||
611 | 314 | self.OutlineColorLabel.setObjectName("OutlineColorLabel") | ||
612 | 315 | self.OutlineformLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.OutlineColorLabel) | ||
613 | 316 | self.OutlineColorPushButton = QtGui.QPushButton(self.layoutWidget_3) | ||
614 | 317 | self.OutlineColorPushButton.setObjectName("OutlineColorPushButton") | ||
615 | 318 | self.OutlineformLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.OutlineColorPushButton) | ||
616 | 319 | self.tabWidget.addTab(self.OptionsTab, "") | ||
617 | 320 | self.horizontalLayout_2.addWidget(self.LeftSide) | ||
618 | 321 | self.RightSide = QtGui.QWidget(self.widget) | ||
619 | 322 | self.RightSide.setObjectName("RightSide") | ||
620 | 323 | self.ThemePreview = QtGui.QLabel(self.RightSide) | ||
621 | 324 | self.ThemePreview.setGeometry(QtCore.QRect(20, 60, 311, 271)) | ||
622 | 325 | self.ThemePreview.setFrameShape(QtGui.QFrame.Box) | ||
623 | 326 | self.ThemePreview.setFrameShadow(QtGui.QFrame.Raised) | ||
624 | 327 | self.ThemePreview.setLineWidth(2) | ||
625 | 328 | self.ThemePreview.setScaledContents(True) | ||
626 | 329 | self.ThemePreview.setObjectName("ThemePreview") | ||
627 | 330 | self.horizontalLayout_2.addWidget(self.RightSide) | ||
628 | 331 | |||
629 | 332 | self.retranslateUi(AmendThemeDialog) | ||
630 | 333 | self.tabWidget.setCurrentIndex(0) | ||
631 | 334 | QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog) | ||
632 | 335 | |||
633 | 336 | def retranslateUi(self, AmendThemeDialog): | ||
634 | 337 | AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintance", None, QtGui.QApplication.UnicodeUTF8)) | ||
635 | 338 | self.ThemeNameLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Theme Name", None, QtGui.QApplication.UnicodeUTF8)) | ||
636 | 339 | self.BackgroundLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background:", None, QtGui.QApplication.UnicodeUTF8)) | ||
637 | 340 | self.BackgroundComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Opaque", None, QtGui.QApplication.UnicodeUTF8)) | ||
638 | 341 | self.BackgroundComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Transparent", None, QtGui.QApplication.UnicodeUTF8)) | ||
639 | 342 | self.BackgroundTypeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background Type:", None, QtGui.QApplication.UnicodeUTF8)) | ||
640 | 343 | self.BackgroundTypeComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Solid Color", None, QtGui.QApplication.UnicodeUTF8)) | ||
641 | 344 | self.BackgroundTypeComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Gradient", None, QtGui.QApplication.UnicodeUTF8)) | ||
642 | 345 | self.BackgroundTypeComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Image", None, QtGui.QApplication.UnicodeUTF8)) | ||
643 | 346 | self.Color1Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "<Color1>", None, QtGui.QApplication.UnicodeUTF8)) | ||
644 | 347 | self.Color2Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "<Color2>", None, QtGui.QApplication.UnicodeUTF8)) | ||
645 | 348 | self.ImageLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Image:", None, QtGui.QApplication.UnicodeUTF8)) | ||
646 | 349 | self.GradientLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Gradient :", None, QtGui.QApplication.UnicodeUTF8)) | ||
647 | 350 | self.GradientComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Horizontal", None, QtGui.QApplication.UnicodeUTF8)) | ||
648 | 351 | self.GradientComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Vertical", None, QtGui.QApplication.UnicodeUTF8)) | ||
649 | 352 | self.GradientComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Circular", None, QtGui.QApplication.UnicodeUTF8)) | ||
650 | 353 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.BackgroundTab), QtGui.QApplication.translate("AmendThemeDialog", "Background", None, QtGui.QApplication.UnicodeUTF8)) | ||
651 | 354 | self.MainFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Main Font", None, QtGui.QApplication.UnicodeUTF8)) | ||
652 | 355 | self.MainFontlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8)) | ||
653 | 356 | self.MainFontColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color", None, QtGui.QApplication.UnicodeUTF8)) | ||
654 | 357 | self.MainFontSize.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8)) | ||
655 | 358 | self.FooterFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8)) | ||
656 | 359 | self.FontMainUseDefault.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use default location", None, QtGui.QApplication.UnicodeUTF8)) | ||
657 | 360 | self.FontMainXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8)) | ||
658 | 361 | self.FontMainYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8)) | ||
659 | 362 | self.FontMainWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width", None, QtGui.QApplication.UnicodeUTF8)) | ||
660 | 363 | self.FontMainHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height", None, QtGui.QApplication.UnicodeUTF8)) | ||
661 | 364 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.FontMainTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Main", None, QtGui.QApplication.UnicodeUTF8)) | ||
662 | 365 | self.FooterFontGroupBox_2.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8)) | ||
663 | 366 | self.FontMainUseDefault_2.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use default location", None, QtGui.QApplication.UnicodeUTF8)) | ||
664 | 367 | self.FontFooterXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8)) | ||
665 | 368 | self.FontFooterYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8)) | ||
666 | 369 | self.FontFooterWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width", None, QtGui.QApplication.UnicodeUTF8)) | ||
667 | 370 | self.FontFooterHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height", None, QtGui.QApplication.UnicodeUTF8)) | ||
668 | 371 | self.FooterFontGroupBox_3.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Footer Font", None, QtGui.QApplication.UnicodeUTF8)) | ||
669 | 372 | self.FontFooterlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8)) | ||
670 | 373 | self.FontFooterColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color", None, QtGui.QApplication.UnicodeUTF8)) | ||
671 | 374 | self.FontFooterSizeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8)) | ||
672 | 375 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.FontFooterTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Footer", None, QtGui.QApplication.UnicodeUTF8)) | ||
673 | 376 | self.ShadowGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Shadow", None, QtGui.QApplication.UnicodeUTF8)) | ||
674 | 377 | self.ShadowCheckBox.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Shadow", None, QtGui.QApplication.UnicodeUTF8)) | ||
675 | 378 | self.ShadowColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Shadow Color:", None, QtGui.QApplication.UnicodeUTF8)) | ||
676 | 379 | self.AlignmentGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8)) | ||
677 | 380 | self.HorizontalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Horizontal Align:", None, QtGui.QApplication.UnicodeUTF8)) | ||
678 | 381 | self.HorizontalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Left", None, QtGui.QApplication.UnicodeUTF8)) | ||
679 | 382 | self.HorizontalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Right", None, QtGui.QApplication.UnicodeUTF8)) | ||
680 | 383 | self.HorizontalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Center", None, QtGui.QApplication.UnicodeUTF8)) | ||
681 | 384 | self.VerticalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Vertical Align:", None, QtGui.QApplication.UnicodeUTF8)) | ||
682 | 385 | self.VerticalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Top", None, QtGui.QApplication.UnicodeUTF8)) | ||
683 | 386 | self.VerticalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Middle", None, QtGui.QApplication.UnicodeUTF8)) | ||
684 | 387 | self.VerticalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Bottom", None, QtGui.QApplication.UnicodeUTF8)) | ||
685 | 388 | self.OutlineGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Outline", None, QtGui.QApplication.UnicodeUTF8)) | ||
686 | 389 | self.OutlineCheckBox.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Outline", None, QtGui.QApplication.UnicodeUTF8)) | ||
687 | 390 | self.OutlineColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Outline Color:", None, QtGui.QApplication.UnicodeUTF8)) | ||
688 | 391 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.OptionsTab), QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8)) | ||
689 | 392 | |||
690 | 0 | 393 | ||
691 | === added file 'openlp/core/ui/amendthemeform.py' | |||
692 | --- openlp/core/ui/amendthemeform.py 1970-01-01 00:00:00 +0000 | |||
693 | +++ openlp/core/ui/amendthemeform.py 2009-04-11 15:16:02 +0000 | |||
694 | @@ -0,0 +1,229 @@ | |||
695 | 1 | # -*- coding: utf-8 -*- | ||
696 | 2 | # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 | ||
697 | 3 | """ | ||
698 | 4 | OpenLP - Open Source Lyrics Projection | ||
699 | 5 | Copyright (c) 2008 Raoul Snyman | ||
700 | 6 | Portions copyright (c) 2008 Martin Thompson, Tim Bentley, | ||
701 | 7 | |||
702 | 8 | This program is free software; you can redistribute it and/or modify it under | ||
703 | 9 | the terms of the GNU General Public License as published by the Free Software | ||
704 | 10 | Foundation; version 2 of the License. | ||
705 | 11 | |||
706 | 12 | This program is distributed in the hope that it will be useful, but WITHOUT ANY | ||
707 | 13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
708 | 14 | PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
709 | 15 | |||
710 | 16 | You should have received a copy of the GNU General Public License along with | ||
711 | 17 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
712 | 18 | Place, Suite 330, Boston, MA 02111-1307 USA | ||
713 | 19 | """ | ||
714 | 20 | import logging | ||
715 | 21 | import os, os.path | ||
716 | 22 | |||
717 | 23 | from PyQt4 import QtCore, QtGui | ||
718 | 24 | from PyQt4.QtGui import QColor, QFont | ||
719 | 25 | from openlp.core.lib import ThemeXML | ||
720 | 26 | from openlp.core import fileToXML | ||
721 | 27 | from openlp.core import Renderer | ||
722 | 28 | from openlp.core import translate | ||
723 | 29 | |||
724 | 30 | from amendthemedialog import Ui_AmendThemeDialog | ||
725 | 31 | |||
726 | 32 | log = logging.getLogger(u'AmendThemeForm') | ||
727 | 33 | |||
728 | 34 | class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): | ||
729 | 35 | |||
730 | 36 | def __init__(self, parent=None): | ||
731 | 37 | QtGui.QDialog.__init__(self, parent) | ||
732 | 38 | self.setupUi(self) | ||
733 | 39 | |||
734 | 40 | #define signals | ||
735 | 41 | #Exits | ||
736 | 42 | QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL("accepted()"), self.accept) | ||
737 | 43 | QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL("rejected()"), self.close) | ||
738 | 44 | #Buttons | ||
739 | 45 | QtCore.QObject.connect(self.Color1PushButton , | ||
740 | 46 | QtCore.SIGNAL("pressed()"), self.onColor1PushButtonClicked) | ||
741 | 47 | QtCore.QObject.connect(self.Color2PushButton , | ||
742 | 48 | QtCore.SIGNAL("pressed()"), self.onColor2PushButtonClicked) | ||
743 | 49 | QtCore.QObject.connect(self.MainFontColorPushButton, | ||
744 | 50 | QtCore.SIGNAL("pressed()"), self.onMainFontColorPushButtonClicked) | ||
745 | 51 | QtCore.QObject.connect(self.FontFooterColorPushButton, | ||
746 | 52 | QtCore.SIGNAL("pressed()"), self.onFontFooterColorPushButtonClicked) | ||
747 | 53 | #Combo boxes | ||
748 | 54 | QtCore.QObject.connect(self.BackgroundComboBox, | ||
749 | 55 | QtCore.SIGNAL("activated(int)"), self.onBackgroundComboBoxSelected) | ||
750 | 56 | QtCore.QObject.connect(self.BackgroundTypeComboBox, | ||
751 | 57 | QtCore.SIGNAL("activated(int)"), self.onBackgroundTypeComboBoxSelected) | ||
752 | 58 | QtCore.QObject.connect(self.GradientComboBox, | ||
753 | 59 | QtCore.SIGNAL("activated(int)"), self.onGradientComboBoxSelected) | ||
754 | 60 | |||
755 | 61 | |||
756 | 62 | def accept(self): | ||
757 | 63 | return QtGui.QDialog.accept(self) | ||
758 | 64 | |||
759 | 65 | def themePath(self, path): | ||
760 | 66 | self.path = path | ||
761 | 67 | |||
762 | 68 | def loadTheme(self, theme): | ||
763 | 69 | self.theme = ThemeXML() | ||
764 | 70 | if theme == None: | ||
765 | 71 | self.theme.parse(self.baseTheme()) | ||
766 | 72 | else: | ||
767 | 73 | xml_file = os.path.join(self.path, theme, theme+u'.xml') | ||
768 | 74 | xml = fileToXML(xml_file) | ||
769 | 75 | self.theme.parse(xml) | ||
770 | 76 | self.paintUi(self.theme) | ||
771 | 77 | self.generateImage(self.theme) | ||
772 | 78 | |||
773 | 79 | def onGradientComboBoxSelected(self): | ||
774 | 80 | if self.GradientComboBox.currentIndex() == 0: # Horizontal | ||
775 | 81 | self.theme.background_direction = u'horizontal' | ||
776 | 82 | elif self.GradientComboBox.currentIndex() == 1: # vertical | ||
777 | 83 | self.theme.background_direction = u'vertical' | ||
778 | 84 | else: | ||
779 | 85 | self.theme.background_direction = u'circular' | ||
780 | 86 | self.stateChanging(self.theme) | ||
781 | 87 | self.generateImage(self.theme) | ||
782 | 88 | |||
783 | 89 | def onBackgroundComboBoxSelected(self): | ||
784 | 90 | if self.BackgroundComboBox.currentIndex() == 0: # Opaque | ||
785 | 91 | self.theme.background_mode = u'opaque' | ||
786 | 92 | else: | ||
787 | 93 | self.theme.background_mode = u'transparent' | ||
788 | 94 | self.stateChanging(self.theme) | ||
789 | 95 | self.generateImage(self.theme) | ||
790 | 96 | |||
791 | 97 | def onBackgroundTypeComboBoxSelected(self): | ||
792 | 98 | if self.BackgroundTypeComboBox.currentIndex() == 0: # Solid | ||
793 | 99 | self.theme.background_type = u'solid' | ||
794 | 100 | elif self.BackgroundTypeComboBox.currentIndex() == 1: # Gradient | ||
795 | 101 | self.theme.background_type = u'gradient' | ||
796 | 102 | if self.theme.background_direction == None: # never defined | ||
797 | 103 | self.theme.background_direction = u'horizontal' | ||
798 | 104 | self.theme.background_color2 = u'#000000' | ||
799 | 105 | else: | ||
800 | 106 | self.theme.background_type = u'image' | ||
801 | 107 | self.stateChanging(self.theme) | ||
802 | 108 | self.generateImage(self.theme) | ||
803 | 109 | |||
804 | 110 | def onColor1PushButtonClicked(self): | ||
805 | 111 | self.theme.background_color1 = QtGui.QColorDialog.getColor( | ||
806 | 112 | QColor(self.theme.background_color1), self).name() | ||
807 | 113 | self.Color1PushButton.setStyleSheet( | ||
808 | 114 | 'background-color: %s' % str(self.theme.background_color1)) | ||
809 | 115 | |||
810 | 116 | self.generateImage(self.theme) | ||
811 | 117 | |||
812 | 118 | def onColor2PushButtonClicked(self): | ||
813 | 119 | self.theme.background_color2 = QtGui.QColorDialog.getColor( | ||
814 | 120 | QColor(self.theme.background_color2), self).name() | ||
815 | 121 | self.Color2PushButton.setStyleSheet( | ||
816 | 122 | 'background-color: %s' % str(self.theme.background_color2)) | ||
817 | 123 | |||
818 | 124 | self.generateImage(self.theme) | ||
819 | 125 | |||
820 | 126 | def onMainFontColorPushButtonClicked(self): | ||
821 | 127 | self.theme.font_main_color = QtGui.QColorDialog.getColor( | ||
822 | 128 | QColor(self.theme.font_main_color), self).name() | ||
823 | 129 | |||
824 | 130 | self.MainFontColorPushButton.setStyleSheet( | ||
825 | 131 | 'background-color: %s' % str(self.theme.font_main_color)) | ||
826 | 132 | self.generateImage(self.theme) | ||
827 | 133 | |||
828 | 134 | def onFontFooterColorPushButtonClicked(self): | ||
829 | 135 | self.theme.font_footer_color = QtGui.QColorDialog.getColor( | ||
830 | 136 | QColor(self.theme.font_footer_color), self).name() | ||
831 | 137 | |||
832 | 138 | self.FontFooterColorPushButton.setStyleSheet( | ||
833 | 139 | 'background-color: %s' % str(self.theme.font_footer_color)) | ||
834 | 140 | self.generateImage(self.theme) | ||
835 | 141 | |||
836 | 142 | def baseTheme(self): | ||
837 | 143 | log.debug(u'base Theme') | ||
838 | 144 | newtheme = ThemeXML() | ||
839 | 145 | newtheme.new_document(u'New Theme') | ||
840 | 146 | newtheme.add_background_solid(str(u'#000000')) | ||
841 | 147 | newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(30), u'False') | ||
842 | 148 | newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer') | ||
843 | 149 | newtheme.add_display(str(False), str(u'#FFFFFF'), str(False), str(u'#FFFFFF'), | ||
844 | 150 | str(0), str(0), str(0)) | ||
845 | 151 | |||
846 | 152 | return newtheme.extract_xml() | ||
847 | 153 | |||
848 | 154 | def paintUi(self, theme): | ||
849 | 155 | print theme # leave as helpful for initial development | ||
850 | 156 | self.stateChanging(theme) | ||
851 | 157 | self.BackgroundTypeComboBox.setCurrentIndex(0) | ||
852 | 158 | self.BackgroundComboBox.setCurrentIndex(0) | ||
853 | 159 | self.GradientComboBox.setCurrentIndex(0) | ||
854 | 160 | self.MainFontColorPushButton.setStyleSheet( | ||
855 | 161 | 'background-color: %s' % str(theme.font_main_color)) | ||
856 | 162 | self.FontFooterColorPushButton.setStyleSheet( | ||
857 | 163 | 'background-color: %s' % str(theme.font_footer_color)) | ||
858 | 164 | |||
859 | 165 | def stateChanging(self, theme): | ||
860 | 166 | if theme.background_type == u'solid': | ||
861 | 167 | self.Color1PushButton.setStyleSheet( | ||
862 | 168 | 'background-color: %s' % str(theme.background_color1)) | ||
863 | 169 | self.Color1Label.setText(translate(u'ThemeManager', u'Background Font:')) | ||
864 | 170 | self.Color1Label.setVisible(True) | ||
865 | 171 | self.Color1PushButton.setVisible(True) | ||
866 | 172 | self.Color2Label.setVisible(False) | ||
867 | 173 | self.Color2PushButton.setVisible(False) | ||
868 | 174 | elif theme.background_type == u'gradient': | ||
869 | 175 | self.Color1PushButton.setStyleSheet( | ||
870 | 176 | 'background-color: %s' % str(theme.background_color1)) | ||
871 | 177 | self.Color2PushButton.setStyleSheet( | ||
872 | 178 | 'background-color: %s' % str(theme.background_color2)) | ||
873 | 179 | self.Color1Label.setText(translate(u'ThemeManager', u'First Color:')) | ||
874 | 180 | self.Color2Label.setText(translate(u'ThemeManager', u'Second Color:')) | ||
875 | 181 | self.Color1Label.setVisible(True) | ||
876 | 182 | self.Color1PushButton.setVisible(True) | ||
877 | 183 | self.Color2Label.setVisible(True) | ||
878 | 184 | self.Color2PushButton.setVisible(True) | ||
879 | 185 | else: # must be image | ||
880 | 186 | self.Color1Label.setVisible(False) | ||
881 | 187 | self.Color1PushButton.setVisible(False) | ||
882 | 188 | self.Color2Label.setVisible(False) | ||
883 | 189 | self.Color2PushButton.setVisible(False) | ||
884 | 190 | |||
885 | 191 | def generateImage(self, theme): | ||
886 | 192 | log.debug(u'generateImage %s ', theme) | ||
887 | 193 | #theme = ThemeXML() | ||
888 | 194 | #theme.parse(theme_xml) | ||
889 | 195 | #print theme | ||
890 | 196 | size=QtCore.QSize(800,600) | ||
891 | 197 | frame=TstFrame(size) | ||
892 | 198 | frame=frame | ||
893 | 199 | paintdest=frame.GetPixmap() | ||
894 | 200 | r=Renderer() | ||
895 | 201 | r.set_paint_dest(paintdest) | ||
896 | 202 | |||
897 | 203 | r.set_theme(theme) # set default theme | ||
898 | 204 | r._render_background() | ||
899 | 205 | r.set_text_rectangle(QtCore.QRect(0,0, size.width()-1, size.height()-1), QtCore.QRect(10,560, size.width()-1, size.height()-1)) | ||
900 | 206 | |||
901 | 207 | lines=[] | ||
902 | 208 | lines.append(u'Amazing Grace!') | ||
903 | 209 | lines.append(u'How sweet the sound') | ||
904 | 210 | lines.append(u'To save a wretch like me;') | ||
905 | 211 | lines.append(u'I once was lost but now am found,') | ||
906 | 212 | lines.append(u'Was blind, but now I see.') | ||
907 | 213 | lines1=[] | ||
908 | 214 | lines1.append(u'Amazing Grace (John Newton)' ) | ||
909 | 215 | lines1.append(u'CCLI xxx (c)Openlp.org') | ||
910 | 216 | |||
911 | 217 | answer=r._render_lines(lines, lines1) | ||
912 | 218 | |||
913 | 219 | self.ThemePreview.setPixmap(frame.GetPixmap()) | ||
914 | 220 | |||
915 | 221 | class TstFrame: | ||
916 | 222 | def __init__(self, size): | ||
917 | 223 | """Create the DemoPanel.""" | ||
918 | 224 | self.width=size.width(); | ||
919 | 225 | self.height=size.height(); | ||
920 | 226 | # create something to be painted into | ||
921 | 227 | self._Buffer = QtGui.QPixmap(self.width, self.height) | ||
922 | 228 | def GetPixmap(self): | ||
923 | 229 | return self._Buffer | ||
924 | 0 | 230 | ||
925 | === modified file 'openlp/core/ui/generaltab.py' | |||
926 | --- openlp/core/ui/generaltab.py 2009-03-01 14:36:49 +0000 | |||
927 | +++ openlp/core/ui/generaltab.py 2009-04-10 05:59:40 +0000 | |||
928 | @@ -28,8 +28,9 @@ | |||
929 | 28 | """ | 28 | """ |
930 | 29 | GeneralTab is the general settings tab in the settings dialog. | 29 | GeneralTab is the general settings tab in the settings dialog. |
931 | 30 | """ | 30 | """ |
933 | 31 | def __init__(self): | 31 | def __init__(self, screen_list): |
934 | 32 | SettingsTab.__init__(self, translate(u'GeneralTab', u'General')) | 32 | SettingsTab.__init__(self, translate(u'GeneralTab', u'General')) |
935 | 33 | self.screen_list = screen_list | ||
936 | 33 | 34 | ||
937 | 34 | def setupUi(self): | 35 | def setupUi(self): |
938 | 35 | self.setObjectName(u'GeneralTab') | 36 | self.setObjectName(u'GeneralTab') |
939 | 36 | 37 | ||
940 | === modified file 'openlp/core/ui/mainwindow.py' | |||
941 | --- openlp/core/ui/mainwindow.py 2009-04-06 18:45:45 +0000 | |||
942 | +++ openlp/core/ui/mainwindow.py 2009-04-09 18:50:20 +0000 | |||
943 | @@ -37,12 +37,13 @@ | |||
944 | 37 | log=logging.getLogger(u'MainWindow') | 37 | log=logging.getLogger(u'MainWindow') |
945 | 38 | log.info(u'MainWindow loaded') | 38 | log.info(u'MainWindow loaded') |
946 | 39 | 39 | ||
948 | 40 | def __init__(self): | 40 | def __init__(self, screens): |
949 | 41 | self.main_window = QtGui.QMainWindow() | 41 | self.main_window = QtGui.QMainWindow() |
950 | 42 | self.screen_list = screens | ||
951 | 42 | self.EventManager = EventManager() | 43 | self.EventManager = EventManager() |
952 | 43 | self.alert_form = AlertForm() | 44 | self.alert_form = AlertForm() |
953 | 44 | self.about_form = AboutForm() | 45 | self.about_form = AboutForm() |
955 | 45 | self.settings_form = SettingsForm() | 46 | self.settings_form = SettingsForm(self.screen_list) |
956 | 46 | 47 | ||
957 | 47 | pluginpath = os.path.split(os.path.abspath(__file__))[0] | 48 | pluginpath = os.path.split(os.path.abspath(__file__))[0] |
958 | 48 | pluginpath = os.path.abspath(os.path.join(pluginpath, '..', '..','plugins')) | 49 | pluginpath = os.path.abspath(os.path.join(pluginpath, '..', '..','plugins')) |
959 | 49 | 50 | ||
960 | === modified file 'openlp/core/ui/settingsform.py' | |||
961 | --- openlp/core/ui/settingsform.py 2009-03-23 19:17:07 +0000 | |||
962 | +++ openlp/core/ui/settingsform.py 2009-04-09 18:50:20 +0000 | |||
963 | @@ -31,18 +31,18 @@ | |||
964 | 31 | 31 | ||
965 | 32 | class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): | 32 | class SettingsForm(QtGui.QDialog, Ui_SettingsDialog): |
966 | 33 | 33 | ||
968 | 34 | def __init__(self, parent=None): | 34 | def __init__(self, screen_list, parent=None): |
969 | 35 | QtGui.QDialog.__init__(self, parent) | 35 | QtGui.QDialog.__init__(self, parent) |
970 | 36 | self.setupUi(self) | 36 | self.setupUi(self) |
971 | 37 | # General tab | 37 | # General tab |
973 | 38 | self.GeneralTab = GeneralTab() | 38 | self.GeneralTab = GeneralTab(screen_list) |
974 | 39 | self.addTab(self.GeneralTab) | 39 | self.addTab(self.GeneralTab) |
975 | 40 | # Themes tab | 40 | # Themes tab |
976 | 41 | self.ThemesTab = ThemesTab() | 41 | self.ThemesTab = ThemesTab() |
977 | 42 | self.addTab(self.ThemesTab) | 42 | self.addTab(self.ThemesTab) |
978 | 43 | # Alert tab | 43 | # Alert tab |
979 | 44 | self.AlertsTab = AlertsTab() | 44 | self.AlertsTab = AlertsTab() |
981 | 45 | self.addTab(self.AlertsTab) | 45 | self.addTab(self.AlertsTab) |
982 | 46 | 46 | ||
983 | 47 | def addTab(self, tab): | 47 | def addTab(self, tab): |
984 | 48 | log.info(u'Inserting %s' % tab.title()) | 48 | log.info(u'Inserting %s' % tab.title()) |
985 | 49 | 49 | ||
986 | === modified file 'openlp/core/ui/thememanager.py' | |||
987 | --- openlp/core/ui/thememanager.py 2009-04-07 19:45:21 +0000 | |||
988 | +++ openlp/core/ui/thememanager.py 2009-04-11 15:16:02 +0000 | |||
989 | @@ -128,7 +128,11 @@ | |||
990 | 128 | for i in self.items: | 128 | for i in self.items: |
991 | 129 | yield i | 129 | yield i |
992 | 130 | 130 | ||
994 | 131 | def item(self, row): | 131 | def getValue(self, index): |
995 | 132 | row = index.row() | ||
996 | 133 | return self.items[row] | ||
997 | 134 | |||
998 | 135 | def getItem(self, row): | ||
999 | 132 | log.info(u'Get Item:%d -> %s' %(row, str(self.items))) | 136 | log.info(u'Get Item:%d -> %s' %(row, str(self.items))) |
1000 | 133 | return self.items[row] | 137 | return self.items[row] |
1001 | 134 | 138 | ||
1002 | @@ -177,6 +181,7 @@ | |||
1003 | 177 | self.themelist= [] | 181 | self.themelist= [] |
1004 | 178 | self.path = os.path.join(ConfigHelper.get_data_path(), u'themes') | 182 | self.path = os.path.join(ConfigHelper.get_data_path(), u'themes') |
1005 | 179 | self.checkThemesExists(self.path) | 183 | self.checkThemesExists(self.path) |
1006 | 184 | self.amendThemeForm.themePath(self.path) | ||
1007 | 180 | 185 | ||
1008 | 181 | def setEventManager(self, eventManager): | 186 | def setEventManager(self, eventManager): |
1009 | 182 | self.eventManager = eventManager | 187 | self.eventManager = eventManager |
1010 | @@ -186,7 +191,10 @@ | |||
1011 | 186 | self.amendThemeForm.exec_() | 191 | self.amendThemeForm.exec_() |
1012 | 187 | 192 | ||
1013 | 188 | def onEditTheme(self): | 193 | def onEditTheme(self): |
1015 | 189 | self.amendThemeForm.loadTheme(theme) | 194 | items = self.ThemeListView.selectedIndexes() |
1016 | 195 | for item in items: | ||
1017 | 196 | data = self.Theme_data.getValue(item) | ||
1018 | 197 | self.amendThemeForm.loadTheme(data[3]) | ||
1019 | 190 | self.amendThemeForm.exec_() | 198 | self.amendThemeForm.exec_() |
1020 | 191 | 199 | ||
1021 | 192 | def onDeleteTheme(self): | 200 | def onDeleteTheme(self): |
1022 | @@ -276,8 +284,8 @@ | |||
1023 | 276 | else: | 284 | else: |
1024 | 277 | newtheme.add_background_image(str(t.BackgroundParameter1)) | 285 | newtheme.add_background_image(str(t.BackgroundParameter1)) |
1025 | 278 | 286 | ||
1028 | 279 | newtheme.add_font(str(t.FontName), str(t.FontColor.name()), str(t.FontProportion * 2)) | 287 | newtheme.add_font(str(t.FontName), str(t.FontColor.name()), str(t.FontProportion * 2), u'False') |
1029 | 280 | newtheme.add_font(str(t.FontName), str(t.FontColor.name()), str(12), u'footer') | 288 | newtheme.add_font(str(t.FontName), str(t.FontColor.name()), str(12), u'False', u'footer') |
1030 | 281 | outline = False | 289 | outline = False |
1031 | 282 | shadow = False | 290 | shadow = False |
1032 | 283 | if t.Shadow == 1: | 291 | if t.Shadow == 1: |
1033 | @@ -302,7 +310,7 @@ | |||
1034 | 302 | 310 | ||
1035 | 303 | r.set_theme(theme) # set default theme | 311 | r.set_theme(theme) # set default theme |
1036 | 304 | r._render_background() | 312 | r._render_background() |
1038 | 305 | r.set_text_rectangle(QtCore.QRect(0,0, size.width()-1, size.height()-1)) | 313 | r.set_text_rectangle(QtCore.QRect(0,0, size.width()-1, size.height()-1), QtCore.QRect(10,560, size.width()-1, size.height()-1)) |
1039 | 306 | 314 | ||
1040 | 307 | lines=[] | 315 | lines=[] |
1041 | 308 | lines.append(u'Amazing Grace!') | 316 | lines.append(u'Amazing Grace!') |
1042 | @@ -310,17 +318,18 @@ | |||
1043 | 310 | lines.append(u'To save a wretch like me;') | 318 | lines.append(u'To save a wretch like me;') |
1044 | 311 | lines.append(u'I once was lost but now am found,') | 319 | lines.append(u'I once was lost but now am found,') |
1045 | 312 | lines.append(u'Was blind, but now I see.') | 320 | lines.append(u'Was blind, but now I see.') |
1046 | 321 | lines1=[] | ||
1047 | 322 | lines1.append(u'Amazing Grace (John Newton)' ) | ||
1048 | 323 | lines1.append(u'CCLI xxx (c)Openlp.org') | ||
1049 | 313 | 324 | ||
1053 | 314 | answer=r._render_lines(lines) | 325 | answer=r._render_lines(lines, lines1) |
1051 | 315 | r._get_extent_and_render(u'Amazing Grace (John Newton) ', (10, 560), True, None, True) | ||
1052 | 316 | r._get_extent_and_render(u'CCLI xxx (c)Openlp.org', (10, 580), True, None, True) | ||
1054 | 317 | 326 | ||
1055 | 318 | im=frame.GetPixmap().toImage() | 327 | im=frame.GetPixmap().toImage() |
1061 | 319 | testpathname=os.path.join(dir, name+u'.png') | 328 | samplepathname=os.path.join(dir, name+u'.png') |
1062 | 320 | if os.path.exists(testpathname): | 329 | if os.path.exists(samplepathname): |
1063 | 321 | os.unlink(testpathname) | 330 | os.unlink(samplepathname) |
1064 | 322 | im.save(testpathname, u'png') | 331 | im.save(samplepathname, u'png') |
1065 | 323 | log.debug(u'Theme image written to %s',testpathname) | 332 | log.debug(u'Theme image written to %s',samplepathname) |
1066 | 324 | 333 | ||
1067 | 325 | 334 | ||
1068 | 326 | class TstFrame: | 335 | class TstFrame: |
1069 | 327 | 336 | ||
1070 | === modified file 'openlp/plugins/bibles/bibleplugin.py' | |||
1071 | --- openlp/plugins/bibles/bibleplugin.py 2009-03-22 07:13:34 +0000 | |||
1072 | +++ openlp/plugins/bibles/bibleplugin.py 2009-04-10 06:06:41 +0000 | |||
1073 | @@ -24,7 +24,8 @@ | |||
1074 | 24 | from PyQt4.QtGui import * | 24 | from PyQt4.QtGui import * |
1075 | 25 | 25 | ||
1076 | 26 | from openlp.core.resources import * | 26 | from openlp.core.resources import * |
1078 | 27 | from openlp.core.lib import Plugin | 27 | from openlp.core.lib import Plugin, Event |
1079 | 28 | from openlp.core.lib import EventType | ||
1080 | 28 | 29 | ||
1081 | 29 | from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem | 30 | from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem |
1082 | 30 | from openlp.plugins.bibles.lib.tables import * | 31 | from openlp.plugins.bibles.lib.tables import * |
1083 | @@ -76,4 +77,13 @@ | |||
1084 | 76 | def onBibleNewClick(self): | 77 | def onBibleNewClick(self): |
1085 | 77 | self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self) | 78 | self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self) |
1086 | 78 | self.bibleimportform.exec_() | 79 | self.bibleimportform.exec_() |
1088 | 79 | pass | 80 | pass |
1089 | 81 | |||
1090 | 82 | def handle_event(self, event): | ||
1091 | 83 | """ | ||
1092 | 84 | Handle the event contained in the event object. | ||
1093 | 85 | """ | ||
1094 | 86 | log.debug(u'Handle event called with event %s'%event.event_type) | ||
1095 | 87 | if event.event_type == EventType.ThemeListChanged: | ||
1096 | 88 | log.debug(u'New Theme request received') | ||
1097 | 89 | #self.edit_custom_form.loadThemes(self.theme_manager.getThemes()) | ||
1098 | 80 | 90 | ||
1099 | === modified file 'openlp/plugins/custom/customplugin.py' | |||
1100 | --- openlp/plugins/custom/customplugin.py 2009-04-07 19:03:36 +0000 | |||
1101 | +++ openlp/plugins/custom/customplugin.py 2009-04-10 06:06:41 +0000 | |||
1102 | @@ -56,7 +56,7 @@ | |||
1103 | 56 | """ | 56 | """ |
1104 | 57 | Handle the event contained in the event object. | 57 | Handle the event contained in the event object. |
1105 | 58 | """ | 58 | """ |
1107 | 59 | log.debug(u'Handle event called with event %s' %event.event_type) | 59 | log.debug(u'Handle event called with event %s'%event.event_type) |
1108 | 60 | if event.event_type == EventType.ThemeListChanged: | 60 | if event.event_type == EventType.ThemeListChanged: |
1109 | 61 | log.debug(u'New Theme request received') | 61 | log.debug(u'New Theme request received') |
1110 | 62 | self.edit_custom_form.loadThemes(self.theme_manager.getThemes()) | 62 | self.edit_custom_form.loadThemes(self.theme_manager.getThemes()) |
1111 | 63 | 63 | ||
1112 | === modified file 'openlp/plugins/songs/songsplugin.py' | |||
1113 | --- openlp/plugins/songs/songsplugin.py 2009-03-22 07:13:34 +0000 | |||
1114 | +++ openlp/plugins/songs/songsplugin.py 2009-04-10 06:06:41 +0000 | |||
1115 | @@ -22,7 +22,8 @@ | |||
1116 | 22 | from PyQt4 import QtCore, QtGui | 22 | from PyQt4 import QtCore, QtGui |
1117 | 23 | 23 | ||
1118 | 24 | from openlp.core.resources import * | 24 | from openlp.core.resources import * |
1120 | 25 | from openlp.core.lib import Plugin | 25 | from openlp.core.lib import Plugin, Event |
1121 | 26 | from openlp.core.lib import EventType | ||
1122 | 26 | from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem | 27 | from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem |
1123 | 27 | from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \ | 28 | from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \ |
1124 | 28 | OpenSongImportForm, OpenLPExportForm | 29 | OpenSongImportForm, OpenLPExportForm |
1125 | @@ -122,3 +123,12 @@ | |||
1126 | 122 | 123 | ||
1127 | 123 | def onExportOpenSongItemClicked(self): | 124 | def onExportOpenSongItemClicked(self): |
1128 | 124 | self.opensong_export_form.show() | 125 | self.opensong_export_form.show() |
1129 | 126 | |||
1130 | 127 | def handle_event(self, event): | ||
1131 | 128 | """ | ||
1132 | 129 | Handle the event contained in the event object. | ||
1133 | 130 | """ | ||
1134 | 131 | log.debug(u'Handle event called with event %s'%event.event_type) | ||
1135 | 132 | if event.event_type == EventType.ThemeListChanged: | ||
1136 | 133 | log.debug(u'New Theme request received') | ||
1137 | 134 | #self.edit_custom_form.loadThemes(self.theme_manager.getThemes()) | ||
1138 | 125 | 135 | ||
1139 | === added file 'resources/forms/amendthemedialog.ui' | |||
1140 | --- resources/forms/amendthemedialog.ui 1970-01-01 00:00:00 +0000 | |||
1141 | +++ resources/forms/amendthemedialog.ui 2009-04-11 05:43:52 +0000 | |||
1142 | @@ -0,0 +1,729 @@ | |||
1143 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
1144 | 2 | <ui version="4.0"> | ||
1145 | 3 | <class>AmendThemeDialog</class> | ||
1146 | 4 | <widget class="QWidget" name="AmendThemeDialog"> | ||
1147 | 5 | <property name="geometry"> | ||
1148 | 6 | <rect> | ||
1149 | 7 | <x>0</x> | ||
1150 | 8 | <y>0</y> | ||
1151 | 9 | <width>752</width> | ||
1152 | 10 | <height>533</height> | ||
1153 | 11 | </rect> | ||
1154 | 12 | </property> | ||
1155 | 13 | <property name="windowTitle"> | ||
1156 | 14 | <string>Theme Maintance</string> | ||
1157 | 15 | </property> | ||
1158 | 16 | <property name="windowIcon"> | ||
1159 | 17 | <iconset resource="../images/openlp-2.qrc"> | ||
1160 | 18 | <normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset> | ||
1161 | 19 | </property> | ||
1162 | 20 | <widget class="QDialogButtonBox" name="ThemeButtonBox"> | ||
1163 | 21 | <property name="geometry"> | ||
1164 | 22 | <rect> | ||
1165 | 23 | <x>580</x> | ||
1166 | 24 | <y>500</y> | ||
1167 | 25 | <width>156</width> | ||
1168 | 26 | <height>26</height> | ||
1169 | 27 | </rect> | ||
1170 | 28 | </property> | ||
1171 | 29 | <property name="standardButtons"> | ||
1172 | 30 | <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | ||
1173 | 31 | </property> | ||
1174 | 32 | </widget> | ||
1175 | 33 | <widget class="QWidget" name="layoutWidget"> | ||
1176 | 34 | <property name="geometry"> | ||
1177 | 35 | <rect> | ||
1178 | 36 | <x>50</x> | ||
1179 | 37 | <y>20</y> | ||
1180 | 38 | <width>441</width> | ||
1181 | 39 | <height>41</height> | ||
1182 | 40 | </rect> | ||
1183 | 41 | </property> | ||
1184 | 42 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
1185 | 43 | <item> | ||
1186 | 44 | <widget class="QLabel" name="ThemeNameLabel"> | ||
1187 | 45 | <property name="text"> | ||
1188 | 46 | <string>Theme Name</string> | ||
1189 | 47 | </property> | ||
1190 | 48 | </widget> | ||
1191 | 49 | </item> | ||
1192 | 50 | <item> | ||
1193 | 51 | <widget class="QLineEdit" name="ThemeNameEdit"/> | ||
1194 | 52 | </item> | ||
1195 | 53 | </layout> | ||
1196 | 54 | </widget> | ||
1197 | 55 | <widget class="QWidget" name=""> | ||
1198 | 56 | <property name="geometry"> | ||
1199 | 57 | <rect> | ||
1200 | 58 | <x>31</x> | ||
1201 | 59 | <y>71</y> | ||
1202 | 60 | <width>721</width> | ||
1203 | 61 | <height>411</height> | ||
1204 | 62 | </rect> | ||
1205 | 63 | </property> | ||
1206 | 64 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
1207 | 65 | <item> | ||
1208 | 66 | <widget class="QWidget" name="LeftSide" native="true"> | ||
1209 | 67 | <widget class="QTabWidget" name="tabWidget"> | ||
1210 | 68 | <property name="geometry"> | ||
1211 | 69 | <rect> | ||
1212 | 70 | <x>0</x> | ||
1213 | 71 | <y>0</y> | ||
1214 | 72 | <width>341</width> | ||
1215 | 73 | <height>401</height> | ||
1216 | 74 | </rect> | ||
1217 | 75 | </property> | ||
1218 | 76 | <property name="currentIndex"> | ||
1219 | 77 | <number>0</number> | ||
1220 | 78 | </property> | ||
1221 | 79 | <widget class="QWidget" name="BackgroundTab"> | ||
1222 | 80 | <attribute name="title"> | ||
1223 | 81 | <string>Background</string> | ||
1224 | 82 | </attribute> | ||
1225 | 83 | <widget class="QWidget" name="layoutWidget"> | ||
1226 | 84 | <property name="geometry"> | ||
1227 | 85 | <rect> | ||
1228 | 86 | <x>10</x> | ||
1229 | 87 | <y>10</y> | ||
1230 | 88 | <width>321</width> | ||
1231 | 89 | <height>351</height> | ||
1232 | 90 | </rect> | ||
1233 | 91 | </property> | ||
1234 | 92 | <layout class="QGridLayout" name="gridLayout"> | ||
1235 | 93 | <item row="0" column="0" colspan="2"> | ||
1236 | 94 | <widget class="QLabel" name="BackgroundLabel"> | ||
1237 | 95 | <property name="text"> | ||
1238 | 96 | <string>Background:</string> | ||
1239 | 97 | </property> | ||
1240 | 98 | </widget> | ||
1241 | 99 | </item> | ||
1242 | 100 | <item row="0" column="2" colspan="2"> | ||
1243 | 101 | <widget class="QComboBox" name="BackgroundComboBox"> | ||
1244 | 102 | <item> | ||
1245 | 103 | <property name="text"> | ||
1246 | 104 | <string>Opaque</string> | ||
1247 | 105 | </property> | ||
1248 | 106 | </item> | ||
1249 | 107 | <item> | ||
1250 | 108 | <property name="text"> | ||
1251 | 109 | <string>Transparent</string> | ||
1252 | 110 | </property> | ||
1253 | 111 | </item> | ||
1254 | 112 | </widget> | ||
1255 | 113 | </item> | ||
1256 | 114 | <item row="1" column="0" colspan="2"> | ||
1257 | 115 | <widget class="QLabel" name="BackgroundTypeLabel"> | ||
1258 | 116 | <property name="text"> | ||
1259 | 117 | <string>Background Type:</string> | ||
1260 | 118 | </property> | ||
1261 | 119 | </widget> | ||
1262 | 120 | </item> | ||
1263 | 121 | <item row="1" column="2" colspan="2"> | ||
1264 | 122 | <widget class="QComboBox" name="BackgroundTypeComboBox"> | ||
1265 | 123 | <item> | ||
1266 | 124 | <property name="text"> | ||
1267 | 125 | <string>Solid Color</string> | ||
1268 | 126 | </property> | ||
1269 | 127 | </item> | ||
1270 | 128 | <item> | ||
1271 | 129 | <property name="text"> | ||
1272 | 130 | <string>Gradient</string> | ||
1273 | 131 | </property> | ||
1274 | 132 | </item> | ||
1275 | 133 | <item> | ||
1276 | 134 | <property name="text"> | ||
1277 | 135 | <string>Image</string> | ||
1278 | 136 | </property> | ||
1279 | 137 | </item> | ||
1280 | 138 | </widget> | ||
1281 | 139 | </item> | ||
1282 | 140 | <item row="2" column="0"> | ||
1283 | 141 | <widget class="QLabel" name="Color1Label"> | ||
1284 | 142 | <property name="text"> | ||
1285 | 143 | <string><Color1></string> | ||
1286 | 144 | </property> | ||
1287 | 145 | </widget> | ||
1288 | 146 | </item> | ||
1289 | 147 | <item row="2" column="2" colspan="2"> | ||
1290 | 148 | <widget class="QPushButton" name="Color1PushButton"> | ||
1291 | 149 | <property name="text"> | ||
1292 | 150 | <string/> | ||
1293 | 151 | </property> | ||
1294 | 152 | </widget> | ||
1295 | 153 | </item> | ||
1296 | 154 | <item row="3" column="0"> | ||
1297 | 155 | <widget class="QLabel" name="Color2Label"> | ||
1298 | 156 | <property name="text"> | ||
1299 | 157 | <string><Color2></string> | ||
1300 | 158 | </property> | ||
1301 | 159 | </widget> | ||
1302 | 160 | </item> | ||
1303 | 161 | <item row="3" column="2" colspan="2"> | ||
1304 | 162 | <widget class="QPushButton" name="Color2PushButton"> | ||
1305 | 163 | <property name="text"> | ||
1306 | 164 | <string/> | ||
1307 | 165 | </property> | ||
1308 | 166 | </widget> | ||
1309 | 167 | </item> | ||
1310 | 168 | <item row="4" column="0"> | ||
1311 | 169 | <widget class="QLabel" name="ImageLabel"> | ||
1312 | 170 | <property name="text"> | ||
1313 | 171 | <string>Image:</string> | ||
1314 | 172 | </property> | ||
1315 | 173 | </widget> | ||
1316 | 174 | </item> | ||
1317 | 175 | <item row="4" column="1" colspan="2"> | ||
1318 | 176 | <widget class="QLineEdit" name="ImageLineEdit"/> | ||
1319 | 177 | </item> | ||
1320 | 178 | <item row="4" column="3"> | ||
1321 | 179 | <widget class="QPushButton" name="ImagePushButton"> | ||
1322 | 180 | <property name="text"> | ||
1323 | 181 | <string/> | ||
1324 | 182 | </property> | ||
1325 | 183 | <property name="icon"> | ||
1326 | 184 | <iconset resource="../images/openlp-2.qrc"> | ||
1327 | 185 | <normaloff>:/services/service_open.png</normaloff>:/services/service_open.png</iconset> | ||
1328 | 186 | </property> | ||
1329 | 187 | </widget> | ||
1330 | 188 | </item> | ||
1331 | 189 | <item row="5" column="0"> | ||
1332 | 190 | <widget class="QLabel" name="GradientLabel"> | ||
1333 | 191 | <property name="text"> | ||
1334 | 192 | <string>Gradient :</string> | ||
1335 | 193 | </property> | ||
1336 | 194 | </widget> | ||
1337 | 195 | </item> | ||
1338 | 196 | <item row="5" column="2" colspan="2"> | ||
1339 | 197 | <widget class="QComboBox" name="GradientComboBox"> | ||
1340 | 198 | <item> | ||
1341 | 199 | <property name="text"> | ||
1342 | 200 | <string>Horizontal</string> | ||
1343 | 201 | </property> | ||
1344 | 202 | </item> | ||
1345 | 203 | <item> | ||
1346 | 204 | <property name="text"> | ||
1347 | 205 | <string>Vertical</string> | ||
1348 | 206 | </property> | ||
1349 | 207 | </item> | ||
1350 | 208 | <item> | ||
1351 | 209 | <property name="text"> | ||
1352 | 210 | <string>Circular</string> | ||
1353 | 211 | </property> | ||
1354 | 212 | </item> | ||
1355 | 213 | </widget> | ||
1356 | 214 | </item> | ||
1357 | 215 | </layout> | ||
1358 | 216 | </widget> | ||
1359 | 217 | </widget> | ||
1360 | 218 | <widget class="QWidget" name="FontMainTab"> | ||
1361 | 219 | <attribute name="title"> | ||
1362 | 220 | <string>Font Main</string> | ||
1363 | 221 | </attribute> | ||
1364 | 222 | <widget class="QGroupBox" name="MainFontGroupBox"> | ||
1365 | 223 | <property name="geometry"> | ||
1366 | 224 | <rect> | ||
1367 | 225 | <x>20</x> | ||
1368 | 226 | <y>10</y> | ||
1369 | 227 | <width>307</width> | ||
1370 | 228 | <height>119</height> | ||
1371 | 229 | </rect> | ||
1372 | 230 | </property> | ||
1373 | 231 | <property name="title"> | ||
1374 | 232 | <string>Main Font</string> | ||
1375 | 233 | </property> | ||
1376 | 234 | <layout class="QGridLayout" name="gridLayout_2"> | ||
1377 | 235 | <item row="0" column="0"> | ||
1378 | 236 | <widget class="QLabel" name="MainFontlabel"> | ||
1379 | 237 | <property name="text"> | ||
1380 | 238 | <string>Font:</string> | ||
1381 | 239 | </property> | ||
1382 | 240 | </widget> | ||
1383 | 241 | </item> | ||
1384 | 242 | <item row="0" column="1" colspan="2"> | ||
1385 | 243 | <widget class="QFontComboBox" name="MainFontComboBox"/> | ||
1386 | 244 | </item> | ||
1387 | 245 | <item row="1" column="0"> | ||
1388 | 246 | <widget class="QLabel" name="MainFontColorLabel"> | ||
1389 | 247 | <property name="text"> | ||
1390 | 248 | <string>Font Color</string> | ||
1391 | 249 | </property> | ||
1392 | 250 | </widget> | ||
1393 | 251 | </item> | ||
1394 | 252 | <item row="1" column="2"> | ||
1395 | 253 | <widget class="QPushButton" name="MainFontColorPushButton"> | ||
1396 | 254 | <property name="text"> | ||
1397 | 255 | <string/> | ||
1398 | 256 | </property> | ||
1399 | 257 | </widget> | ||
1400 | 258 | </item> | ||
1401 | 259 | <item row="2" column="0"> | ||
1402 | 260 | <widget class="QLabel" name="MainFontSize"> | ||
1403 | 261 | <property name="text"> | ||
1404 | 262 | <string>Size:</string> | ||
1405 | 263 | </property> | ||
1406 | 264 | </widget> | ||
1407 | 265 | </item> | ||
1408 | 266 | <item row="2" column="1"> | ||
1409 | 267 | <widget class="QLineEdit" name="MainFontSizeLineEdit"/> | ||
1410 | 268 | </item> | ||
1411 | 269 | <item row="2" column="2"> | ||
1412 | 270 | <widget class="QSlider" name="MainFontlSlider"> | ||
1413 | 271 | <property name="value"> | ||
1414 | 272 | <number>15</number> | ||
1415 | 273 | </property> | ||
1416 | 274 | <property name="maximum"> | ||
1417 | 275 | <number>40</number> | ||
1418 | 276 | </property> | ||
1419 | 277 | <property name="orientation"> | ||
1420 | 278 | <enum>Qt::Horizontal</enum> | ||
1421 | 279 | </property> | ||
1422 | 280 | <property name="tickPosition"> | ||
1423 | 281 | <enum>QSlider::TicksBelow</enum> | ||
1424 | 282 | </property> | ||
1425 | 283 | <property name="tickInterval"> | ||
1426 | 284 | <number>5</number> | ||
1427 | 285 | </property> | ||
1428 | 286 | </widget> | ||
1429 | 287 | </item> | ||
1430 | 288 | </layout> | ||
1431 | 289 | </widget> | ||
1432 | 290 | <widget class="QGroupBox" name="FooterFontGroupBox"> | ||
1433 | 291 | <property name="geometry"> | ||
1434 | 292 | <rect> | ||
1435 | 293 | <x>20</x> | ||
1436 | 294 | <y>160</y> | ||
1437 | 295 | <width>301</width> | ||
1438 | 296 | <height>190</height> | ||
1439 | 297 | </rect> | ||
1440 | 298 | </property> | ||
1441 | 299 | <property name="title"> | ||
1442 | 300 | <string>Display Location</string> | ||
1443 | 301 | </property> | ||
1444 | 302 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1445 | 303 | <item> | ||
1446 | 304 | <widget class="QCheckBox" name="FontMainUseDefault"> | ||
1447 | 305 | <property name="text"> | ||
1448 | 306 | <string>Use default location</string> | ||
1449 | 307 | </property> | ||
1450 | 308 | <property name="tristate"> | ||
1451 | 309 | <bool>false</bool> | ||
1452 | 310 | </property> | ||
1453 | 311 | </widget> | ||
1454 | 312 | </item> | ||
1455 | 313 | <item> | ||
1456 | 314 | <layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
1457 | 315 | <item> | ||
1458 | 316 | <widget class="QLabel" name="FontMainXLabel"> | ||
1459 | 317 | <property name="text"> | ||
1460 | 318 | <string>X Position:</string> | ||
1461 | 319 | </property> | ||
1462 | 320 | </widget> | ||
1463 | 321 | </item> | ||
1464 | 322 | <item> | ||
1465 | 323 | <widget class="QLineEdit" name="FontMainXEdit"/> | ||
1466 | 324 | </item> | ||
1467 | 325 | </layout> | ||
1468 | 326 | </item> | ||
1469 | 327 | <item> | ||
1470 | 328 | <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||
1471 | 329 | <item> | ||
1472 | 330 | <widget class="QLabel" name="FontMainYLabel"> | ||
1473 | 331 | <property name="text"> | ||
1474 | 332 | <string>Y Position:</string> | ||
1475 | 333 | </property> | ||
1476 | 334 | </widget> | ||
1477 | 335 | </item> | ||
1478 | 336 | <item> | ||
1479 | 337 | <widget class="QLineEdit" name="FontMainYEdit"/> | ||
1480 | 338 | </item> | ||
1481 | 339 | </layout> | ||
1482 | 340 | </item> | ||
1483 | 341 | <item> | ||
1484 | 342 | <layout class="QHBoxLayout" name="horizontalLayout_5"> | ||
1485 | 343 | <item> | ||
1486 | 344 | <widget class="QLabel" name="FontMainWidthLabel"> | ||
1487 | 345 | <property name="text"> | ||
1488 | 346 | <string>Width</string> | ||
1489 | 347 | </property> | ||
1490 | 348 | </widget> | ||
1491 | 349 | </item> | ||
1492 | 350 | <item> | ||
1493 | 351 | <widget class="QLineEdit" name="FontMainWidthEdit"/> | ||
1494 | 352 | </item> | ||
1495 | 353 | </layout> | ||
1496 | 354 | </item> | ||
1497 | 355 | <item> | ||
1498 | 356 | <layout class="QHBoxLayout" name="horizontalLayout_6"> | ||
1499 | 357 | <item> | ||
1500 | 358 | <widget class="QLabel" name="FontMainHeightLabel"> | ||
1501 | 359 | <property name="text"> | ||
1502 | 360 | <string>Height</string> | ||
1503 | 361 | </property> | ||
1504 | 362 | </widget> | ||
1505 | 363 | </item> | ||
1506 | 364 | <item> | ||
1507 | 365 | <widget class="QLineEdit" name="FontMainHeightEdit"/> | ||
1508 | 366 | </item> | ||
1509 | 367 | </layout> | ||
1510 | 368 | </item> | ||
1511 | 369 | </layout> | ||
1512 | 370 | </widget> | ||
1513 | 371 | </widget> | ||
1514 | 372 | <widget class="QWidget" name="FontFooterTab"> | ||
1515 | 373 | <attribute name="title"> | ||
1516 | 374 | <string>Font Footer</string> | ||
1517 | 375 | </attribute> | ||
1518 | 376 | <widget class="QGroupBox" name="FooterFontGroupBox_2"> | ||
1519 | 377 | <property name="geometry"> | ||
1520 | 378 | <rect> | ||
1521 | 379 | <x>20</x> | ||
1522 | 380 | <y>160</y> | ||
1523 | 381 | <width>301</width> | ||
1524 | 382 | <height>190</height> | ||
1525 | 383 | </rect> | ||
1526 | 384 | </property> | ||
1527 | 385 | <property name="title"> | ||
1528 | 386 | <string>Display Location</string> | ||
1529 | 387 | </property> | ||
1530 | 388 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
1531 | 389 | <item> | ||
1532 | 390 | <widget class="QCheckBox" name="FontMainUseDefault_2"> | ||
1533 | 391 | <property name="text"> | ||
1534 | 392 | <string>Use default location</string> | ||
1535 | 393 | </property> | ||
1536 | 394 | <property name="tristate"> | ||
1537 | 395 | <bool>false</bool> | ||
1538 | 396 | </property> | ||
1539 | 397 | </widget> | ||
1540 | 398 | </item> | ||
1541 | 399 | <item> | ||
1542 | 400 | <layout class="QHBoxLayout" name="horizontalLayout_7"> | ||
1543 | 401 | <item> | ||
1544 | 402 | <widget class="QLabel" name="FontFooterXLabel"> | ||
1545 | 403 | <property name="text"> | ||
1546 | 404 | <string>X Position:</string> | ||
1547 | 405 | </property> | ||
1548 | 406 | </widget> | ||
1549 | 407 | </item> | ||
1550 | 408 | <item> | ||
1551 | 409 | <widget class="QLineEdit" name="FontFooterXEdit"/> | ||
1552 | 410 | </item> | ||
1553 | 411 | </layout> | ||
1554 | 412 | </item> | ||
1555 | 413 | <item> | ||
1556 | 414 | <layout class="QHBoxLayout" name="horizontalLayout_8"> | ||
1557 | 415 | <item> | ||
1558 | 416 | <widget class="QLabel" name="FontFooterYLabel"> | ||
1559 | 417 | <property name="text"> | ||
1560 | 418 | <string>Y Position:</string> | ||
1561 | 419 | </property> | ||
1562 | 420 | </widget> | ||
1563 | 421 | </item> | ||
1564 | 422 | <item> | ||
1565 | 423 | <widget class="QLineEdit" name="FontFooterYEdit"/> | ||
1566 | 424 | </item> | ||
1567 | 425 | </layout> | ||
1568 | 426 | </item> | ||
1569 | 427 | <item> | ||
1570 | 428 | <layout class="QHBoxLayout" name="horizontalLayout_9"> | ||
1571 | 429 | <item> | ||
1572 | 430 | <widget class="QLabel" name="FontFooterWidthLabel"> | ||
1573 | 431 | <property name="text"> | ||
1574 | 432 | <string>Width</string> | ||
1575 | 433 | </property> | ||
1576 | 434 | </widget> | ||
1577 | 435 | </item> | ||
1578 | 436 | <item> | ||
1579 | 437 | <widget class="QLineEdit" name="FontFooterWidthEdit"/> | ||
1580 | 438 | </item> | ||
1581 | 439 | </layout> | ||
1582 | 440 | </item> | ||
1583 | 441 | <item> | ||
1584 | 442 | <layout class="QHBoxLayout" name="horizontalLayout_10"> | ||
1585 | 443 | <item> | ||
1586 | 444 | <widget class="QLabel" name="FontFooterHeightLabel"> | ||
1587 | 445 | <property name="text"> | ||
1588 | 446 | <string>Height</string> | ||
1589 | 447 | </property> | ||
1590 | 448 | </widget> | ||
1591 | 449 | </item> | ||
1592 | 450 | <item> | ||
1593 | 451 | <widget class="QLineEdit" name="FontFooterHeightEdit"/> | ||
1594 | 452 | </item> | ||
1595 | 453 | </layout> | ||
1596 | 454 | </item> | ||
1597 | 455 | </layout> | ||
1598 | 456 | </widget> | ||
1599 | 457 | <widget class="QGroupBox" name="FooterFontGroupBox_3"> | ||
1600 | 458 | <property name="geometry"> | ||
1601 | 459 | <rect> | ||
1602 | 460 | <x>20</x> | ||
1603 | 461 | <y>10</y> | ||
1604 | 462 | <width>307</width> | ||
1605 | 463 | <height>119</height> | ||
1606 | 464 | </rect> | ||
1607 | 465 | </property> | ||
1608 | 466 | <property name="title"> | ||
1609 | 467 | <string>Footer Font</string> | ||
1610 | 468 | </property> | ||
1611 | 469 | <layout class="QGridLayout" name="gridLayout_3"> | ||
1612 | 470 | <item row="0" column="0"> | ||
1613 | 471 | <widget class="QLabel" name="FontFooterlabel"> | ||
1614 | 472 | <property name="text"> | ||
1615 | 473 | <string>Font:</string> | ||
1616 | 474 | </property> | ||
1617 | 475 | </widget> | ||
1618 | 476 | </item> | ||
1619 | 477 | <item row="0" column="1" colspan="2"> | ||
1620 | 478 | <widget class="QFontComboBox" name="FontFooterComboBox"/> | ||
1621 | 479 | </item> | ||
1622 | 480 | <item row="1" column="0"> | ||
1623 | 481 | <widget class="QLabel" name="FontFooterColorLabel"> | ||
1624 | 482 | <property name="text"> | ||
1625 | 483 | <string>Font Color</string> | ||
1626 | 484 | </property> | ||
1627 | 485 | </widget> | ||
1628 | 486 | </item> | ||
1629 | 487 | <item row="1" column="2"> | ||
1630 | 488 | <widget class="QPushButton" name="FontFooterColorPushButton"> | ||
1631 | 489 | <property name="text"> | ||
1632 | 490 | <string/> | ||
1633 | 491 | </property> | ||
1634 | 492 | </widget> | ||
1635 | 493 | </item> | ||
1636 | 494 | <item row="2" column="0"> | ||
1637 | 495 | <widget class="QLabel" name="FontFooterSizeLabel"> | ||
1638 | 496 | <property name="text"> | ||
1639 | 497 | <string>Size:</string> | ||
1640 | 498 | </property> | ||
1641 | 499 | </widget> | ||
1642 | 500 | </item> | ||
1643 | 501 | <item row="2" column="1"> | ||
1644 | 502 | <widget class="QLineEdit" name="FontFooterSizeLineEdit"/> | ||
1645 | 503 | </item> | ||
1646 | 504 | <item row="2" column="2"> | ||
1647 | 505 | <widget class="QSlider" name="FontFooterSlider"> | ||
1648 | 506 | <property name="value"> | ||
1649 | 507 | <number>15</number> | ||
1650 | 508 | </property> | ||
1651 | 509 | <property name="maximum"> | ||
1652 | 510 | <number>40</number> | ||
1653 | 511 | </property> | ||
1654 | 512 | <property name="orientation"> | ||
1655 | 513 | <enum>Qt::Horizontal</enum> | ||
1656 | 514 | </property> | ||
1657 | 515 | <property name="tickPosition"> | ||
1658 | 516 | <enum>QSlider::TicksBelow</enum> | ||
1659 | 517 | </property> | ||
1660 | 518 | <property name="tickInterval"> | ||
1661 | 519 | <number>5</number> | ||
1662 | 520 | </property> | ||
1663 | 521 | </widget> | ||
1664 | 522 | </item> | ||
1665 | 523 | </layout> | ||
1666 | 524 | </widget> | ||
1667 | 525 | </widget> | ||
1668 | 526 | <widget class="QWidget" name="OptionsTab"> | ||
1669 | 527 | <attribute name="title"> | ||
1670 | 528 | <string>Alignment</string> | ||
1671 | 529 | </attribute> | ||
1672 | 530 | <widget class="QGroupBox" name="ShadowGroupBox"> | ||
1673 | 531 | <property name="geometry"> | ||
1674 | 532 | <rect> | ||
1675 | 533 | <x>20</x> | ||
1676 | 534 | <y>10</y> | ||
1677 | 535 | <width>301</width> | ||
1678 | 536 | <height>80</height> | ||
1679 | 537 | </rect> | ||
1680 | 538 | </property> | ||
1681 | 539 | <property name="title"> | ||
1682 | 540 | <string>Shadow</string> | ||
1683 | 541 | </property> | ||
1684 | 542 | <widget class="QWidget" name="layoutWidget"> | ||
1685 | 543 | <property name="geometry"> | ||
1686 | 544 | <rect> | ||
1687 | 545 | <x>10</x> | ||
1688 | 546 | <y>20</y> | ||
1689 | 547 | <width>281</width> | ||
1690 | 548 | <height>58</height> | ||
1691 | 549 | </rect> | ||
1692 | 550 | </property> | ||
1693 | 551 | <layout class="QFormLayout" name="formLayout"> | ||
1694 | 552 | <item row="0" column="0"> | ||
1695 | 553 | <widget class="QCheckBox" name="ShadowCheckBox"> | ||
1696 | 554 | <property name="text"> | ||
1697 | 555 | <string>Use Shadow</string> | ||
1698 | 556 | </property> | ||
1699 | 557 | </widget> | ||
1700 | 558 | </item> | ||
1701 | 559 | <item row="1" column="0"> | ||
1702 | 560 | <widget class="QLabel" name="ShadowColorLabel"> | ||
1703 | 561 | <property name="text"> | ||
1704 | 562 | <string>Shadow Color:</string> | ||
1705 | 563 | </property> | ||
1706 | 564 | </widget> | ||
1707 | 565 | </item> | ||
1708 | 566 | <item row="1" column="1"> | ||
1709 | 567 | <widget class="QPushButton" name="ShadowColorPushButton"> | ||
1710 | 568 | <property name="text"> | ||
1711 | 569 | <string/> | ||
1712 | 570 | </property> | ||
1713 | 571 | </widget> | ||
1714 | 572 | </item> | ||
1715 | 573 | </layout> | ||
1716 | 574 | </widget> | ||
1717 | 575 | </widget> | ||
1718 | 576 | <widget class="QGroupBox" name="AlignmentGroupBox"> | ||
1719 | 577 | <property name="geometry"> | ||
1720 | 578 | <rect> | ||
1721 | 579 | <x>10</x> | ||
1722 | 580 | <y>200</y> | ||
1723 | 581 | <width>321</width> | ||
1724 | 582 | <height>161</height> | ||
1725 | 583 | </rect> | ||
1726 | 584 | </property> | ||
1727 | 585 | <property name="title"> | ||
1728 | 586 | <string>Alignment</string> | ||
1729 | 587 | </property> | ||
1730 | 588 | <layout class="QGridLayout" name="gridLayout_4"> | ||
1731 | 589 | <item row="0" column="0"> | ||
1732 | 590 | <widget class="QLabel" name="HorizontalLabel"> | ||
1733 | 591 | <property name="text"> | ||
1734 | 592 | <string>Horizontal Align:</string> | ||
1735 | 593 | </property> | ||
1736 | 594 | </widget> | ||
1737 | 595 | </item> | ||
1738 | 596 | <item row="0" column="1"> | ||
1739 | 597 | <widget class="QComboBox" name="HorizontalComboBox"> | ||
1740 | 598 | <item> | ||
1741 | 599 | <property name="text"> | ||
1742 | 600 | <string>Left</string> | ||
1743 | 601 | </property> | ||
1744 | 602 | </item> | ||
1745 | 603 | <item> | ||
1746 | 604 | <property name="text"> | ||
1747 | 605 | <string>Right</string> | ||
1748 | 606 | </property> | ||
1749 | 607 | </item> | ||
1750 | 608 | <item> | ||
1751 | 609 | <property name="text"> | ||
1752 | 610 | <string>Center</string> | ||
1753 | 611 | </property> | ||
1754 | 612 | </item> | ||
1755 | 613 | </widget> | ||
1756 | 614 | </item> | ||
1757 | 615 | <item row="1" column="0"> | ||
1758 | 616 | <widget class="QLabel" name="VerticalLabel"> | ||
1759 | 617 | <property name="text"> | ||
1760 | 618 | <string>Vertical Align:</string> | ||
1761 | 619 | </property> | ||
1762 | 620 | </widget> | ||
1763 | 621 | </item> | ||
1764 | 622 | <item row="1" column="1"> | ||
1765 | 623 | <widget class="QComboBox" name="VerticalComboBox"> | ||
1766 | 624 | <item> | ||
1767 | 625 | <property name="text"> | ||
1768 | 626 | <string>Top</string> | ||
1769 | 627 | </property> | ||
1770 | 628 | </item> | ||
1771 | 629 | <item> | ||
1772 | 630 | <property name="text"> | ||
1773 | 631 | <string>Middle</string> | ||
1774 | 632 | </property> | ||
1775 | 633 | </item> | ||
1776 | 634 | <item> | ||
1777 | 635 | <property name="text"> | ||
1778 | 636 | <string>Bottom</string> | ||
1779 | 637 | </property> | ||
1780 | 638 | </item> | ||
1781 | 639 | </widget> | ||
1782 | 640 | </item> | ||
1783 | 641 | </layout> | ||
1784 | 642 | </widget> | ||
1785 | 643 | <widget class="QGroupBox" name="OutlineGroupBox"> | ||
1786 | 644 | <property name="geometry"> | ||
1787 | 645 | <rect> | ||
1788 | 646 | <x>20</x> | ||
1789 | 647 | <y>110</y> | ||
1790 | 648 | <width>301</width> | ||
1791 | 649 | <height>80</height> | ||
1792 | 650 | </rect> | ||
1793 | 651 | </property> | ||
1794 | 652 | <property name="title"> | ||
1795 | 653 | <string>Outline</string> | ||
1796 | 654 | </property> | ||
1797 | 655 | <widget class="QWidget" name="layoutWidget_3"> | ||
1798 | 656 | <property name="geometry"> | ||
1799 | 657 | <rect> | ||
1800 | 658 | <x>10</x> | ||
1801 | 659 | <y>20</y> | ||
1802 | 660 | <width>281</width> | ||
1803 | 661 | <height>58</height> | ||
1804 | 662 | </rect> | ||
1805 | 663 | </property> | ||
1806 | 664 | <layout class="QFormLayout" name="OutlineformLayout"> | ||
1807 | 665 | <item row="0" column="0"> | ||
1808 | 666 | <widget class="QCheckBox" name="OutlineCheckBox"> | ||
1809 | 667 | <property name="text"> | ||
1810 | 668 | <string>Use Outline</string> | ||
1811 | 669 | </property> | ||
1812 | 670 | </widget> | ||
1813 | 671 | </item> | ||
1814 | 672 | <item row="1" column="0"> | ||
1815 | 673 | <widget class="QLabel" name="OutlineColorLabel"> | ||
1816 | 674 | <property name="text"> | ||
1817 | 675 | <string>Outline Color:</string> | ||
1818 | 676 | </property> | ||
1819 | 677 | </widget> | ||
1820 | 678 | </item> | ||
1821 | 679 | <item row="1" column="1"> | ||
1822 | 680 | <widget class="QPushButton" name="OutlineColorPushButton"> | ||
1823 | 681 | <property name="text"> | ||
1824 | 682 | <string/> | ||
1825 | 683 | </property> | ||
1826 | 684 | </widget> | ||
1827 | 685 | </item> | ||
1828 | 686 | </layout> | ||
1829 | 687 | </widget> | ||
1830 | 688 | </widget> | ||
1831 | 689 | </widget> | ||
1832 | 690 | </widget> | ||
1833 | 691 | </widget> | ||
1834 | 692 | </item> | ||
1835 | 693 | <item> | ||
1836 | 694 | <widget class="QWidget" name="RightSide" native="true"> | ||
1837 | 695 | <widget class="QLabel" name="ThemePreview"> | ||
1838 | 696 | <property name="geometry"> | ||
1839 | 697 | <rect> | ||
1840 | 698 | <x>20</x> | ||
1841 | 699 | <y>60</y> | ||
1842 | 700 | <width>311</width> | ||
1843 | 701 | <height>271</height> | ||
1844 | 702 | </rect> | ||
1845 | 703 | </property> | ||
1846 | 704 | <property name="frameShape"> | ||
1847 | 705 | <enum>QFrame::Box</enum> | ||
1848 | 706 | </property> | ||
1849 | 707 | <property name="frameShadow"> | ||
1850 | 708 | <enum>QFrame::Raised</enum> | ||
1851 | 709 | </property> | ||
1852 | 710 | <property name="lineWidth"> | ||
1853 | 711 | <number>2</number> | ||
1854 | 712 | </property> | ||
1855 | 713 | <property name="text"> | ||
1856 | 714 | <string/> | ||
1857 | 715 | </property> | ||
1858 | 716 | <property name="scaledContents"> | ||
1859 | 717 | <bool>true</bool> | ||
1860 | 718 | </property> | ||
1861 | 719 | </widget> | ||
1862 | 720 | </widget> | ||
1863 | 721 | </item> | ||
1864 | 722 | </layout> | ||
1865 | 723 | </widget> | ||
1866 | 724 | </widget> | ||
1867 | 725 | <resources> | ||
1868 | 726 | <include location="../images/openlp-2.qrc"/> | ||
1869 | 727 | </resources> | ||
1870 | 728 | <connections/> | ||
1871 | 729 | </ui> |
Add Theme Editing (Start of)
Changes to XML handling for Themes
Add Theme event handling for plugins so they know when the theme list has changed