bzr-revno: 536
This commit is contained in:
Jon Tibble 2009-09-13 19:40:53 +01:00 committed by Tim Bentley
commit 142c43d54a
22 changed files with 2722 additions and 2722 deletions

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<Theme> <Theme>
<Name>openlp.org 2.0 Demo Theme</Name> <Name>openlp.org 2.0 Demo Theme</Name>
<BackgroundType>2</BackgroundType> <BackgroundType>2</BackgroundType>
<BackgroundParameter1>./openlp/core/test/data_for_tests/treesbig.jpg</BackgroundParameter1> <BackgroundParameter1>./openlp/core/test/data_for_tests/treesbig.jpg</BackgroundParameter1>
<BackgroundParameter2>clBlack</BackgroundParameter2> <BackgroundParameter2>clBlack</BackgroundParameter2>
<BackgroundParameter3/> <BackgroundParameter3/>
<FontName>Tahoma</FontName> <FontName>Tahoma</FontName>
<FontColor>clWhite</FontColor> <FontColor>clWhite</FontColor>
<FontProportion>16</FontProportion> <FontProportion>16</FontProportion>
<Shadow>-1</Shadow> <Shadow>-1</Shadow>
<ShadowColor>$00000001</ShadowColor> <ShadowColor>$00000001</ShadowColor>
<Outline>-1</Outline> <Outline>-1</Outline>
<OutlineColor>clRed</OutlineColor> <OutlineColor>clRed</OutlineColor>
<HorizontalAlign>2</HorizontalAlign> <HorizontalAlign>2</HorizontalAlign>
<VerticalAlign>2</VerticalAlign> <VerticalAlign>2</VerticalAlign>
</Theme> </Theme>

View File

@ -1,58 +1,58 @@
This content can be found at this URL: This content can be found at this URL:
http://netsuperbrain.com/Postmodern%20PostgreSQL%20Application%20Development.pdf http://netsuperbrain.com/Postmodern%20PostgreSQL%20Application%20Development.pdf
Page 11-15: QtDesigner Page 11-15: QtDesigner
Page 18-20: SQLAlchemy Page 18-20: SQLAlchemy
Page 21-23: PyQt - widget Page 21-23: PyQt - widget
Page 24 : main Page 24 : main
Page 28 : py2exe and release Page 28 : py2exe and release
============================== ==============================
This is the destilled content. This is the destilled content.
============================== ==============================
---------------- ----------------
** sqlalchemy ** ** sqlalchemy **
---------------- ----------------
from sqlalchemy import create_engine, MetaData, Table from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.orm import sessionmaker, mapper from sqlalchemy.orm import sessionmaker, mapper
engine = create_engine( 'postgres://postgres@localhost/customers' ) engine = create_engine( 'postgres://postgres@localhost/customers' )
metadata = MetaData( bind=engine, reflect=True) metadata = MetaData( bind=engine, reflect=True)
Session = sessionmaker(bind=engine, autoflush=True, Session = sessionmaker(bind=engine, autoflush=True,
transactional=True) transactional=True)
class Customer(object): pass class Customer(object): pass
mapper( Customer, Table('customers', metadata ) ) mapper( Customer, Table('customers', metadata ) )
session = Session() session = Session()
customer = Customer( businessName=“Jamb Safety”, customer = Customer( businessName=“Jamb Safety”,
website=“www.jamb.com” ) website=“www.jamb.com” )
session.save( customer ) session.save( customer )
for customer in Session.query(Customer).filter( for customer in Session.query(Customer).filter(
Customer.businessName.like(“Jamb%”)): Customer.businessName.like(“Jamb%”)):
print customer.businessName print customer.businessName
session.commit() session.commit()
------------------------ ------------------------
** release and py2exe ** ** release and py2exe **
------------------------ ------------------------
from distutils.core import setup from distutils.core import setup
import py2exe import py2exe
import glob import glob
setup( setup(
name="Customers", name="Customers",
author="Sankel Software", author="Sankel Software",
author_email="david@sankelsoftware.com", author_email="david@sankelsoftware.com",
url="http://sankelsoftware.com", url="http://sankelsoftware.com",
license=“GPL", license=“GPL",
version=“1.0.0", version=“1.0.0",
windows=[ { "script":"main.py“,}], windows=[ { "script":"main.py“,}],
options={"py2exe":{"includes":["sip”]}}, options={"py2exe":{"includes":["sip”]}},
data_files=[ data_files=[
("forms",glob.glob("forms/*.ui")), ("forms",glob.glob("forms/*.ui")),
] ) ] )
release: release:
python setup.py py2exe --quiet --dist-dir=dist python setup.py py2exe --quiet --dist-dir=dist

View File

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<Theme> <Theme>
<Name>openlp.org Packaged Theme</Name> <Name>openlp.org Packaged Theme</Name>
<BackgroundType>0</BackgroundType> <BackgroundType>0</BackgroundType>
<BackgroundParameter1>clWhite</BackgroundParameter1> <BackgroundParameter1>clWhite</BackgroundParameter1>
<BackgroundParameter2/> <BackgroundParameter2/>
<BackgroundParameter3/> <BackgroundParameter3/>
<FontName>Tahoma</FontName> <FontName>Tahoma</FontName>
<FontColor>$00007F</FontColor> <FontColor>$00007F</FontColor>
<FontProportion>53</FontProportion> <FontProportion>53</FontProportion>
<FontUnits>pixels</FontUnits> <FontUnits>pixels</FontUnits>
<Shadow>0</Shadow> <Shadow>0</Shadow>
<ShadowColor>$000000</ShadowColor> <ShadowColor>$000000</ShadowColor>
<Outline>0</Outline> <Outline>0</Outline>
<OutlineColor>$000000</OutlineColor> <OutlineColor>$000000</OutlineColor>
<HorizontalAlign>0</HorizontalAlign> <HorizontalAlign>0</HorizontalAlign>
<VerticalAlign>0</VerticalAlign> <VerticalAlign>0</VerticalAlign>
<WrapStyle>1</WrapStyle> <WrapStyle>1</WrapStyle>
</Theme> </Theme>

View File

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<Theme> <Theme>
<Name>openlp.org Packaged Theme</Name> <Name>openlp.org Packaged Theme</Name>
<BackgroundType>2</BackgroundType> <BackgroundType>2</BackgroundType>
<BackgroundParameter1>sunset1.jpg</BackgroundParameter1> <BackgroundParameter1>sunset1.jpg</BackgroundParameter1>
<BackgroundParameter2/> <BackgroundParameter2/>
<BackgroundParameter3/> <BackgroundParameter3/>
<FontName>Tahoma</FontName> <FontName>Tahoma</FontName>
<FontColor>clWhite</FontColor> <FontColor>clWhite</FontColor>
<FontProportion>16</FontProportion> <FontProportion>16</FontProportion>
<FontUnits>pixels</FontUnits> <FontUnits>pixels</FontUnits>
<Shadow>-1</Shadow> <Shadow>-1</Shadow>
<ShadowColor>$00000001</ShadowColor> <ShadowColor>$00000001</ShadowColor>
<Outline>-1</Outline> <Outline>-1</Outline>
<OutlineColor>clRed</OutlineColor> <OutlineColor>clRed</OutlineColor>
<HorizontalAlign>2</HorizontalAlign> <HorizontalAlign>2</HorizontalAlign>
<VerticalAlign>0</VerticalAlign> <VerticalAlign>0</VerticalAlign>
</Theme> </Theme>

File diff suppressed because it is too large Load Diff

View File

