diff --git a/documentation/Makefile b/documentation/api/Makefile similarity index 100% rename from documentation/Makefile rename to documentation/api/Makefile diff --git a/documentation/make.bat b/documentation/api/make.bat similarity index 100% rename from documentation/make.bat rename to documentation/api/make.bat diff --git a/documentation/source/conf.py b/documentation/api/source/conf.py similarity index 96% rename from documentation/source/conf.py rename to documentation/api/source/conf.py index 248c83e56..51ecfee0c 100644 --- a/documentation/source/conf.py +++ b/documentation/api/source/conf.py @@ -17,7 +17,7 @@ import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) +sys.path.insert(0, os.path.abspath(os.path.join('..', '..', '..'))) # -- General configuration ----------------------------------------------------- @@ -39,7 +39,7 @@ master_doc = 'index' # General information about the project. project = u'OpenLP' -copyright = u'2009, Raoul Snyman' +copyright = u'2004-2010, Raoul Snyman' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -48,7 +48,7 @@ copyright = u'2009, Raoul Snyman' # The short X.Y version. version = '2.0' # The full version, including alpha/beta/rc tags. -release = '2.0.pre' +release = '1.9.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -111,7 +111,7 @@ html_theme_options = { # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = 'OpenLP 2.0 Developer API' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None @@ -166,7 +166,7 @@ html_static_path = ['_static'] #html_file_suffix = '' # Output file base name for HTML help builder. -htmlhelp_basename = 'OpenLPdoc' +htmlhelp_basename = 'OpenLP-2.0-api' # -- Options for LaTeX output -------------------------------------------------- @@ -180,7 +180,7 @@ htmlhelp_basename = 'OpenLPdoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'OpenLP.tex', u'OpenLP Documentation', + ('index', 'OpenLP.tex', u'OpenLP 2.0 Developer API', u'Raoul Snyman', 'manual'), ] diff --git a/documentation/source/core/index.rst b/documentation/api/source/core/index.rst similarity index 65% rename from documentation/source/core/index.rst rename to documentation/api/source/core/index.rst index 38a98ab97..8555e1ebe 100644 --- a/documentation/source/core/index.rst +++ b/documentation/api/source/core/index.rst @@ -3,9 +3,13 @@ :mod:`core` Module ================== +.. automodule:: openlp.core + :members: + .. toctree:: :maxdepth: 2 lib theme - + ui + utils \ No newline at end of file diff --git a/documentation/source/core/lib.rst b/documentation/api/source/core/lib.rst similarity index 97% rename from documentation/source/core/lib.rst rename to documentation/api/source/core/lib.rst index 5fc66200d..6ca952d7d 100644 --- a/documentation/source/core/lib.rst +++ b/documentation/api/source/core/lib.rst @@ -1,7 +1,7 @@ .. _core-lib: -:mod:`lib` Module -================= +Object Library +============== .. automodule:: openlp.core.lib :members: diff --git a/documentation/source/core/theme.rst b/documentation/api/source/core/theme.rst similarity index 100% rename from documentation/source/core/theme.rst rename to documentation/api/source/core/theme.rst diff --git a/documentation/api/source/core/ui.rst b/documentation/api/source/core/ui.rst new file mode 100644 index 000000000..63db7478e --- /dev/null +++ b/documentation/api/source/core/ui.rst @@ -0,0 +1,27 @@ +.. _core-ui: + +User Interface +============== + +.. automodule:: openlp.core.ui + +Main Windows +------------ + +.. autoclass:: openlp.core.ui.mainwindow.MainWindow + :members: + +.. autoclass:: openlp.core.ui.maindisplay.MainDisplay + :members: + +Managers +-------- + +.. autoclass:: openlp.core.ui.servicemanager.ServiceManager + :members: + +.. autoclass:: openlp.core.ui.mediadockmanager.MediaDockManager + :members: + +.. autoclass:: openlp.core.ui.thememanager.ThemeManager + :members: diff --git a/documentation/api/source/core/utils.rst b/documentation/api/source/core/utils.rst new file mode 100644 index 000000000..d0c6a672b --- /dev/null +++ b/documentation/api/source/core/utils.rst @@ -0,0 +1,7 @@ +.. _core-utils: + +Utilities +========= + +.. automodule:: openlp.core.utils + :members: diff --git a/documentation/source/index.rst b/documentation/api/source/index.rst similarity index 98% rename from documentation/source/index.rst rename to documentation/api/source/index.rst index cd64b13a1..e1aeebbab 100644 --- a/documentation/source/index.rst +++ b/documentation/api/source/index.rst @@ -15,7 +15,6 @@ Contents: .. toctree:: :maxdepth: 2 - openlp core/index plugins/index diff --git a/documentation/source/openlp.rst b/documentation/api/source/openlp.rst similarity index 100% rename from documentation/source/openlp.rst rename to documentation/api/source/openlp.rst diff --git a/documentation/api/source/plugins/alerts.rst b/documentation/api/source/plugins/alerts.rst new file mode 100644 index 000000000..e7cf33d63 --- /dev/null +++ b/documentation/api/source/plugins/alerts.rst @@ -0,0 +1,31 @@ +.. _plugins-alerts: + +Alerts Plugin +============= + +.. automodule:: openlp.plugins.alerts + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.alerts.alertsplugin.AlertsPlugin + :members: + +Forms +----- + +.. automodule:: openlp.plugins.alerts.forms + :members: + +.. autoclass:: openlp.plugins.alerts.forms.alertform.AlertForm + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.alerts.lib + :members: + +.. automodule:: openlp.plugins.alerts.lib.db + :members: diff --git a/documentation/api/source/plugins/bibles.rst b/documentation/api/source/plugins/bibles.rst new file mode 100644 index 000000000..67162d414 --- /dev/null +++ b/documentation/api/source/plugins/bibles.rst @@ -0,0 +1,55 @@ +.. _plugins-bibles: + +Bibles Plugin +============= + +.. automodule:: openlp.plugins.bibles + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.bibles.bibleplugin.BiblePlugin + :members: + +Forms +----- + +.. automodule:: openlp.plugins.bibles.forms + :members: + +.. autoclass:: openlp.plugins.bibles.forms.importwizardform.ImportWizardForm + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.bibles.lib + :members: + +.. automodule:: openlp.plugins.bibles.lib.db + :members: + +.. automodule:: openlp.plugins.bibles.lib.biblestab + :members: + +.. automodule:: openlp.plugins.bibles.lib.manager + :members: + +.. automodule:: openlp.plugins.bibles.lib.mediaitem + :members: + +Bible Importers +--------------- + +.. automodule:: openlp.plugins.bibles.lib.csvbible + :members: + +.. automodule:: openlp.plugins.bibles.lib.http + :members: + +.. automodule:: openlp.plugins.bibles.lib.osis + :members: + +.. automodule:: openlp.plugins.bibles.lib.opensong + :members: diff --git a/documentation/api/source/plugins/custom.rst b/documentation/api/source/plugins/custom.rst new file mode 100644 index 000000000..f50b86d41 --- /dev/null +++ b/documentation/api/source/plugins/custom.rst @@ -0,0 +1,34 @@ +.. _plugins-custom: + +Custom Slides Plugin +==================== + +.. automodule:: openlp.plugins.custom + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.custom.customplugin.CustomPlugin + :members: + +Forms +----- + +.. automodule:: openlp.plugins.custom.forms + :members: + +.. autoclass:: openlp.plugins.custom.forms.editcustomform.EditCustomForm + :members: + +.. autoclass:: openlp.plugins.custom.forms.editcustomslideform.EditCustomSlideForm + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.custom.lib + :members: + +.. automodule:: openlp.plugins.custom.lib.mediaitem + :members: diff --git a/documentation/api/source/plugins/images.rst b/documentation/api/source/plugins/images.rst new file mode 100644 index 000000000..1007fc64c --- /dev/null +++ b/documentation/api/source/plugins/images.rst @@ -0,0 +1,22 @@ +.. _plugins-images: + +Images Plugin +============= + +.. automodule:: openlp.plugins.images + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.images.imageplugin.ImagePlugin + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.images.lib + :members: + +.. automodule:: openlp.plugins.images.lib.mediaitem + :members: diff --git a/documentation/api/source/plugins/index.rst b/documentation/api/source/plugins/index.rst new file mode 100644 index 000000000..78126ff9e --- /dev/null +++ b/documentation/api/source/plugins/index.rst @@ -0,0 +1,20 @@ +.. _plugins-index: + +Plugins +======= + +.. automodule:: openlp.plugins + :members: + +.. toctree:: + :maxdepth: 2 + + songs + bibles + presentations + media + images + custom + remotes + songusage + alerts diff --git a/documentation/api/source/plugins/media.rst b/documentation/api/source/plugins/media.rst new file mode 100644 index 000000000..a8486c9b4 --- /dev/null +++ b/documentation/api/source/plugins/media.rst @@ -0,0 +1,22 @@ +.. _plugins-media: + +Media Plugin +============ + +.. automodule:: openlp.plugins.media + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.media.mediaplugin.MediaPlugin + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.media.lib + :members: + +.. automodule:: openlp.plugins.media.lib.mediaitem + :members: diff --git a/documentation/api/source/plugins/presentations.rst b/documentation/api/source/plugins/presentations.rst new file mode 100644 index 000000000..dd688ddf6 --- /dev/null +++ b/documentation/api/source/plugins/presentations.rst @@ -0,0 +1,40 @@ +.. _plugins-presentations: + +Presentations Plugin +==================== + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.presentations.presentationplugin.PresentationPlugin + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.presentations.lib + :members: + +.. automodule:: openlp.plugins.presentations.lib.mediaitem + :members: + +.. automodule:: openlp.plugins.presentations.lib.presentationtab + :members: + +.. automodule:: openlp.plugins.presentations.lib.messagelistener + :members: + +.. automodule:: openlp.plugins.presentations.lib.presentationcontroller + :members: + +Presentation Application Controllers +------------------------------------ + +.. automodule:: openlp.plugins.presentations.lib.impresscontroller + :members: + +.. automodule:: openlp.plugins.presentations.lib.pptviewcontroller + :members: + +.. automodule:: openlp.plugins.presentations.lib.powerpointcontroller + :members: diff --git a/documentation/api/source/plugins/remotes.rst b/documentation/api/source/plugins/remotes.rst new file mode 100644 index 000000000..0bcd37119 --- /dev/null +++ b/documentation/api/source/plugins/remotes.rst @@ -0,0 +1,19 @@ +.. _plugins-remotes: + +Remotes Plugin +============== + +.. automodule:: openlp.plugins.remotes + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.remotes.remoteplugin.RemotesPlugin + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.remotes.lib + :members: diff --git a/documentation/api/source/plugins/songs.rst b/documentation/api/source/plugins/songs.rst new file mode 100644 index 000000000..fed9907a2 --- /dev/null +++ b/documentation/api/source/plugins/songs.rst @@ -0,0 +1,103 @@ +.. _plugins-songs: + +Songs Plugin +============ + +.. automodule:: openlp.plugins.songs + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.songs.songsplugin.SongsPlugin + :members: + +Forms +----- + +.. automodule:: openlp.plugins.songs.forms + :members: + +.. autoclass:: openlp.plugins.songs.forms.authorsform.AuthorsForm + :members: + +.. autoclass:: openlp.plugins.songs.forms.editsongform.EditSongForm + :members: + +.. autoclass:: openlp.plugins.songs.forms.editverseform.EditVerseForm + :members: + +.. autoclass:: openlp.plugins.songs.forms.songbookform.SongBookForm + :members: + +.. autoclass:: openlp.plugins.songs.forms.songimportform.SongImportForm + :members: + +.. autoclass:: openlp.plugins.songs.forms.songmaintenanceform.SongMaintenanceForm + :members: + +.. autoclass:: openlp.plugins.songs.forms.topicsform.TopicsForm + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.songs.lib + :members: + +.. automodule:: openlp.plugins.songs.lib.db + :members: + +.. automodule:: openlp.plugins.songs.lib.importer + :members: + +.. automodule:: openlp.plugins.songs.lib.mediaitem + :members: + +.. autoclass:: openlp.plugins.songs.lib.mediaitem.SongListView + :members: + +.. automodule:: openlp.plugins.songs.lib.songimport + :members: + +.. automodule:: openlp.plugins.songs.lib.songstab + :members: + +.. automodule:: openlp.plugins.songs.lib.xml + :members: + +Song Importers +-------------- + +.. automodule:: openlp.plugins.songs.lib.cclifileimport + :members: + +.. autoclass:: openlp.plugins.songs.lib.cclifileimport.CCLIFileImportError + :members: + +.. automodule:: openlp.plugins.songs.lib.ewimport + :members: + +.. autoclass:: openlp.plugins.songs.lib.ewimport.FieldDescEntry + :members: + +.. automodule:: openlp.plugins.songs.lib.olp1import + :members: + +.. automodule:: openlp.plugins.songs.lib.olpimport + :members: + +.. automodule:: openlp.plugins.songs.lib.oooimport + :members: + +.. automodule:: openlp.plugins.songs.lib.opensongimport + :members: + +.. automodule:: openlp.plugins.songs.lib.sofimport + :members: + +.. automodule:: openlp.plugins.songs.lib.songbeamerimport + :members: + +.. automodule:: openlp.plugins.songs.lib.wowimport + :members: diff --git a/documentation/api/source/plugins/songusage.rst b/documentation/api/source/plugins/songusage.rst new file mode 100644 index 000000000..e4804ea34 --- /dev/null +++ b/documentation/api/source/plugins/songusage.rst @@ -0,0 +1,34 @@ +.. _plugins-songusage: + +Song Usage Plugin +================= + +.. automodule:: openlp.plugins.songusage + :members: + +Plugin Class +------------ + +.. autoclass:: openlp.plugins.songusage.songusageplugin.SongUsagePlugin + :members: + +Forms +----- + +.. automodule:: openlp.plugins.songusage.forms + :members: + +.. autoclass:: openlp.plugins.songusage.forms.songusagedeleteform.SongUsageDeleteForm + :members: + +.. autoclass:: openlp.plugins.songusage.forms.songusagedetailform.SongUsageDetailForm + :members: + +Helper Classes & Functions +-------------------------- + +.. automodule:: openlp.plugins.songusage.lib + :members: + +.. automodule:: openlp.plugins.songusage.lib.db + :members: diff --git a/documentation/manual/Makefile b/documentation/manual/Makefile new file mode 100644 index 000000000..70c821142 --- /dev/null +++ b/documentation/manual/Makefile @@ -0,0 +1,88 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf build/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html + @echo + @echo "Build finished. The HTML pages are in build/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) build/dirhtml + @echo + @echo "Build finished. The HTML pages are in build/dirhtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in build/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in build/qthelp, like this:" + @echo "# qcollectiongenerator build/qthelp/OpenLP.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile build/qthelp/OpenLP.qhc" + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex + @echo + @echo "Build finished; the LaTeX files are in build/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes + @echo + @echo "The overview file is in build/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in build/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) build/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in build/doctest/output.txt." diff --git a/documentation/manual/make.bat b/documentation/manual/make.bat new file mode 100644 index 000000000..8d21b45ce --- /dev/null +++ b/documentation/manual/make.bat @@ -0,0 +1,112 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +set SPHINXBUILD=sphinx-build +set ALLSPHINXOPTS=-d build/doctrees %SPHINXOPTS% source +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (build\*) do rmdir /q /s %%i + del /q /s build\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% build/html + echo. + echo.Build finished. The HTML pages are in build/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% build/dirhtml + echo. + echo.Build finished. The HTML pages are in build/dirhtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% build/pickle + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% build/json + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% build/htmlhelp + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in build/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% build/qthelp + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in build/qthelp, like this: + echo.^> qcollectiongenerator build\qthelp\OpenLP.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile build\qthelp\OpenLP.ghc + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% build/latex + echo. + echo.Build finished; the LaTeX files are in build/latex. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% build/changes + echo. + echo.The overview file is in build/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% build/linkcheck + echo. + echo.Link check complete; look for any errors in the above output ^ +or in build/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% build/doctest + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in build/doctest/output.txt. + goto end +) + +:end diff --git a/documentation/manual/source/conf.py b/documentation/manual/source/conf.py new file mode 100644 index 000000000..517fc2f44 --- /dev/null +++ b/documentation/manual/source/conf.py @@ -0,0 +1,208 @@ +# -*- coding: utf-8 -*- +# +# OpenLP documentation build configuration file, created by +# sphinx-quickstart on Fri Jul 10 17:20:40 2009. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import os +import sys + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) + +# -- General configuration ----------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +#extensions = ['sphinx.ext.autodoc'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'OpenLP' +copyright = u'2004-2010 Raoul Snyman' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '2.0' +# The full version, including alpha/beta/rc tags. +release = '1.9.3' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = [] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +add_module_names = False + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + 'sidebarbgcolor': '#3a60a9', + 'relbarbgcolor': '#203b6f', + 'footerbgcolor': '#26437c', + 'headtextcolor': '#203b6f', + 'linkcolor': '#26437c', + 'sidebarlinkcolor': '#ceceff' +} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +html_title = u'OpenLP 2.0 User Manual' + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'OpenLP-2.0-manual' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'OpenLP.tex', u'OpenLP 2.0 User Manual', + u'Raoul Snyman', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True + +# A dictionary that contains LaTeX snippets that override those Sphinx usually +# puts into the generated .tex files. +latex_elements = { + 'fontpkg': '\\usepackage{helvet}' +} diff --git a/documentation/manual/source/dualmonitors.rst b/documentation/manual/source/dualmonitors.rst new file mode 100644 index 000000000..7e5fdc19b --- /dev/null +++ b/documentation/manual/source/dualmonitors.rst @@ -0,0 +1,180 @@ +================== +Dual Monitor Setup +================== + +The first step in getting OpenLP working on your system is to setup your +computer properly for dual monitors. This is not very difficult, but the steps +do vary depending on operating system. + +Most modern computers do have the ability for dual monitors. To be certain +check your computer's documentation. A typical desktop computer capable of dual +monitors will have two of, or a combination of the two connectors below. + +**VGA** + +.. image:: pics/vga.png + +**DVI** + +.. image:: pics/dvi.png + +A laptop computer setup only varies slightly, generally you will need only one +of outputs pictured above since your laptops screen serves as one of the +monitors. Sometimes with older laptops a key stroke generally involving the +:kbd:`Fn` key and another key is required to enable the second monitor on +laptops. + +Some computers also incorporate the use of :abbr:`S-Video (Separate Video)` or +:abbr:`HDMI (High-Definition Multimedia Interface)` connections. + +A typical OpenLP set up consist of your normal single monitor setup, with your +projector setup as the second monitor. With the option of extending your +desktop across the second monitor, or your operating system's equivalent. + +Microsoft Windows +----------------- + +Dual monitor setup is similar among all the currently supported Windows +releases (XP, Vista, Windows 7), but does vary slightly from one release to the +next. + +Windows 7 +^^^^^^^^^ + +Windows 7 has using a projector in mind. Simply connect your projector and +press :kbd:`Windows+P`. + +The more traditional way is also fairly straight forward. Go to +:guilabel:`Control Panel` and click on :guilabel:`Display`. This will open up +the :guilabel:`Display` dialog. You can also bypass this step by right click on +a blank area on your desktop and selecting :guilabel:`Resolution`. + +.. image:: pics/winsevendisplay.png + +Then click on the :guilabel:`Adjust resolution` link in the left pane. Enable +your projector and make sure that the selected value for :guilabel:`Multiple +displays` is :guilabel:`Extend these displays`. + +.. image:: pics/winsevenresolution.png + +Windows Vista +^^^^^^^^^^^^^ + +From :guilabel:`Control Panel` click on :guilabel:`Personalize`, or right click +a blank place on the desktop and click :guilabel:`Personalization`. + +.. image:: pics/vistapersonalize.png + +From the :guilabel:`Personalization` window click on :guilabel:`Display +Settings`. Then enable the montior that represents your projector and make sure +you have checked :guilabel:`Extend the desktop onto this monitor`. + +.. image:: pics/vistadisplaysettings.png + +Windows XP +^^^^^^^^^^ + +From :guilabel:`Control Panel` select :guilabel:`Display`, or right click on a +blank area of the desktop and select :guilabel:`Properties`. From the +:guilabel:`Display Properties` window click on the :guilabel:`Settings` tab. +Then click on the monitor that represents your projector and make sure you have +checked :guilabel:`Extend my Windows desktop onto this monitor`. + +.. image:: pics/xpdisplaysettings.png + +Linux +----- + +Due to the vast varieties of hardware, distributions, desktops, and drivers +this is not an exhaustive guide to dual monitor setup on Linux. This guide +assumes that you have properly set up any proprietary drivers if needed. You +should seek out your distributions documentation if this general guide does not +work. + +GNOME +^^^^^ + +This guide is for users of the GNOME desktop who do not use proprietary drivers. +From most distros go to :menuselection:`System --> Preferences --> Display +Settings (Monitors)`. Set up your projector with the correct resolution and make +sure that :guilabel:`Same image on all monitors` is **unchecked**. + +.. image:: pics/gnome.png + +KDE +^^^ + +This guide is for users of the KDE desktop who do not use proprietary drivers. +From most distros click the Kick Off menu and navigate to +:guilabel:`System Settings` + +.. image:: pics/kdesystemsettings.png + +Click on the display and monitor icon. + +.. image:: pics/kdedisplay.png + +From here you will need to set up your projector with the appropriate +resolution, and position. OpenLP works best projecting to the monitor on the +right. + +Linux Systems Using nVidia Drivers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This guide is for users of the proprietary nVidia driver on Linux Distributions. +It is assumed that you have properly setup your drivers according to your +distribution's documentation, and you have a working ``xorg.conf`` file in place. + +If you wish to make the changes permanent in setting up your system for dual +monitors it will be necessary to modify your ``xorg.conf`` file. It is always a +good idea to make a backup of any critical file before making changes:: + + user@linux:~ $ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old + +Or for those using systems that use the root user instead of sudo, change to +root and enter:: + + root@linux: # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old + +The exact location of the ``xorg.conf`` file can vary so check your +distribution's documentation. + +If you want to make your changes permanent run nVidia settings from the +terminal:: + + user@linux:~ $ sudo nvidia-settings + +Or, as root:: + + root@linux: # nividia-settings + +If you do not want to write the changes to your ``xorg.conf`` file simply run +the nVidia Settings program (``nvidia-settings``) from your desktop's menu, +usually in an administration or system menu, or from the terminal as a normal +user run:: + + user@linux:~ $ nvidia-settings + +Once you have opened nVidia Settings, click on +:guilabel:`X Server Display Configuration`. Then select the monitor you are +wanting to use as your second monitor and click :guilabel:`Configure`. + +.. image:: pics/nvlinux1.png + +After clicking :guilabel:`Configure`, select :guilabel:`TwinView`. Then click +:guilabel:`OK`. + +.. image:: pics/twinview.png + +Then click :guilabel:`Apply` and if you are happy with the way things look click +:guilabel:`Keep` to keep your new settings. Don't worry if all goes wrong the +settings will return back to the previous settings in 15 seconds without any +action. nVidia Settings should take care of selecting your optimum resolution +etc, but that can be changed as needed. When you are happy with everything click +on :guilabel:`Save to X Configuration File`. + +.. image:: pics/xorgwrite.png + +Then click :guilabel:`Save` and you should be set. You may want to restart X or +your machine just to make sure all the settings carry over the next time you log +in. diff --git a/documentation/manual/source/glossary.rst b/documentation/manual/source/glossary.rst new file mode 100644 index 000000000..41a8f4ac6 --- /dev/null +++ b/documentation/manual/source/glossary.rst @@ -0,0 +1,70 @@ +======== +Glossary +======== + +The developers of OpenLP have strived to make it a straightforward and easy to +use application. However, it is good to be familiar with a few terms that will +be used throughout this documentation, and when seeking support. + +Main Window +----------- + +The Main Window is what you will see when you first open OpenLP + +.. image:: pics/mainwindow.png + +The Main Window contains all the tools and plugins that make OpenLP function + +Media Manager +------------- + +The Media Manager contains a number of tabs that plugins supply to OpenLP. +Each tab in the Media Manager is called a **Media Item** + +.. image:: pics/mediamanager.png + +From the Media Manager you can send Media Items to the Preview or Live screens. + +Preview +------- + +The preview pane is a section to preview your media items before you go live +with them. + +.. image:: pics/preview.png + +Service File +------------ + +A service file, is the file that is created when you save your work on OpenLP. +The service file consist of **Service Items** + +Service Item +------------ + +A service item are the **media items** that are in the **service manager** + +Service Manger +-------------- + +The service manager contains the media items in your service file. This is the +area from wich your media items go live, and you can also save, open, and edit +services files. + +.. image:: pics/servicemanager.png + +Slide Controller +---------------- + +The Slide Controller controls which slide from a **Service Item** is currently +being displayed, and moving between the various slides. + +.. image:: pics/slidecontroller.png + +Theme Manager +------------- + +The theme manager is where themes are created and edited. Themes are the text +styles backgrounds that you use to personalize your services. + +.. image:: pics/thememanager.png diff --git a/documentation/source/manual/index.rst b/documentation/manual/source/index.rst similarity index 77% rename from documentation/source/manual/index.rst rename to documentation/manual/source/index.rst index 2ed7824fe..ac29c4360 100644 --- a/documentation/source/manual/index.rst +++ b/documentation/manual/source/index.rst @@ -3,8 +3,8 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to OpenLP's documentation -================================== +Welcome to the OpenLP 2.0 User Manual +===================================== Contents: @@ -12,6 +12,8 @@ Contents: :maxdepth: 2 introduction + glossary + dualmonitors Indices and tables ================== diff --git a/documentation/source/manual/introduction.rst b/documentation/manual/source/introduction.rst similarity index 100% rename from documentation/source/manual/introduction.rst rename to documentation/manual/source/introduction.rst diff --git a/documentation/manual/source/pics/dvi.png b/documentation/manual/source/pics/dvi.png new file mode 100644 index 000000000..bc9e345b3 Binary files /dev/null and b/documentation/manual/source/pics/dvi.png differ diff --git a/documentation/manual/source/pics/gnome.png b/documentation/manual/source/pics/gnome.png new file mode 100644 index 000000000..1ea060b7a Binary files /dev/null and b/documentation/manual/source/pics/gnome.png differ diff --git a/documentation/manual/source/pics/kdedisplay.png b/documentation/manual/source/pics/kdedisplay.png new file mode 100644 index 000000000..ddbbae028 Binary files /dev/null and b/documentation/manual/source/pics/kdedisplay.png differ diff --git a/documentation/manual/source/pics/kdesystemsettings.png b/documentation/manual/source/pics/kdesystemsettings.png new file mode 100644 index 000000000..7d7ac1f76 Binary files /dev/null and b/documentation/manual/source/pics/kdesystemsettings.png differ diff --git a/documentation/manual/source/pics/mainwindow.png b/documentation/manual/source/pics/mainwindow.png new file mode 100644 index 000000000..217751062 Binary files /dev/null and b/documentation/manual/source/pics/mainwindow.png differ diff --git a/documentation/manual/source/pics/mediamanager.png b/documentation/manual/source/pics/mediamanager.png new file mode 100644 index 000000000..245f2469b Binary files /dev/null and b/documentation/manual/source/pics/mediamanager.png differ diff --git a/documentation/manual/source/pics/nvlinux1.png b/documentation/manual/source/pics/nvlinux1.png new file mode 100644 index 000000000..6c585bae4 Binary files /dev/null and b/documentation/manual/source/pics/nvlinux1.png differ diff --git a/documentation/manual/source/pics/preview.png b/documentation/manual/source/pics/preview.png new file mode 100644 index 000000000..f3041726b Binary files /dev/null and b/documentation/manual/source/pics/preview.png differ diff --git a/documentation/manual/source/pics/servicemanager.png b/documentation/manual/source/pics/servicemanager.png new file mode 100644 index 000000000..8e2842eb5 Binary files /dev/null and b/documentation/manual/source/pics/servicemanager.png differ diff --git a/documentation/manual/source/pics/slidecontroller.png b/documentation/manual/source/pics/slidecontroller.png new file mode 100644 index 000000000..01e5c86d0 Binary files /dev/null and b/documentation/manual/source/pics/slidecontroller.png differ diff --git a/documentation/manual/source/pics/thememanager.png b/documentation/manual/source/pics/thememanager.png new file mode 100644 index 000000000..be35cadc1 Binary files /dev/null and b/documentation/manual/source/pics/thememanager.png differ diff --git a/documentation/manual/source/pics/twinview.png b/documentation/manual/source/pics/twinview.png new file mode 100644 index 000000000..d8a659f53 Binary files /dev/null and b/documentation/manual/source/pics/twinview.png differ diff --git a/documentation/manual/source/pics/vga.png b/documentation/manual/source/pics/vga.png new file mode 100644 index 000000000..3e02726a8 Binary files /dev/null and b/documentation/manual/source/pics/vga.png differ diff --git a/documentation/manual/source/pics/vistadisplaysettings.png b/documentation/manual/source/pics/vistadisplaysettings.png new file mode 100755 index 000000000..1fd2c8b16 Binary files /dev/null and b/documentation/manual/source/pics/vistadisplaysettings.png differ diff --git a/documentation/manual/source/pics/vistapersonalize.png b/documentation/manual/source/pics/vistapersonalize.png new file mode 100755 index 000000000..c24cc15dd Binary files /dev/null and b/documentation/manual/source/pics/vistapersonalize.png differ diff --git a/documentation/manual/source/pics/winsevendisplay.png b/documentation/manual/source/pics/winsevendisplay.png new file mode 100755 index 000000000..deea325b5 Binary files /dev/null and b/documentation/manual/source/pics/winsevendisplay.png differ diff --git a/documentation/manual/source/pics/winsevenresolution.png b/documentation/manual/source/pics/winsevenresolution.png new file mode 100755 index 000000000..c60bf4c0c Binary files /dev/null and b/documentation/manual/source/pics/winsevenresolution.png differ diff --git a/documentation/manual/source/pics/xorgwrite.png b/documentation/manual/source/pics/xorgwrite.png new file mode 100644 index 000000000..812b9e0ae Binary files /dev/null and b/documentation/manual/source/pics/xorgwrite.png differ diff --git a/documentation/manual/source/pics/xpdisplaysettings.png b/documentation/manual/source/pics/xpdisplaysettings.png new file mode 100644 index 000000000..eb7a8921c Binary files /dev/null and b/documentation/manual/source/pics/xpdisplaysettings.png differ diff --git a/documentation/source/plugins/bibles.rst b/documentation/source/plugins/bibles.rst deleted file mode 100644 index c042feb56..000000000 --- a/documentation/source/plugins/bibles.rst +++ /dev/null @@ -1,95 +0,0 @@ -.. _plugins-bibles: - -:mod:`bibles` Plugin -==================== - -.. automodule:: openlp.plugins.bibles - :members: - -:mod:`BiblePlugin` Class -------------------------- - -.. autoclass:: openlp.plugins.bibles.bibleplugin.BiblePlugin - :members: - -:mod:`forms` Submodule ----------------------- - -.. automodule:: openlp.plugins.bibles.forms - :members: - -:mod:`BibleImportWizard` -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.bibles.forms.bibleimportwizard.Ui_BibleImportWizard - :members: - -.. autoclass:: openlp.plugins.bibles.forms.importwizardform.ImportWizardForm - :members: - -:mod:`lib` Submodule --------------------- - -.. automodule:: openlp.plugins.bibles.lib - :members: - -:mod:`db` -^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.db - :members: - -.. autoclass:: openlp.plugins.bibles.lib.db.BibleDB - :members: - -:mod:`csv` -^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.csvbible - :members: - -.. autoclass:: openlp.plugins.bibles.lib.csvbible.CSVBible - :members: - -:mod:`http` -^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.http - :members: - -.. autoclass:: openlp.plugins.bibles.lib.http.HTTPBible - :members: - -:mod:`bibleOSISimpl` -^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.osis - :members: - -.. autoclass:: openlp.plugins.bibles.lib.osis.OSISBible - :members: - -:mod:`biblestab` -^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.biblestab - :members: - -:mod:`common` -^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.common - :members: - -:mod:`manager` -^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.manager - :members: - -:mod:`mediaitem` -^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.bibles.lib.mediaitem - :members: - diff --git a/documentation/source/plugins/index.rst b/documentation/source/plugins/index.rst deleted file mode 100644 index 713005c3d..000000000 --- a/documentation/source/plugins/index.rst +++ /dev/null @@ -1,43 +0,0 @@ -.. _plugins-index: - -:mod:`plugins` Module -===================== - -.. automodule:: openlp.plugins - :members: - -.. toctree:: - :maxdepth: 2 - - songs - bibles - -:mod:`presentations` Plugin ---------------------------- - -.. automodule:: openlp.plugins.presentations - :members: - -:mod:`media` Plugin -------------------- - -.. automodule:: openlp.plugins.media - :members: - -:mod:`images` Plugin --------------------- - -.. automodule:: openlp.plugins.images - :members: - -:mod:`custom` Plugin --------------------- - -.. automodule:: openlp.plugins.custom - :members: - -:mod:`songusage` Plugin ------------------------ - -.. automodule:: openlp.plugins.songusage - :members: diff --git a/documentation/source/plugins/songs.rst b/documentation/source/plugins/songs.rst deleted file mode 100644 index 2ce744ddd..000000000 --- a/documentation/source/plugins/songs.rst +++ /dev/null @@ -1,193 +0,0 @@ -.. _plugins-songs: - -:mod:`songs` Plugin -=================== - -.. automodule:: openlp.plugins.songs - :members: - -:class:`SongsPlugin` Class --------------------------- - -.. autoclass:: openlp.plugins.songs.songsplugin.SongsPlugin - :members: - -:mod:`forms` Submodule ----------------------- - -.. automodule:: openlp.plugins.songs.forms - :members: - -:class:`AuthorsForm` -^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.authorsdialog.Ui_AuthorsDialog - :members: - -.. autoclass:: openlp.plugins.songs.forms.authorsform.AuthorsForm - :members: - -:class:`EditSongForm` -^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.editsongdialog.Ui_EditSongDialog - :members: - -.. autoclass:: openlp.plugins.songs.forms.editsongform.EditSongForm - :members: - -:class:`EditVerseForm` -^^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.editversedialog.Ui_EditVerseDialog - :members: - -.. autoclass:: openlp.plugins.songs.forms.editverseform.EditVerseForm - :members: - -:class:`SongBookForm` -^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.songbookdialog.Ui_SongBookDialog - :members: - -.. autoclass:: openlp.plugins.songs.forms.songbookform.SongBookForm - :members: - -:class:`SongImportForm` -^^^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.songimportwizard.Ui_SongImportWizard - :members: - -.. autoclass:: openlp.plugins.songs.forms.songimportform.ImportWizardForm - :members: - -:class:`SongMaintenanceForm` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.songmaintenancedialog.Ui_SongMaintenanceDialog - :members: - -.. autoclass:: openlp.plugins.songs.forms.songmaintenanceform.SongMaintenanceForm - :members: - -:class:`TopicsForm` -^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: openlp.plugins.songs.forms.topicsdialog.Ui_TopicsDialog - :members: - -.. autoclass:: openlp.plugins.songs.forms.topicsform.TopicsForm - :members: - -:mod:`lib` Submodule --------------------- - -.. automodule:: openlp.plugins.songs.lib - :members: - -:mod:`cclifileimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.cclifileimport - :members: - -.. autoclass:: openlp.plugins.songs.lib.cclifileimport.CCLIFileImportError - :members: - -:mod:`db` Submodule -^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.db - :members: - -:mod:`ewimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.ewimport - :members: - -.. autoclass:: openlp.plugins.songs.lib.ewimport.FieldDescEntry - :members: - -:mod:`importer` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.importer - :members: - -:mod:`mediaitem` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.mediaitem - :members: - -.. autoclass:: openlp.plugins.songs.lib.mediaitem.SongListView - :members: - -:mod:`olp1import` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.olp1import - :members: - -:mod:`olpimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.olpimport - :members: - -:mod:`oooimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.oooimport - :members: - -:mod:`opensongimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.opensongimport - :members: - -:mod:`sofimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.sofimport - :members: - -:mod:`songbeamerimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.songbeamerimport - :members: - -:mod:`songimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.songimport - :members: - -:mod:`songstab` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.songstab - :members: - -:mod:`wowimport` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.wowimport - :members: - -:mod:`songxml` Submodule -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.songxml - :members: - -:mod:`xml` Submodule -^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: openlp.plugins.songs.lib.xml - :members: diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 52ebe99c8..b6946a628 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -81,9 +81,6 @@ html_expands.append({u'desc':u'Italics', u'start tag':u'{it}', u'start html':u'', u'end tag':u'{/it}', u'end html':u'', u'protected':True}) -# Image image_cache to stop regualar image resizing -image_cache = {} - def translate(context, text, comment=None): """ A special shortcut method to wrap around the Qt4 translation functions. @@ -223,16 +220,13 @@ def image_to_byte(image): ``image`` The image to converted. """ - log.debug(u'image_to_byte') + log.debug(u'image_to_byte - start') byte_array = QtCore.QByteArray() # use buffer to store pixmap into byteArray buffie = QtCore.QBuffer(byte_array) buffie.open(QtCore.QIODevice.WriteOnly) - if isinstance(image, QtGui.QImage): - pixmap = QtGui.QPixmap.fromImage(image) - else: - pixmap = QtGui.QPixmap(image) - pixmap.save(buffie, "PNG") + image.save(buffie, "PNG") + log.debug(u'image_to_byte - end') # convert to base64 encoding so does not get missed! return byte_array.toBase64() @@ -253,26 +247,25 @@ def resize_image(image, width, height, background=QtCore.Qt.black): The background colour defaults to black. """ - log.debug(u'resize_image') - preview = QtGui.QImage(image) + log.debug(u'resize_image - start') + if isinstance(image, QtGui.QImage): + preview = image + else: + preview = QtGui.QImage(image) if not preview.isNull(): # Only resize if different size if preview.width() == width and preview.height == height: return preview preview = preview.scaled(width, height, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation) - image_cache_key = u'%s%s%s' % (image, unicode(width), unicode(height)) - if image_cache_key in image_cache: - return image_cache[image_cache_key] realw = preview.width() realh = preview.height() # and move it to the centre of the preview space new_image = QtGui.QImage(width, height, QtGui.QImage.Format_ARGB32_Premultiplied) - new_image.fill(background) painter = QtGui.QPainter(new_image) + painter.fillRect(new_image.rect(), background) painter.drawImage((width - realw) / 2, (height - realh) / 2, preview) - image_cache[image_cache_key] = new_image return new_image def check_item_selected(list_widget, message): @@ -310,8 +303,11 @@ def expand_tags(text): text = text.replace(tag[u'end tag'], tag[u'end html']) return text +from theme import ThemeLevel, ThemeXML, BackgroundGradientType, BackgroundType, \ + HorizontalType, VerticalType from spelltextedit import SpellTextEdit from eventreceiver import Receiver +from imagemanager import ImageManager from settingsmanager import SettingsManager from plugin import PluginStatus, StringContent, Plugin from pluginmanager import PluginManager @@ -323,7 +319,6 @@ from htmlbuilder import build_html, build_lyrics_format_css, \ build_lyrics_outline_css from toolbar import OpenLPToolbar from dockwidget import OpenLPDockWidget -from theme import ThemeLevel, ThemeXML from renderer import Renderer from rendermanager import RenderManager from mediamanageritem import MediaManagerItem diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py index 972d849a3..0dc138abc 100644 --- a/openlp/core/lib/db.py +++ b/openlp/core/lib/db.py @@ -117,6 +117,7 @@ class Manager(object): settings = QtCore.QSettings() settings.beginGroup(plugin_name) self.db_url = u'' + self.is_dirty = False db_type = unicode( settings.value(u'db type', QtCore.QVariant(u'sqlite')).toString()) if db_type == u'sqlite': @@ -150,12 +151,34 @@ class Manager(object): self.session.add(object_instance) if commit: self.session.commit() + self.is_dirty = True return True except InvalidRequestError: self.session.rollback() log.exception(u'Object save failed') return False + def save_objects(self, object_list, commit=True): + """ + Save a list of objects to the database + + ``object_list`` + The list of objects to save + + ``commit`` + Commit the session with this object + """ + try: + self.session.add_all(object_list) + if commit: + self.session.commit() + self.is_dirty = True + return True + except InvalidRequestError: + self.session.rollback() + log.exception(u'Object list save failed') + return False + def get_object(self, object_class, key=None): """ Return the details of an object @@ -205,6 +228,22 @@ class Manager(object): return query.order_by(order_by_ref).all() return query.all() + def get_object_count(self, object_class, filter_clause=None): + """ + Returns a count of the number of objects in the database. + + ``object_class`` + The type of objects to return. + + ``filter_clause`` + The filter governing selection of objects to return. Defaults to + None. + """ + query = self.session.query(object_class) + if filter_clause is not None: + query = query.filter(filter_clause) + return query.count() + def delete_object(self, object_class, key): """ Delete an object from the database @@ -220,6 +259,7 @@ class Manager(object): try: self.session.delete(object_instance) self.session.commit() + self.is_dirty = True return True except InvalidRequestError: self.session.rollback() @@ -241,8 +281,17 @@ class Manager(object): query = query.filter(filter_clause) query.delete(synchronize_session=False) self.session.commit() + self.is_dirty = True return True except InvalidRequestError: self.session.rollback() log.exception(u'Failed to delete %s records', object_class.__name__) return False + + def finalise(self): + """ + VACUUM the database on exit. + """ + if self.is_dirty: + engine = create_engine(self.db_url) + engine.execute("vacuum") diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 511046fe3..b2f46e655 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -25,8 +25,11 @@ ############################################################################### import logging + from PyQt4 import QtWebKit +from openlp.core.lib import BackgroundType, BackgroundGradientType + log = logging.getLogger(__name__) HTMLSRC = u""" @@ -90,16 +93,16 @@ body { var transition = %s; function show_video(state, path, volume, loop){ - // Note, the preferred method for looping would be to use the + // Note, the preferred method for looping would be to use the // video tag loop attribute. // But QtWebKit doesn't support this. Neither does it support the // onended event, hence the setInterval() // In addition, setting the currentTime attribute to zero to restart // the video raises an INDEX_SIZE_ERROR: DOM Exception 1 - // To complicate it further, sometimes vid.currentTime stops + // To complicate it further, sometimes vid.currentTime stops // slightly short of vid.duration and vid.ended is intermittent! // - // Note, currently the background may go black between loops. Not + // Note, currently the background may go black between loops. Not // desirable. Need to investigate using two