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

Proposed by Tim Bentley
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
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+5460@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

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

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

+ log=logging.getLogger(u'OpenLP Application')

I'd just use getLogger(''), which is the root logger.

+ for i in range (0 , self.desktop().numScreens()):

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[index.row()] instead of this function (but there might
be a good reason for the abstraction).

+ log.debug(u'Handle event called with event %s'%event.event_type)

Pass event_type as a parameter.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Watch your spaces, and preferably name your counter something interesting:

  for i in range (0 , self.desktop().numScreens()):
      screens.insert(i, (i+1, self.desktop().availableGeometry(i+1)))
      log.info(u'Screen %d found with resolution %s', i+1, self.desktop().availableGeometry(i+1))

  should be:

  for screen in range(0, self.desktop().numScreens()):
      screens.insert(screen, (screen + 1, self.desktop().availableGeometry(screen + 1)))
      log.info(u'Screen %d found with resolution %s', screen + 1, self.desktop().availableGeometry(screen + 1))

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':
      background.setAttribute(u'mode', u'opaque')
      background.setAttribute(u'type', u'color')
      color = self.theme_xml.createElement(u'color')
      # do the rest of your "color" stuff here
  elif background_type == u'gradient':
      background.setAttribute(u'mode', u'opaque')
      background.setAttribute(u'type', u'gradient')
      startColor = self.theme_xml.createElement(u'startColor')
      endColor = self.theme_xml.createElement(u'endColor')
      # 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=self._render_lines_unaligned(lines, False, (x,y))
  => bbox = self._render_lines_unaligned(lines, False, (x, y))

  bbox=self._render_lines_unaligned(lines1, True, (x,y) )
  => bbox = self._render_lines_unaligned(lines1, True, (x, y))

  (plenty other places)

review: Approve
lp:~trb143/openlp/ThemeManager2 updated
431. By Tim Bentley