@ -1,462 +1,462 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
############################################################################### ###############################################################################
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2008-2009 Raoul Snyman # # Copyright (c) 2008-2009 Raoul Snyman #
# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten # # Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri # # Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free # # under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. # # Software Foundation; version 2 of the License. #
# # # #
# This program is distributed in the hope that it will be useful, but WITHOUT # # This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. # # more details. #
# # # #
# You should have received a copy of the GNU General Public License along # # You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 # # with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
import os import os
import sys import sys
import zipfile import zipfile
import shutil import shutil
import logging import logging
from xml.etree.ElementTree import ElementTree, XML from xml.etree.ElementTree import ElementTree, XML
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.ui import AmendThemeForm, ServiceManager from openlp.core.ui import AmendThemeForm, ServiceManager
from openlp.core.theme import Theme from openlp.core.theme import Theme
from openlp.core.lib import PluginConfig, OpenLPToolbar, ThemeXML, Renderer, \ from openlp.core.lib import PluginConfig, OpenLPToolbar, ThemeXML, Renderer, \
translate, str_to_bool, file_to_xml, buildIcon, Receiver translate, str_to_bool, file_to_xml, buildIcon, Receiver
from openlp.core.utils import ConfigHelper from openlp.core.utils import ConfigHelper
class ThemeManager(QtGui.QWidget): class ThemeManager(QtGui.QWidget):
""" """
Manages the orders of Theme. Manages the orders of Theme.
""" """
global log global log
log = logging.getLogger(u'ThemeManager') log = logging.getLogger(u'ThemeManager')
def __init__(self, parent): def __init__(self, parent):
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.parent = parent self.parent = parent
self.Layout = QtGui.QVBoxLayout(self) self.Layout = QtGui.QVBoxLayout(self)
self.Layout.setSpacing(0) self.Layout.setSpacing(0)
self.Layout.setMargin(0) self.Layout.setMargin(0)
self.amendThemeForm = AmendThemeForm(self) self.amendThemeForm = AmendThemeForm(self)
self.Toolbar = OpenLPToolbar(self) self.Toolbar = OpenLPToolbar(self)
self.Toolbar.addToolbarButton( self.Toolbar.addToolbarButton(
translate(u'ThemeManager', u'New Theme'), u':/themes/theme_new.png', translate(u'ThemeManager', u'New Theme'), u':/themes/theme_new.png',
translate(u'ThemeManager', u'Create a new theme'), self.onAddTheme) translate(u'ThemeManager', u'Create a new theme'), self.onAddTheme)
self.Toolbar.addToolbarButton( self.Toolbar.addToolbarButton(
translate(u'ThemeManager', u'Edit Theme'), translate(u'ThemeManager', u'Edit Theme'),
u':/themes/theme_edit.png', u':/themes/theme_edit.png',
translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme) translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme)
self.Toolbar.addToolbarButton( self.Toolbar.addToolbarButton(
translate(u'ThemeManager', u'Delete Theme'), translate(u'ThemeManager', u'Delete Theme'),
u':/themes/theme_delete.png', u':/themes/theme_delete.png',
translate(u'ThemeManager', u'Delete a theme'), self.onDeleteTheme) translate(u'ThemeManager', u'Delete a theme'), self.onDeleteTheme)
self.Toolbar.addSeparator() self.Toolbar.addSeparator()
self.Toolbar.addToolbarButton( self.Toolbar.addToolbarButton(
translate(u'ThemeManager', u'Import Theme'), translate(u'ThemeManager', u'Import Theme'),
u':/themes/theme_import.png', u':/themes/theme_import.png',
translate(u'ThemeManager', u'Import a theme'), self.onImportTheme) translate(u'ThemeManager', u'Import a theme'), self.onImportTheme)
self.Toolbar.addToolbarButton( self.Toolbar.addToolbarButton(
translate(u'ThemeManager', u'Export Theme'), translate(u'ThemeManager', u'Export Theme'),
u':/themes/theme_export.png', u':/themes/theme_export.png',
translate(u'ThemeManager', u'Export a theme'), self.onExportTheme) translate(u'ThemeManager', u'Export a theme'), self.onExportTheme)
self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar) self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar)
self.Layout.addWidget(self.Toolbar) self.Layout.addWidget(self.Toolbar)
self.ThemeListWidget = QtGui.QListWidget(self) self.ThemeListWidget = QtGui.QListWidget(self)
self.ThemeListWidget.setAlternatingRowColors(True) self.ThemeListWidget.setAlternatingRowColors(True)
self.ThemeListWidget.setIconSize(QtCore.QSize(88,50)) self.ThemeListWidget.setIconSize(QtCore.QSize(88,50))
self.Layout.addWidget(self.ThemeListWidget) self.Layout.addWidget(self.ThemeListWidget)
#Signals #Signals
QtCore.QObject.connect(self.ThemeListWidget, QtCore.QObject.connect(self.ThemeListWidget,
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
self.changeGlobalFromScreen) self.changeGlobalFromScreen)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'update_global_theme'), self.changeGlobalFromTab) QtCore.SIGNAL(u'update_global_theme'), self.changeGlobalFromTab)
#Variables #Variables
self.themelist = [] self.themelist = []
self.path = os.path.join(ConfigHelper.get_data_path(), u'themes') self.path = os.path.join(ConfigHelper.get_data_path(), u'themes')
self.checkThemesExists(self.path) self.checkThemesExists(self.path)
self.amendThemeForm.path = self.path self.amendThemeForm.path = self.path
# Last little bits of setting up # Last little bits of setting up
self.config = PluginConfig(u'themes') self.config = PluginConfig(u'themes')
self.servicePath = self.config.get_data_path() self.servicePath = self.config.get_data_path()
self.global_theme = unicode( self.global_theme = unicode(
self.config.get_config(u'theme global theme', u'')) self.config.get_config(u'theme global theme', u''))
def changeGlobalFromTab(self, themeName): def changeGlobalFromTab(self, themeName):
log.debug(u'changeGlobalFromTab %s', themeName) log.debug(u'changeGlobalFromTab %s', themeName)
for count in range (0, self.ThemeListWidget.count()): for count in range (0, self.ThemeListWidget.count()):
#reset the old name #reset the old name
item = self.ThemeListWidget.item(count) item = self.ThemeListWidget.item(count)
oldName = item.text() oldName = item.text()
newName = unicode(item.data(QtCore.Qt.UserRole).toString()) newName = unicode(item.data(QtCore.Qt.UserRole).toString())
if oldName != newName: if oldName != newName:
self.ThemeListWidget.item(count).setText(newName) self.ThemeListWidget.item(count).setText(newName)
#Set the new name #Set the new name
if themeName == newName: if themeName == newName:
name = u'%s (%s)' % (newName, translate(u'ThemeManager', name = u'%s (%s)' % (newName, translate(u'ThemeManager',
u'default')) u'default'))
self.ThemeListWidget.item(count).setText(name) self.ThemeListWidget.item(count).setText(name)
def changeGlobalFromScreen(self, index): def changeGlobalFromScreen(self, index):
log.debug(u'changeGlobalFromScreen %s', index) log.debug(u'changeGlobalFromScreen %s', index)
for count in range (0, self.ThemeListWidget.count()): for count in range (0, self.ThemeListWidget.count()):
item = self.ThemeListWidget.item(count) item = self.ThemeListWidget.item(count)
oldName = item.text() oldName = item.text()
#reset the old name #reset the old name
if oldName != unicode(item.data(QtCore.Qt.UserRole).toString()): if oldName != unicode(item.data(QtCore.Qt.UserRole).toString()):
self.ThemeListWidget.item(count).setText( self.ThemeListWidget.item(count).setText(
unicode(item.data(QtCore.Qt.UserRole).toString())) unicode(item.data(QtCore.Qt.UserRole).toString()))
#Set the new name #Set the new name
if count == index.row(): if count == index.row():
self.global_theme = unicode( self.global_theme = unicode(
self.ThemeListWidget.item(count).text()) self.ThemeListWidget.item(count).text())
name = u'%s (%s)' % (self.global_theme, name = u'%s (%s)' % (self.global_theme,
translate(u'ThemeManager', u'default')) translate(u'ThemeManager', u'default'))
self.ThemeListWidget.item(count).setText(name) self.ThemeListWidget.item(count).setText(name)
self.config.set_config(u'theme global theme', self.global_theme) self.config.set_config(u'theme global theme', self.global_theme)
Receiver().send_message(u'update_global_theme', Receiver().send_message(u'update_global_theme',
self.global_theme) self.global_theme)
self.pushThemes() self.pushThemes()
def onAddTheme(self): def onAddTheme(self):
self.amendThemeForm.theme.parse(self.baseTheme()) self.amendThemeForm.theme.parse(self.baseTheme())
self.amendThemeForm.loadTheme(None) self.amendThemeForm.loadTheme(None)
self.amendThemeForm.exec_() self.amendThemeForm.exec_()
def onEditTheme(self): def onEditTheme(self):
item = self.ThemeListWidget.currentItem() item = self.ThemeListWidget.currentItem()
if item is not None: if item is not None:
self.amendThemeForm.loadTheme( self.amendThemeForm.loadTheme(
unicode(item.data(QtCore.Qt.UserRole).toString())) unicode(item.data(QtCore.Qt.UserRole).toString()))
self.amendThemeForm.exec_() self.amendThemeForm.exec_()
def onDeleteTheme(self): def onDeleteTheme(self):
self.global_theme = unicode( self.global_theme = unicode(
self.config.get_config(u'theme global theme', u'')) self.config.get_config(u'theme global theme', u''))
item = self.ThemeListWidget.currentItem() item = self.ThemeListWidget.currentItem()
if item is not None: if item is not None:
theme = unicode(item.text()) theme = unicode(item.text())
# should be the same unless default # should be the same unless default
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()): if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
QtGui.QMessageBox.critical(self, QtGui.QMessageBox.critical(self,
translate(u'ThemeManager', u'Error'), translate(u'ThemeManager', u'Error'),
translate(u'ThemeManager', translate(u'ThemeManager',
u'You are unable to delete the default theme!'), u'You are unable to delete the default theme!'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
else: else:
self.themelist.remove(theme) self.themelist.remove(theme)
th = theme + u'.png' th = theme + u'.png'
row = self.ThemeListWidget.row(item) row = self.ThemeListWidget.row(item)
self.ThemeListWidget.takeItem(row) self.ThemeListWidget.takeItem(row)
try: try:
os.remove(os.path.join(self.path, th)) os.remove(os.path.join(self.path, th))
except: except:
#if not present do not worry #if not present do not worry
pass pass
try: try:
shutil.rmtree(os.path.join(self.path, theme)) shutil.rmtree(os.path.join(self.path, theme))
except: except:
#if not present do not worry #if not present do not worry
pass pass
# As we do not reload the themes push out the change # As we do not reload the themes push out the change
# Reaload the list as the internal lists and events need # Reaload the list as the internal lists and events need
# to be triggered # to be triggered
self.pushThemes() self.pushThemes()
def onExportTheme(self): def onExportTheme(self):
pass pass
def onImportTheme(self): def onImportTheme(self):
files = QtGui.QFileDialog.getOpenFileNames(None, files = QtGui.QFileDialog.getOpenFileNames(None,
translate(u'ThemeManager', u'Select Theme Import File'), translate(u'ThemeManager', u'Select Theme Import File'),
self.path, u'Theme (*.*)') self.path, u'Theme (*.*)')
log.info(u'New Themes %s', unicode(files)) log.info(u'New Themes %s', unicode(files))
if len(files) > 0: if len(files) > 0:
for file in files: for file in files:
self.unzipTheme(file, self.path) self.unzipTheme(file, self.path)
self.loadThemes() self.loadThemes()
def loadThemes(self): def loadThemes(self):
""" """
Loads the theme lists and triggers updates accross Loads the theme lists and triggers updates accross
the whole system using direct calls or core functions the whole system using direct calls or core functions
and events for the plugins. and events for the plugins.
The plugins will call back in to get the real list if they want it. The plugins will call back in to get the real list if they want it.
""" """
log.debug(u'Load themes from dir') log.debug(u'Load themes from dir')
self.themelist = [] self.themelist = []
self.ThemeListWidget.clear() self.ThemeListWidget.clear()
for root, dirs, files in os.walk(self.path): for root, dirs, files in os.walk(self.path):
for name in files: for name in files:
if name.endswith(u'.png'): if name.endswith(u'.png'):
#check to see file is in theme root directory #check to see file is in theme root directory
theme = os.path.join(self.path, name) theme = os.path.join(self.path, name)
if os.path.exists(theme): if os.path.exists(theme):
(path, filename) = os.path.split(unicode(file)) (path, filename) = os.path.split(unicode(file))
textName = os.path.splitext(name)[0] textName = os.path.splitext(name)[0]
if textName == self.global_theme: if textName == self.global_theme:
name = u'%s (%s)' % (textName, name = u'%s (%s)' % (textName,
translate(u'ThemeManager', u'default')) translate(u'ThemeManager', u'default'))
else: else:
name = textName name = textName
item_name = QtGui.QListWidgetItem(name) item_name = QtGui.QListWidgetItem(name)
item_name.setIcon(buildIcon(theme)) item_name.setIcon(buildIcon(theme))
item_name.setData(QtCore.Qt.UserRole, item_name.setData(QtCore.Qt.UserRole,
QtCore.QVariant(textName)) QtCore.QVariant(textName))
self.ThemeListWidget.addItem(item_name) self.ThemeListWidget.addItem(item_name)
self.themelist.append(textName) self.themelist.append(textName)
self.pushThemes() self.pushThemes()
def pushThemes(self): def pushThemes(self):
Receiver().send_message(u'update_themes', self.getThemes() ) Receiver().send_message(u'update_themes', self.getThemes() )
def getThemes(self): def getThemes(self):
return self.themelist return self.themelist
def getThemeData(self, themename): def getThemeData(self, themename):
log.debug(u'getthemedata for theme %s', themename) log.debug(u'getthemedata for theme %s', themename)
xml_file = os.path.join(self.path, unicode(themename), xml_file = os.path.join(self.path, unicode(themename),
unicode(themename) + u'.xml') unicode(themename) + u'.xml')
try: try:
xml = file_to_xml(xml_file) xml = file_to_xml(xml_file)
except: except:
newtheme = ThemeXML() newtheme = ThemeXML()
newtheme.new_document(u'New Theme') newtheme.new_document(u'New Theme')
newtheme.add_background_solid(unicode(u'#000000')) newtheme.add_background_solid(unicode(u'#000000'))
newtheme.add_font(unicode(QtGui.QFont().family()), newtheme.add_font(unicode(QtGui.QFont().family()),
unicode(u'#FFFFFF'), unicode(30), u'False') unicode(u'#FFFFFF'), unicode(30), u'False')
newtheme.add_font(unicode(QtGui.QFont().family()), newtheme.add_font(unicode(QtGui.QFont().family()),
unicode(u'#FFFFFF'), unicode(12), u'False', u'footer') unicode(u'#FFFFFF'), unicode(12), u'False', u'footer')
newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False', newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False',
unicode(u'#FFFFFF'), unicode(0), unicode(0), unicode(0)) unicode(u'#FFFFFF'), unicode(0), unicode(0), unicode(0))
xml = newtheme.extract_xml() xml = newtheme.extract_xml()
theme = ThemeXML() theme = ThemeXML()
theme.parse(xml) theme.parse(xml)
theme.extend_image_filename(self.path) theme.extend_image_filename(self.path)
self.cleanTheme(theme) self.cleanTheme(theme)
return theme return theme
def checkThemesExists(self, dir): def checkThemesExists(self, dir):
log.debug(u'check themes') log.debug(u'check themes')
if os.path.exists(dir) == False: if os.path.exists(dir) == False:
os.mkdir(dir) os.mkdir(dir)
def unzipTheme(self, filename, dir): def unzipTheme(self, filename, dir):
""" """
Unzip the theme, remove the preview file if stored Unzip the theme, remove the preview file if stored
Generate a new preview fileCheck the XML theme version and upgrade if Generate a new preview fileCheck the XML theme version and upgrade if
necessary. necessary.
""" """
log.debug(u'Unzipping theme %s', filename) log.debug(u'Unzipping theme %s', filename)
zip = zipfile.ZipFile(unicode(filename)) zip = zipfile.ZipFile(unicode(filename))
filexml = None filexml = None
themename = None themename = None
for file in zip.namelist(): for file in zip.namelist():
if file.endswith(os.path.sep): if file.endswith(os.path.sep):
theme_dir = os.path.join(dir, file) theme_dir = os.path.join(dir, file)
if os.path.exists(theme_dir) == False: if os.path.exists(theme_dir) == False:
os.mkdir(os.path.join(dir, file)) os.mkdir(os.path.join(dir, file))
else: else:
fullpath = os.path.join(dir, file) fullpath = os.path.join(dir, file)
names = file.split(os.path.sep) names = file.split(os.path.sep)
if len(names) > 1: if len(names) > 1:
# not preview file # not preview file
if themename is None: if themename is None:
themename = names[0] themename = names[0]
xml_data = zip.read(file) xml_data = zip.read(file)
if os.path.splitext(file)[1].lower() in [u'.xml']: if os.path.splitext(file)[1].lower() in [u'.xml']:
if self.checkVersion1(xml_data): if self.checkVersion1(xml_data):
# upgrade theme xml # upgrade theme xml
filexml = self.migrateVersion122(filename, filexml = self.migrateVersion122(filename,
fullpath, xml_data) fullpath, xml_data)
else: else:
filexml = xml_data filexml = xml_data
outfile = open(fullpath, u'w') outfile = open(fullpath, u'w')
outfile.write(filexml) outfile.write(filexml)
outfile.close() outfile.close()
else: else:
outfile = open(fullpath, u'w') outfile = open(fullpath, u'w')
outfile.write(zip.read(file)) outfile.write(zip.read(file))
outfile.close() outfile.close()
self.generateAndSaveImage(dir, themename, filexml) self.generateAndSaveImage(dir, themename, filexml)
def checkVersion1(self, xmlfile): def checkVersion1(self, xmlfile):
""" """
Am I a version 1 theme Am I a version 1 theme
""" """
log.debug(u'checkVersion1 ') log.debug(u'checkVersion1 ')
theme = xmlfile theme = xmlfile
tree = ElementTree(element=XML(theme)).getroot() tree = ElementTree(element=XML(theme)).getroot()
if tree.find(u'BackgroundType') is None: if tree.find(u'BackgroundType') is None:
return False return False
else: else:
return True return True
def migrateVersion122(self, filename, fullpath, xml_data): def migrateVersion122(self, filename, fullpath, xml_data):
""" """
Called by convert the xml data from version 1 format Called by convert the xml data from version 1 format
to the current format. to the current format.
New fields are defaulted but the new theme is useable New fields are defaulted but the new theme is useable
""" """
log.debug(u'migrateVersion122 %s %s', filename, fullpath) log.debug(u'migrateVersion122 %s %s', filename, fullpath)
theme = Theme(xml_data) theme = Theme(xml_data)
newtheme = ThemeXML() newtheme = ThemeXML()
newtheme.new_document(theme.Name) newtheme.new_document(theme.Name)
if theme.BackgroundType == 0: if theme.BackgroundType == 0:
newtheme.add_background_solid(unicode( newtheme.add_background_solid(unicode(
theme.BackgroundParameter1.name())) theme.BackgroundParameter1.name()))
elif theme.BackgroundType == 1: elif theme.BackgroundType == 1:
direction = u'vertical' direction = u'vertical'
if theme.BackgroundParameter3.name() == 1: if theme.BackgroundParameter3.name() == 1:
direction = u'horizontal' direction = u'horizontal'
newtheme.add_background_gradient( newtheme.add_background_gradient(
unicode(theme.BackgroundParameter1.name()), unicode(theme.BackgroundParameter1.name()),
unicode(theme.BackgroundParameter2.name()), direction) unicode(theme.BackgroundParameter2.name()), direction)
else: else:
newtheme.add_background_image(unicode(theme.BackgroundParameter1)) newtheme.add_background_image(unicode(theme.BackgroundParameter1))
newtheme.add_font(unicode(theme.FontName), newtheme.add_font(unicode(theme.FontName),
unicode(theme.FontColor.name()), unicode(theme.FontColor.name()),
unicode(theme.FontProportion * 2), u'False') unicode(theme.FontProportion * 2), u'False')
newtheme.add_font(unicode(theme.FontName), newtheme.add_font(unicode(theme.FontName),
unicode(theme.FontColor.name()), unicode(theme.FontColor.name()),
unicode(12), u'False', u'footer') unicode(12), u'False', u'footer')
outline = False outline = False
shadow = False shadow = False
if theme.Shadow == 1: if theme.Shadow == 1:
shadow = True shadow = True
if theme.Outline == 1: if theme.Outline == 1:
outline = True outline = True
newtheme.add_display(unicode(shadow), unicode(theme.ShadowColor.name()), newtheme.add_display(unicode(shadow), unicode(theme.ShadowColor.name()),
unicode(outline), unicode(theme.OutlineColor.name()), unicode(outline), unicode(theme.OutlineColor.name()),
unicode(theme.HorizontalAlign), unicode(theme.VerticalAlign), unicode(theme.HorizontalAlign), unicode(theme.VerticalAlign),
unicode(theme.WrapStyle)) unicode(theme.WrapStyle))
return newtheme.extract_xml() return newtheme.extract_xml()
def saveTheme(self, name, theme_xml, theme_pretty_xml, image_from, def saveTheme(self, name, theme_xml, theme_pretty_xml, image_from,
image_to) : image_to) :
""" """
Called by thememaintenance Dialog to save the theme Called by thememaintenance Dialog to save the theme
and to trigger the reload of the theme list and to trigger the reload of the theme list
""" """
log.debug(u'saveTheme %s %s', name, theme_xml) log.debug(u'saveTheme %s %s', name, theme_xml)
theme_dir = os.path.join(self.path, name) theme_dir = os.path.join(self.path, name)
if os.path.exists(theme_dir) == False: if os.path.exists(theme_dir) == False:
os.mkdir(os.path.join(self.path, name)) os.mkdir(os.path.join(self.path, name))
theme_file = os.path.join(theme_dir, name + u'.xml') theme_file = os.path.join(theme_dir, name + u'.xml')
log.debug(theme_file) log.debug(theme_file)
result = QtGui.QMessageBox.Yes result = QtGui.QMessageBox.Yes
if os.path.exists(theme_file): if os.path.exists(theme_file):
result = QtGui.QMessageBox.question( result = QtGui.QMessageBox.question(
self, self,
translate(u'ThemeManager', u'Theme Exists'), translate(u'ThemeManager', u'Theme Exists'),
translate(u'ThemeManager', u'A theme with this name already exists, would you like to overwrite it?'), translate(u'ThemeManager', u'A theme with this name already exists, would you like to overwrite it?'),
(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No), (QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
QtGui.QMessageBox.No) QtGui.QMessageBox.No)
if result == QtGui.QMessageBox.Yes: if result == QtGui.QMessageBox.Yes:
# Save the theme, overwriting the existing theme if necessary. # Save the theme, overwriting the existing theme if necessary.
outfile = open(theme_file, u'w') outfile = open(theme_file, u'w')
outfile.write(theme_pretty_xml) outfile.write(theme_pretty_xml)
outfile.close() outfile.close()
if image_from is not None and image_from != image_to: if image_from is not None and image_from != image_to:
shutil.copyfile(image_from, image_to) shutil.copyfile(image_from, image_to)
self.generateAndSaveImage(self.path, name, theme_xml) self.generateAndSaveImage(self.path, name, theme_xml)
self.loadThemes() self.loadThemes()
else: else:
# Don't close the dialog - allow the user to change the name of # Don't close the dialog - allow the user to change the name of
# the theme or to cancel the theme dialog completely. # the theme or to cancel the theme dialog completely.
return False return False
def generateAndSaveImage(self, dir, name, theme_xml): def generateAndSaveImage(self, dir, name, theme_xml):
log.debug(u'generateAndSaveImage %s %s %s', dir, name, theme_xml) log.debug(u'generateAndSaveImage %s %s %s', dir, name, theme_xml)
theme = ThemeXML() theme = ThemeXML()
theme.parse(theme_xml) theme.parse(theme_xml)
theme.extend_image_filename(dir) theme.extend_image_filename(dir)
frame = self.generateImage(theme) frame = self.generateImage(theme)
samplepathname = os.path.join(self.path, name + u'.png') samplepathname = os.path.join(self.path, name + u'.png')
if os.path.exists(samplepathname): if os.path.exists(samplepathname):
os.unlink(samplepathname) os.unlink(samplepathname)
frame.save(samplepathname, u'png') frame.save(samplepathname, u'png')
log.debug(u'Theme image written to %s', samplepathname) log.debug(u'Theme image written to %s', samplepathname)
def generateImage(self, themedata): def generateImage(self, themedata):
""" """
Call the RenderManager to build a Sample Image Call the RenderManager to build a Sample Image
""" """
log.debug(u'generateImage %s ', themedata) log.debug(u'generateImage %s ', themedata)
frame = self.parent.RenderManager.generate_preview(themedata) frame = self.parent.RenderManager.generate_preview(themedata)
return frame return frame
def getPreviewImage(self, theme): def getPreviewImage(self, theme):
log.debug(u'getPreviewImage %s ', theme) log.debug(u'getPreviewImage %s ', theme)
image = os.path.join(self.path, theme + u'.png') image = os.path.join(self.path, theme + u'.png')
return image return image
def baseTheme(self): def baseTheme(self):
log.debug(u'base theme created') log.debug(u'base theme created')
newtheme = ThemeXML() newtheme = ThemeXML()
newtheme.new_document(u'New Theme') newtheme.new_document(u'New Theme')
newtheme.add_background_solid(unicode(u'#000000')) newtheme.add_background_solid(unicode(u'#000000'))
newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'),
unicode(30), u'False') unicode(30), u'False')
newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'), newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'),
unicode(12), u'False', u'footer') unicode(12), u'False', u'footer')
newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False', newtheme.add_display(u'False', unicode(u'#FFFFFF'), u'False',
unicode(u'#FFFFFF'), unicode(0), unicode(0), unicode(0)) unicode(u'#FFFFFF'), unicode(0), unicode(0), unicode(0))
return newtheme.extract_xml() return newtheme.extract_xml()
def cleanTheme(self, theme): def cleanTheme(self, theme):
theme.background_color = theme.background_color.strip() theme.background_color = theme.background_color.strip()
theme.background_direction = theme.background_direction.strip() theme.background_direction = theme.background_direction.strip()
theme.background_endColor = theme.background_endColor.strip() theme.background_endColor = theme.background_endColor.strip()
if theme.background_filename: if theme.background_filename:
theme.background_filename = theme.background_filename.strip() theme.background_filename = theme.background_filename.strip()
#theme.background_mode #theme.background_mode
theme.background_startColor = theme.background_startColor.strip() theme.background_startColor = theme.background_startColor.strip()
#theme.background_type #theme.background_type
if theme.display_display: if theme.display_display:
theme.display_display = theme.display_display.strip() theme.display_display = theme.display_display.strip()
theme.display_horizontalAlign = theme.display_horizontalAlign.strip() theme.display_horizontalAlign = theme.display_horizontalAlign.strip()
theme.display_outline = str_to_bool(theme.display_outline) theme.display_outline = str_to_bool(theme.display_outline)
#theme.display_outline_color #theme.display_outline_color
theme.display_shadow = str_to_bool(theme.display_shadow) theme.display_shadow = str_to_bool(theme.display_shadow)
#theme.display_shadow_color #theme.display_shadow_color
theme.display_verticalAlign = theme.display_verticalAlign.strip() theme.display_verticalAlign = theme.display_verticalAlign.strip()
theme.display_wrapStyle = theme.display_wrapStyle.strip() theme.display_wrapStyle = theme.display_wrapStyle.strip()
theme.font_footer_color = theme.font_footer_color.strip() theme.font_footer_color = theme.font_footer_color.strip()
theme.font_footer_height = theme.font_footer_height.strip() theme.font_footer_height = theme.font_footer_height.strip()
theme.font_footer_italics = str_to_bool(theme.font_footer_italics) theme.font_footer_italics = str_to_bool(theme.font_footer_italics)
theme.font_footer_name = theme.font_footer_name.strip() theme.font_footer_name = theme.font_footer_name.strip()
#theme.font_footer_override #theme.font_footer_override
theme.font_footer_proportion = theme.font_footer_proportion.strip() theme.font_footer_proportion = theme.font_footer_proportion.strip()
theme.font_footer_weight = theme.font_footer_weight.strip() theme.font_footer_weight = theme.font_footer_weight.strip()
theme.font_footer_width = theme.font_footer_width.strip() theme.font_footer_width = theme.font_footer_width.strip()
theme.font_footer_x = theme.font_footer_x.strip() theme.font_footer_x = theme.font_footer_x.strip()
theme.font_footer_y = theme.font_footer_y.strip() theme.font_footer_y = theme.font_footer_y.strip()
theme.font_main_color = theme.font_main_color.strip() theme.font_main_color = theme.font_main_color.strip()
theme.font_main_height = theme.font_main_height.strip() theme.font_main_height = theme.font_main_height.strip()
theme.font_main_italics = str_to_bool(theme.font_main_italics) theme.font_main_italics = str_to_bool(theme.font_main_italics)
theme.font_main_name = theme.font_main_name.strip() theme.font_main_name = theme.font_main_name.strip()
#theme.font_main_override #theme.font_main_override
theme.font_main_proportion = theme.font_main_proportion.strip() theme.font_main_proportion = theme.font_main_proportion.strip()
theme.font_main_weight = theme.font_main_weight.strip() theme.font_main_weight = theme.font_main_weight.strip()
theme.font_main_x = theme.font_main_x.strip() theme.font_main_x = theme.font_main_x.strip()
theme.font_main_y = theme.font_main_y.strip() theme.font_main_y = theme.font_main_y.strip()
#theme.theme_mode #theme.theme_mode
theme.theme_name = theme.theme_name.strip() theme.theme_name = theme.theme_name.strip()
#theme.theme_version #theme.theme_version

