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