<email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'openlp.pyw'
--- openlp.pyw 2009-03-10 16:46:25 +0000
+++ openlp.pyw 2009-04-10 05:59:40 +0000
@@ -26,29 +26,37 @@
26from openlp.core.lib import Receiver26from openlp.core.lib import Receiver
2727
28logging.basicConfig(level=logging.DEBUG,28logging.basicConfig(level=logging.DEBUG,
29 format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',29 format=u'%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
30 datefmt='%m-%d %H:%M',30 datefmt=u'%m-%d %H:%M',
31 filename='openlp.log',31 filename=u'openlp.log',
32 filemode='w')32 filemode=u'w')
3333
34from openlp.core.resources import *34from openlp.core.resources import *
35from openlp.core.ui import MainWindow, SplashScreen35from openlp.core.ui import MainWindow, SplashScreen
3636
37class OpenLP(QtGui.QApplication):37class OpenLP(QtGui.QApplication):
38 global log
39 log=logging.getLogger(u'OpenLP Application')
40 log.info(u'Application Loaded')
3841
39 def run(self):42 def run(self):
40 #provide a listener for widgets to reqest a screen update.43 #provide a listener for widgets to reqest a screen update.
41 QtCore.QObject.connect(Receiver.get_receiver(),44 QtCore.QObject.connect(Receiver.get_receiver(),
42 QtCore.SIGNAL('openlpprocessevents'), self.processEvents)45 QtCore.SIGNAL(u'openlpprocessevents'), self.processEvents)
4346
44 self.setApplicationName('openlp.org')47 self.setApplicationName(u'openlp.org')
45 self.setApplicationVersion('1.9.0')48 self.setApplicationVersion(u'1.9.0')
46 self.splash = SplashScreen()49 self.splash = SplashScreen()
47 self.splash.show()50 self.splash.show()
48 # make sure Qt really display the splash screen51 # make sure Qt really display the splash screen
49 self.processEvents()52 self.processEvents()
50 # start tha main app window53 screens = []
51 self.main_window = MainWindow()54 # Decide how many screens we have and their size
55 for i in range (0 , self.desktop().numScreens()):
56 screens.insert(i, (i+1, self.desktop().availableGeometry(i+1)))
57 log.info(u'Screen %d found with resolution %s', i+1, self.desktop().availableGeometry(i+1))
58 # start the main app window
59 self.main_window = MainWindow(screens)
52 self.main_window.show()60 self.main_window.show()
53 # now kill the splashscreen61 # now kill the splashscreen
54 self.splash.finish(self.main_window.main_window)62 self.splash.finish(self.main_window.main_window)
5563
=== modified file 'openlp/core/lib/themexmlhandler.py'
--- openlp/core/lib/themexmlhandler.py 2009-04-07 19:45:21 +0000
+++ openlp/core/lib/themexmlhandler.py 2009-04-11 07:33:45 +0000
@@ -52,23 +52,30 @@
52 background.setAttribute(u'type', u'solid')52 background.setAttribute(u'type', u'solid')
53 self.theme.appendChild(background)53 self.theme.appendChild(background)
5454
55 color = self.theme_xml.createElement(u'color')55 color = self.theme_xml.createElement(u'color1')
56 bkc = self.theme_xml.createTextNode(bkcolor)56 bkc = self.theme_xml.createTextNode(bkcolor)
57 color.appendChild(bkc)57 color.appendChild(bkc)
58 background.appendChild(color)58 background.appendChild(color)
5959
60 color = self.theme_xml.createElement(u'color2')
61 background.appendChild(color)
62
63 color = self.theme_xml.createElement(u'direction')
64 background.appendChild(color)
65
66
60 def add_background_gradient(self, startcolor, endcolor, direction):67 def add_background_gradient(self, startcolor, endcolor, direction):
61 background = self.theme_xml.createElement(u'background')68 background = self.theme_xml.createElement(u'background')
62 background.setAttribute(u'mode', u'opaque')69 background.setAttribute(u'mode', u'opaque')
63 background.setAttribute(u'type', u'Gradient')70 background.setAttribute(u'type', u'gradient')
64 self.theme.appendChild(background)71 self.theme.appendChild(background)
6572
66 color = self.theme_xml.createElement(u'startColor')73 color = self.theme_xml.createElement(u'color1')
67 bkc = self.theme_xml.createTextNode(startcolor)74 bkc = self.theme_xml.createTextNode(startcolor)
68 color.appendChild(bkc)75 color.appendChild(bkc)
69 background.appendChild(color)76 background.appendChild(color)
7077
71 color = self.theme_xml.createElement(u'endColor')78 color = self.theme_xml.createElement(u'color2')
72 bkc = self.theme_xml.createTextNode(endcolor)79 bkc = self.theme_xml.createTextNode(endcolor)
73 color.appendChild(bkc)80 color.appendChild(bkc)
74 background.appendChild(color)81 background.appendChild(color)
@@ -89,7 +96,7 @@
89 color.appendChild(bkc)96 color.appendChild(bkc)
90 background.appendChild(color)97 background.appendChild(color)
9198
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):
93 background = self.theme_xml.createElement(u'font')100 background = self.theme_xml.createElement(u'font')
94 background.setAttribute(u'type',fonttype)101 background.setAttribute(u'type',fonttype)
95 self.theme.appendChild(background)102 self.theme.appendChild(background)
@@ -109,6 +116,14 @@
109 name.appendChild(fn)116 name.appendChild(fn)
110 background.appendChild(name)117 background.appendChild(name)
111118
119 name = self.theme_xml.createElement(u'location')
120 name.setAttribute(u'override',override)
121 name.setAttribute(u'x',str(xpos))
122 name.setAttribute(u'y',str(ypos))
123 name.setAttribute(u'width',str(width))
124 name.setAttribute(u'height',str(height))
125 background.appendChild(name)
126
112 def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap):127 def add_display(self, shadow, shadowColor, outline, outlineColor, horizontal, vertical, wrap):
113 background = self.theme_xml.createElement(u'display')128 background = self.theme_xml.createElement(u'display')
114 self.theme.appendChild(background)129 self.theme.appendChild(background)
115130
=== modified file 'openlp/core/render.py'
--- openlp/core/render.py 2009-04-06 18:45:45 +0000
+++ openlp/core/render.py 2009-04-11 07:33:45 +0000
@@ -23,7 +23,7 @@
23from PyQt4 import QtGui, QtCore, Qt23from PyQt4 import QtGui, QtCore, Qt
2424
25from copy import copy25from copy import copy
26from interpolate import interpolate26#from interpolate import interpolate
2727
28class Renderer:28class Renderer:
2929
@@ -116,9 +116,10 @@
116 retval=self._render_lines(words)116 retval=self._render_lines(words)
117 return retval117 return retval
118118
119 def set_text_rectangle(self, rect):119 def set_text_rectangle(self, rect_main, rect_footer):
120 """ Sets the rectangle within which text should be rendered"""120 """ Sets the rectangle within which text should be rendered"""
121 self._rect=rect121 self._rect=rect_main
122 self._rect_footer=rect_footer
122123
123 def _render_background(self):124 def _render_background(self):
124 assert(self._theme)125 assert(self._theme)
@@ -127,8 +128,8 @@
127 p=QtGui.QPainter()128 p=QtGui.QPainter()
128 p.begin(self._paint)129 p.begin(self._paint)
129 if self._theme.background_type == u'solid':130 if self._theme.background_type == u'solid':
130 p.fillRect(self._paint.rect(), QtGui.QColor(self._theme.background_color))131 p.fillRect(self._paint.rect(), QtGui.QColor(self._theme.background_color1))
131 elif self._theme.background_type == u'Gradient' : # gradient132 elif self._theme.background_type == u'gradient' : # gradient
132 gradient = None133 gradient = None
133 if self._theme.background_direction == u'vertical':134 if self._theme.background_direction == u'vertical':
134 w = int(self._paint.width())/2135 w = int(self._paint.width())/2
@@ -141,8 +142,8 @@
141 h = int(self._paint.height())/2142 h = int(self._paint.height())/2
142 gradient = QtGui.QRadialGradient(w, h, w) # Circular143 gradient = QtGui.QRadialGradient(w, h, w) # Circular
143144
144 gradient.setColorAt(0, QtGui.QColor(self._theme.background_startColor))145 gradient.setColorAt(0, QtGui.QColor(self._theme.background_color1))
145 gradient.setColorAt(1, QtGui.QColor(self._theme.background_endColor))146 gradient.setColorAt(1, QtGui.QColor(self._theme.background_color2))
146147
147 p.setBrush(QtGui.QBrush(gradient))148 p.setBrush(QtGui.QBrush(gradient))
148 rectPath = QtGui.QPainterPath()149 rectPath = QtGui.QPainterPath()
@@ -230,29 +231,40 @@
230231
231 return retval232 return retval
232233
233 def _render_lines(self, lines):234 def _correctAlignment(self, rect, bbox):
235 x=rect.left()
236 if int(self._theme.display_verticalAlign) == 0: # top align
237 y = rect.top()
238 elif int(self._theme.display_verticalAlign) == 1: # bottom align
239 y=rect.bottom()-bbox.height()
240 elif int(t.display_verticalAlign) == 2: # centre align
241 y=rect.top()+(rect.height()-bbox.height())/2
242 else:
243 assert(0, u'Invalid value for theme.VerticalAlign:%s' % self._theme.display_verticalAlign)
244 return x, y
245
246 def _render_lines(self, lines, lines1=None):
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"""
235 #log.debug(u'_render_lines %s', lines)248 #log.debug(u'_render_lines %s', lines)
236249
237 bbox=self._render_lines_unaligned(lines)250 bbox=self._render_lines_unaligned(lines, False) # Main font
251 if lines1 is not None:
252 bbox1=self._render_lines_unaligned(lines1, True) # Footer Font
238253
239 t=self._theme254 # put stuff on background so need to reset before doing the job properly.
240 x=self._rect.left()
241 if int(t.display_verticalAlign) == 0: # top align
242 y = self._rect.top()
243 elif int(t.display_verticalAlign) == 1: # bottom align
244 y=self._rect.bottom()-bbox.height()
245 elif int(t.display_verticalAlign) == 2: # centre align
246 y=self._rect.top()+(self._rect.height()-bbox.height())/2
247 else:
248 assert(0, u'Invalid value for theme.VerticalAlign:%s' % t.display_verticalAlign)
249 self._render_background()255 self._render_background()
250 bbox=self._render_lines_unaligned(lines, (x,y))256 x, y = self._correctAlignment(self._rect, bbox)
257 bbox=self._render_lines_unaligned(lines, False, (x,y))
258
259 if lines1 is not None:
260 x, y = self._correctAlignment(self._rect_footer, bbox1)
261 bbox=self._render_lines_unaligned(lines1, True, (x,y) )
262
251 log.debug(u'render lines DONE')263 log.debug(u'render lines DONE')
252264
253 return bbox265 return bbox
254266
255 def _render_lines_unaligned(self, lines, tlcorner=(0,0)):267 def _render_lines_unaligned(self, lines, footer, tlcorner=(0,0)):
256268
257 """Given a list of lines to render, render each one in turn269 """Given a list of lines to render, render each one in turn
258 (using the _render_single_line fn - which may result in going270 (using the _render_single_line fn - which may result in going
@@ -269,7 +281,7 @@
269 continue281 continue
270 # render after current bottom, but at original left edge282 # render after current bottom, but at original left edge
271 # keep track of right edge to see which is biggest283 # keep track of right edge to see which is biggest
272 (thisx, bry) = self._render_single_line(line, (x,bry))284 (thisx, bry) = self._render_single_line(line, footer, (x,bry))
273 if (thisx > brx):285 if (thisx > brx):
274 brx=thisx286 brx=thisx
275 retval=QtCore.QRect(x,y,brx-x, bry-y)287 retval=QtCore.QRect(x,y,brx-x, bry-y)
@@ -283,7 +295,7 @@
283295
284 return retval296 return retval
285297
286 def _render_single_line(self, line, tlcorner=(0,0)):298 def _render_single_line(self, line, footer, tlcorner=(0,0)):
287299
288 """render a single line of words onto the DC, top left corner300 """render a single line of words onto the DC, top left corner
289 specified.301 specified.
@@ -307,7 +319,7 @@
307 lines=[]319 lines=[]
308 maxx=self._rect.width(); maxy=self._rect.height();320 maxx=self._rect.width(); maxy=self._rect.height();
309 while (len(words)>0):321 while (len(words)>0):
310 w,h=self._get_extent_and_render(thisline)322 w,h=self._get_extent_and_render(thisline, footer)
311 rhs=w+x323 rhs=w+x
312 if rhs < maxx-self._right_margin:324 if rhs < maxx-self._right_margin:
313 lines.append(thisline)325 lines.append(thisline)
@@ -327,7 +339,7 @@
327 for linenum in range(len(lines)):339 for linenum in range(len(lines)):
328 line=lines[linenum]340 line=lines[linenum]
329 #find out how wide line is341 #find out how wide line is
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)
331343
332 if t.display_shadow:344 if t.display_shadow:
333 w+=self._shadow_offset345 w+=self._shadow_offset
@@ -351,20 +363,20 @@
351 rightextent=x+w363 rightextent=x+w
352 # now draw the text, and any outlines/shadows364 # now draw the text, and any outlines/shadows
353 if t.display_shadow:365 if t.display_shadow:
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),
355 draw=True, color = t.display_shadow_color)367 draw=True, color = t.display_shadow_color)
356 if t.display_outline:368 if t.display_outline:
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)
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)
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)
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)
361 if self._outline_offset > 1:373 if self._outline_offset > 1:
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)
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)
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)
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)
366378
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)
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)
369 y += h381 y += h
370 if linenum == 0:382 if linenum == 0:
@@ -381,7 +393,7 @@
381 return brcorner393 return brcorner
382394
383 # xxx this is what to override for an SDL version395 # xxx this is what to override for an SDL version
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):
385 """Find bounding box of text - as render_single_line.397 """Find bounding box of text - as render_single_line.
386 If draw is set, actually draw the text to the current DC as well398 If draw is set, actually draw the text to the current DC as well
387399
388400
=== added file 'openlp/core/ui/amendthemedialog.py'
--- openlp/core/ui/amendthemedialog.py 1970-01-01 00:00:00 +0000
+++ openlp/core/ui/amendthemedialog.py 2009-04-11 05:43:52 +0000
@@ -0,0 +1,392 @@
1# -*- coding: utf-8 -*-
2
3# Form implementation generated from reading ui file 'amendthemedialog.ui'
4#
5# Created: Fri Apr 10 20:38:33 2009
6# by: PyQt4 UI code generator 4.4.4
7#
8# WARNING! All changes made in this file will be lost!
9
10from PyQt4 import QtCore, QtGui
11
12class Ui_AmendThemeDialog(object):
13 def setupUi(self, AmendThemeDialog):
14 AmendThemeDialog.setObjectName("AmendThemeDialog")
15 AmendThemeDialog.resize(752, 533)
16 icon = QtGui.QIcon()
17 icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
18 AmendThemeDialog.setWindowIcon(icon)
19 self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog)
20 self.ThemeButtonBox.setGeometry(QtCore.QRect(580, 500, 156, 26))
21 self.ThemeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
22 self.ThemeButtonBox.setObjectName("ThemeButtonBox")
23 self.layoutWidget = QtGui.QWidget(AmendThemeDialog)
24 self.layoutWidget.setGeometry(QtCore.QRect(50, 20, 441, 41))
25 self.layoutWidget.setObjectName("layoutWidget")
26 self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget)
27 self.horizontalLayout.setObjectName("horizontalLayout")
28 self.ThemeNameLabel = QtGui.QLabel(self.layoutWidget)
29 self.ThemeNameLabel.setObjectName("ThemeNameLabel")
30 self.horizontalLayout.addWidget(self.ThemeNameLabel)
31 self.ThemeNameEdit = QtGui.QLineEdit(self.layoutWidget)
32 self.ThemeNameEdit.setObjectName("ThemeNameEdit")
33 self.horizontalLayout.addWidget(self.ThemeNameEdit)
34 self.widget = QtGui.QWidget(AmendThemeDialog)
35 self.widget.setGeometry(QtCore.QRect(31, 71, 721, 411))
36 self.widget.setObjectName("widget")
37 self.horizontalLayout_2 = QtGui.QHBoxLayout(self.widget)
38 self.horizontalLayout_2.setObjectName("horizontalLayout_2")
39 self.LeftSide = QtGui.QWidget(self.widget)
40 self.LeftSide.setObjectName("LeftSide")
41 self.tabWidget = QtGui.QTabWidget(self.LeftSide)
42 self.tabWidget.setGeometry(QtCore.QRect(0, 0, 341, 401))
43 self.tabWidget.setObjectName("tabWidget")
44 self.BackgroundTab = QtGui.QWidget()
45 self.BackgroundTab.setObjectName("BackgroundTab")
46 self.layoutWidget1 = QtGui.QWidget(self.BackgroundTab)
47 self.layoutWidget1.setGeometry(QtCore.QRect(10, 10, 321, 351))
48 self.layoutWidget1.setObjectName("layoutWidget1")
49 self.gridLayout = QtGui.QGridLayout(self.layoutWidget1)
50 self.gridLayout.setObjectName("gridLayout")
51 self.BackgroundLabel = QtGui.QLabel(self.layoutWidget1)
52 self.BackgroundLabel.setObjectName("BackgroundLabel")
53 self.gridLayout.addWidget(self.BackgroundLabel, 0, 0, 1, 2)
54 self.BackgroundComboBox = QtGui.QComboBox(self.layoutWidget1)
55 self.BackgroundComboBox.setObjectName("BackgroundComboBox")
56 self.BackgroundComboBox.addItem(QtCore.QString())
57 self.BackgroundComboBox.addItem(QtCore.QString())
58 self.gridLayout.addWidget(self.BackgroundComboBox, 0, 2, 1, 2)
59 self.BackgroundTypeLabel = QtGui.QLabel(self.layoutWidget1)
60 self.BackgroundTypeLabel.setObjectName("BackgroundTypeLabel")
61 self.gridLayout.addWidget(self.BackgroundTypeLabel, 1, 0, 1, 2)
62 self.BackgroundTypeComboBox = QtGui.QComboBox(self.layoutWidget1)
63 self.BackgroundTypeComboBox.setObjectName("BackgroundTypeComboBox")
64 self.BackgroundTypeComboBox.addItem(QtCore.QString())
65 self.BackgroundTypeComboBox.addItem(QtCore.QString())
66 self.BackgroundTypeComboBox.addItem(QtCore.QString())
67 self.gridLayout.addWidget(self.BackgroundTypeComboBox, 1, 2, 1, 2)
68 self.Color1Label = QtGui.QLabel(self.layoutWidget1)
69 self.Color1Label.setObjectName("Color1Label")
70 self.gridLayout.addWidget(self.Color1Label, 2, 0, 1, 1)
71 self.Color1PushButton = QtGui.QPushButton(self.layoutWidget1)
72 self.Color1PushButton.setObjectName("Color1PushButton")
73 self.gridLayout.addWidget(self.Color1PushButton, 2, 2, 1, 2)
74 self.Color2Label = QtGui.QLabel(self.layoutWidget1)
75 self.Color2Label.setObjectName("Color2Label")
76 self.gridLayout.addWidget(self.Color2Label, 3, 0, 1, 1)
77 self.Color2PushButton = QtGui.QPushButton(self.layoutWidget1)
78 self.Color2PushButton.setObjectName("Color2PushButton")
79 self.gridLayout.addWidget(self.Color2PushButton, 3, 2, 1, 2)
80 self.ImageLabel = QtGui.QLabel(self.layoutWidget1)
81 self.ImageLabel.setObjectName("ImageLabel")
82 self.gridLayout.addWidget(self.ImageLabel, 4, 0, 1, 1)
83 self.ImageLineEdit = QtGui.QLineEdit(self.layoutWidget1)
84 self.ImageLineEdit.setObjectName("ImageLineEdit")
85 self.gridLayout.addWidget(self.ImageLineEdit, 4, 1, 1, 2)
86 self.ImagePushButton = QtGui.QPushButton(self.layoutWidget1)
87 icon1 = QtGui.QIcon()
88 icon1.addPixmap(QtGui.QPixmap(":/services/service_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
89 self.ImagePushButton.setIcon(icon1)
90 self.ImagePushButton.setObjectName("ImagePushButton")
91 self.gridLayout.addWidget(self.ImagePushButton, 4, 3, 1, 1)
92 self.GradientLabel = QtGui.QLabel(self.layoutWidget1)
93 self.GradientLabel.setObjectName("GradientLabel")
94 self.gridLayout.addWidget(self.GradientLabel, 5, 0, 1, 1)
95 self.GradientComboBox = QtGui.QComboBox(self.layoutWidget1)
96 self.GradientComboBox.setObjectName("GradientComboBox")
97 self.GradientComboBox.addItem(QtCore.QString())
98 self.GradientComboBox.addItem(QtCore.QString())
99 self.GradientComboBox.addItem(QtCore.QString())
100 self.gridLayout.addWidget(self.GradientComboBox, 5, 2, 1, 2)
101 self.tabWidget.addTab(self.BackgroundTab, "")
102 self.FontMainTab = QtGui.QWidget()
103 self.FontMainTab.setObjectName("FontMainTab")
104 self.MainFontGroupBox = QtGui.QGroupBox(self.FontMainTab)
105 self.MainFontGroupBox.setGeometry(QtCore.QRect(20, 10, 307, 119))
106 self.MainFontGroupBox.setObjectName("MainFontGroupBox")
107 self.gridLayout_2 = QtGui.QGridLayout(self.MainFontGroupBox)
108 self.gridLayout_2.setObjectName("gridLayout_2")
109 self.MainFontlabel = QtGui.QLabel(self.MainFontGroupBox)
110 self.MainFontlabel.setObjectName("MainFontlabel")
111 self.gridLayout_2.addWidget(self.MainFontlabel, 0, 0, 1, 1)
112 self.MainFontComboBox = QtGui.QFontComboBox(self.MainFontGroupBox)
113 self.MainFontComboBox.setObjectName("MainFontComboBox")
114 self.gridLayout_2.addWidget(self.MainFontComboBox, 0, 1, 1, 2)
115 self.MainFontColorLabel = QtGui.QLabel(self.MainFontGroupBox)
116 self.MainFontColorLabel.setObjectName("MainFontColorLabel")
117 self.gridLayout_2.addWidget(self.MainFontColorLabel, 1, 0, 1, 1)
118 self.MainFontColorPushButton = QtGui.QPushButton(self.MainFontGroupBox)
119 self.MainFontColorPushButton.setObjectName("MainFontColorPushButton")
120 self.gridLayout_2.addWidget(self.MainFontColorPushButton, 1, 2, 1, 1)
121 self.MainFontSize = QtGui.QLabel(self.MainFontGroupBox)
122 self.MainFontSize.setObjectName("MainFontSize")
123 self.gridLayout_2.addWidget(self.MainFontSize, 2, 0, 1, 1)
124 self.MainFontSizeLineEdit = QtGui.QLineEdit(self.MainFontGroupBox)
125 self.MainFontSizeLineEdit.setObjectName("MainFontSizeLineEdit")
126 self.gridLayout_2.addWidget(self.MainFontSizeLineEdit, 2, 1, 1, 1)
127 self.MainFontlSlider = QtGui.QSlider(self.MainFontGroupBox)
128 self.MainFontlSlider.setProperty("value", QtCore.QVariant(15))
129 self.MainFontlSlider.setMaximum(40)
130 self.MainFontlSlider.setOrientation(QtCore.Qt.Horizontal)
131 self.MainFontlSlider.setTickPosition(QtGui.QSlider.TicksBelow)
132 self.MainFontlSlider.setTickInterval(5)
133 self.MainFontlSlider.setObjectName("MainFontlSlider")
134 self.gridLayout_2.addWidget(self.MainFontlSlider, 2, 2, 1, 1)
135 self.FooterFontGroupBox = QtGui.QGroupBox(self.FontMainTab)
136 self.FooterFontGroupBox.setGeometry(QtCore.QRect(20, 160, 301, 190))
137 self.FooterFontGroupBox.setObjectName("FooterFontGroupBox")
138 self.verticalLayout = QtGui.QVBoxLayout(self.FooterFontGroupBox)
139 self.verticalLayout.setObjectName("verticalLayout")
140 self.FontMainUseDefault = QtGui.QCheckBox(self.FooterFontGroupBox)
141 self.FontMainUseDefault.setTristate(False)
142 self.FontMainUseDefault.setObjectName("FontMainUseDefault")
143 self.verticalLayout.addWidget(self.FontMainUseDefault)
144 self.horizontalLayout_3 = QtGui.QHBoxLayout()
145 self.horizontalLayout_3.setObjectName("horizontalLayout_3")
146 self.FontMainXLabel = QtGui.QLabel(self.FooterFontGroupBox)
147 self.FontMainXLabel.setObjectName("FontMainXLabel")
148 self.horizontalLayout_3.addWidget(self.FontMainXLabel)
149 self.FontMainXEdit = QtGui.QLineEdit(self.FooterFontGroupBox)
150 self.FontMainXEdit.setObjectName("FontMainXEdit")
151 self.horizontalLayout_3.addWidget(self.FontMainXEdit)
152 self.verticalLayout.addLayout(self.horizontalLayout_3)
153 self.horizontalLayout_4 = QtGui.QHBoxLayout()
154 self.horizontalLayout_4.setObjectName("horizontalLayout_4")
155 self.FontMainYLabel = QtGui.QLabel(self.FooterFontGroupBox)
156 self.FontMainYLabel.setObjectName("FontMainYLabel")
157 self.horizontalLayout_4.addWidget(self.FontMainYLabel)
158 self.FontMainYEdit = QtGui.QLineEdit(self.FooterFontGroupBox)
159 self.FontMainYEdit.setObjectName("FontMainYEdit")
160 self.horizontalLayout_4.addWidget(self.FontMainYEdit)
161 self.verticalLayout.addLayout(self.horizontalLayout_4)
162 self.horizontalLayout_5 = QtGui.QHBoxLayout()
163 self.horizontalLayout_5.setObjectName("horizontalLayout_5")
164 self.FontMainWidthLabel = QtGui.QLabel(self.FooterFontGroupBox)
165 self.FontMainWidthLabel.setObjectName("FontMainWidthLabel")
166 self.horizontalLayout_5.addWidget(self.FontMainWidthLabel)
167 self.FontMainWidthEdit = QtGui.QLineEdit(self.FooterFontGroupBox)
168 self.FontMainWidthEdit.setObjectName("FontMainWidthEdit")
169 self.horizontalLayout_5.addWidget(self.FontMainWidthEdit)
170 self.verticalLayout.addLayout(self.horizontalLayout_5)
171 self.horizontalLayout_6 = QtGui.QHBoxLayout()
172 self.horizontalLayout_6.setObjectName("horizontalLayout_6")
173 self.FontMainHeightLabel = QtGui.QLabel(self.FooterFontGroupBox)
174 self.FontMainHeightLabel.setObjectName("FontMainHeightLabel")
175 self.horizontalLayout_6.addWidget(self.FontMainHeightLabel)
176 self.FontMainHeightEdit = QtGui.QLineEdit(self.FooterFontGroupBox)
177 self.FontMainHeightEdit.setObjectName("FontMainHeightEdit")
178 self.horizontalLayout_6.addWidget(self.FontMainHeightEdit)
179 self.verticalLayout.addLayout(self.horizontalLayout_6)
180 self.tabWidget.addTab(self.FontMainTab, "")
181 self.FontFooterTab = QtGui.QWidget()
182 self.FontFooterTab.setObjectName("FontFooterTab")
183 self.FooterFontGroupBox_2 = QtGui.QGroupBox(self.FontFooterTab)
184 self.FooterFontGroupBox_2.setGeometry(QtCore.QRect(20, 160, 301, 190))
185 self.FooterFontGroupBox_2.setObjectName("FooterFontGroupBox_2")
186 self.verticalLayout_2 = QtGui.QVBoxLayout(self.FooterFontGroupBox_2)
187 self.verticalLayout_2.setObjectName("verticalLayout_2")
188 self.FontMainUseDefault_2 = QtGui.QCheckBox(self.FooterFontGroupBox_2)
189 self.FontMainUseDefault_2.setTristate(False)
190 self.FontMainUseDefault_2.setObjectName("FontMainUseDefault_2")
191 self.verticalLayout_2.addWidget(self.FontMainUseDefault_2)
192 self.horizontalLayout_7 = QtGui.QHBoxLayout()
193 self.horizontalLayout_7.setObjectName("horizontalLayout_7")
194 self.FontFooterXLabel = QtGui.QLabel(self.FooterFontGroupBox_2)
195 self.FontFooterXLabel.setObjectName("FontFooterXLabel")
196 self.horizontalLayout_7.addWidget(self.FontFooterXLabel)
197 self.FontFooterXEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2)
198 self.FontFooterXEdit.setObjectName("FontFooterXEdit")
199 self.horizontalLayout_7.addWidget(self.FontFooterXEdit)
200 self.verticalLayout_2.addLayout(self.horizontalLayout_7)
201 self.horizontalLayout_8 = QtGui.QHBoxLayout()
202 self.horizontalLayout_8.setObjectName("horizontalLayout_8")
203 self.FontFooterYLabel = QtGui.QLabel(self.FooterFontGroupBox_2)
204 self.FontFooterYLabel.setObjectName("FontFooterYLabel")
205 self.horizontalLayout_8.addWidget(self.FontFooterYLabel)
206 self.FontFooterYEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2)
207 self.FontFooterYEdit.setObjectName("FontFooterYEdit")
208 self.horizontalLayout_8.addWidget(self.FontFooterYEdit)
209 self.verticalLayout_2.addLayout(self.horizontalLayout_8)
210 self.horizontalLayout_9 = QtGui.QHBoxLayout()
211 self.horizontalLayout_9.setObjectName("horizontalLayout_9")
212 self.FontFooterWidthLabel = QtGui.QLabel(self.FooterFontGroupBox_2)
213 self.FontFooterWidthLabel.setObjectName("FontFooterWidthLabel")
214 self.horizontalLayout_9.addWidget(self.FontFooterWidthLabel)
215 self.FontFooterWidthEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2)
216 self.FontFooterWidthEdit.setObjectName("FontFooterWidthEdit")
217 self.horizontalLayout_9.addWidget(self.FontFooterWidthEdit)
218 self.verticalLayout_2.addLayout(self.horizontalLayout_9)
219 self.horizontalLayout_10 = QtGui.QHBoxLayout()
220 self.horizontalLayout_10.setObjectName("horizontalLayout_10")
221 self.FontFooterHeightLabel = QtGui.QLabel(self.FooterFontGroupBox_2)
222 self.FontFooterHeightLabel.setObjectName("FontFooterHeightLabel")
223 self.horizontalLayout_10.addWidget(self.FontFooterHeightLabel)
224 self.FontFooterHeightEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2)
225 self.FontFooterHeightEdit.setObjectName("FontFooterHeightEdit")
226 self.horizontalLayout_10.addWidget(self.FontFooterHeightEdit)
227 self.verticalLayout_2.addLayout(self.horizontalLayout_10)
228 self.FooterFontGroupBox_3 = QtGui.QGroupBox(self.FontFooterTab)
229 self.FooterFontGroupBox_3.setGeometry(QtCore.QRect(20, 10, 307, 119))
230 self.FooterFontGroupBox_3.setObjectName("FooterFontGroupBox_3")
231 self.gridLayout_3 = QtGui.QGridLayout(self.FooterFontGroupBox_3)
232 self.gridLayout_3.setObjectName("gridLayout_3")
233 self.FontFooterlabel = QtGui.QLabel(self.FooterFontGroupBox_3)
234 self.FontFooterlabel.setObjectName("FontFooterlabel")
235 self.gridLayout_3.addWidget(self.FontFooterlabel, 0, 0, 1, 1)
236 self.FontFooterComboBox = QtGui.QFontComboBox(self.FooterFontGroupBox_3)
237 self.FontFooterComboBox.setObjectName("FontFooterComboBox")
238 self.gridLayout_3.addWidget(self.FontFooterComboBox, 0, 1, 1, 2)
239 self.FontFooterColorLabel = QtGui.QLabel(self.FooterFontGroupBox_3)
240 self.FontFooterColorLabel.setObjectName("FontFooterColorLabel")
241 self.gridLayout_3.addWidget(self.FontFooterColorLabel, 1, 0, 1, 1)
242 self.FontFooterColorPushButton = QtGui.QPushButton(self.FooterFontGroupBox_3)
243 self.FontFooterColorPushButton.setObjectName("FontFooterColorPushButton")
244 self.gridLayout_3.addWidget(self.FontFooterColorPushButton, 1, 2, 1, 1)
245 self.FontFooterSizeLabel = QtGui.QLabel(self.FooterFontGroupBox_3)
246 self.FontFooterSizeLabel.setObjectName("FontFooterSizeLabel")
247 self.gridLayout_3.addWidget(self.FontFooterSizeLabel, 2, 0, 1, 1)
248 self.FontFooterSizeLineEdit = QtGui.QLineEdit(self.FooterFontGroupBox_3)
249 self.FontFooterSizeLineEdit.setObjectName("FontFooterSizeLineEdit")
250 self.gridLayout_3.addWidget(self.FontFooterSizeLineEdit, 2, 1, 1, 1)
251 self.FontFooterSlider = QtGui.QSlider(self.FooterFontGroupBox_3)
252 self.FontFooterSlider.setProperty("value", QtCore.QVariant(15))
253 self.FontFooterSlider.setMaximum(40)
254 self.FontFooterSlider.setOrientation(QtCore.Qt.Horizontal)
255 self.FontFooterSlider.setTickPosition(QtGui.QSlider.TicksBelow)
256 self.FontFooterSlider.setTickInterval(5)
257 self.FontFooterSlider.setObjectName("FontFooterSlider")
258 self.gridLayout_3.addWidget(self.FontFooterSlider, 2, 2, 1, 1)
259 self.tabWidget.addTab(self.FontFooterTab, "")
260 self.OptionsTab = QtGui.QWidget()
261 self.OptionsTab.setObjectName("OptionsTab")
262 self.ShadowGroupBox = QtGui.QGroupBox(self.OptionsTab)
263 self.ShadowGroupBox.setGeometry(QtCore.QRect(20, 10, 301, 80))
264 self.ShadowGroupBox.setObjectName("ShadowGroupBox")
265 self.layoutWidget2 = QtGui.QWidget(self.ShadowGroupBox)
266 self.layoutWidget2.setGeometry(QtCore.QRect(10, 20, 281, 58))
267 self.layoutWidget2.setObjectName("layoutWidget2")
268 self.formLayout = QtGui.QFormLayout(self.layoutWidget2)
269 self.formLayout.setObjectName("formLayout")
270 self.ShadowCheckBox = QtGui.QCheckBox(self.layoutWidget2)
271 self.ShadowCheckBox.setObjectName("ShadowCheckBox")
272 self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.ShadowCheckBox)
273 self.ShadowColorLabel = QtGui.QLabel(self.layoutWidget2)
274 self.ShadowColorLabel.setObjectName("ShadowColorLabel")
275 self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.ShadowColorLabel)
276 self.ShadowColorPushButton = QtGui.QPushButton(self.layoutWidget2)
277 self.ShadowColorPushButton.setObjectName("ShadowColorPushButton")
278 self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ShadowColorPushButton)
279 self.AlignmentGroupBox = QtGui.QGroupBox(self.OptionsTab)
280 self.AlignmentGroupBox.setGeometry(QtCore.QRect(10, 200, 321, 161))
281 self.AlignmentGroupBox.setObjectName("AlignmentGroupBox")
282 self.gridLayout_4 = QtGui.QGridLayout(self.AlignmentGroupBox)
283 self.gridLayout_4.setObjectName("gridLayout_4")
284 self.HorizontalLabel = QtGui.QLabel(self.AlignmentGroupBox)
285 self.HorizontalLabel.setObjectName("HorizontalLabel")
286 self.gridLayout_4.addWidget(self.HorizontalLabel, 0, 0, 1, 1)
287 self.HorizontalComboBox = QtGui.QComboBox(self.AlignmentGroupBox)
288 self.HorizontalComboBox.setObjectName("HorizontalComboBox")
289 self.HorizontalComboBox.addItem(QtCore.QString())
290 self.HorizontalComboBox.addItem(QtCore.QString())
291 self.HorizontalComboBox.addItem(QtCore.QString())
292 self.gridLayout_4.addWidget(self.HorizontalComboBox, 0, 1, 1, 1)
293 self.VerticalLabel = QtGui.QLabel(self.AlignmentGroupBox)
294 self.VerticalLabel.setObjectName("VerticalLabel")
295 self.gridLayout_4.addWidget(self.VerticalLabel, 1, 0, 1, 1)
296 self.VerticalComboBox = QtGui.QComboBox(self.AlignmentGroupBox)
297 self.VerticalComboBox.setObjectName("VerticalComboBox")
298 self.VerticalComboBox.addItem(QtCore.QString())
299 self.VerticalComboBox.addItem(QtCore.QString())
300 self.VerticalComboBox.addItem(QtCore.QString())
301 self.gridLayout_4.addWidget(self.VerticalComboBox, 1, 1, 1, 1)
302 self.OutlineGroupBox = QtGui.QGroupBox(self.OptionsTab)
303 self.OutlineGroupBox.setGeometry(QtCore.QRect(20, 110, 301, 80))
304 self.OutlineGroupBox.setObjectName("OutlineGroupBox")
305 self.layoutWidget_3 = QtGui.QWidget(self.OutlineGroupBox)
306 self.layoutWidget_3.setGeometry(QtCore.QRect(10, 20, 281, 58))
307 self.layoutWidget_3.setObjectName("layoutWidget_3")
308 self.OutlineformLayout = QtGui.QFormLayout(self.layoutWidget_3)
309 self.OutlineformLayout.setObjectName("OutlineformLayout")
310 self.OutlineCheckBox = QtGui.QCheckBox(self.layoutWidget_3)
311 self.OutlineCheckBox.setObjectName("OutlineCheckBox")
312 self.OutlineformLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.OutlineCheckBox)
313 self.OutlineColorLabel = QtGui.QLabel(self.layoutWidget_3)
314 self.OutlineColorLabel.setObjectName("OutlineColorLabel")
315 self.OutlineformLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.OutlineColorLabel)
316 self.OutlineColorPushButton = QtGui.QPushButton(self.layoutWidget_3)
317 self.OutlineColorPushButton.setObjectName("OutlineColorPushButton")
318 self.OutlineformLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.OutlineColorPushButton)
319 self.tabWidget.addTab(self.OptionsTab, "")
320 self.horizontalLayout_2.addWidget(self.LeftSide)
321 self.RightSide = QtGui.QWidget(self.widget)
322 self.RightSide.setObjectName("RightSide")
323 self.ThemePreview = QtGui.QLabel(self.RightSide)
324 self.ThemePreview.setGeometry(QtCore.QRect(20, 60, 311, 271))
325 self.ThemePreview.setFrameShape(QtGui.QFrame.Box)
326 self.ThemePreview.setFrameShadow(QtGui.QFrame.Raised)
327 self.ThemePreview.setLineWidth(2)
328 self.ThemePreview.setScaledContents(True)
329 self.ThemePreview.setObjectName("ThemePreview")
330 self.horizontalLayout_2.addWidget(self.RightSide)
331
332 self.retranslateUi(AmendThemeDialog)
333 self.tabWidget.setCurrentIndex(0)
334 QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog)
335
336 def retranslateUi(self, AmendThemeDialog):
337 AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintance", None, QtGui.QApplication.UnicodeUTF8))
338 self.ThemeNameLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Theme Name", None, QtGui.QApplication.UnicodeUTF8))
339 self.BackgroundLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background:", None, QtGui.QApplication.UnicodeUTF8))
340 self.BackgroundComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Opaque", None, QtGui.QApplication.UnicodeUTF8))
341 self.BackgroundComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Transparent", None, QtGui.QApplication.UnicodeUTF8))
342 self.BackgroundTypeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background Type:", None, QtGui.QApplication.UnicodeUTF8))
343 self.BackgroundTypeComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Solid Color", None, QtGui.QApplication.UnicodeUTF8))
344 self.BackgroundTypeComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Gradient", None, QtGui.QApplication.UnicodeUTF8))
345 self.BackgroundTypeComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Image", None, QtGui.QApplication.UnicodeUTF8))
346 self.Color1Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "<Color1>", None, QtGui.QApplication.UnicodeUTF8))
347 self.Color2Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "<Color2>", None, QtGui.QApplication.UnicodeUTF8))
348 self.ImageLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Image:", None, QtGui.QApplication.UnicodeUTF8))
349 self.GradientLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Gradient :", None, QtGui.QApplication.UnicodeUTF8))
350 self.GradientComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Horizontal", None, QtGui.QApplication.UnicodeUTF8))
351 self.GradientComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Vertical", None, QtGui.QApplication.UnicodeUTF8))
352 self.GradientComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Circular", None, QtGui.QApplication.UnicodeUTF8))
353 self.tabWidget.setTabText(self.tabWidget.indexOf(self.BackgroundTab), QtGui.QApplication.translate("AmendThemeDialog", "Background", None, QtGui.QApplication.UnicodeUTF8))
354 self.MainFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Main Font", None, QtGui.QApplication.UnicodeUTF8))
355 self.MainFontlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8))
356 self.MainFontColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color", None, QtGui.QApplication.UnicodeUTF8))
357 self.MainFontSize.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8))
358 self.FooterFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8))
359 self.FontMainUseDefault.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use default location", None, QtGui.QApplication.UnicodeUTF8))
360 self.FontMainXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8))
361 self.FontMainYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8))
362 self.FontMainWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width", None, QtGui.QApplication.UnicodeUTF8))
363 self.FontMainHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height", None, QtGui.QApplication.UnicodeUTF8))
364 self.tabWidget.setTabText(self.tabWidget.indexOf(self.FontMainTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Main", None, QtGui.QApplication.UnicodeUTF8))
365 self.FooterFontGroupBox_2.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8))
366 self.FontMainUseDefault_2.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use default location", None, QtGui.QApplication.UnicodeUTF8))
367 self.FontFooterXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8))
368 self.FontFooterYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8))
369 self.FontFooterWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width", None, QtGui.QApplication.UnicodeUTF8))
370 self.FontFooterHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height", None, QtGui.QApplication.UnicodeUTF8))
371 self.FooterFontGroupBox_3.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Footer Font", None, QtGui.QApplication.UnicodeUTF8))
372 self.FontFooterlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8))
373 self.FontFooterColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color", None, QtGui.QApplication.UnicodeUTF8))
374 self.FontFooterSizeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8))
375 self.tabWidget.setTabText(self.tabWidget.indexOf(self.FontFooterTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Footer", None, QtGui.QApplication.UnicodeUTF8))
376 self.ShadowGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Shadow", None, QtGui.QApplication.UnicodeUTF8))
377 self.ShadowCheckBox.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Shadow", None, QtGui.QApplication.UnicodeUTF8))
378 self.ShadowColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Shadow Color:", None, QtGui.QApplication.UnicodeUTF8))
379 self.AlignmentGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8))
380 self.HorizontalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Horizontal Align:", None, QtGui.QApplication.UnicodeUTF8))
381 self.HorizontalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Left", None, QtGui.QApplication.UnicodeUTF8))
382 self.HorizontalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Right", None, QtGui.QApplication.UnicodeUTF8))
383 self.HorizontalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Center", None, QtGui.QApplication.UnicodeUTF8))
384 self.VerticalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Vertical Align:", None, QtGui.QApplication.UnicodeUTF8))
385 self.VerticalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Top", None, QtGui.QApplication.UnicodeUTF8))
386 self.VerticalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Middle", None, QtGui.QApplication.UnicodeUTF8))
387 self.VerticalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Bottom", None, QtGui.QApplication.UnicodeUTF8))
388 self.OutlineGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Outline", None, QtGui.QApplication.UnicodeUTF8))
389 self.OutlineCheckBox.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Outline", None, QtGui.QApplication.UnicodeUTF8))
390 self.OutlineColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Outline Color:", None, QtGui.QApplication.UnicodeUTF8))
391 self.tabWidget.setTabText(self.tabWidget.indexOf(self.OptionsTab), QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8))
392
0393
=== added file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py 1970-01-01 00:00:00 +0000
+++ openlp/core/ui/amendthemeform.py 2009-04-11 15:16:02 +0000
@@ -0,0 +1,229 @@
1# -*- coding: utf-8 -*-
2# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
3"""
4OpenLP - Open Source Lyrics Projection
5Copyright (c) 2008 Raoul Snyman
6Portions copyright (c) 2008 Martin Thompson, Tim Bentley,
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free Software
10Foundation; version 2 of the License.
11
12This program is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14PARTICULAR PURPOSE. See the GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License along with
17this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18Place, Suite 330, Boston, MA 02111-1307 USA
19"""
20import logging
21import os, os.path
22
23from PyQt4 import QtCore, QtGui
24from PyQt4.QtGui import QColor, QFont
25from openlp.core.lib import ThemeXML
26from openlp.core import fileToXML
27from openlp.core import Renderer
28from openlp.core import translate
29
30from amendthemedialog import Ui_AmendThemeDialog
31
32log = logging.getLogger(u'AmendThemeForm')
33
34class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
35
36 def __init__(self, parent=None):
37 QtGui.QDialog.__init__(self, parent)
38 self.setupUi(self)
39
40 #define signals
41 #Exits
42 QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL("accepted()"), self.accept)
43 QtCore.QObject.connect(self.ThemeButtonBox, QtCore.SIGNAL("rejected()"), self.close)
44 #Buttons
45 QtCore.QObject.connect(self.Color1PushButton ,
46 QtCore.SIGNAL("pressed()"), self.onColor1PushButtonClicked)
47 QtCore.QObject.connect(self.Color2PushButton ,
48 QtCore.SIGNAL("pressed()"), self.onColor2PushButtonClicked)
49 QtCore.QObject.connect(self.MainFontColorPushButton,
50 QtCore.SIGNAL("pressed()"), self.onMainFontColorPushButtonClicked)
51 QtCore.QObject.connect(self.FontFooterColorPushButton,
52 QtCore.SIGNAL("pressed()"), self.onFontFooterColorPushButtonClicked)
53 #Combo boxes
54 QtCore.QObject.connect(self.BackgroundComboBox,
55 QtCore.SIGNAL("activated(int)"), self.onBackgroundComboBoxSelected)
56 QtCore.QObject.connect(self.BackgroundTypeComboBox,
57 QtCore.SIGNAL("activated(int)"), self.onBackgroundTypeComboBoxSelected)
58 QtCore.QObject.connect(self.GradientComboBox,
59 QtCore.SIGNAL("activated(int)"), self.onGradientComboBoxSelected)
60
61
62 def accept(self):
63 return QtGui.QDialog.accept(self)
64
65 def themePath(self, path):
66 self.path = path
67
68 def loadTheme(self, theme):
69 self.theme = ThemeXML()
70 if theme == None:
71 self.theme.parse(self.baseTheme())
72 else:
73 xml_file = os.path.join(self.path, theme, theme+u'.xml')
74 xml = fileToXML(xml_file)
75 self.theme.parse(xml)
76 self.paintUi(self.theme)
77 self.generateImage(self.theme)
78
79 def onGradientComboBoxSelected(self):
80 if self.GradientComboBox.currentIndex() == 0: # Horizontal
81 self.theme.background_direction = u'horizontal'
82 elif self.GradientComboBox.currentIndex() == 1: # vertical
83 self.theme.background_direction = u'vertical'
84 else:
85 self.theme.background_direction = u'circular'
86 self.stateChanging(self.theme)
87 self.generateImage(self.theme)
88
89 def onBackgroundComboBoxSelected(self):
90 if self.BackgroundComboBox.currentIndex() == 0: # Opaque
91 self.theme.background_mode = u'opaque'
92 else:
93 self.theme.background_mode = u'transparent'
94 self.stateChanging(self.theme)
95 self.generateImage(self.theme)
96
97 def onBackgroundTypeComboBoxSelected(self):
98 if self.BackgroundTypeComboBox.currentIndex() == 0: # Solid
99 self.theme.background_type = u'solid'
100 elif self.BackgroundTypeComboBox.currentIndex() == 1: # Gradient
101 self.theme.background_type = u'gradient'
102 if self.theme.background_direction == None: # never defined
103 self.theme.background_direction = u'horizontal'
104 self.theme.background_color2 = u'#000000'
105 else:
106 self.theme.background_type = u'image'
107 self.stateChanging(self.theme)
108 self.generateImage(self.theme)
109
110 def onColor1PushButtonClicked(self):
111 self.theme.background_color1 = QtGui.QColorDialog.getColor(
112 QColor(self.theme.background_color1), self).name()
113 self.Color1PushButton.setStyleSheet(
114 'background-color: %s' % str(self.theme.background_color1))
115
116 self.generateImage(self.theme)
117
118 def onColor2PushButtonClicked(self):
119 self.theme.background_color2 = QtGui.QColorDialog.getColor(
120 QColor(self.theme.background_color2), self).name()
121 self.Color2PushButton.setStyleSheet(
122 'background-color: %s' % str(self.theme.background_color2))
123
124 self.generateImage(self.theme)
125
126 def onMainFontColorPushButtonClicked(self):
127 self.theme.font_main_color = QtGui.QColorDialog.getColor(
128 QColor(self.theme.font_main_color), self).name()
129
130 self.MainFontColorPushButton.setStyleSheet(
131 'background-color: %s' % str(self.theme.font_main_color))
132 self.generateImage(self.theme)
133
134 def onFontFooterColorPushButtonClicked(self):
135 self.theme.font_footer_color = QtGui.QColorDialog.getColor(
136 QColor(self.theme.font_footer_color), self).name()
137
138 self.FontFooterColorPushButton.setStyleSheet(
139 'background-color: %s' % str(self.theme.font_footer_color))
140 self.generateImage(self.theme)
141
142 def baseTheme(self):
143 log.debug(u'base Theme')
144 newtheme = ThemeXML()
145 newtheme.new_document(u'New Theme')
146 newtheme.add_background_solid(str(u'#000000'))
147 newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(30), u'False')
148 newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer')
149 newtheme.add_display(str(False), str(u'#FFFFFF'), str(False), str(u'#FFFFFF'),
150 str(0), str(0), str(0))
151
152 return newtheme.extract_xml()
153
154 def paintUi(self, theme):
155 print theme # leave as helpful for initial development
156 self.stateChanging(theme)
157 self.BackgroundTypeComboBox.setCurrentIndex(0)
158 self.BackgroundComboBox.setCurrentIndex(0)
159 self.GradientComboBox.setCurrentIndex(0)
160 self.MainFontColorPushButton.setStyleSheet(
161 'background-color: %s' % str(theme.font_main_color))
162 self.FontFooterColorPushButton.setStyleSheet(
163 'background-color: %s' % str(theme.font_footer_color))
164
165 def stateChanging(self, theme):
166 if theme.background_type == u'solid':
167 self.Color1PushButton.setStyleSheet(
168 'background-color: %s' % str(theme.background_color1))
169 self.Color1Label.setText(translate(u'ThemeManager', u'Background Font:'))
170 self.Color1Label.setVisible(True)
171 self.Color1PushButton.setVisible(True)
172 self.Color2Label.setVisible(False)
173 self.Color2PushButton.setVisible(False)
174 elif theme.background_type == u'gradient':
175 self.Color1PushButton.setStyleSheet(
176 'background-color: %s' % str(theme.background_color1))
177 self.Color2PushButton.setStyleSheet(
178 'background-color: %s' % str(theme.background_color2))
179 self.Color1Label.setText(translate(u'ThemeManager', u'First Color:'))
180 self.Color2Label.setText(translate(u'ThemeManager', u'Second Color:'))
181 self.Color1Label.setVisible(True)
182 self.Color1PushButton.setVisible(True)
183 self.Color2Label.setVisible(True)
184 self.Color2PushButton.setVisible(True)
185 else: # must be image
186 self.Color1Label.setVisible(False)
187 self.Color1PushButton.setVisible(False)
188 self.Color2Label.setVisible(False)
189 self.Color2PushButton.setVisible(False)
190
191 def generateImage(self, theme):
192 log.debug(u'generateImage %s ', theme)
193 #theme = ThemeXML()
194 #theme.parse(theme_xml)
195 #print theme
196 size=QtCore.QSize(800,600)
197 frame=TstFrame(size)
198 frame=frame
199 paintdest=frame.GetPixmap()
200 r=Renderer()
201 r.set_paint_dest(paintdest)
202
203 r.set_theme(theme) # set default theme
204 r._render_background()
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))
206
207 lines=[]
208 lines.append(u'Amazing Grace!')
209 lines.append(u'How sweet the sound')
210 lines.append(u'To save a wretch like me;')
211 lines.append(u'I once was lost but now am found,')
212 lines.append(u'Was blind, but now I see.')
213 lines1=[]
214 lines1.append(u'Amazing Grace (John Newton)' )
215 lines1.append(u'CCLI xxx (c)Openlp.org')
216
217 answer=r._render_lines(lines, lines1)
218
219 self.ThemePreview.setPixmap(frame.GetPixmap())
220
221class TstFrame:
222 def __init__(self, size):
223 """Create the DemoPanel."""
224 self.width=size.width();
225 self.height=size.height();
226 # create something to be painted into
227 self._Buffer = QtGui.QPixmap(self.width, self.height)
228 def GetPixmap(self):
229 return self._Buffer
0230
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py 2009-03-01 14:36:49 +0000
+++ openlp/core/ui/generaltab.py 2009-04-10 05:59:40 +0000
@@ -28,8 +28,9 @@
28 """28 """
29 GeneralTab is the general settings tab in the settings dialog.29 GeneralTab is the general settings tab in the settings dialog.
30 """30 """
31 def __init__(self):31 def __init__(self, screen_list):
32 SettingsTab.__init__(self, translate(u'GeneralTab', u'General'))32 SettingsTab.__init__(self, translate(u'GeneralTab', u'General'))
33 self.screen_list = screen_list
3334
34 def setupUi(self):35 def setupUi(self):
35 self.setObjectName(u'GeneralTab')36 self.setObjectName(u'GeneralTab')
3637
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2009-04-06 18:45:45 +0000
+++ openlp/core/ui/mainwindow.py 2009-04-09 18:50:20 +0000
@@ -37,12 +37,13 @@
37 log=logging.getLogger(u'MainWindow')37 log=logging.getLogger(u'MainWindow')
38 log.info(u'MainWindow loaded')38 log.info(u'MainWindow loaded')
3939
40 def __init__(self):40 def __init__(self, screens):
41 self.main_window = QtGui.QMainWindow()41 self.main_window = QtGui.QMainWindow()
42 self.screen_list = screens
42 self.EventManager = EventManager()43 self.EventManager = EventManager()
43 self.alert_form = AlertForm()44 self.alert_form = AlertForm()
44 self.about_form = AboutForm()45 self.about_form = AboutForm()
45 self.settings_form = SettingsForm()46 self.settings_form = SettingsForm(self.screen_list)
4647
47 pluginpath = os.path.split(os.path.abspath(__file__))[0]48 pluginpath = os.path.split(os.path.abspath(__file__))[0]
48 pluginpath = os.path.abspath(os.path.join(pluginpath, '..', '..','plugins'))49 pluginpath = os.path.abspath(os.path.join(pluginpath, '..', '..','plugins'))
4950
=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py 2009-03-23 19:17:07 +0000
+++ openlp/core/ui/settingsform.py 2009-04-09 18:50:20 +0000
@@ -31,18 +31,18 @@
3131
32class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):32class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
3333
34 def __init__(self, parent=None):34 def __init__(self, screen_list, parent=None):
35 QtGui.QDialog.__init__(self, parent)35 QtGui.QDialog.__init__(self, parent)
36 self.setupUi(self)36 self.setupUi(self)
37 # General tab37 # General tab
38 self.GeneralTab = GeneralTab()38 self.GeneralTab = GeneralTab(screen_list)
39 self.addTab(self.GeneralTab)39 self.addTab(self.GeneralTab)
40 # Themes tab40 # Themes tab
41 self.ThemesTab = ThemesTab()41 self.ThemesTab = ThemesTab()
42 self.addTab(self.ThemesTab)42 self.addTab(self.ThemesTab)
43 # Alert tab43 # Alert tab
44 self.AlertsTab = AlertsTab()44 self.AlertsTab = AlertsTab()
45 self.addTab(self.AlertsTab) 45 self.addTab(self.AlertsTab)
4646
47 def addTab(self, tab):47 def addTab(self, tab):
48 log.info(u'Inserting %s' % tab.title())48 log.info(u'Inserting %s' % tab.title())
4949
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2009-04-07 19:45:21 +0000
+++ openlp/core/ui/thememanager.py 2009-04-11 15:16:02 +0000
@@ -128,7 +128,11 @@
128 for i in self.items:128 for i in self.items:
129 yield i129 yield i
130130
131 def item(self, row):131 def getValue(self, index):
132 row = index.row()
133 return self.items[row]
134
135 def getItem(self, row):
132 log.info(u'Get Item:%d -> %s' %(row, str(self.items)))136 log.info(u'Get Item:%d -> %s' %(row, str(self.items)))
133 return self.items[row]137 return self.items[row]
134138
@@ -177,6 +181,7 @@
177 self.themelist= []181 self.themelist= []
178 self.path = os.path.join(ConfigHelper.get_data_path(), u'themes')182 self.path = os.path.join(ConfigHelper.get_data_path(), u'themes')
179 self.checkThemesExists(self.path)183 self.checkThemesExists(self.path)
184 self.amendThemeForm.themePath(self.path)
180185
181 def setEventManager(self, eventManager):186 def setEventManager(self, eventManager):
182 self.eventManager = eventManager187 self.eventManager = eventManager
@@ -186,7 +191,10 @@
186 self.amendThemeForm.exec_()191 self.amendThemeForm.exec_()
187192
188 def onEditTheme(self):193 def onEditTheme(self):
189 self.amendThemeForm.loadTheme(theme)194 items = self.ThemeListView.selectedIndexes()
195 for item in items:
196 data = self.Theme_data.getValue(item)
197 self.amendThemeForm.loadTheme(data[3])
190 self.amendThemeForm.exec_()198 self.amendThemeForm.exec_()
191199
192 def onDeleteTheme(self):200 def onDeleteTheme(self):
@@ -276,8 +284,8 @@
276 else:284 else:
277 newtheme.add_background_image(str(t.BackgroundParameter1))285 newtheme.add_background_image(str(t.BackgroundParameter1))
278286
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')
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')
281 outline = False289 outline = False
282 shadow = False290 shadow = False
283 if t.Shadow == 1:291 if t.Shadow == 1:
@@ -302,7 +310,7 @@
302310
303 r.set_theme(theme) # set default theme311 r.set_theme(theme) # set default theme
304 r._render_background()312 r._render_background()
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))
306314
307 lines=[]315 lines=[]
308 lines.append(u'Amazing Grace!')316 lines.append(u'Amazing Grace!')
@@ -310,17 +318,18 @@
310 lines.append(u'To save a wretch like me;')318 lines.append(u'To save a wretch like me;')
311 lines.append(u'I once was lost but now am found,')319 lines.append(u'I once was lost but now am found,')
312 lines.append(u'Was blind, but now I see.')320 lines.append(u'Was blind, but now I see.')
321 lines1=[]
322 lines1.append(u'Amazing Grace (John Newton)' )
323 lines1.append(u'CCLI xxx (c)Openlp.org')
313324
314 answer=r._render_lines(lines)325 answer=r._render_lines(lines, lines1)
315 r._get_extent_and_render(u'Amazing Grace (John Newton) ', (10, 560), True, None, True)
316 r._get_extent_and_render(u'CCLI xxx (c)Openlp.org', (10, 580), True, None, True)
317326
318 im=frame.GetPixmap().toImage()327 im=frame.GetPixmap().toImage()
319 testpathname=os.path.join(dir, name+u'.png')328 samplepathname=os.path.join(dir, name+u'.png')
320 if os.path.exists(testpathname):329 if os.path.exists(samplepathname):
321 os.unlink(testpathname)330 os.unlink(samplepathname)
322 im.save(testpathname, u'png')331 im.save(samplepathname, u'png')
323 log.debug(u'Theme image written to %s',testpathname)332 log.debug(u'Theme image written to %s',samplepathname)
324333
325334
326class TstFrame:335class TstFrame:
327336
=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py 2009-03-22 07:13:34 +0000
+++ openlp/plugins/bibles/bibleplugin.py 2009-04-10 06:06:41 +0000
@@ -24,7 +24,8 @@
24from PyQt4.QtGui import *24from PyQt4.QtGui import *
2525
26from openlp.core.resources import *26from openlp.core.resources import *
27from openlp.core.lib import Plugin27from openlp.core.lib import Plugin, Event
28from openlp.core.lib import EventType
2829
29from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem30from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
30from openlp.plugins.bibles.lib.tables import *31from openlp.plugins.bibles.lib.tables import *
@@ -76,4 +77,13 @@
76 def onBibleNewClick(self):77 def onBibleNewClick(self):
77 self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self)78 self.bibleimportform = BibleImportForm(self.config, self.biblemanager, self)
78 self.bibleimportform.exec_()79 self.bibleimportform.exec_()
79 pass 80 pass
81
82 def handle_event(self, event):
83 """
84 Handle the event contained in the event object.
85 """
86 log.debug(u'Handle event called with event %s'%event.event_type)
87 if event.event_type == EventType.ThemeListChanged:
88 log.debug(u'New Theme request received')
89 #self.edit_custom_form.loadThemes(self.theme_manager.getThemes())
8090
=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py 2009-04-07 19:03:36 +0000
+++ openlp/plugins/custom/customplugin.py 2009-04-10 06:06:41 +0000
@@ -56,7 +56,7 @@
56 """56 """
57 Handle the event contained in the event object.57 Handle the event contained in the event object.
58 """58 """
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)
60 if event.event_type == EventType.ThemeListChanged:60 if event.event_type == EventType.ThemeListChanged:
61 log.debug(u'New Theme request received')61 log.debug(u'New Theme request received')
62 self.edit_custom_form.loadThemes(self.theme_manager.getThemes())62 self.edit_custom_form.loadThemes(self.theme_manager.getThemes())
6363
=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py 2009-03-22 07:13:34 +0000
+++ openlp/plugins/songs/songsplugin.py 2009-04-10 06:06:41 +0000
@@ -22,7 +22,8 @@
22from PyQt4 import QtCore, QtGui22from PyQt4 import QtCore, QtGui
2323
24from openlp.core.resources import *24from openlp.core.resources import *
25from openlp.core.lib import Plugin25from openlp.core.lib import Plugin, Event
26from openlp.core.lib import EventType
26from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem27from openlp.plugins.songs.lib import SongManager, SongsTab, SongMediaItem
27from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \28from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
28 OpenSongImportForm, OpenLPExportForm29 OpenSongImportForm, OpenLPExportForm
@@ -122,3 +123,12 @@
122123
123 def onExportOpenSongItemClicked(self):124 def onExportOpenSongItemClicked(self):
124 self.opensong_export_form.show()125 self.opensong_export_form.show()
126
127 def handle_event(self, event):
128 """
129 Handle the event contained in the event object.
130 """
131 log.debug(u'Handle event called with event %s'%event.event_type)
132 if event.event_type == EventType.ThemeListChanged:
133 log.debug(u'New Theme request received')
134 #self.edit_custom_form.loadThemes(self.theme_manager.getThemes())
125135
=== added file 'resources/forms/amendthemedialog.ui'
--- resources/forms/amendthemedialog.ui 1970-01-01 00:00:00 +0000
+++ resources/forms/amendthemedialog.ui 2009-04-11 05:43:52 +0000
@@ -0,0 +1,729 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>AmendThemeDialog</class>
4 <widget class="QWidget" name="AmendThemeDialog">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>752</width>
10 <height>533</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Theme Maintance</string>
15 </property>
16 <property name="windowIcon">
17 <iconset resource="../images/openlp-2.qrc">
18 <normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
19 </property>
20 <widget class="QDialogButtonBox" name="ThemeButtonBox">
21 <property name="geometry">
22 <rect>
23 <x>580</x>
24 <y>500</y>
25 <width>156</width>
26 <height>26</height>
27 </rect>
28 </property>
29 <property name="standardButtons">
30 <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
31 </property>
32 </widget>
33 <widget class="QWidget" name="layoutWidget">
34 <property name="geometry">
35 <rect>
36 <x>50</x>
37 <y>20</y>
38 <width>441</width>
39 <height>41</height>
40 </rect>
41 </property>
42 <layout class="QHBoxLayout" name="horizontalLayout">
43 <item>
44 <widget class="QLabel" name="ThemeNameLabel">
45 <property name="text">
46 <string>Theme Name</string>
47 </property>
48 </widget>
49 </item>
50 <item>
51 <widget class="QLineEdit" name="ThemeNameEdit"/>
52 </item>
53 </layout>
54 </widget>
55 <widget class="QWidget" name="">
56 <property name="geometry">
57 <rect>
58 <x>31</x>
59 <y>71</y>
60 <width>721</width>
61 <height>411</height>
62 </rect>
63 </property>
64 <layout class="QHBoxLayout" name="horizontalLayout_2">
65 <item>
66 <widget class="QWidget" name="LeftSide" native="true">
67 <widget class="QTabWidget" name="tabWidget">
68 <property name="geometry">
69 <rect>
70 <x>0</x>
71 <y>0</y>
72 <width>341</width>
73 <height>401</height>
74 </rect>
75 </property>
76 <property name="currentIndex">
77 <number>0</number>
78 </property>
79 <widget class="QWidget" name="BackgroundTab">
80 <attribute name="title">
81 <string>Background</string>
82 </attribute>
83 <widget class="QWidget" name="layoutWidget">
84 <property name="geometry">
85 <rect>
86 <x>10</x>
87 <y>10</y>
88 <width>321</width>
89 <height>351</height>
90 </rect>
91 </property>
92 <layout class="QGridLayout" name="gridLayout">
93 <item row="0" column="0" colspan="2">
94 <widget class="QLabel" name="BackgroundLabel">
95 <property name="text">
96 <string>Background:</string>
97 </property>
98 </widget>
99 </item>
100 <item row="0" column="2" colspan="2">
101 <widget class="QComboBox" name="BackgroundComboBox">
102 <item>
103 <property name="text">
104 <string>Opaque</string>
105 </property>
106 </item>
107 <item>
108 <property name="text">
109 <string>Transparent</string>
110 </property>
111 </item>
112 </widget>
113 </item>
114 <item row="1" column="0" colspan="2">
115 <widget class="QLabel" name="BackgroundTypeLabel">
116 <property name="text">
117 <string>Background Type:</string>
118 </property>
119 </widget>
120 </item>
121 <item row="1" column="2" colspan="2">
122 <widget class="QComboBox" name="BackgroundTypeComboBox">
123 <item>
124 <property name="text">
125 <string>Solid Color</string>
126 </property>
127 </item>
128 <item>
129 <property name="text">
130 <string>Gradient</string>
131 </property>
132 </item>
133 <item>
134 <property name="text">
135 <string>Image</string>
136 </property>
137 </item>
138 </widget>
139 </item>
140 <item row="2" column="0">
141 <widget class="QLabel" name="Color1Label">
142 <property name="text">
143 <string>&lt;Color1&gt;</string>
144 </property>
145 </widget>
146 </item>
147 <item row="2" column="2" colspan="2">
148 <widget class="QPushButton" name="Color1PushButton">
149 <property name="text">
150 <string/>
151 </property>
152 </widget>
153 </item>
154 <item row="3" column="0">
155 <widget class="QLabel" name="Color2Label">
156 <property name="text">
157 <string>&lt;Color2&gt;</string>
158 </property>
159 </widget>
160 </item>
161 <item row="3" column="2" colspan="2">
162 <widget class="QPushButton" name="Color2PushButton">
163 <property name="text">
164 <string/>
165 </property>
166 </widget>
167 </item>
168 <item row="4" column="0">
169 <widget class="QLabel" name="ImageLabel">
170 <property name="text">
171 <string>Image:</string>
172 </property>
173 </widget>
174 </item>
175 <item row="4" column="1" colspan="2">
176 <widget class="QLineEdit" name="ImageLineEdit"/>
177 </item>
178 <item row="4" column="3">
179 <widget class="QPushButton" name="ImagePushButton">
180 <property name="text">
181 <string/>
182 </property>
183 <property name="icon">
184 <iconset resource="../images/openlp-2.qrc">
185 <normaloff>:/services/service_open.png</normaloff>:/services/service_open.png</iconset>
186 </property>
187 </widget>
188 </item>
189 <item row="5" column="0">
190 <widget class="QLabel" name="GradientLabel">
191 <property name="text">
192 <string>Gradient :</string>
193 </property>
194 </widget>
195 </item>
196 <item row="5" column="2" colspan="2">
197 <widget class="QComboBox" name="GradientComboBox">
198 <item>
199 <property name="text">
200 <string>Horizontal</string>
201 </property>
202 </item>
203 <item>
204 <property name="text">
205 <string>Vertical</string>
206 </property>
207 </item>
208 <item>
209 <property name="text">
210 <string>Circular</string>
211 </property>
212 </item>
213 </widget>
214 </item>
215 </layout>
216 </widget>
217 </widget>
218 <widget class="QWidget" name="FontMainTab">
219 <attribute name="title">
220 <string>Font Main</string>
221 </attribute>
222 <widget class="QGroupBox" name="MainFontGroupBox">
223 <property name="geometry">
224 <rect>
225 <x>20</x>
226 <y>10</y>
227 <width>307</width>
228 <height>119</height>
229 </rect>
230 </property>
231 <property name="title">
232 <string>Main Font</string>
233 </property>
234 <layout class="QGridLayout" name="gridLayout_2">
235 <item row="0" column="0">
236 <widget class="QLabel" name="MainFontlabel">
237 <property name="text">
238 <string>Font:</string>
239 </property>
240 </widget>
241 </item>
242 <item row="0" column="1" colspan="2">
243 <widget class="QFontComboBox" name="MainFontComboBox"/>
244 </item>
245 <item row="1" column="0">
246 <widget class="QLabel" name="MainFontColorLabel">
247 <property name="text">
248 <string>Font Color</string>
249 </property>
250 </widget>
251 </item>
252 <item row="1" column="2">
253 <widget class="QPushButton" name="MainFontColorPushButton">
254 <property name="text">
255 <string/>
256 </property>
257 </widget>
258 </item>
259 <item row="2" column="0">
260 <widget class="QLabel" name="MainFontSize">
261 <property name="text">
262 <string>Size:</string>
263 </property>
264 </widget>
265 </item>
266 <item row="2" column="1">
267 <widget class="QLineEdit" name="MainFontSizeLineEdit"/>
268 </item>
269 <item row="2" column="2">
270 <widget class="QSlider" name="MainFontlSlider">
271 <property name="value">
272 <number>15</number>
273 </property>
274 <property name="maximum">
275 <number>40</number>
276 </property>
277 <property name="orientation">
278 <enum>Qt::Horizontal</enum>
279 </property>
280 <property name="tickPosition">
281 <enum>QSlider::TicksBelow</enum>
282 </property>
283 <property name="tickInterval">
284 <number>5</number>
285 </property>
286 </widget>
287 </item>
288 </layout>
289 </widget>
290 <widget class="QGroupBox" name="FooterFontGroupBox">
291 <property name="geometry">
292 <rect>
293 <x>20</x>
294 <y>160</y>
295 <width>301</width>
296 <height>190</height>
297 </rect>
298 </property>
299 <property name="title">
300 <string>Display Location</string>
301 </property>
302 <layout class="QVBoxLayout" name="verticalLayout">
303 <item>
304 <widget class="QCheckBox" name="FontMainUseDefault">
305 <property name="text">
306 <string>Use default location</string>
307 </property>
308 <property name="tristate">
309 <bool>false</bool>
310 </property>
311 </widget>
312 </item>
313 <item>
314 <layout class="QHBoxLayout" name="horizontalLayout_3">
315 <item>
316 <widget class="QLabel" name="FontMainXLabel">
317 <property name="text">
318 <string>X Position:</string>
319 </property>
320 </widget>
321 </item>
322 <item>
323 <widget class="QLineEdit" name="FontMainXEdit"/>
324 </item>
325 </layout>
326 </item>
327 <item>
328 <layout class="QHBoxLayout" name="horizontalLayout_4">
329 <item>
330 <widget class="QLabel" name="FontMainYLabel">
331 <property name="text">
332 <string>Y Position:</string>
333 </property>
334 </widget>
335 </item>
336 <item>
337 <widget class="QLineEdit" name="FontMainYEdit"/>
338 </item>
339 </layout>
340 </item>
341 <item>
342 <layout class="QHBoxLayout" name="horizontalLayout_5">
343 <item>
344 <widget class="QLabel" name="FontMainWidthLabel">
345 <property name="text">
346 <string>Width</string>
347 </property>
348 </widget>
349 </item>
350 <item>
351 <widget class="QLineEdit" name="FontMainWidthEdit"/>
352 </item>
353 </layout>
354 </item>
355 <item>
356 <layout class="QHBoxLayout" name="horizontalLayout_6">
357 <item>
358 <widget class="QLabel" name="FontMainHeightLabel">
359 <property name="text">
360 <string>Height</string>
361 </property>
362 </widget>
363 </item>
364 <item>
365 <widget class="QLineEdit" name="FontMainHeightEdit"/>
366 </item>
367 </layout>
368 </item>
369 </layout>
370 </widget>
371 </widget>
372 <widget class="QWidget" name="FontFooterTab">
373 <attribute name="title">
374 <string>Font Footer</string>
375 </attribute>
376 <widget class="QGroupBox" name="FooterFontGroupBox_2">
377 <property name="geometry">
378 <rect>
379 <x>20</x>
380 <y>160</y>
381 <width>301</width>
382 <height>190</height>
383 </rect>
384 </property>
385 <property name="title">
386 <string>Display Location</string>
387 </property>
388 <layout class="QVBoxLayout" name="verticalLayout_2">
389 <item>
390 <widget class="QCheckBox" name="FontMainUseDefault_2">
391 <property name="text">
392 <string>Use default location</string>
393 </property>
394 <property name="tristate">
395 <bool>false</bool>
396 </property>
397 </widget>
398 </item>
399 <item>
400 <layout class="QHBoxLayout" name="horizontalLayout_7">
401 <item>
402 <widget class="QLabel" name="FontFooterXLabel">
403 <property name="text">
404 <string>X Position:</string>
405 </property>
406 </widget>
407 </item>
408 <item>
409 <widget class="QLineEdit" name="FontFooterXEdit"/>
410 </item>
411 </layout>
412 </item>
413 <item>
414 <layout class="QHBoxLayout" name="horizontalLayout_8">
415 <item>
416 <widget class="QLabel" name="FontFooterYLabel">
417 <property name="text">
418 <string>Y Position:</string>
419 </property>
420 </widget>
421 </item>
422 <item>
423 <widget class="QLineEdit" name="FontFooterYEdit"/>
424 </item>
425 </layout>
426 </item>
427 <item>
428 <layout class="QHBoxLayout" name="horizontalLayout_9">
429 <item>
430 <widget class="QLabel" name="FontFooterWidthLabel">
431 <property name="text">
432 <string>Width</string>
433 </property>
434 </widget>
435 </item>
436 <item>
437 <widget class="QLineEdit" name="FontFooterWidthEdit"/>
438 </item>
439 </layout>
440 </item>
441 <item>
442 <layout class="QHBoxLayout" name="horizontalLayout_10">
443 <item>
444 <widget class="QLabel" name="FontFooterHeightLabel">
445 <property name="text">
446 <string>Height</string>
447 </property>
448 </widget>
449 </item>
450 <item>
451 <widget class="QLineEdit" name="FontFooterHeightEdit"/>
452 </item>
453 </layout>
454 </item>
455 </layout>
456 </widget>
457 <widget class="QGroupBox" name="FooterFontGroupBox_3">
458 <property name="geometry">
459 <rect>
460 <x>20</x>
461 <y>10</y>
462 <width>307</width>
463 <height>119</height>
464 </rect>
465 </property>
466 <property name="title">
467 <string>Footer Font</string>
468 </property>
469 <layout class="QGridLayout" name="gridLayout_3">
470 <item row="0" column="0">
471 <widget class="QLabel" name="FontFooterlabel">
472 <property name="text">
473 <string>Font:</string>
474 </property>
475 </widget>
476 </item>
477 <item row="0" column="1" colspan="2">
478 <widget class="QFontComboBox" name="FontFooterComboBox"/>
479 </item>
480 <item row="1" column="0">
481 <widget class="QLabel" name="FontFooterColorLabel">
482 <property name="text">
483 <string>Font Color</string>
484 </property>
485 </widget>
486 </item>
487 <item row="1" column="2">
488 <widget class="QPushButton" name="FontFooterColorPushButton">
489 <property name="text">
490 <string/>
491 </property>
492 </widget>
493 </item>
494 <item row="2" column="0">
495 <widget class="QLabel" name="FontFooterSizeLabel">
496 <property name="text">
497 <string>Size:</string>
498 </property>
499 </widget>
500 </item>
501 <item row="2" column="1">
502 <widget class="QLineEdit" name="FontFooterSizeLineEdit"/>
503 </item>
504 <item row="2" column="2">
505 <widget class="QSlider" name="FontFooterSlider">
506 <property name="value">
507 <number>15</number>
508 </property>
509 <property name="maximum">
510 <number>40</number>
511 </property>
512 <property name="orientation">
513 <enum>Qt::Horizontal</enum>
514 </property>
515 <property name="tickPosition">
516 <enum>QSlider::TicksBelow</enum>
517 </property>
518 <property name="tickInterval">
519 <number>5</number>
520 </property>
521 </widget>
522 </item>
523 </layout>
524 </widget>
525 </widget>
526 <widget class="QWidget" name="OptionsTab">
527 <attribute name="title">
528 <string>Alignment</string>
529 </attribute>
530 <widget class="QGroupBox" name="ShadowGroupBox">
531 <property name="geometry">
532 <rect>
533 <x>20</x>
534 <y>10</y>
535 <width>301</width>
536 <height>80</height>
537 </rect>
538 </property>
539 <property name="title">
540 <string>Shadow</string>
541 </property>
542 <widget class="QWidget" name="layoutWidget">
543 <property name="geometry">
544 <rect>
545 <x>10</x>
546 <y>20</y>
547 <width>281</width>
548 <height>58</height>
549 </rect>
550 </property>
551 <layout class="QFormLayout" name="formLayout">
552 <item row="0" column="0">
553 <widget class="QCheckBox" name="ShadowCheckBox">
554 <property name="text">
555 <string>Use Shadow</string>
556 </property>
557 </widget>
558 </item>
559 <item row="1" column="0">
560 <widget class="QLabel" name="ShadowColorLabel">
561 <property name="text">
562 <string>Shadow Color:</string>
563 </property>
564 </widget>
565 </item>
566 <item row="1" column="1">
567 <widget class="QPushButton" name="ShadowColorPushButton">
568 <property name="text">
569 <string/>
570 </property>
571 </widget>
572 </item>
573 </layout>
574 </widget>
575 </widget>
576 <widget class="QGroupBox" name="AlignmentGroupBox">
577 <property name="geometry">
578 <rect>
579 <x>10</x>
580 <y>200</y>
581 <width>321</width>
582 <height>161</height>
583 </rect>
584 </property>
585 <property name="title">
586 <string>Alignment</string>
587 </property>
588 <layout class="QGridLayout" name="gridLayout_4">
589 <item row="0" column="0">
590 <widget class="QLabel" name="HorizontalLabel">
591 <property name="text">
592 <string>Horizontal Align:</string>
593 </property>
594 </widget>
595 </item>
596 <item row="0" column="1">
597 <widget class="QComboBox" name="HorizontalComboBox">
598 <item>
599 <property name="text">
600 <string>Left</string>
601 </property>
602 </item>
603 <item>
604 <property name="text">
605 <string>Right</string>
606 </property>
607 </item>
608 <item>
609 <property name="text">
610 <string>Center</string>
611 </property>
612 </item>
613 </widget>
614 </item>
615 <item row="1" column="0">
616 <widget class="QLabel" name="VerticalLabel">
617 <property name="text">
618 <string>Vertical Align:</string>
619 </property>
620 </widget>
621 </item>
622 <item row="1" column="1">
623 <widget class="QComboBox" name="VerticalComboBox">
624 <item>
625 <property name="text">
626 <string>Top</string>
627 </property>
628 </item>
629 <item>
630 <property name="text">
631 <string>Middle</string>
632 </property>
633 </item>
634 <item>
635 <property name="text">
636 <string>Bottom</string>
637 </property>
638 </item>
639 </widget>
640 </item>
641 </layout>
642 </widget>
643 <widget class="QGroupBox" name="OutlineGroupBox">
644 <property name="geometry">
645 <rect>
646 <x>20</x>
647 <y>110</y>
648 <width>301</width>
649 <height>80</height>
650 </rect>
651 </property>
652 <property name="title">
653 <string>Outline</string>
654 </property>
655 <widget class="QWidget" name="layoutWidget_3">
656 <property name="geometry">
657 <rect>
658 <x>10</x>
659 <y>20</y>
660 <width>281</width>
661 <height>58</height>
662 </rect>
663 </property>
664 <layout class="QFormLayout" name="OutlineformLayout">
665 <item row="0" column="0">
666 <widget class="QCheckBox" name="OutlineCheckBox">
667 <property name="text">
668 <string>Use Outline</string>
669 </property>
670 </widget>
671 </item>
672 <item row="1" column="0">
673 <widget class="QLabel" name="OutlineColorLabel">
674 <property name="text">
675 <string>Outline Color:</string>
676 </property>
677 </widget>
678 </item>
679 <item row="1" column="1">
680 <widget class="QPushButton" name="OutlineColorPushButton">
681 <property name="text">
682 <string/>
683 </property>
684 </widget>
685 </item>
686 </layout>
687 </widget>
688 </widget>
689 </widget>
690 </widget>
691 </widget>
692 </item>
693 <item>
694 <widget class="QWidget" name="RightSide" native="true">
695 <widget class="QLabel" name="ThemePreview">
696 <property name="geometry">
697 <rect>
698 <x>20</x>
699 <y>60</y>
700 <width>311</width>
701 <height>271</height>
702 </rect>
703 </property>
704 <property name="frameShape">
705 <enum>QFrame::Box</enum>
706 </property>
707 <property name="frameShadow">
708 <enum>QFrame::Raised</enum>
709 </property>
710 <property name="lineWidth">
711 <number>2</number>
712 </property>
713 <property name="text">
714 <string/>
715 </property>
716 <property name="scaledContents">
717 <bool>true</bool>
718 </property>
719 </widget>
720 </widget>
721 </item>
722 </layout>
723 </widget>
724 </widget>
725 <resources>
726 <include location="../images/openlp-2.qrc"/>
727 </resources>
728 <connections/>
729</ui>