View File

@ -1,8 +1,8 @@
1,1,"Genesis","GEN" 1,1,"Genesis","GEN"
2,1,"Exodus","EXOD" 2,1,"Exodus","EXOD"
3,1,"Leviticus","LEV" 3,1,"Leviticus","LEV"
4,1,"Numbers","NUM" 4,1,"Numbers","NUM"
47,2,"Matthew","MATT" 47,2,"Matthew","MATT"
48,2,"Mark","MARK" 48,2,"Mark","MARK"
49,2,"Luke","LUKE" 49,2,"Luke","LUKE"
50,2,"John","JOHN" 50,2,"John","JOHN"

1 1 1 Genesis GEN
2 2 1 Exodus EXOD
3 3 1 Leviticus LEV
4 4 1 Numbers NUM
5 47 2 Matthew MATT
6 48 2 Mark MARK
7 49 2 Luke LUKE
8 50 2 John JOHN

View File

@ -1,9 +1,9 @@
1,1,"Genesis","GEN" 1,1,"Genesis","GEN"
2,1,"Exodus","EXOD" 2,1,"Exodus","EXOD"
3,1,"Leviticus","LEV" 3,1,"Leviticus","LEV"
4,1,"Numbers","NUM" 4,1,"Numbers","NUM"
46,1,"Malachi","MAL" 46,1,"Malachi","MAL"
47,2,"Matthew","MATT" 47,2,"Matthew","MATT"
48,2,"Mark","MARK" 48,2,"Mark","MARK"
49,2,"Luke","LUKE" 49,2,"Luke","LUKE"
50,2,"John","JOHN" 50,2,"John","JOHN"

1 1 1 Genesis GEN
2 2 1 Exodus EXOD
3 3 1 Leviticus LEV
4 4 1 Numbers NUM
5 46 1 Malachi MAL
6 47 2 Matthew MATT
7 48 2 Mark MARK
8 49 2 Luke LUKE
9 50 2 John JOHN

View File

@ -1,35 +1,35 @@
"Genesis",1,1,"First this: God created the Heavens and Earth - all you see, all you don't see." "Genesis",1,1,"First this: God created the Heavens and Earth - all you see, all you don't see."
"Genesis",1,2,"Earth was a soup of nothingness, a bottomless emptiness, an inky blackness. God's Spirit brooded like a bird above the watery abyss." "Genesis",1,2,"Earth was a soup of nothingness, a bottomless emptiness, an inky blackness. God's Spirit brooded like a bird above the watery abyss."
"Exodus",1,1,"These are the names of the Israelites who went to Egypt with Jacob, each bringing his family members:" "Exodus",1,1,"These are the names of the Israelites who went to Egypt with Jacob, each bringing his family members:"
"Exodus",1,2,"Reuben, Simeon, Levi, and Judah," "Exodus",1,2,"Reuben, Simeon, Levi, and Judah,"
"Exodus",2,1,"A man from the family of Levi married a Levite woman." "Exodus",2,1,"A man from the family of Levi married a Levite woman."
"Exodus",2,2,"The woman became pregnant and had a son. She saw there was something special about him and hid him. She hid him for three months." "Exodus",2,2,"The woman became pregnant and had a son. She saw there was something special about him and hid him. She hid him for three months."
"Leviticus",1,1,"God called Moses and spoke to him from the Tent of Meeting:" "Leviticus",1,1,"God called Moses and spoke to him from the Tent of Meeting:"
"Leviticus",1,2,"""Speak to the People of Israel. Tell them, When anyone presents an offering to God, present an animal from either the herd or the flock." "Leviticus",1,2,"""Speak to the People of Israel. Tell them, When anyone presents an offering to God, present an animal from either the herd or the flock."
"Leviticus",1,3,"""If the offering is a Whole-Burnt-Offering from the herd, present a male without a defect at the entrance to the Tent of Meeting that it may be accepted by God." "Leviticus",1,3,"""If the offering is a Whole-Burnt-Offering from the herd, present a male without a defect at the entrance to the Tent of Meeting that it may be accepted by God."
"Numbers",1,1,"God spoke to Moses in the Wilderness of Sinai at the Tent of Meeting on the first day of the second month in the second year after they had left Egypt. He said," "Numbers",1,1,"God spoke to Moses in the Wilderness of Sinai at the Tent of Meeting on the first day of the second month in the second year after they had left Egypt. He said,"
"Numbers",1,2,"""Number the congregation of the People of Israel by clans and families, writing down the names of every male." "Numbers",1,2,"""Number the congregation of the People of Israel by clans and families, writing down the names of every male."
"Matthew",1,1,"The family tree of Jesus Christ, David's son, Abraham's son:" "Matthew",1,1,"The family tree of Jesus Christ, David's son, Abraham's son:"
"Matthew",1,2,"Abraham had Isaac, Isaac had Jacob, Jacob had Judah and his brothers," "Matthew",1,2,"Abraham had Isaac, Isaac had Jacob, Jacob had Judah and his brothers,"
"Matthew",1,3,"Judah had Perez and Zerah (the mother was Tamar), Perez had Hezron, Hezron had Aram," "Matthew",1,3,"Judah had Perez and Zerah (the mother was Tamar), Perez had Hezron, Hezron had Aram,"
"Matthew",1,4,"Aram had Amminadab, Amminadab had Nahshon, Nahshon had Salmon," "Matthew",1,4,"Aram had Amminadab, Amminadab had Nahshon, Nahshon had Salmon,"
"Matthew",1,5,"Salmon had Boaz (his mother was Rahab), Boaz had Obed (Ruth was the mother), Obed had Jesse," "Matthew",1,5,"Salmon had Boaz (his mother was Rahab), Boaz had Obed (Ruth was the mother), Obed had Jesse,"
"Matthew",1,6,"Jesse had David, and David became king. David had Solomon (Uriah's wife was the mother)," "Matthew",1,6,"Jesse had David, and David became king. David had Solomon (Uriah's wife was the mother),"
"Matthew",1,7,"Solomon had Rehoboam, Rehoboam had Abijah, Abijah had Asa," "Matthew",1,7,"Solomon had Rehoboam, Rehoboam had Abijah, Abijah had Asa,"
"Matthew",1,8,"Asa had Jehoshaphat, Jehoshaphat had Joram, Joram had Uzziah," "Matthew",1,8,"Asa had Jehoshaphat, Jehoshaphat had Joram, Joram had Uzziah,"
"Matthew",2,1,"After Jesus was born in Bethlehem village, Judah territory - this was during Herod's kingship - a band of scholars arrived in Jerusalem from the East." "Matthew",2,1,"After Jesus was born in Bethlehem village, Judah territory - this was during Herod's kingship - a band of scholars arrived in Jerusalem from the East."
"Matthew",2,2,"They asked around, ""Where can we find and pay homage to the newborn King of the Jews? We observed a star in the eastern sky that "Matthew",3,1,"While Jesus was living in the Galilean hills, John, called ""the Baptizer,"" was preaching in the desert country of Judea." "Matthew",2,2,"They asked around, ""Where can we find and pay homage to the newborn King of the Jews? We observed a star in the eastern sky that "Matthew",3,1,"While Jesus was living in the Galilean hills, John, called ""the Baptizer,"" was preaching in the desert country of Judea."
"Matthew",3,2,"His message was simple and austere, like his desert surroundings: ""Change your life. God's kingdom is here.""" "Matthew",3,2,"His message was simple and austere, like his desert surroundings: ""Change your life. God's kingdom is here."""
"Matthew",3,3,"John and his message were authorized by Isaiah's prophecy: Thunder in the desert! Prepare for God's arrival! Make the road smooth and straight!" "Matthew",3,3,"John and his message were authorized by Isaiah's prophecy: Thunder in the desert! Prepare for God's arrival! Make the road smooth and straight!"
"Mark",1,1,"The good news of Jesus Christ - the Message! - begins here," "Mark",1,1,"The good news of Jesus Christ - the Message! - begins here,"
"Mark",1,2,"following to the letter the scroll of the prophet Isaiah. Watch closely: I'm sending my preacher ahead of you; He'll make the road smooth for you." "Mark",1,2,"following to the letter the scroll of the prophet Isaiah. Watch closely: I'm sending my preacher ahead of you; He'll make the road smooth for you."
"Mark",1,3,"Thunder in the desert! Prepare for God's arrival! Make the road smooth and straight!" "Mark",1,3,"Thunder in the desert! Prepare for God's arrival! Make the road smooth and straight!"
"Luke",1,1,"So many others have tried their hand at putting together a story of the wonderful harvest of Scripture and history that took place among us," "Luke",1,1,"So many others have tried their hand at putting together a story of the wonderful harvest of Scripture and history that took place among us,"
"Luke",1,2,"using reports handed down by the original eyewitnesses who served this Word with their very lives." "Luke",1,2,"using reports handed down by the original eyewitnesses who served this Word with their very lives."
"Luke",1,3,"Since I have investigated all the reports in close detail, starting from the story's beginning, I decided to write it all out for you, most honorable Theophilus," "Luke",1,3,"Since I have investigated all the reports in close detail, starting from the story's beginning, I decided to write it all out for you, most honorable Theophilus,"
"John",1,1,"The Word was first, the Word present to God, God present to the Word. The Word was God," "John",1,1,"The Word was first, the Word present to God, God present to the Word. The Word was God,"
"John",1,2,"in readiness for God from day one." "John",1,2,"in readiness for God from day one."
"John",1,3,"Everything was created through him; nothing - not one thing! - came into being without him." "John",1,3,"Everything was created through him; nothing - not one thing! - came into being without him."
"John",2,1,"Three days later there was a wedding in the village of Cana in Galilee. Jesus' mother was there." "John",2,1,"Three days later there was a wedding in the village of Cana in Galilee. Jesus' mother was there."
"John",2,2,"Jesus and his disciples were guests also." "John",2,2,"Jesus and his disciples were guests also."
"John",2,3,"When they started running low on wine at the wedding banquet, Jesus' mother told him, ""They're just about out of wine.""" "John",2,3,"When they started running low on wine at the wedding banquet, Jesus' mother told him, ""They're just about out of wine."""

Can't render this file because it contains an unexpected character in line 21 and column 146.

View File

@ -1,116 +1,116 @@
PPTVIEWLIB - Control PowerPoint Viewer 2003/2007 (for openlp.org) PPTVIEWLIB - Control PowerPoint Viewer 2003/2007 (for openlp.org)
Copyright (C) 2008 Jonathan Corwin (j@corwin.co.uk) Copyright (C) 2008 Jonathan Corwin (j@corwin.co.uk)
This library wrappers the free Microsoft PowerPoint Viewer (2003/2007) program, This library wrappers the free Microsoft PowerPoint Viewer (2003/2007) program,
allowing it to be more easily controlled from another program. allowing it to be more easily controlled from another program.
The PowerPoint Viewer must already be installed on the destination machine, and is The PowerPoint Viewer must already be installed on the destination machine, and is
freely available at microsoft.com. freely available at microsoft.com.
The full Microsoft Office PowerPoint and PowerPoint Viewer 97 have a COM interface allowing The full Microsoft Office PowerPoint and PowerPoint Viewer 97 have a COM interface allowing
automation. This ability was removed from the 2003+ viewer offerings. automation. This ability was removed from the 2003+ viewer offerings.
To developers: I am not a C/C++ or Win32 API programmer as you can probably tell. To developers: I am not a C/C++ or Win32 API programmer as you can probably tell.
The code and API of this DLL could certainly do with some tidying up, and the The code and API of this DLL could certainly do with some tidying up, and the
error trapping, where it exists, is very basic. I'll happily accept patches! error trapping, where it exists, is very basic. I'll happily accept patches!
This library is covered by the GPL (http://www.gnu.org/licenses/) This library is covered by the GPL (http://www.gnu.org/licenses/)
It is NOT covered by the LGPL, so can only be used in GPL compatable programs. It is NOT covered by the LGPL, so can only be used in GPL compatable programs.
(http://www.gnu.org/licenses/why-not-lgpl.html) (http://www.gnu.org/licenses/why-not-lgpl.html)
This README.TXT must be distributed with the pptviewlib.dll This README.TXT must be distributed with the pptviewlib.dll
This library has a limit of 50 PowerPoints which can be opened simultaneously. This library has a limit of 50 PowerPoints which can be opened simultaneously.
USAGE USAGE
----- -----
int OpenPPT(char *filename, HWND hParentWnd, RECT rect, char *previewpath); int OpenPPT(char *filename, HWND hParentWnd, RECT rect, char *previewpath);
Opens the PowerPoint file, counts the number of slides, sizes and positions accordingly Opens the PowerPoint file, counts the number of slides, sizes and positions accordingly
and creates preview images of each slide. Note PowerPoint Viewer only allows the and creates preview images of each slide. Note PowerPoint Viewer only allows the
slideshow to be resized whilst it is being loaded. It can be moved at any time however. slideshow to be resized whilst it is being loaded. It can be moved at any time however.
The only way to count the number of slides is to step through the entire show. Therefore The only way to count the number of slides is to step through the entire show. Therefore
there will be a delay whilst opening large presentations for the first time. there will be a delay whilst opening large presentations for the first time.
For pre XP/2003 systems, the slideshow will flicker as the screen snapshots are taken. For pre XP/2003 systems, the slideshow will flicker as the screen snapshots are taken.
filename: The PowerPoint file to be opened. Full path filename: The PowerPoint file to be opened. Full path
hParentWnd: The window which will become the parent of the slideshow window. hParentWnd: The window which will become the parent of the slideshow window.
Can be NULL. Can be NULL.
rect: The location/dimensions of the slideshow window. rect: The location/dimensions of the slideshow window.
If all properties of this structure are zero, the dimensions of the hParentWnd If all properties of this structure are zero, the dimensions of the hParentWnd
are used. are used.
previewpath If specified, the prefix to use for snapshot images of each slide, in the previewpath If specified, the prefix to use for snapshot images of each slide, in the
form: previewpath + n + ".bmp", where n is the slide number. form: previewpath + n + ".bmp", where n is the slide number.
A file called previewpath + "info.txt" will also be created containing information A file called previewpath + "info.txt" will also be created containing information
about the PPT file, to speed up future openings of the unmodified file. about the PPT file, to speed up future openings of the unmodified file.
Note it is up the calling program to directly access these images if they Note it is up the calling program to directly access these images if they
are required. are required.
RETURNS: An unique identifier to pass to other methods in this library. RETURNS: An unique identifier to pass to other methods in this library.
If < 0, then the PPT failed to open. If < 0, then the PPT failed to open.
If >=0, ClosePPT must be called when the PPT is no longer being used If >=0, ClosePPT must be called when the PPT is no longer being used
or when the calling program is closed to release resources/hooks. or when the calling program is closed to release resources/hooks.
void ClosePPT(int id); void ClosePPT(int id);
Closes the presentation, releasing any resources and hooks. Closes the presentation, releasing any resources and hooks.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
int GetCurrentSlide(int id); int GetCurrentSlide(int id);
Returns the current slide number (from 1) Returns the current slide number (from 1)
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
int GetSlideCount(int id); int GetSlideCount(int id);
Returns the total number of slides. Returns the total number of slides.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void NextStep(int id); void NextStep(int id);
Advances one step (animation) through the slideshow. Advances one step (animation) through the slideshow.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void PrevStep(int id); void PrevStep(int id);
Goes backwards one step (animation) through the slideshow. Goes backwards one step (animation) through the slideshow.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void GotoSlide(int id, int slideno); void GotoSlide(int id, int slideno);
Goes directly to a specific slide in the slideshow Goes directly to a specific slide in the slideshow
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
slideno: The number of the slide (from 1) to go directly to. slideno: The number of the slide (from 1) to go directly to.
If the slide has already been displayed, then the completed slide with animations performed If the slide has already been displayed, then the completed slide with animations performed
will be shown. This is how the PowerPoint Viewer works so have no control over this. will be shown. This is how the PowerPoint Viewer works so have no control over this.
void RestartShow(int id); void RestartShow(int id);
Restarts the show from the beginning. To reset animations, behind the scenes it Restarts the show from the beginning. To reset animations, behind the scenes it
has to travel to the end and step backwards though the entire show. Therefore has to travel to the end and step backwards though the entire show. Therefore
for large presentations there might be a delay. for large presentations there might be a delay.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void Blank(int id); void Blank(int id);
Blanks the screen, colour black. Blanks the screen, colour black.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void Unblank(int id) void Unblank(int id)
Unblanks the screen, restoring it to it's pre-blank state. Unblanks the screen, restoring it to it's pre-blank state.
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void Stop(int id) void Stop(int id)
Moves the slideshow off the screen. (There is no concept of stop show in the PowerPoint Viewer) Moves the slideshow off the screen. (There is no concept of stop show in the PowerPoint Viewer)
id: The value returned from OpenPPT. id: The value returned from OpenPPT.
void Resume(int id) void Resume(int id)
Moves the slideshow display back onto the screen following a Stop() Moves the slideshow display back onto the screen following a Stop()
id: The value returned from OpenPPT. id: The value returned from OpenPPT.

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +1,54 @@
#define DllExport extern "C" __declspec( dllexport ) #define DllExport extern "C" __declspec( dllexport )
enum PPTVIEWSTATE { PPT_CLOSED, PPT_STARTED, PPT_OPENED, PPT_LOADED, PPT_CLOSING}; enum PPTVIEWSTATE { PPT_CLOSED, PPT_STARTED, PPT_OPENED, PPT_LOADED, PPT_CLOSING};
DllExport int OpenPPT(char *filename, HWND hParentWnd, RECT rect, char *previewpath); DllExport int OpenPPT(char *filename, HWND hParentWnd, RECT rect, char *previewpath);
DllExport void ClosePPT(int id); DllExport void ClosePPT(int id);
DllExport int GetCurrentSlide(int id); DllExport int GetCurrentSlide(int id);
DllExport int GetSlideCount(int id); DllExport int GetSlideCount(int id);
DllExport void NextStep(int id); DllExport void NextStep(int id);
DllExport void PrevStep(int id); DllExport void PrevStep(int id);
DllExport void GotoSlide(int id, int slideno); DllExport void GotoSlide(int id, int slideno);
DllExport void RestartShow(int id); DllExport void RestartShow(int id);
DllExport void Blank(int id); DllExport void Blank(int id);
DllExport void Unblank(int id); DllExport void Unblank(int id);
DllExport void Stop(int id); DllExport void Stop(int id);
DllExport void Resume(int id); DllExport void Resume(int id);
DllExport void SetDebug(BOOL onoff); DllExport void SetDebug(BOOL onoff);
LRESULT CALLBACK CbtProc(int nCode, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK CbtProc(int nCode, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK CwpProc(int nCode, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK CwpProc(int nCode, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam);
BOOL GetPPTViewerPath(char *pptviewerpath, int strsize); BOOL GetPPTViewerPath(char *pptviewerpath, int strsize);
HBITMAP CaptureWindow (HWND hWnd); HBITMAP CaptureWindow (HWND hWnd);
VOID SaveBitmap (CHAR* filename, HBITMAP hBmp) ; VOID SaveBitmap (CHAR* filename, HBITMAP hBmp) ;
VOID CaptureAndSaveWindow(HWND hWnd, CHAR* filename); VOID CaptureAndSaveWindow(HWND hWnd, CHAR* filename);
BOOL GetPPTInfo(int id); BOOL GetPPTInfo(int id);
BOOL SavePPTInfo(int id); BOOL SavePPTInfo(int id);
void Unhook(int id); void Unhook(int id);
#define MAX_PPTOBJS 50 #define MAX_PPTOBJS 50
struct PPTVIEWOBJ struct PPTVIEWOBJ
{ {
HHOOK hook; HHOOK hook;
HHOOK mhook; HHOOK mhook;
HWND hWnd; HWND hWnd;
HWND hWnd2; HWND hWnd2;
HWND hParentWnd; HWND hParentWnd;
HANDLE hProcess; HANDLE hProcess;
HANDLE hThread; HANDLE hThread;
DWORD dwProcessId; DWORD dwProcessId;
DWORD dwThreadId; DWORD dwThreadId;
RECT rect; RECT rect;
int slideCount; int slideCount;
int currentSlide; int currentSlide;
int firstSlideSteps; int firstSlideSteps;
int steps; int steps;
char filename[MAX_PATH]; char filename[MAX_PATH];
char previewpath[MAX_PATH]; char previewpath[MAX_PATH];
PPTVIEWSTATE state; PPTVIEWSTATE state;
}; };

View File

@ -1,203 +1,203 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9.00"
Name="pptviewlib" Name="pptviewlib"
ProjectGUID="{04CC20D1-DC5A-4189-8181-4011E3C21DCF}" ProjectGUID="{04CC20D1-DC5A-4189-8181-4011E3C21DCF}"
RootNamespace="pptviewlib" RootNamespace="pptviewlib"
Keyword="Win32Proj" Keyword="Win32Proj"
TargetFrameworkVersion="196613" TargetFrameworkVersion="196613"
> >
<Platforms> <Platforms>
<Platform <Platform
Name="Win32" Name="Win32"
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2" ConfigurationType="2"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PPTVIEWLIB_EXPORTS" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PPTVIEWLIB_EXPORTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="4" DebugInformationFormat="4"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
LinkIncremental="2" LinkIncremental="2"
ModuleDefinitionFile="" ModuleDefinitionFile=""
GenerateDebugInformation="true" GenerateDebugInformation="true"
SubSystem="2" SubSystem="2"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2" ConfigurationType="2"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
/> />
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool <Tool
Name="VCWebServiceProxyGeneratorTool" Name="VCWebServiceProxyGeneratorTool"
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PPTVIEWLIB_EXPORTS" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PPTVIEWLIB_EXPORTS"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
LinkIncremental="1" LinkIncremental="1"
ModuleDefinitionFile="pptviewlib.def" ModuleDefinitionFile="pptviewlib.def"
GenerateDebugInformation="true" GenerateDebugInformation="true"
SubSystem="2" SubSystem="2"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
/> />
<Tool <Tool
Name="VCManifestTool" Name="VCManifestTool"
/> />
<Tool <Tool
Name="VCXDCMakeTool" Name="VCXDCMakeTool"
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
/> />
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
Name="Source Files" Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> >
<File <File
RelativePath=".\pptviewlib.cpp" RelativePath=".\pptviewlib.cpp"
> >
</File> </File>
<File <File
RelativePath=".\README.TXT" RelativePath=".\README.TXT"
> >
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
> >
<File <File
RelativePath=".\pptviewlib.h" RelativePath=".\pptviewlib.h"
> >
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
> >
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -1,56 +1,56 @@
<?xml version="1.0" encoding="utf-8"?><song><title>På en fjern ensom høj</title><author></author><copyright></copyright><ccli></ccli><lyrics>[V1] <?xml version="1.0" encoding="utf-8"?><song><title>På en fjern ensom høj</title><author></author><copyright></copyright><ccli></ccli><lyrics>[V1]
På en fjern ensom høj, På en fjern ensom høj,
Jesu kors dyrest stod, Jesu kors dyrest stod,
symbolet på smerte og skam. symbolet på smerte og skam.
O, jeg elsker det kors, O, jeg elsker det kors,
hvor Guds søn gjorde bod, hvor Guds søn gjorde bod,
da forbandelsen blev lagt på ham. da forbandelsen blev lagt på ham.
[C1] [C1]
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
[V2] [V2]
O, det urgamle kors, O, det urgamle kors,
med sin hvile og fred, med sin hvile og fred,
tilhyllet i verdens foragt. tilhyllet i verdens foragt.
Se, det hellige lam, Se, det hellige lam,
som på Golgatha stred, som på Golgatha stred,
og til jorden Guds nåde har bragt. og til jorden Guds nåde har bragt.
[C2] [C2]
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
[V3] [V3]
I det urgamle kors, I det urgamle kors,
i hans blod farvet rødt, i hans blod farvet rødt,
en underfuld skønhed jeg ser. en underfuld skønhed jeg ser.
Ja, det var på det kors, Ja, det var på det kors,
at han selv blev forstødt, at han selv blev forstødt,
nu skal aldrig for dommen jeg mer. nu skal aldrig for dommen jeg mer.
[C3] [C3]
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
[V4] [V4]
For det urgamle kors, For det urgamle kors,
står mit hjerte i brand, står mit hjerte i brand,
min plads jeg nu har ved dets fod. min plads jeg nu har ved dets fod.
Til han kalder en dag, Til han kalder en dag,
mig til himmelens land, mig til himmelens land,
og til hvilen hos Faderen god. og til hvilen hos Faderen god.
[C4] [C4]
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
</lyrics><presentation>V1 C1 V2 C2 V3 C3 V4 C4</presentation></song> </lyrics><presentation>V1 C1 V2 C2 V3 C3 V4 C4</presentation></song>

View File

@ -1,36 +1,36 @@
Song Title Here Song Title Here
Chorus 1 Chorus 1
Lyrics Lyrics
Lyrics Lyrics
Lyrics Lyrics
Lyrics Lyrics
Verse 1 Verse 1
Lyrics Lyrics
Lyrics Lyrics
Lyrics Lyrics
Verse 2 Verse 2
Lyrics Lyrics
Lyrics Lyrics
Lyrics Lyrics
Misc 1 Misc 1
(BRIDGE) (BRIDGE)
Lyrics Lyrics
Lyrics Lyrics
Lyrics Lyrics
Lyrics Lyrics
CCLI Song No. 1234567 CCLI Song No. 1234567
© 1996 Publisher Info © 1996 Publisher Info
Author/artist name Author/artist name
For use solely in accordance with the SongSelect Advanced Terms of Agreement. All rights Reserved. For use solely in accordance with the SongSelect Advanced Terms of Agreement. All rights Reserved.
CCLI License No. 1234567 CCLI License No. 1234567

View File

@ -1,61 +1,61 @@
På en fjern ensom høj På en fjern ensom høj
Verse 1 Verse 1
På en fjern ensom høj, På en fjern ensom høj,
Jesu kors dyrest stod, Jesu kors dyrest stod,
symbolet på smerte og skam. symbolet på smerte og skam.
O, jeg elsker det kors, O, jeg elsker det kors,
hvor Guds søn gjorde bod, hvor Guds søn gjorde bod,
da forbandelsen blev lagt på ham. da forbandelsen blev lagt på ham.
Chorus 1 Chorus 1
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
Verse 2 Verse 2
O, det urgamle kors, O, det urgamle kors,
med sin hvile og fred, med sin hvile og fred,
tilhyllet i verdens foragt. tilhyllet i verdens foragt.
Se, det hellige lam, Se, det hellige lam,
som på Golgatha stred, som på Golgatha stred,
og til jorden Guds nåde har bragt. og til jorden Guds nåde har bragt.
Chorus 2 Chorus 2
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
Verse 3 Verse 3
I det urgamle kors, I det urgamle kors,
i hans blod farvet rødt, i hans blod farvet rødt,
en underfuld skønhed jeg ser. en underfuld skønhed jeg ser.
Ja, det var på det kors, Ja, det var på det kors,
at han selv blev forstødt, at han selv blev forstødt,
nu skal aldrig for dommen jeg mer. nu skal aldrig for dommen jeg mer.
Chorus 3 Chorus 3
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
Verse 4 Verse 4
For det urgamle kors, For det urgamle kors,
står mit hjerte i brand, står mit hjerte i brand,
min plads jeg nu har ved dets fod. min plads jeg nu har ved dets fod.
Til han kalder en dag, Til han kalder en dag,
mig til himmelens land, mig til himmelens land,
og til hvilen hos Faderen god. og til hvilen hos Faderen god.
Chorus 4 Chorus 4
Jeg vil elske det urgamle kors, Jeg vil elske det urgamle kors,
i det kraft er der sejer og sang. i det kraft er der sejer og sang.
Lad mig favne det hellige kors, Lad mig favne det hellige kors,
det med kronen ombyttes engang. det med kronen ombyttes engang.
CCLI Song No. CCLI Song No.
© ©
Georg Bennard Georg Bennard

View File

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<Song> <Song>
<lyrics lang="en_US"> <lyrics lang="en_US">
<title>Amazing Grace</title> <title>Amazing Grace</title>
<verse name="v1"> <verse name="v1">
<theme>name of verse specific theme</theme> <theme>name of verse specific theme</theme>
<comment>any text</comment> <comment>any text</comment>
<part name="men"> <part name="men">
Amazing grace, how ... Amazing grace, how ...
</part> </part>
<part name="women"> <part name="women">
A b c A b c
D e f D e f
</part> </part>
... ...
</verse> </verse>
<verse name="c"> <verse name="c">
<comment>any text</comment> <comment>any text</comment>
... ...
</verse> </verse>
</lyrics> </lyrics>
<lyrics lang="de_DE"> <lyrics lang="de_DE">
<title>Erstaunliche Anmut</title> <title>Erstaunliche Anmut</title>
<verse name="v1"> <verse name="v1">
Erstaunliche Anmut, wie Erstaunliche Anmut, wie
... ...
</verse> </verse>
<verse name="c"> <verse name="c">
... ...
</verse> </verse>
</lyrics> </lyrics>
</Song> </Song>

View File

@ -1,6 +1,6 @@
# audio/video sync test # audio/video sync test
# by: Andrew Lok # by: Andrew Lok
# 2009-06-22 # 2009-06-22
Import("synctest.avsi") Import("synctest.avsi")
SyncClip(23.976, 44100) SyncClip(23.976, 44100)

View File

@ -1,6 +1,6 @@
# audio/video sync test # audio/video sync test
# by: Andrew Lok # by: Andrew Lok
# 2009-06-22 # 2009-06-22
Import("synctest.avsi") Import("synctest.avsi")
SyncClip(25, 48000) SyncClip(25, 48000)

View File

@ -1,6 +1,6 @@
# audio/video sync test # audio/video sync test
# by: Andrew Lok # by: Andrew Lok
# 2009-06-22 # 2009-06-22
Import("synctest.avsi") Import("synctest.avsi")
SyncClip(29.97, 32000) SyncClip(29.97, 32000)

View File

@ -1,7 +1,7 @@
# audio/video sync test # audio/video sync test
# by: Andrew Lok # by: Andrew Lok
# 2009-06-22 # 2009-06-22
Import("synctest.avsi") Import("synctest.avsi")
SyncClip(29.97, 22050) SyncClip(29.97, 22050)
BicubicResize(640,360) BicubicResize(640,360)

View File

@ -1,47 +1,47 @@
# audio/video sync test # audio/video sync test
# by: Andrew Lok # by: Andrew Lok
# 2009-06-22 # 2009-06-22
# #
# This code is part of OpenLP's testsuite # This code is part of OpenLP's testsuite
# OpenLP - Open Source Lyrics Projection # OpenLP - Open Source Lyrics Projection
# Copyright (c) 2009 Andrew Lok # Copyright (c) 2009 Andrew Lok
# #
# This program is free software; you can redistribute it and/or modify it under # This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software # the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License. # Foundation; version 2 of the License.
# #
# This program is distributed in the hope that it will be useful, but WITHOUT ANY # This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details. # PARTICULAR PURPOSE. See the GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA # Place, Suite 330, Boston, MA 02111-1307 USA
# #
function SyncClip(float framerate, int audiorate) function SyncClip(float framerate, int audiorate)
{ {
frames=30 frames=30
seconds=frames/framerate seconds=frames/framerate
silence = Tone(seconds, 440, audiorate, 1, "silence", 1.0) silence = Tone(seconds, 440, audiorate, 1, "silence", 1.0)
tone = Tone(seconds, 440, audiorate, 1, "sine", 1.0) tone = Tone(seconds, 440, audiorate, 1, "sine", 1.0)
silence2 = MonoToStereo(silence, silence) silence2 = MonoToStereo(silence, silence)
left = MonoToStereo(tone, silence) left = MonoToStereo(tone, silence)
right = MonoToStereo(silence, tone) right = MonoToStereo(silence, tone)
leftvid=ImageSource("left-720.png",end = frames, fps=framerate, use_DevIL=true) leftvid=ImageSource("left-720.png",end = frames, fps=framerate, use_DevIL=true)
rightvid=ImageSource("right-720.png",end = frames, fps=framerate, use_DevIL=true) rightvid=ImageSource("right-720.png",end = frames, fps=framerate, use_DevIL=true)
normalvid=ImageSource("normal-720.png",end = frames, fps=framerate, use_DevIL=true) normalvid=ImageSource("normal-720.png",end = frames, fps=framerate, use_DevIL=true)
cycle = AudioDub(leftvid,left) ++ AudioDub(normalvid,silence2) ++ AudioDub(rightvid,right) ++ AudioDub(normalvid,silence2) cycle = AudioDub(leftvid,left) ++ AudioDub(normalvid,silence2) ++ AudioDub(rightvid,right) ++ AudioDub(normalvid,silence2)
final = loop(cycle,times=5) final = loop(cycle,times=5)
final = final.ConvertToYV12() final = final.ConvertToYV12()
final = final.info() final = final.info()
return final return final
} }