corrections to dualmonitors.rst and troubleshooting.rst
@ -21,20 +21,35 @@ You will see the Bible Importer window, click :guilabel:`Next`.
|
|||||||
|
|
||||||
.. image:: pics/bibleimport01.png
|
.. image:: pics/bibleimport01.png
|
||||||
|
|
||||||
After clicking :guilabel:`Next` you can select from the various types of
|
After clicking :guilabel:`Next` you can select from the various types of
|
||||||
software that OpenLP will convert Bibles from.
|
software that OpenLP will convert Bibles from. Click on the file folder icon to
|
||||||
|
choose the file(s) of the Bible database you want to import. See the sections
|
||||||
|
below for more information on the different formats that OpenLP will import.
|
||||||
|
Click :guilabel:`Next` to continue.
|
||||||
|
|
||||||
.. image:: pics/bibleimport02.png
|
.. image:: pics/bibleimport02.png
|
||||||
|
|
||||||
Click on the file folder icon to choose the file of the Bible database you
|
After selecting your file(s), you'll be asked to fill in the details of the
|
||||||
want to import. See the following sections for information on the different
|
Bible you are importing. Remember to check what information you need to display
|
||||||
formats that OpenLP will import.
|
for your Bible's translation, as some of them have strict rules around the
|
||||||
|
copyright notice. Click :guilabel:`Next` to continue.
|
||||||
|
|
||||||
Importing from OpenLP Version 1
|
.. image:: pics/bibleimportdetails1.png
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Converting from OpenLP Version 1 is a simple process. First you will need to
|
After filling in the copyright details, OpenLP will start to import your Bible.
|
||||||
locate your Version 1 Bibles.
|
It may take some time to import your Bible so please be patient.
|
||||||
|
|
||||||
|
.. image:: pics/bibleimportfinished1.png
|
||||||
|
|
||||||
|
When the import has finished click :guilabel:`Finish` and you should be
|
||||||
|
ready to use your Bible in OpenLP.
|
||||||
|
|
||||||
|
Importing from openlp.org 1.x
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Importing Bibles from openlp.org 1.x is a simple process. First you will need to
|
||||||
|
locate your version 1.x Bibles. Version 1.x Bibles have the `.bible` file
|
||||||
|
extension.
|
||||||
|
|
||||||
Windows XP::
|
Windows XP::
|
||||||
|
|
||||||
@ -44,22 +59,15 @@ Windows Vista / Windows 7::
|
|||||||
|
|
||||||
C:\ProgramData\openlp.org\Data\Bibles\
|
C:\ProgramData\openlp.org\Data\Bibles\
|
||||||
|
|
||||||
OpenLP Version 1 Bibles have the `.bible` file extension. After selecting
|
After selecting all of the openlp.org 1.x Bibles you want to convert, click
|
||||||
all of the OpenLP Version 1 Bibles you want to convert, click :guilabel:`Next`
|
:guilabel:`Next` to continue the import process.
|
||||||
|
|
||||||
.. image:: pics/bibleimportdetails1.png
|
|
||||||
|
|
||||||
Enter your Bible name and copyright details. Click :guilabel:`Next`. It may
|
|
||||||
take some time to convert your Bibles so please be patient.
|
|
||||||
|
|
||||||
.. image:: pics/bibleimportfinished1.png
|
|
||||||
|
|
||||||
When the import has finished click :guilabel:`Finish` and you should be
|
|
||||||
ready to use your OpenLP Version 1 Bibles.
|
|
||||||
|
|
||||||
Importing OSIS Bibles
|
Importing OSIS Bibles
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Importing OSIS files is very simple. Select OSIS as your import source, select
|
||||||
|
your OSIS Bible file and continue the import process.
|
||||||
|
|
||||||
**About OSIS Formatted Bibles**
|
**About OSIS Formatted Bibles**
|
||||||
|
|
||||||
The OSIS XML standard was designed to provide a common format for distribution
|
The OSIS XML standard was designed to provide a common format for distribution
|
||||||
@ -69,24 +77,11 @@ of electronic Bibles. More information can be found out at the `Bible Technologi
|
|||||||
If you have any software installed that is part of the `Sword Project
|
If you have any software installed that is part of the `Sword Project
|
||||||
<http://www.crosswire.org/sword/index.jsp>`_ it can be easily converted.
|
<http://www.crosswire.org/sword/index.jsp>`_ it can be easily converted.
|
||||||
|
|
||||||
Importing OSIS files is very simple. Select your OSIS Bible file and click
|
|
||||||
:guilabel:`Next`
|
|
||||||
|
|
||||||
.. image:: pics/bibleimportdetails1.png
|
|
||||||
|
|
||||||
Enter you Bible name and copyright details. Click :guilabel:`Next`. It may take
|
|
||||||
some time to convert your Bibles so please be patient.
|
|
||||||
|
|
||||||
.. image:: pics/bibleimportfinished1.png
|
|
||||||
|
|
||||||
Click :guilabel:`Finish` and you should be ready to use your OpenLP Version
|
|
||||||
1 Bibles.
|
|
||||||
|
|
||||||
You can use the commands below convert Bibles from that software to OSIS format.
|
You can use the commands below convert Bibles from that software to OSIS format.
|
||||||
|
|
||||||
The following commands are used in all platforms and the commands are case
|
The following commands are used in all platforms and the commands are case
|
||||||
sensitive across all platforms. To convert a Bible using Command Prompt in
|
sensitive across all platforms. To convert a Bible using the command prompt in
|
||||||
Windows or a Terminal in Linux or MAC you would type::
|
Windows or a terminal in Linux or Mac OS X you would type::
|
||||||
|
|
||||||
mod2osis biblename > biblename.osis
|
mod2osis biblename > biblename.osis
|
||||||
|
|
||||||
@ -114,17 +109,9 @@ You may also import downloaded bibles from OpenSong. The process is the same,
|
|||||||
except you will need to extract the bible from a zip file. This is usually done
|
except you will need to extract the bible from a zip file. This is usually done
|
||||||
by right clicking on the downloaded file and select `Extract` or `Extract Here`.
|
by right clicking on the downloaded file and select `Extract` or `Extract Here`.
|
||||||
|
|
||||||
After selecting the OpenSong Bibles you want to convert, click :guilabel:`Next`
|
After selecting the OpenSong Bibles you want to import, follow the rest of the
|
||||||
|
import process. When the import has finished you should be ready to use your
|
||||||
.. image:: pics/bibleimportdetails1.png
|
OpenSong Bibles.
|
||||||
|
|
||||||
Enter your Bible name and copyright details. Click :guilabel:`Next`. It may
|
|
||||||
take some time to convert your Bibles so please be patient.
|
|
||||||
|
|
||||||
.. image:: pics/bibleimportfinished1.png
|
|
||||||
|
|
||||||
When the import has finished then click :guilabel:`Finish` and you should now be
|
|
||||||
ready to use your OpenSong Bibles.
|
|
||||||
|
|
||||||
Importing Web Download Bibles
|
Importing Web Download Bibles
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -139,8 +126,6 @@ as another option and does require an internet connection.
|
|||||||
|
|
||||||
To use the web download feature select web download from the import wizard.
|
To use the web download feature select web download from the import wizard.
|
||||||
|
|
||||||
.. image:: pics/bibleimport01.png
|
|
||||||
|
|
||||||
You can select from several options of location to download from and also
|
You can select from several options of location to download from and also
|
||||||
what Bible translation you need. You will probably want to choose the location
|
what Bible translation you need. You will probably want to choose the location
|
||||||
from where you get the best performance or has the translation you need.
|
from where you get the best performance or has the translation you need.
|
||||||
@ -154,30 +139,20 @@ not be needed.
|
|||||||
.. image:: pics/webbibleproxy1.png
|
.. image:: pics/webbibleproxy1.png
|
||||||
|
|
||||||
After selecting your download location and the Bible you wish to use, click
|
After selecting your download location and the Bible you wish to use, click
|
||||||
:guilabel:`Next` When your import is completed click :guilabel:`Finish`
|
:guilabel:`Next` to continue the import process. When your import is completed
|
||||||
|
you should now be ready to use the web bible.
|
||||||
.. image:: pics/biblewebcomplete.png
|
|
||||||
|
|
||||||
You should now be ready to use the web bible.
|
|
||||||
|
|
||||||
Importing CSV formatted Bibles
|
Importing CSV formatted Bibles
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you have a Bible in .csv format OpenLP can import it. CSV Bibles will
|
If you have a Bible in .csv format OpenLP can import it. CSV Bibles will
|
||||||
consist of two files a `books` file and a `verse` file.
|
consist of two files a `books` file and a `verse` file. Select CSV from the list
|
||||||
|
of Bible types to import.
|
||||||
Select CSV from the list of Bible types to import.
|
|
||||||
|
|
||||||
.. image:: pics/bibleimport02.png
|
|
||||||
|
|
||||||
You are now ready to select your .csv files. You will need to select both your
|
You are now ready to select your .csv files. You will need to select both your
|
||||||
books and verse file location.
|
books and verse file location.
|
||||||
|
|
||||||
.. image:: pics/csvimport1.png
|
.. image:: pics/csvimport1.png
|
||||||
|
|
||||||
After you have selected the file locations you can click :guilabel:`Next`
|
After you have selected the file locations you can continue with the import
|
||||||
|
process. Once it is complete you should be ready to use your imported CSV Bible.
|
||||||
.. image:: pics/bibleimportfinished1.png
|
|
||||||
|
|
||||||
Click :guilabel:`Finish` and you should now be ready to use your imported CSV
|
|
||||||
Bible
|
|
||||||
|
@ -36,11 +36,11 @@ equivalent.
|
|||||||
|
|
||||||
**Special Note For Projectors Using USB Connections**
|
**Special Note For Projectors Using USB Connections**
|
||||||
|
|
||||||
We have experienced difficulties with users using a projector with a USB
|
Users have reported experiencing difficulties when using a projector with a USB
|
||||||
connection. It seems that third party software many times is required to
|
connection. It seems that third party software many times is required to
|
||||||
properly setup dual monitors. If possible, it is best to use a direct output
|
properly setup dual monitors. If possible, it is best to use a direct output
|
||||||
(VGA, DVI, HDMI, S-Video) from your machine's video card. If a USB connection
|
(VGA, DVI, HDMI, S-Video) from your machine's video card. f a USB connection is
|
||||||
is your only option please carefully read the manual from the manufacture on
|
your only option please consult the manufacturer's manual for instructions on a
|
||||||
proper setup.
|
proper setup.
|
||||||
|
|
||||||
Microsoft Windows
|
Microsoft Windows
|
||||||
|
After Width: | Height: | Size: 16 KiB |
BIN
documentation/manual/source/pics/song_edit_authors.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
documentation/manual/source/pics/song_edit_lyrics.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
documentation/manual/source/pics/song_edit_maintenance.png
Normal file
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 12 KiB |
BIN
documentation/manual/source/pics/song_edit_theme_copyright.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
documentation/manual/source/pics/song_edit_topic_maintenance.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
documentation/manual/source/pics/song_edit_verse_error.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
documentation/manual/source/pics/song_edit_verse_type.png
Normal file
After Width: | Height: | Size: 45 KiB |
@ -99,4 +99,134 @@ completed.
|
|||||||
Press :guilabel:`Finish` and OpenLP will be ready to use your songs imported
|
Press :guilabel:`Finish` and OpenLP will be ready to use your songs imported
|
||||||
from CCLI SongSelect.
|
from CCLI SongSelect.
|
||||||
|
|
||||||
|
Creating or editing a song slide
|
||||||
|
================================
|
||||||
|
|
||||||
|
If you want to create a new song slide or, once you have a song imported, you
|
||||||
|
want to edit and rearrange the Title & Lyrics, Author, Topics & Song Book,
|
||||||
|
assign a Theme, or edit Copyright Info & Comments, you will do this through the
|
||||||
|
`Song Editor`.
|
||||||
|
|
||||||
|
**Edit:** To edit an existing song you can either click on a song in the
|
||||||
|
`Media Manager` and then click the button to :guilabel:`Edit the selected song`
|
||||||
|
or right click a song from either the `Media Manager` or additionally from the
|
||||||
|
`Service Manager` and click :guilabel:`Edit item`. If you are adding a new song
|
||||||
|
click :guilabel:`Add a new Song` in the `Media Manager`.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_lyrics.png
|
||||||
|
|
||||||
|
**Title:** This is where you would name your song or edit a song name.
|
||||||
|
|
||||||
|
**Alternate title:**Alternate Title was for songs with two names
|
||||||
|
"Lord the Light" - "Shine Jesus Shine". You can also add a name in this box that
|
||||||
|
will bring up the song in Titles search. **Example:** You could use an alternate
|
||||||
|
title of "hymn" on all your hymn song titles for grouping. When you search "hymn"
|
||||||
|
it will show all the hymns that have "hymn" for the Alternate title.
|
||||||
|
|
||||||
|
**Lyrics:** The *Lyrics* window shows all lyrics imported or added. On the left
|
||||||
|
side of the lyrics you will see a capital letter followed by a number. A V1
|
||||||
|
would represent verse 1, C1 would be Chorus 1. You will use these letters and
|
||||||
|
numbers for the order to display the lyrics.
|
||||||
|
|
||||||
|
**Verse Order:** After you entered or edited your song, you will want OpenLP to
|
||||||
|
display the verses in the correct order you want them displayed. On the left side
|
||||||
|
of your lyrics you will see C1, V1, V2 etc. the way they were imported or added.
|
||||||
|
To put your lyrics in the correct order is as simple as typing in the
|
||||||
|
:guilabel:`Verse order box` at the bottom, the correct order you want them
|
||||||
|
displayed, with only a blank space in between each entry. The correct format will
|
||||||
|
look like this: V1 C1 V2 C1 V3 C1. If you forget to put a space in between the
|
||||||
|
order, or if you do not have the corresponding verse number, OpenLP will politely
|
||||||
|
tell you with a pop-up error message what is wrong so you can correct your
|
||||||
|
mistake and save it. Verse order is optional and if left blank the verses will
|
||||||
|
display in the order seen in *Lyrics*.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_verse_error.png
|
||||||
|
|
||||||
|
Adding or editing the lyrics
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Add:** To Add a new verse, click on :guilabel:`Add`. The main window is where
|
||||||
|
you will type your lyrics. OpenLP is packaged with a spell checker for most
|
||||||
|
languages. If you misspell a word it will be underlined. Right click the
|
||||||
|
underlined word and left click *Spelling Suggestions* or you can ignore it and
|
||||||
|
continue typing. You also have the ability to format the font using *Formatting
|
||||||
|
Tags*. Highlight the word/words you want to format and right click the highlight.
|
||||||
|
Left click *Formatting Tags* and choose the format you want to apply to the font
|
||||||
|
and the format tags will be entered with your lyrics. These tags are not visible
|
||||||
|
when displayed. To remove the format, delete the tag on each end of the word or
|
||||||
|
sentence.
|
||||||
|
|
||||||
|
**Edit:** To edit an existing verse, click on the verse you wish to *Edit* then click on
|
||||||
|
:guilabel:`Edit`, make your changes and click :guilabel:`Save`.
|
||||||
|
|
||||||
|
**Edit All:** To edit the whole song at once, click on :guilabel:`Edit All`.
|
||||||
|
|
||||||
|
**Delete:** To delete a verse, click on the verse you want to delete and it will
|
||||||
|
highlight, click on the :guilabel:`Delete` button and it will be deleted.
|
||||||
|
**Warning:**, once you click the :guilabel:`Delete` button, you will not be
|
||||||
|
asked again, it will be deleted immediately.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_verse_type.png
|
||||||
|
|
||||||
|
**Verse type:** gives you 7 ways to classify your lyrics. Verse, Chorus, Bridge,
|
||||||
|
Pre-Chorus, Intro, Ending, Other.
|
||||||
|
|
||||||
|
If you have more than one verse, you would number them Verse 1, 2, 3 as needed.
|
||||||
|
If you find the verse has too many lines for your screen, you can edit and
|
||||||
|
shorten the verse and :guilabel:`Add` another slide.
|
||||||
|
|
||||||
|
Authors, Topics & Song Book
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Once your *Title & Lyrics* are added or edited the way you want them you must
|
||||||
|
add or enter the author or authors of the song. OpenLP requires all songs to
|
||||||
|
have an author entered. You can add a blank space for the author name.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_authors.png
|
||||||
|
|
||||||
|
**Authors:** Click the drop down arrow to view all authors or start typing a name
|
||||||
|
in the box and a list will appear. If the authors name has not been added, type
|
||||||
|
the authors name in the box and click :guilabel:`Add to Song`. The authors name
|
||||||
|
will appear below and will also be added to your database. If you accidently add
|
||||||
|
the wrong author you can click on the authors name and click :guilabel:`Remove`.
|
||||||
|
|
||||||
|
:guilabel:`Manage Authors, Topics, Song Books`: Clicking this button will bring
|
||||||
|
up your complete list of authors.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_maintenance.png
|
||||||
|
|
||||||
|
**Add:** Clicking the :guilabel:`Add` button will bring up a box where you will
|
||||||
|
add the Authors First name, Last name and Display name. Click :guilabel:`Save`
|
||||||
|
when you are finished.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_author_maintenance.png
|
||||||
|
|
||||||
|
**Edit:** The :guilabel:`Edit` button will bring up window where you can edit
|
||||||
|
the info that is already there.
|
||||||
|
|
||||||
|
**Delete:** The :guilabel:`Delete` button will remove the author you have
|
||||||
|
highlighted. Note: You cannot delete an author that is assigned to a song.
|
||||||
|
Authors names are displayed in the footer.
|
||||||
|
|
||||||
|
Theme, Copyright info & Comments
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
On this tab you can assign a *Theme* to a song, enter the *Copyright information*
|
||||||
|
and add the *CCLI number*. If you imported a song from SongSelect this
|
||||||
|
information will usually be entered.
|
||||||
|
|
||||||
|
.. image:: pics/song_edit_theme_copyright.png
|
||||||
|
|
||||||
|
**Theme:** Click the drop down arrow to display your list of themes or start
|
||||||
|
typing a theme name in the box and the list will appear. You can also create a
|
||||||
|
new theme by clicking the :guilabel:`New Theme` button.
|
||||||
|
|
||||||
|
**Copyright information:** Add or edit the copyright information in this box. If
|
||||||
|
you would like to use the © symbol click "guilabel:`©` button. This information
|
||||||
|
is displayed in the footer.
|
||||||
|
|
||||||
|
**CCLI number:** Enter the CCLI number in this box. Note: this is the CCLI number
|
||||||
|
of the song, not your contract number. This number is not displayed in the footer
|
||||||
|
|
||||||
|
**Comments:** You can add comments in this box. This information is not
|
||||||
|
dispayed in the footer.
|
||||||
|
@ -183,8 +183,8 @@ presentation by itself. OpenLP uses PowerPoint or Impress to load the
|
|||||||
presentation. Then OpenLP displays images of each slide. This results in the
|
presentation. Then OpenLP displays images of each slide. This results in the
|
||||||
higher than expected RAM usage.
|
higher than expected RAM usage.
|
||||||
|
|
||||||
OpenLP is not displaying correctly, or on the correct screen
|
OpenLP is not displaying correctly, or is not on the correct screen
|
||||||
------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
Please read the documentation on :ref:`dualmonitors`. It is very important to
|
Please read the documentation on :ref:`dualmonitors`. It is very important to
|
||||||
have dual monitors setup properly for OpenLP to function as expected.
|
have dual monitors setup properly for OpenLP to function as expected.
|
||||||
|
@ -140,7 +140,7 @@ class OpenLP(QtGui.QApplication):
|
|||||||
self.sharedMemory = QtCore.QSharedMemory('OpenLP')
|
self.sharedMemory = QtCore.QSharedMemory('OpenLP')
|
||||||
if self.sharedMemory.attach():
|
if self.sharedMemory.attach():
|
||||||
status = QtGui.QMessageBox.critical(None,
|
status = QtGui.QMessageBox.critical(None,
|
||||||
UiStrings.Error, UiStrings.OpenLPStart,
|
UiStrings().Error, UiStrings().OpenLPStart,
|
||||||
QtGui.QMessageBox.StandardButtons(
|
QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
|
||||||
if status == QtGui.QMessageBox.No:
|
if status == QtGui.QMessageBox.No:
|
||||||
@ -250,4 +250,4 @@ if __name__ == u'__main__':
|
|||||||
"""
|
"""
|
||||||
Instantiate and run the application.
|
Instantiate and run the application.
|
||||||
"""
|
"""
|
||||||
main()
|
main()
|
@ -274,8 +274,8 @@ def check_directory_exists(dir):
|
|||||||
|
|
||||||
from listwidgetwithdnd import ListWidgetWithDnD
|
from listwidgetwithdnd import ListWidgetWithDnD
|
||||||
from displaytags import DisplayTags
|
from displaytags import DisplayTags
|
||||||
from spelltextedit import SpellTextEdit
|
|
||||||
from eventreceiver import Receiver
|
from eventreceiver import Receiver
|
||||||
|
from spelltextedit import SpellTextEdit
|
||||||
from imagemanager import ImageManager
|
from imagemanager import ImageManager
|
||||||
from settingsmanager import SettingsManager
|
from settingsmanager import SettingsManager
|
||||||
from plugin import PluginStatus, StringContent, Plugin
|
from plugin import PluginStatus, StringContent, Plugin
|
||||||
|
@ -307,7 +307,7 @@ sup {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<img id="bgimage" class="size" %s />
|
<img id="bgimage" class="size" %s />
|
||||||
<img id="image" class="size" style="display:none" />
|
<img id="image" class="size" %s />
|
||||||
<video id="video1" class="size" style="visibility:hidden" autobuffer preload>
|
<video id="video1" class="size" style="visibility:hidden" autobuffer preload>
|
||||||
</video>
|
</video>
|
||||||
<video id="video2" class="size" style="visibility:hidden" autobuffer preload>
|
<video id="video2" class="size" style="visibility:hidden" autobuffer preload>
|
||||||
@ -320,7 +320,7 @@ sup {
|
|||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def build_html(item, screen, alert, islive, background):
|
def build_html(item, screen, alert, islive, background, image=None):
|
||||||
"""
|
"""
|
||||||
Build the full web paged structure for display
|
Build the full web paged structure for display
|
||||||
|
|
||||||
@ -332,6 +332,10 @@ def build_html(item, screen, alert, islive, background):
|
|||||||
Alert display display information
|
Alert display display information
|
||||||
`islive`
|
`islive`
|
||||||
Item is going live, rather than preview/theme building
|
Item is going live, rather than preview/theme building
|
||||||
|
`background`
|
||||||
|
Theme background image - bytes
|
||||||
|
`image`
|
||||||
|
Image media item - bytes
|
||||||
"""
|
"""
|
||||||
width = screen[u'size'].width()
|
width = screen[u'size'].width()
|
||||||
height = screen[u'size'].height()
|
height = screen[u'size'].height()
|
||||||
@ -339,11 +343,15 @@ def build_html(item, screen, alert, islive, background):
|
|||||||
webkitvers = webkit_version()
|
webkitvers = webkit_version()
|
||||||
# Image generated and poked in
|
# Image generated and poked in
|
||||||
if background:
|
if background:
|
||||||
image = u'src="data:image/png;base64,%s"' % background
|
bgimage_src = u'src="data:image/png;base64,%s"' % background
|
||||||
elif item.bg_image_bytes:
|
elif item.bg_image_bytes:
|
||||||
image = u'src="data:image/png;base64,%s"' % item.bg_image_bytes
|
bgimage_src = u'src="data:image/png;base64,%s"' % item.bg_image_bytes
|
||||||
else:
|
else:
|
||||||
image = u'style="display:none;"'
|
bgimage_src = u'style="display:none;"'
|
||||||
|
if image:
|
||||||
|
image_src = u'src="data:image/png;base64,%s"' % image
|
||||||
|
else:
|
||||||
|
image_src = u'style="display:none;"'
|
||||||
html = HTMLSRC % (build_background_css(item, width, height),
|
html = HTMLSRC % (build_background_css(item, width, height),
|
||||||
width, height,
|
width, height,
|
||||||
build_alert_css(alert, width),
|
build_alert_css(alert, width),
|
||||||
@ -351,7 +359,7 @@ def build_html(item, screen, alert, islive, background):
|
|||||||
build_lyrics_css(item, webkitvers),
|
build_lyrics_css(item, webkitvers),
|
||||||
u'true' if theme and theme.display_slide_transition and islive \
|
u'true' if theme and theme.display_slide_transition and islive \
|
||||||
else u'false',
|
else u'false',
|
||||||
image,
|
bgimage_src, image_src,
|
||||||
build_lyrics_html(item, webkitvers))
|
build_lyrics_html(item, webkitvers))
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
@ -435,7 +435,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
item to the preview slide controller.
|
item to the preview slide controller.
|
||||||
"""
|
"""
|
||||||
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self, UiStrings.NISp,
|
QtGui.QMessageBox.information(self, UiStrings().NISp,
|
||||||
translate('OpenLP.MediaManagerItem',
|
translate('OpenLP.MediaManagerItem',
|
||||||
'You must select one or more items to preview.'))
|
'You must select one or more items to preview.'))
|
||||||
else:
|
else:
|
||||||
@ -453,7 +453,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
item to the live slide controller.
|
item to the live slide controller.
|
||||||
"""
|
"""
|
||||||
if not self.listView.selectedIndexes():
|
if not self.listView.selectedIndexes():
|
||||||
QtGui.QMessageBox.information(self, UiStrings.NISp,
|
QtGui.QMessageBox.information(self, UiStrings().NISp,
|
||||||
translate('OpenLP.MediaManagerItem',
|
translate('OpenLP.MediaManagerItem',
|
||||||
'You must select one or more items to send live.'))
|
'You must select one or more items to send live.'))
|
||||||
else:
|
else:
|
||||||
@ -468,7 +468,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
Add a selected item to the current service
|
Add a selected item to the current service
|
||||||
"""
|
"""
|
||||||
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self, UiStrings.NISp,
|
QtGui.QMessageBox.information(self, UiStrings().NISp,
|
||||||
translate('OpenLP.MediaManagerItem',
|
translate('OpenLP.MediaManagerItem',
|
||||||
'You must select one or more items.'))
|
'You must select one or more items.'))
|
||||||
else:
|
else:
|
||||||
@ -494,14 +494,14 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
Add a selected item to an existing item in the current service.
|
Add a selected item to an existing item in the current service.
|
||||||
"""
|
"""
|
||||||
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
if not self.listView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self, UiStrings.NISp,
|
QtGui.QMessageBox.information(self, UiStrings().NISp,
|
||||||
translate('OpenLP.MediaManagerItem',
|
translate('OpenLP.MediaManagerItem',
|
||||||
'You must select one or more items.'))
|
'You must select one or more items.'))
|
||||||
else:
|
else:
|
||||||
log.debug(u'%s Add requested', self.plugin.name)
|
log.debug(u'%s Add requested', self.plugin.name)
|
||||||
serviceItem = self.parent.serviceManager.getServiceItem()
|
serviceItem = self.parent.serviceManager.getServiceItem()
|
||||||
if not serviceItem:
|
if not serviceItem:
|
||||||
QtGui.QMessageBox.information(self, UiStrings.NISs,
|
QtGui.QMessageBox.information(self, UiStrings().NISs,
|
||||||
translate('OpenLP.MediaManagerItem',
|
translate('OpenLP.MediaManagerItem',
|
||||||
'You must select an existing service item to add to.'))
|
'You must select an existing service item to add to.'))
|
||||||
elif self.plugin.name.lower() == serviceItem.name.lower():
|
elif self.plugin.name.lower() == serviceItem.name.lower():
|
||||||
@ -554,4 +554,4 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
item_id = remoteItem
|
item_id = remoteItem
|
||||||
else:
|
else:
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
return item_id
|
return item_id
|
@ -115,8 +115,8 @@ class Plugin(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
log.info(u'loaded')
|
log.info(u'loaded')
|
||||||
|
|
||||||
def __init__(self, name, pluginHelpers=None, mediaItemClass=None,
|
def __init__(self, name, plugin_helpers=None, media_item_class=None,
|
||||||
settingsTabClass=None, version=None):
|
settings_tab_class=None, version=None):
|
||||||
"""
|
"""
|
||||||
This is the constructor for the plugin object. This provides an easy
|
This is the constructor for the plugin object. This provides an easy
|
||||||
way for descendent plugins to populate common data. This method *must*
|
way for descendent plugins to populate common data. This method *must*
|
||||||
@ -132,15 +132,16 @@ class Plugin(QtCore.QObject):
|
|||||||
``version``
|
``version``
|
||||||
Defaults to *None*. The version of the plugin.
|
Defaults to *None*. The version of the plugin.
|
||||||
|
|
||||||
``pluginHelpers``
|
``plugin_helpers``
|
||||||
Defaults to *None*. A list of helper objects.
|
Defaults to *None*. A list of helper objects.
|
||||||
|
|
||||||
``mediaItemClass``
|
``media_item_class``
|
||||||
The class name of the plugin's media item.
|
The class name of the plugin's media item.
|
||||||
|
|
||||||
``settingsTabClass``
|
``settings_tab_class``
|
||||||
The class name of the plugin's settings tab.
|
The class name of the plugin's settings tab.
|
||||||
"""
|
"""
|
||||||
|
log.debug(u'Plugin %s initialised' % name)
|
||||||
QtCore.QObject.__init__(self)
|
QtCore.QObject.__init__(self)
|
||||||
self.name = name
|
self.name = name
|
||||||
self.textStrings = {}
|
self.textStrings = {}
|
||||||
@ -152,20 +153,20 @@ class Plugin(QtCore.QObject):
|
|||||||
self.version = get_application_version()[u'version']
|
self.version = get_application_version()[u'version']
|
||||||
self.settingsSection = self.name.lower()
|
self.settingsSection = self.name.lower()
|
||||||
self.icon = None
|
self.icon = None
|
||||||
self.mediaItemClass = mediaItemClass
|
self.media_item_class = media_item_class
|
||||||
self.settingsTabClass = settingsTabClass
|
self.settings_tab_class = settings_tab_class
|
||||||
self.weight = 0
|
self.weight = 0
|
||||||
self.status = PluginStatus.Inactive
|
self.status = PluginStatus.Inactive
|
||||||
# Set up logging
|
# Set up logging
|
||||||
self.log = logging.getLogger(self.name)
|
self.log = logging.getLogger(self.name)
|
||||||
self.previewController = pluginHelpers[u'preview']
|
self.previewController = plugin_helpers[u'preview']
|
||||||
self.liveController = pluginHelpers[u'live']
|
self.liveController = plugin_helpers[u'live']
|
||||||
self.renderManager = pluginHelpers[u'render']
|
self.renderManager = plugin_helpers[u'render']
|
||||||
self.serviceManager = pluginHelpers[u'service']
|
self.serviceManager = plugin_helpers[u'service']
|
||||||
self.settingsForm = pluginHelpers[u'settings form']
|
self.settingsForm = plugin_helpers[u'settings form']
|
||||||
self.mediadock = pluginHelpers[u'toolbox']
|
self.mediadock = plugin_helpers[u'toolbox']
|
||||||
self.pluginManager = pluginHelpers[u'pluginmanager']
|
self.pluginManager = plugin_helpers[u'pluginmanager']
|
||||||
self.formparent = pluginHelpers[u'formparent']
|
self.formparent = plugin_helpers[u'formparent']
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
||||||
self.processAddServiceEvent)
|
self.processAddServiceEvent)
|
||||||
@ -212,8 +213,8 @@ class Plugin(QtCore.QObject):
|
|||||||
Construct a MediaManagerItem object with all the buttons and things
|
Construct a MediaManagerItem object with all the buttons and things
|
||||||
you need, and return it for integration into openlp.org.
|
you need, and return it for integration into openlp.org.
|
||||||
"""
|
"""
|
||||||
if self.mediaItemClass:
|
if self.media_item_class:
|
||||||
return self.mediaItemClass(self, self, self.icon)
|
return self.media_item_class(self, self, self.icon)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def addImportMenuItem(self, importMenu):
|
def addImportMenuItem(self, importMenu):
|
||||||
@ -243,14 +244,15 @@ class Plugin(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getSettingsTab(self):
|
def getSettingsTab(self, parent):
|
||||||
"""
|
"""
|
||||||
Create a tab for the settings window to display the configurable
|
Create a tab for the settings window to display the configurable
|
||||||
options for this plugin to the user.
|
options for this plugin to the user.
|
||||||
"""
|
"""
|
||||||
if self.settingsTabClass:
|
if self.settings_tab_class:
|
||||||
return self.settingsTabClass(self.name,
|
return self.settings_tab_class(parent, self.name,
|
||||||
self.getString(StringContent.VisibleName)[u'title'])
|
self.getString(StringContent.VisibleName)[u'title'],
|
||||||
|
self.icon_path)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def addToMenu(self, menubar):
|
def addToMenu(self, menubar):
|
||||||
@ -287,31 +289,14 @@ class Plugin(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
if self.mediaItem:
|
if self.mediaItem:
|
||||||
self.mediaItem.initialise()
|
self.mediaItem.initialise()
|
||||||
self.insertToolboxItem()
|
self.mediadock.insert_dock(self.mediaItem, self.icon, self.weight)
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
"""
|
"""
|
||||||
Called by the plugin Manager to cleanup things.
|
Called by the plugin Manager to cleanup things.
|
||||||
"""
|
"""
|
||||||
self.removeToolboxItem()
|
|
||||||
|
|
||||||
def removeToolboxItem(self):
|
|
||||||
"""
|
|
||||||
Called by the plugin to remove toolbar
|
|
||||||
"""
|
|
||||||
if self.mediaItem:
|
if self.mediaItem:
|
||||||
self.mediadock.remove_dock(self.mediaItem)
|
self.mediadock.remove_dock(self.mediaItem)
|
||||||
if self.settings_tab:
|
|
||||||
self.settingsForm.removeTab(self.settings_tab)
|
|
||||||
|
|
||||||
def insertToolboxItem(self):
|
|
||||||
"""
|
|
||||||
Called by plugin to replace toolbar
|
|
||||||
"""
|
|
||||||
if self.mediaItem:
|
|
||||||
self.mediadock.insert_dock(self.mediaItem, self.icon, self.weight)
|
|
||||||
if self.settings_tab:
|
|
||||||
self.settingsForm.insertTab(self.settings_tab, self.weight)
|
|
||||||
|
|
||||||
def usesTheme(self, theme):
|
def usesTheme(self, theme):
|
||||||
"""
|
"""
|
||||||
@ -345,28 +330,28 @@ class Plugin(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
## Load Action ##
|
## Load Action ##
|
||||||
self.__setNameTextString(StringContent.Load,
|
self.__setNameTextString(StringContent.Load,
|
||||||
UiStrings.Load, tooltips[u'load'])
|
UiStrings().Load, tooltips[u'load'])
|
||||||
## Import Action ##
|
## Import Action ##
|
||||||
self.__setNameTextString(StringContent.Import,
|
self.__setNameTextString(StringContent.Import,
|
||||||
UiStrings.Import, tooltips[u'import'])
|
UiStrings().Import, tooltips[u'import'])
|
||||||
## New Action ##
|
## New Action ##
|
||||||
self.__setNameTextString(StringContent.New,
|
self.__setNameTextString(StringContent.New,
|
||||||
UiStrings.Add, tooltips[u'new'])
|
UiStrings().Add, tooltips[u'new'])
|
||||||
## Edit Action ##
|
## Edit Action ##
|
||||||
self.__setNameTextString(StringContent.Edit,
|
self.__setNameTextString(StringContent.Edit,
|
||||||
UiStrings.Edit, tooltips[u'edit'])
|
UiStrings().Edit, tooltips[u'edit'])
|
||||||
## Delete Action ##
|
## Delete Action ##
|
||||||
self.__setNameTextString(StringContent.Delete,
|
self.__setNameTextString(StringContent.Delete,
|
||||||
UiStrings.Delete, tooltips[u'delete'])
|
UiStrings().Delete, tooltips[u'delete'])
|
||||||
## Preview Action ##
|
## Preview Action ##
|
||||||
self.__setNameTextString(StringContent.Preview,
|
self.__setNameTextString(StringContent.Preview,
|
||||||
UiStrings.Preview, tooltips[u'preview'])
|
UiStrings().Preview, tooltips[u'preview'])
|
||||||
## Send Live Action ##
|
## Send Live Action ##
|
||||||
self.__setNameTextString(StringContent.Live,
|
self.__setNameTextString(StringContent.Live,
|
||||||
UiStrings.Live, tooltips[u'live'])
|
UiStrings().Live, tooltips[u'live'])
|
||||||
## Add to Service Action ##
|
## Add to Service Action ##
|
||||||
self.__setNameTextString(StringContent.Service,
|
self.__setNameTextString(StringContent.Service,
|
||||||
UiStrings.Service, tooltips[u'service'])
|
UiStrings().Service, tooltips[u'service'])
|
||||||
|
|
||||||
def __setNameTextString(self, name, title, tooltip):
|
def __setNameTextString(self, name, title, tooltip):
|
||||||
"""
|
"""
|
||||||
@ -374,4 +359,4 @@ class Plugin(QtCore.QObject):
|
|||||||
use of the singular name of the plugin object so must only be called
|
use of the singular name of the plugin object so must only be called
|
||||||
after this has been set.
|
after this has been set.
|
||||||
"""
|
"""
|
||||||
self.textStrings[name] = {u'title': title, u'tooltip': tooltip}
|
self.textStrings[name] = {u'title': title, u'tooltip': tooltip}
|
@ -137,7 +137,7 @@ class PluginManager(object):
|
|||||||
if plugin.status is not PluginStatus.Disabled:
|
if plugin.status is not PluginStatus.Disabled:
|
||||||
plugin.mediaItem = plugin.getMediaManagerItem()
|
plugin.mediaItem = plugin.getMediaManagerItem()
|
||||||
|
|
||||||
def hook_settings_tabs(self, settingsform=None):
|
def hook_settings_tabs(self, settings_form=None):
|
||||||
"""
|
"""
|
||||||
Loop through all the plugins. If a plugin has a valid settings tab
|
Loop through all the plugins. If a plugin has a valid settings tab
|
||||||
item, add it to the settings tab.
|
item, add it to the settings tab.
|
||||||
@ -148,16 +148,8 @@ class PluginManager(object):
|
|||||||
"""
|
"""
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugins:
|
||||||
if plugin.status is not PluginStatus.Disabled:
|
if plugin.status is not PluginStatus.Disabled:
|
||||||
plugin.settings_tab = plugin.getSettingsTab()
|
plugin.settings_tab = plugin.getSettingsTab(settings_form)
|
||||||
visible_title = plugin.getString(StringContent.VisibleName)
|
settings_form.plugins = self.plugins
|
||||||
if plugin.settings_tab:
|
|
||||||
log.debug(u'Inserting settings tab item from %s' %
|
|
||||||
visible_title[u'title'])
|
|
||||||
settingsform.addTab(visible_title[u'title'],
|
|
||||||
plugin.settings_tab)
|
|
||||||
else:
|
|
||||||
log.debug(
|
|
||||||
u'No tab settings in %s' % visible_title[u'title'])
|
|
||||||
|
|
||||||
def hook_import_menu(self, import_menu):
|
def hook_import_menu(self, import_menu):
|
||||||
"""
|
"""
|
||||||
@ -207,8 +199,6 @@ class PluginManager(object):
|
|||||||
if plugin.isActive():
|
if plugin.isActive():
|
||||||
plugin.initialise()
|
plugin.initialise()
|
||||||
log.info(u'Initialisation Complete for %s ' % plugin.name)
|
log.info(u'Initialisation Complete for %s ' % plugin.name)
|
||||||
if not plugin.isActive():
|
|
||||||
plugin.removeToolboxItem()
|
|
||||||
log.info(u'Initialise Plugins - Finished')
|
log.info(u'Initialise Plugins - Finished')
|
||||||
|
|
||||||
def finalise_plugins(self):
|
def finalise_plugins(self):
|
||||||
|
@ -110,6 +110,21 @@ class SearchEdit(QtGui.QLineEdit):
|
|||||||
"""
|
"""
|
||||||
return self._currentSearchType
|
return self._currentSearchType
|
||||||
|
|
||||||
|
def setCurrentSearchType(self, identifier):
|
||||||
|
"""
|
||||||
|
Set a new current search type.
|
||||||
|
|
||||||
|
``identifier``
|
||||||
|
The search type identifier (int).
|
||||||
|
"""
|
||||||
|
menu = self.menuButton.menu()
|
||||||
|
for action in menu.actions():
|
||||||
|
if identifier == action.data().toInt()[0]:
|
||||||
|
self.menuButton.setDefaultAction(action)
|
||||||
|
self._currentSearchType = identifier
|
||||||
|
self.emit(QtCore.SIGNAL(u'searchTypeChanged(int)'), identifier)
|
||||||
|
return True
|
||||||
|
|
||||||
def setSearchTypes(self, items):
|
def setSearchTypes(self, items):
|
||||||
"""
|
"""
|
||||||
A list of tuples to be used in the search type menu. The first item in
|
A list of tuples to be used in the search type menu. The first item in
|
||||||
|
@ -441,10 +441,10 @@ class ServiceItem(object):
|
|||||||
start = None
|
start = None
|
||||||
end = None
|
end = None
|
||||||
if self.start_time != 0:
|
if self.start_time != 0:
|
||||||
start = UiStrings.StartTimeCode % \
|
start = UiStrings().StartTimeCode % \
|
||||||
unicode(datetime.timedelta(seconds=self.start_time))
|
unicode(datetime.timedelta(seconds=self.start_time))
|
||||||
if self.media_length != 0:
|
if self.media_length != 0:
|
||||||
end = UiStrings.LengthTime % \
|
end = UiStrings().LengthTime % \
|
||||||
unicode(datetime.timedelta(seconds=self.media_length))
|
unicode(datetime.timedelta(seconds=self.media_length))
|
||||||
if not start and not end:
|
if not start and not end:
|
||||||
return None
|
return None
|
||||||
@ -453,4 +453,4 @@ class ServiceItem(object):
|
|||||||
elif not start and end:
|
elif not start and end:
|
||||||
return end
|
return end
|
||||||
else:
|
else:
|
||||||
return u'%s : %s' % (start, end)
|
return u'%s : %s' % (start, end)
|
@ -31,7 +31,7 @@ class SettingsTab(QtGui.QWidget):
|
|||||||
SettingsTab is a helper widget for plugins to define Tabs for the settings
|
SettingsTab is a helper widget for plugins to define Tabs for the settings
|
||||||
dialog.
|
dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, visible_title=None):
|
def __init__(self, parent, title, visible_title=None, icon_path=None):
|
||||||
"""
|
"""
|
||||||
Constructor to create the Settings tab item.
|
Constructor to create the Settings tab item.
|
||||||
|
|
||||||
@ -41,10 +41,12 @@ class SettingsTab(QtGui.QWidget):
|
|||||||
``visible_title``
|
``visible_title``
|
||||||
The title of the tab, which is usually displayed on the tab.
|
The title of the tab, which is usually displayed on the tab.
|
||||||
"""
|
"""
|
||||||
QtGui.QWidget.__init__(self)
|
QtGui.QWidget.__init__(self, parent)
|
||||||
self.tabTitle = title
|
self.tabTitle = title
|
||||||
self.tabTitleVisible = visible_title
|
self.tabTitleVisible = visible_title
|
||||||
self.settingsSection = self.tabTitle.lower()
|
self.settingsSection = self.tabTitle.lower()
|
||||||
|
if icon_path:
|
||||||
|
self.icon_path = icon_path
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
self.retranslateUi()
|
self.retranslateUi()
|
||||||
self.initialise()
|
self.initialise()
|
||||||
|
@ -36,7 +36,9 @@ except ImportError:
|
|||||||
# http://john.nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check
|
# http://john.nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate, DisplayTags
|
from openlp.core.lib import translate, DisplayTags
|
||||||
|
from openlp.core.lib.ui import checkable_action
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -80,6 +82,19 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
|||||||
if not cursor.hasSelection():
|
if not cursor.hasSelection():
|
||||||
cursor.select(QtGui.QTextCursor.WordUnderCursor)
|
cursor.select(QtGui.QTextCursor.WordUnderCursor)
|
||||||
self.setTextCursor(cursor)
|
self.setTextCursor(cursor)
|
||||||
|
# Add menu with available languages.
|
||||||
|
if ENCHANT_AVAILABLE:
|
||||||
|
lang_menu = QtGui.QMenu(
|
||||||
|
translate('OpenLP.SpellTextEdit', 'Language:'))
|
||||||
|
for lang in enchant.list_languages():
|
||||||
|
action = checkable_action(
|
||||||
|
lang_menu, lang, lang == self.dictionary.tag)
|
||||||
|
action.setText(lang)
|
||||||
|
lang_menu.addAction(action)
|
||||||
|
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||||
|
popupMenu.insertMenu(popupMenu.actions()[0], lang_menu)
|
||||||
|
QtCore.QObject.connect(lang_menu,
|
||||||
|
QtCore.SIGNAL(u'triggered(QAction*)'), self.setLanguage)
|
||||||
# Check if the selected word is misspelled and offer spelling
|
# Check if the selected word is misspelled and offer spelling
|
||||||
# suggestions if it is.
|
# suggestions if it is.
|
||||||
if ENCHANT_AVAILABLE and self.textCursor().hasSelection():
|
if ENCHANT_AVAILABLE and self.textCursor().hasSelection():
|
||||||
@ -93,19 +108,30 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
|||||||
spell_menu.addAction(action)
|
spell_menu.addAction(action)
|
||||||
# Only add the spelling suggests to the menu if there are
|
# Only add the spelling suggests to the menu if there are
|
||||||
# suggestions.
|
# suggestions.
|
||||||
if len(spell_menu.actions()) != 0:
|
if len(spell_menu.actions()):
|
||||||
popupMenu.insertSeparator(popupMenu.actions()[0])
|
|
||||||
popupMenu.insertMenu(popupMenu.actions()[0], spell_menu)
|
popupMenu.insertMenu(popupMenu.actions()[0], spell_menu)
|
||||||
tagMenu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
tagMenu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
||||||
'Formatting Tags'))
|
'Formatting Tags'))
|
||||||
for html in DisplayTags.get_html_tags():
|
for html in DisplayTags.get_html_tags():
|
||||||
action = SpellAction( html[u'desc'], tagMenu)
|
action = SpellAction(html[u'desc'], tagMenu)
|
||||||
action.correct.connect(self.htmlTag)
|
action.correct.connect(self.htmlTag)
|
||||||
tagMenu.addAction(action)
|
tagMenu.addAction(action)
|
||||||
popupMenu.insertSeparator(popupMenu.actions()[0])
|
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||||
popupMenu.insertMenu(popupMenu.actions()[0], tagMenu)
|
popupMenu.insertMenu(popupMenu.actions()[0], tagMenu)
|
||||||
popupMenu.exec_(event.globalPos())
|
popupMenu.exec_(event.globalPos())
|
||||||
|
|
||||||
|
def setLanguage(self, action):
|
||||||
|
"""
|
||||||
|
Changes the language for this spelltextedit.
|
||||||
|
|
||||||
|
``action``
|
||||||
|
The action.
|
||||||
|
"""
|
||||||
|
self.dictionary = enchant.Dict(action.text())
|
||||||
|
self.highlighter.spellingDictionary = self.dictionary
|
||||||
|
self.highlighter.highlightBlock(self.toPlainText())
|
||||||
|
self.highlighter.rehighlight()
|
||||||
|
|
||||||
def correctWord(self, word):
|
def correctWord(self, word):
|
||||||
"""
|
"""
|
||||||
Replaces the selected text with word.
|
Replaces the selected text with word.
|
||||||
|
@ -192,7 +192,7 @@ class VerticalType(object):
|
|||||||
Bottom = 2
|
Bottom = 2
|
||||||
|
|
||||||
Names = [u'top', u'middle', u'bottom']
|
Names = [u'top', u'middle', u'bottom']
|
||||||
TranslatedNames = [UiStrings.Top, UiStrings.Middle, UiStrings.Bottom]
|
TranslatedNames = [UiStrings().Top, UiStrings().Middle, UiStrings().Bottom]
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
|
BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
|
||||||
@ -637,4 +637,4 @@ class ThemeXML(object):
|
|||||||
self.font_footer_shadow_size)
|
self.font_footer_shadow_size)
|
||||||
self.add_display(self.display_horizontal_align,
|
self.add_display(self.display_horizontal_align,
|
||||||
self.display_vertical_align,
|
self.display_vertical_align,
|
||||||
self.display_slide_transition)
|
self.display_slide_transition)
|
@ -39,78 +39,96 @@ class UiStrings(object):
|
|||||||
"""
|
"""
|
||||||
Provide standard strings for objects to use.
|
Provide standard strings for objects to use.
|
||||||
"""
|
"""
|
||||||
# These strings should need a good reason to be retranslated elsewhere.
|
__instance__ = None
|
||||||
# Should some/more/less of these have an & attached?
|
|
||||||
About = translate('OpenLP.Ui', 'About')
|
def __new__(cls):
|
||||||
Add = translate('OpenLP.Ui', '&Add')
|
"""
|
||||||
Advanced = translate('OpenLP.Ui', 'Advanced')
|
Override the default object creation method to return a single instance.
|
||||||
AllFiles = translate('OpenLP.Ui', 'All Files')
|
"""
|
||||||
Bottom = translate('OpenLP.Ui', 'Bottom')
|
if not cls.__instance__:
|
||||||
Browse = translate('OpenLP.Ui', 'Browse...')
|
cls.__instance__ = object.__new__(cls)
|
||||||
Cancel = translate('OpenLP.Ui', 'Cancel')
|
return cls.__instance__
|
||||||
CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
|
|
||||||
CreateService = translate('OpenLP.Ui', 'Create a new service.')
|
def __init__(self):
|
||||||
Continuous = translate('OpenLP.Ui', 'Continuous')
|
"""
|
||||||
Default = unicode(translate('OpenLP.Ui', 'Default'))
|
These strings should need a good reason to be retranslated elsewhere.
|
||||||
Delete = translate('OpenLP.Ui', '&Delete')
|
Should some/more/less of these have an & attached?
|
||||||
DisplayStyle = translate('OpenLP.Ui', 'Display style:')
|
"""
|
||||||
Edit = translate('OpenLP.Ui', '&Edit')
|
self.About = translate('OpenLP.Ui', 'About')
|
||||||
EmptyField = translate('OpenLP.Ui', 'Empty Field')
|
self.Add = translate('OpenLP.Ui', '&Add')
|
||||||
Error = translate('OpenLP.Ui', 'Error')
|
self.Advanced = translate('OpenLP.Ui', 'Advanced')
|
||||||
Export = translate('OpenLP.Ui', 'Export')
|
self.AllFiles = translate('OpenLP.Ui', 'All Files')
|
||||||
File = translate('OpenLP.Ui', 'File')
|
self.Bottom = translate('OpenLP.Ui', 'Bottom')
|
||||||
FontSizePtUnit = translate('OpenLP.Ui', 'pt',
|
self.Browse = translate('OpenLP.Ui', 'Browse...')
|
||||||
'Abbreviated font pointsize unit')
|
self.Cancel = translate('OpenLP.Ui', 'Cancel')
|
||||||
Help = translate('OpenLP.Ui', 'Help')
|
self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
|
||||||
Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours')
|
self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
|
||||||
Image = translate('OpenLP.Ui', 'Image')
|
self.Continuous = translate('OpenLP.Ui', 'Continuous')
|
||||||
Import = translate('OpenLP.Ui', 'Import')
|
self.Default = unicode(translate('OpenLP.Ui', 'Default'))
|
||||||
LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
|
self.Delete = translate('OpenLP.Ui', '&Delete')
|
||||||
Live = translate('OpenLP.Ui', 'Live')
|
self.DisplayStyle = translate('OpenLP.Ui', 'Display style:')
|
||||||
LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
|
self.Edit = translate('OpenLP.Ui', '&Edit')
|
||||||
LivePanel = translate('OpenLP.Ui', 'Live Panel')
|
self.EmptyField = translate('OpenLP.Ui', 'Empty Field')
|
||||||
LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
|
self.Error = translate('OpenLP.Ui', 'Error')
|
||||||
Load = translate('OpenLP.Ui', 'Load')
|
self.Export = translate('OpenLP.Ui', 'Export')
|
||||||
Minutes = translate('OpenLP.Ui', 'm', 'The abbreviated unit for minutes')
|
self.File = translate('OpenLP.Ui', 'File')
|
||||||
Middle = translate('OpenLP.Ui', 'Middle')
|
self.FontSizePtUnit = translate('OpenLP.Ui', 'pt',
|
||||||
New = translate('OpenLP.Ui', 'New')
|
'Abbreviated font pointsize unit')
|
||||||
NewService = translate('OpenLP.Ui', 'New Service')
|
self.Help = translate('OpenLP.Ui', 'Help')
|
||||||
NewTheme = translate('OpenLP.Ui', 'New Theme')
|
self.Hours = translate('OpenLP.Ui', 'h',
|
||||||
NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
|
'The abbreviated unit for hours')
|
||||||
NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
|
self.Image = translate('OpenLP.Ui', 'Image')
|
||||||
NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
|
self.Import = translate('OpenLP.Ui', 'Import')
|
||||||
NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
|
self.LayoutStyle = translate('OpenLP.Ui', 'Layout style:')
|
||||||
OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
|
self.LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
|
||||||
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
self.Live = translate('OpenLP.Ui', 'Live')
|
||||||
OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. Do you '
|
self.LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
|
||||||
'wish to continue?')
|
self.LivePanel = translate('OpenLP.Ui', 'Live Panel')
|
||||||
OpenService = translate('OpenLP.Ui', 'Open Service')
|
self.LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
|
||||||
Preview = translate('OpenLP.Ui', 'Preview')
|
self.Load = translate('OpenLP.Ui', 'Load')
|
||||||
PreviewPanel = translate('OpenLP.Ui', 'Preview Panel')
|
self.Minutes = translate('OpenLP.Ui', 'm',
|
||||||
PreviewToolbar = translate('OpenLP.Ui', 'Preview Toolbar')
|
'The abbreviated unit for minutes')
|
||||||
PrintServiceOrder = translate('OpenLP.Ui', 'Print Service Order')
|
self.Middle = translate('OpenLP.Ui', 'Middle')
|
||||||
ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
|
self.New = translate('OpenLP.Ui', 'New')
|
||||||
ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
|
self.NewService = translate('OpenLP.Ui', 'New Service')
|
||||||
ResetBG = translate('OpenLP.Ui', 'Reset Background')
|
self.NewTheme = translate('OpenLP.Ui', 'New Theme')
|
||||||
ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
|
self.NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
|
||||||
Seconds = translate('OpenLP.Ui', 's', 'The abbreviated unit for seconds')
|
self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
|
||||||
SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
|
self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
|
||||||
Search = translate('OpenLP.Ui', 'Search')
|
self.NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
|
||||||
SelectDelete = translate('OpenLP.Ui', 'You must select an item to delete.')
|
self.OLPV1 = translate('OpenLP.Ui', 'openlp.org 1.x')
|
||||||
SelectEdit = translate('OpenLP.Ui', 'You must select an item to edit.')
|
self.OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
||||||
Settings = translate('OpenLP.Ui', 'Settings')
|
self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. '
|
||||||
SaveService = translate('OpenLP.Ui', 'Save Service')
|
'Do you wish to continue?')
|
||||||
Service = translate('OpenLP.Ui', 'Service')
|
self.OpenService = translate('OpenLP.Ui', 'Open Service')
|
||||||
StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
|
self.Preview = translate('OpenLP.Ui', 'Preview')
|
||||||
Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
|
self.PreviewPanel = translate('OpenLP.Ui', 'Preview Panel')
|
||||||
Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
|
self.PrintServiceOrder = translate('OpenLP.Ui', 'Print Service Order')
|
||||||
Tools = translate('OpenLP.Ui', 'Tools')
|
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
|
||||||
Top = translate('OpenLP.Ui', 'Top')
|
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
|
||||||
VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
|
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
|
||||||
VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
|
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
|
||||||
Version = translate('OpenLP.Ui', 'Version')
|
self.Seconds = translate('OpenLP.Ui', 's',
|
||||||
View = translate('OpenLP.Ui', 'View')
|
'The abbreviated unit for seconds')
|
||||||
ViewMode = translate('OpenLP.Ui', 'View Model')
|
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')
|
||||||
|
self.Search = translate('OpenLP.Ui', 'Search')
|
||||||
|
self.SelectDelete = translate('OpenLP.Ui', 'You must select an item '
|
||||||
|
'to delete.')
|
||||||
|
self.SelectEdit = translate('OpenLP.Ui', 'You must select an item to '
|
||||||
|
'edit.')
|
||||||
|
self.Settings = translate('OpenLP.Ui', 'Settings')
|
||||||
|
self.SaveService = translate('OpenLP.Ui', 'Save Service')
|
||||||
|
self.Service = translate('OpenLP.Ui', 'Service')
|
||||||
|
self.StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
|
||||||
|
self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
|
||||||
|
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
|
||||||
|
self.Tools = translate('OpenLP.Ui', 'Tools')
|
||||||
|
self.Top = translate('OpenLP.Ui', 'Top')
|
||||||
|
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
|
||||||
|
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
|
||||||
|
self.Version = translate('OpenLP.Ui', 'Version')
|
||||||
|
self.View = translate('OpenLP.Ui', 'View')
|
||||||
|
self.ViewMode = translate('OpenLP.Ui', 'View Model')
|
||||||
|
|
||||||
def add_welcome_page(parent, image):
|
def add_welcome_page(parent, image):
|
||||||
"""
|
"""
|
||||||
@ -157,7 +175,8 @@ def create_accept_reject_button_box(parent, okay=False):
|
|||||||
accept_button = QtGui.QDialogButtonBox.Save
|
accept_button = QtGui.QDialogButtonBox.Save
|
||||||
if okay:
|
if okay:
|
||||||
accept_button = QtGui.QDialogButtonBox.Ok
|
accept_button = QtGui.QDialogButtonBox.Ok
|
||||||
button_box.setStandardButtons(accept_button | QtGui.QDialogButtonBox.Cancel)
|
button_box.setStandardButtons(
|
||||||
|
accept_button | QtGui.QDialogButtonBox.Cancel)
|
||||||
button_box.setObjectName(u'%sButtonBox' % parent)
|
button_box.setObjectName(u'%sButtonBox' % parent)
|
||||||
QtCore.QObject.connect(button_box, QtCore.SIGNAL(u'accepted()'),
|
QtCore.QObject.connect(button_box, QtCore.SIGNAL(u'accepted()'),
|
||||||
parent.accept)
|
parent.accept)
|
||||||
@ -184,11 +203,11 @@ def critical_error_message_box(title=None, message=None, parent=None,
|
|||||||
Should this message box question the user.
|
Should this message box question the user.
|
||||||
"""
|
"""
|
||||||
if question:
|
if question:
|
||||||
return QtGui.QMessageBox.critical(parent, UiStrings.Error, message,
|
return QtGui.QMessageBox.critical(parent, UiStrings().Error, message,
|
||||||
QtGui.QMessageBox.StandardButtons(
|
QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
|
||||||
data = {u'message': message}
|
data = {u'message': message}
|
||||||
data[u'title'] = title if title else UiStrings.Error
|
data[u'title'] = title if title else UiStrings().Error
|
||||||
return Receiver.send_message(u'openlp_error_message', data)
|
return Receiver.send_message(u'openlp_error_message', data)
|
||||||
|
|
||||||
def media_item_combo_box(parent, name):
|
def media_item_combo_box(parent, name):
|
||||||
@ -218,7 +237,7 @@ def create_delete_push_button(parent, icon=None):
|
|||||||
delete_button.setObjectName(u'deleteButton')
|
delete_button.setObjectName(u'deleteButton')
|
||||||
delete_icon = icon if icon else u':/general/general_delete.png'
|
delete_icon = icon if icon else u':/general/general_delete.png'
|
||||||
delete_button.setIcon(build_icon(delete_icon))
|
delete_button.setIcon(build_icon(delete_icon))
|
||||||
delete_button.setText(UiStrings.Delete)
|
delete_button.setText(UiStrings().Delete)
|
||||||
delete_button.setToolTip(
|
delete_button.setToolTip(
|
||||||
translate('OpenLP.Ui', 'Delete the selected item.'))
|
translate('OpenLP.Ui', 'Delete the selected item.'))
|
||||||
QtCore.QObject.connect(delete_button,
|
QtCore.QObject.connect(delete_button,
|
||||||
@ -304,7 +323,7 @@ def shortcut_action(parent, name, shortcuts, function, icon=None, checked=None,
|
|||||||
action.setShortcutContext(context)
|
action.setShortcutContext(context)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(action, category)
|
action_list.add_action(action, category)
|
||||||
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), function)
|
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), function)
|
||||||
return action
|
return action
|
||||||
|
|
||||||
def context_menu_action(base, icon, text, slot, shortcuts=None, category=None,
|
def context_menu_action(base, icon, text, slot, shortcuts=None, category=None,
|
||||||
@ -330,14 +349,14 @@ def context_menu_action(base, icon, text, slot, shortcuts=None, category=None,
|
|||||||
``category``
|
``category``
|
||||||
The category the shortcut should be listed in the shortcut dialog. If
|
The category the shortcut should be listed in the shortcut dialog. If
|
||||||
left to None, then the action will be hidden in the shortcut dialog.
|
left to None, then the action will be hidden in the shortcut dialog.
|
||||||
|
|
||||||
``context``
|
``context``
|
||||||
The context the shortcut is valid.
|
The context the shortcut is valid.
|
||||||
"""
|
"""
|
||||||
action = QtGui.QAction(text, base)
|
action = QtGui.QAction(text, base)
|
||||||
if icon:
|
if icon:
|
||||||
action.setIcon(build_icon(icon))
|
action.setIcon(build_icon(icon))
|
||||||
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
|
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), slot)
|
||||||
if shortcuts is not None:
|
if shortcuts is not None:
|
||||||
action.setShortcuts(shortcuts)
|
action.setShortcuts(shortcuts)
|
||||||
action.setShortcutContext(context)
|
action.setShortcutContext(context)
|
||||||
@ -406,9 +425,9 @@ def create_valign_combo(form, parent, layout):
|
|||||||
verticalLabel.setText(translate('OpenLP.Ui', '&Vertical Align:'))
|
verticalLabel.setText(translate('OpenLP.Ui', '&Vertical Align:'))
|
||||||
form.verticalComboBox = QtGui.QComboBox(parent)
|
form.verticalComboBox = QtGui.QComboBox(parent)
|
||||||
form.verticalComboBox.setObjectName(u'VerticalComboBox')
|
form.verticalComboBox.setObjectName(u'VerticalComboBox')
|
||||||
form.verticalComboBox.addItem(UiStrings.Top)
|
form.verticalComboBox.addItem(UiStrings().Top)
|
||||||
form.verticalComboBox.addItem(UiStrings.Middle)
|
form.verticalComboBox.addItem(UiStrings().Middle)
|
||||||
form.verticalComboBox.addItem(UiStrings.Bottom)
|
form.verticalComboBox.addItem(UiStrings().Bottom)
|
||||||
verticalLabel.setBuddy(form.verticalComboBox)
|
verticalLabel.setBuddy(form.verticalComboBox)
|
||||||
layout.addRow(verticalLabel, form.verticalComboBox)
|
layout.addRow(verticalLabel, form.verticalComboBox)
|
||||||
|
|
||||||
@ -427,4 +446,4 @@ def find_and_set_in_combo_box(combo_box, value_to_find):
|
|||||||
if index == -1:
|
if index == -1:
|
||||||
# Not Found.
|
# Not Found.
|
||||||
index = 0
|
index = 0
|
||||||
combo_box.setCurrentIndex(index)
|
combo_box.setCurrentIndex(index)
|
||||||
|
@ -87,7 +87,7 @@ class Ui_AboutDialog(object):
|
|||||||
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
|
QtCore.QMetaObject.connectSlotsByName(aboutDialog)
|
||||||
|
|
||||||
def retranslateUi(self, aboutDialog):
|
def retranslateUi(self, aboutDialog):
|
||||||
aboutDialog.setWindowTitle(u'%s OpenLP' % UiStrings.About)
|
aboutDialog.setWindowTitle(u'%s OpenLP' % UiStrings().About)
|
||||||
self.aboutTextEdit.setPlainText(translate('OpenLP.AboutForm',
|
self.aboutTextEdit.setPlainText(translate('OpenLP.AboutForm',
|
||||||
'OpenLP <version><revision> - Open Source Lyrics '
|
'OpenLP <version><revision> - Open Source Lyrics '
|
||||||
'Projection\n'
|
'Projection\n'
|
||||||
@ -105,7 +105,7 @@ class Ui_AboutDialog(object):
|
|||||||
'consider contributing by using the button below.'
|
'consider contributing by using the button below.'
|
||||||
))
|
))
|
||||||
self.aboutNotebook.setTabText(
|
self.aboutNotebook.setTabText(
|
||||||
self.aboutNotebook.indexOf(self.aboutTab), UiStrings.About)
|
self.aboutNotebook.indexOf(self.aboutTab), UiStrings().About)
|
||||||
lead = u'Raoul "superfly" Snyman'
|
lead = u'Raoul "superfly" Snyman'
|
||||||
developers = [u'Tim "TRB143" Bentley', u'Jonathan "gushie" Corwin',
|
developers = [u'Tim "TRB143" Bentley', u'Jonathan "gushie" Corwin',
|
||||||
u'Michael "cocooncrash" Gorven',
|
u'Michael "cocooncrash" Gorven',
|
||||||
@ -615,4 +615,4 @@ class Ui_AboutDialog(object):
|
|||||||
self.aboutNotebook.indexOf(self.licenseTab),
|
self.aboutNotebook.indexOf(self.licenseTab),
|
||||||
translate('OpenLP.AboutForm', 'License'))
|
translate('OpenLP.AboutForm', 'License'))
|
||||||
self.contributeButton.setText(translate('OpenLP.AboutForm',
|
self.contributeButton.setText(translate('OpenLP.AboutForm',
|
||||||
'Contribute'))
|
'Contribute'))
|
@ -37,13 +37,15 @@ class AdvancedTab(SettingsTab):
|
|||||||
The :class:`AdvancedTab` manages the advanced settings tab including the UI
|
The :class:`AdvancedTab` manages the advanced settings tab including the UI
|
||||||
and the loading and saving of the displayed settings.
|
and the loading and saving of the displayed settings.
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self, parent):
|
||||||
"""
|
"""
|
||||||
Initialise the settings tab
|
Initialise the settings tab
|
||||||
"""
|
"""
|
||||||
SettingsTab.__init__(self, u'Advanced')
|
generalTranslated = translate('AdvancedTab', 'Advanced')
|
||||||
|
SettingsTab.__init__(self, parent ,u'Advanced', generalTranslated)
|
||||||
self.default_image = u':/graphics/openlp-splash-screen.png'
|
self.default_image = u':/graphics/openlp-splash-screen.png'
|
||||||
self.default_color = u'#ffffff'
|
self.default_color = u'#ffffff'
|
||||||
|
self.icon_path = u':/system/system_settings.png'
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
"""
|
"""
|
||||||
@ -125,7 +127,7 @@ class AdvancedTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
Setup the interface translation strings.
|
Setup the interface translation strings.
|
||||||
"""
|
"""
|
||||||
self.tabTitleVisible = UiStrings.Advanced
|
self.tabTitleVisible = UiStrings().Advanced
|
||||||
self.uiGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'UI Settings'))
|
self.uiGroupBox.setTitle(translate('OpenLP.AdvancedTab', 'UI Settings'))
|
||||||
self.recentLabel.setText(
|
self.recentLabel.setText(
|
||||||
translate('OpenLP.AdvancedTab',
|
translate('OpenLP.AdvancedTab',
|
||||||
@ -224,10 +226,10 @@ class AdvancedTab(SettingsTab):
|
|||||||
|
|
||||||
def onDefaultBrowseButtonPressed(self):
|
def onDefaultBrowseButtonPressed(self):
|
||||||
file_filters = u'%s;;%s (*.*) (*)' % (get_images_filter(),
|
file_filters = u'%s;;%s (*.*) (*)' % (get_images_filter(),
|
||||||
UiStrings.AllFiles)
|
UiStrings().AllFiles)
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||||
translate('OpenLP.AdvancedTab', 'Open File'), '',
|
translate('OpenLP.AdvancedTab', 'Open File'), '',
|
||||||
file_filters)
|
file_filters)
|
||||||
if filename:
|
if filename:
|
||||||
self.defaultFileEdit.setText(filename)
|
self.defaultFileEdit.setText(filename)
|
||||||
self.defaultFileEdit.setFocus()
|
self.defaultFileEdit.setFocus()
|
@ -136,10 +136,10 @@ class Ui_DisplayTagDialog(object):
|
|||||||
translate('OpenLP.DisplayTagDialog', 'Start tag'))
|
translate('OpenLP.DisplayTagDialog', 'Start tag'))
|
||||||
self.endTagLabel.setText(
|
self.endTagLabel.setText(
|
||||||
translate('OpenLP.DisplayTagDialog', 'End tag'))
|
translate('OpenLP.DisplayTagDialog', 'End tag'))
|
||||||
self.deletePushButton.setText(UiStrings.Delete)
|
self.deletePushButton.setText(UiStrings().Delete)
|
||||||
self.defaultPushButton.setText(
|
self.defaultPushButton.setText(
|
||||||
translate('OpenLP.DisplayTagDialog', 'Default'))
|
translate('OpenLP.DisplayTagDialog', 'Default'))
|
||||||
self.newPushButton.setText(UiStrings.New)
|
self.newPushButton.setText(UiStrings().New)
|
||||||
self.tagTableWidget.horizontalHeaderItem(0).setText(
|
self.tagTableWidget.horizontalHeaderItem(0).setText(
|
||||||
translate('OpenLP.DisplayTagDialog', 'Description'))
|
translate('OpenLP.DisplayTagDialog', 'Description'))
|
||||||
self.tagTableWidget.horizontalHeaderItem(1).setText(
|
self.tagTableWidget.horizontalHeaderItem(1).setText(
|
||||||
@ -151,4 +151,4 @@ class Ui_DisplayTagDialog(object):
|
|||||||
self.tagTableWidget.setColumnWidth(0, 120)
|
self.tagTableWidget.setColumnWidth(0, 120)
|
||||||
self.tagTableWidget.setColumnWidth(1, 40)
|
self.tagTableWidget.setColumnWidth(1, 40)
|
||||||
self.tagTableWidget.setColumnWidth(2, 240)
|
self.tagTableWidget.setColumnWidth(2, 240)
|
||||||
self.tagTableWidget.setColumnWidth(3, 240)
|
self.tagTableWidget.setColumnWidth(3, 240)
|
@ -178,11 +178,11 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||||||
self,translate('ImagePlugin.ExceptionDialog',
|
self,translate('ImagePlugin.ExceptionDialog',
|
||||||
'Select Attachment'),
|
'Select Attachment'),
|
||||||
SettingsManager.get_last_dir(u'exceptions'),
|
SettingsManager.get_last_dir(u'exceptions'),
|
||||||
u'%s (*.*) (*)' % UiStrings.AllFiles)
|
u'%s (*.*) (*)' % UiStrings().AllFiles)
|
||||||
log.info(u'New files(s) %s', unicode(files))
|
log.info(u'New files(s) %s', unicode(files))
|
||||||
if files:
|
if files:
|
||||||
self.fileAttachment = unicode(files)
|
self.fileAttachment = unicode(files)
|
||||||
|
|
||||||
def __buttonState(self, state):
|
def __buttonState(self, state):
|
||||||
self.saveReportButton.setEnabled(state)
|
self.saveReportButton.setEnabled(state)
|
||||||
self.sendReportButton.setEnabled(state)
|
self.sendReportButton.setEnabled(state)
|
@ -140,6 +140,8 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
return FirstTimePage.Songs
|
return FirstTimePage.Songs
|
||||||
elif self.currentId() == FirstTimePage.Progress:
|
elif self.currentId() == FirstTimePage.Progress:
|
||||||
return -1
|
return -1
|
||||||
|
elif self.currentId() == FirstTimePage.NoInternet:
|
||||||
|
return FirstTimePage.Progress
|
||||||
else:
|
else:
|
||||||
return self.currentId() + 1
|
return self.currentId() + 1
|
||||||
|
|
||||||
@ -147,11 +149,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
"""
|
"""
|
||||||
Detects Page changes and updates as approprate.
|
Detects Page changes and updates as approprate.
|
||||||
"""
|
"""
|
||||||
if pageId == FirstTimePage.NoInternet:
|
if pageId == FirstTimePage.Defaults:
|
||||||
self.finishButton.setVisible(True)
|
|
||||||
self.finishButton.setEnabled(True)
|
|
||||||
self.nextButton.setVisible(False)
|
|
||||||
elif pageId == FirstTimePage.Defaults:
|
|
||||||
self.themeComboBox.clear()
|
self.themeComboBox.clear()
|
||||||
for iter in xrange(self.themesListWidget.count()):
|
for iter in xrange(self.themesListWidget.count()):
|
||||||
item = self.themesListWidget.item(iter)
|
item = self.themesListWidget.item(iter)
|
||||||
|
@ -36,7 +36,7 @@ class GeneralTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
GeneralTab is the general settings tab in the settings dialog.
|
GeneralTab is the general settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, screens):
|
def __init__(self, parent, screens):
|
||||||
"""
|
"""
|
||||||
Initialise the general settings tab
|
Initialise the general settings tab
|
||||||
"""
|
"""
|
||||||
@ -44,7 +44,9 @@ class GeneralTab(SettingsTab):
|
|||||||
self.monitorNumber = 0
|
self.monitorNumber = 0
|
||||||
# Set to True to allow PostSetup to work on application start up
|
# Set to True to allow PostSetup to work on application start up
|
||||||
self.overrideChanged = True
|
self.overrideChanged = True
|
||||||
SettingsTab.__init__(self, u'General')
|
self.icon_path = u':/icon/openlp-logo-16x16.png'
|
||||||
|
generalTranslated = translate('GeneralTab', 'General')
|
||||||
|
SettingsTab.__init__(self, parent, u'General', generalTranslated)
|
||||||
|
|
||||||
def preLoad(self):
|
def preLoad(self):
|
||||||
"""
|
"""
|
||||||
@ -236,7 +238,7 @@ class GeneralTab(SettingsTab):
|
|||||||
self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec'))
|
self.timeoutSpinBox.setSuffix(translate('OpenLP.GeneralTab', ' sec'))
|
||||||
self.ccliGroupBox.setTitle(
|
self.ccliGroupBox.setTitle(
|
||||||
translate('OpenLP.GeneralTab', 'CCLI Details'))
|
translate('OpenLP.GeneralTab', 'CCLI Details'))
|
||||||
self.numberLabel.setText(UiStrings.CCLINumberLabel)
|
self.numberLabel.setText(UiStrings().CCLINumberLabel)
|
||||||
self.usernameLabel.setText(
|
self.usernameLabel.setText(
|
||||||
translate('OpenLP.GeneralTab', 'SongSelect username:'))
|
translate('OpenLP.GeneralTab', 'SongSelect username:'))
|
||||||
self.passwordLabel.setText(
|
self.passwordLabel.setText(
|
||||||
@ -392,4 +394,4 @@ class GeneralTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
Called when the width, height, x position or y position has changed.
|
Called when the width, height, x position or y position has changed.
|
||||||
"""
|
"""
|
||||||
self.overrideChanged = True
|
self.overrideChanged = True
|
@ -453,7 +453,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
painter.end()
|
painter.end()
|
||||||
return preview
|
return preview
|
||||||
|
|
||||||
def buildHtml(self, serviceItem):
|
def buildHtml(self, serviceItem, image=None):
|
||||||
"""
|
"""
|
||||||
Store the serviceItem and build the new HTML from it. Add the
|
Store the serviceItem and build the new HTML from it. Add the
|
||||||
HTML to the display
|
HTML to the display
|
||||||
@ -480,8 +480,12 @@ class MainDisplay(DisplayWidget):
|
|||||||
if self.serviceItem.themedata.background_filename:
|
if self.serviceItem.themedata.background_filename:
|
||||||
self.serviceItem.bg_image_bytes = self.imageManager. \
|
self.serviceItem.bg_image_bytes = self.imageManager. \
|
||||||
get_image_bytes(self.serviceItem.themedata.theme_name)
|
get_image_bytes(self.serviceItem.themedata.theme_name)
|
||||||
|
if image:
|
||||||
|
image_bytes = self.imageManager.get_image_bytes(image)
|
||||||
|
else:
|
||||||
|
image_bytes = None
|
||||||
html = build_html(self.serviceItem, self.screen, self.alertTab,
|
html = build_html(self.serviceItem, self.screen, self.alertTab,
|
||||||
self.isLive, background)
|
self.isLive, background, image_bytes)
|
||||||
log.debug(u'buildHtml - pre setHtml')
|
log.debug(u'buildHtml - pre setHtml')
|
||||||
self.webView.setHtml(html)
|
self.webView.setHtml(html)
|
||||||
log.debug(u'buildHtml - post setHtml')
|
log.debug(u'buildHtml - post setHtml')
|
||||||
|
@ -163,82 +163,82 @@ class Ui_MainWindow(object):
|
|||||||
self.themeManagerDock)
|
self.themeManagerDock)
|
||||||
# Create the menu items
|
# Create the menu items
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(UiStrings.File, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().File, CategoryOrder.standardMenu)
|
||||||
self.FileNewItem = shortcut_action(mainWindow, u'FileNewItem',
|
self.FileNewItem = shortcut_action(mainWindow, u'FileNewItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+N')],
|
[QtGui.QKeySequence(u'Ctrl+N')],
|
||||||
self.ServiceManagerContents.onNewServiceClicked,
|
self.ServiceManagerContents.onNewServiceClicked,
|
||||||
u':/general/general_new.png', category=UiStrings.File)
|
u':/general/general_new.png', category=UiStrings().File)
|
||||||
self.FileOpenItem = shortcut_action(mainWindow, u'FileOpenItem',
|
self.FileOpenItem = shortcut_action(mainWindow, u'FileOpenItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+O')],
|
[QtGui.QKeySequence(u'Ctrl+O')],
|
||||||
self.ServiceManagerContents.onLoadServiceClicked,
|
self.ServiceManagerContents.onLoadServiceClicked,
|
||||||
u':/general/general_open.png', category=UiStrings.File)
|
u':/general/general_open.png', category=UiStrings().File)
|
||||||
self.FileSaveItem = shortcut_action(mainWindow, u'FileSaveItem',
|
self.FileSaveItem = shortcut_action(mainWindow, u'FileSaveItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+S')],
|
[QtGui.QKeySequence(u'Ctrl+S')],
|
||||||
self.ServiceManagerContents.saveFile,
|
self.ServiceManagerContents.saveFile,
|
||||||
u':/general/general_save.png', category=UiStrings.File)
|
u':/general/general_save.png', category=UiStrings().File)
|
||||||
self.FileSaveAsItem = shortcut_action(mainWindow, u'FileSaveAsItem',
|
self.FileSaveAsItem = shortcut_action(mainWindow, u'FileSaveAsItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+Shift+S')],
|
[QtGui.QKeySequence(u'Ctrl+Shift+S')],
|
||||||
self.ServiceManagerContents.saveFileAs, category=UiStrings.File)
|
self.ServiceManagerContents.saveFileAs, category=UiStrings().File)
|
||||||
self.printServiceOrderItem = shortcut_action(mainWindow,
|
self.printServiceOrderItem = shortcut_action(mainWindow,
|
||||||
u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')],
|
u'printServiceItem', [QtGui.QKeySequence(u'Ctrl+P')],
|
||||||
self.ServiceManagerContents.printServiceOrder,
|
self.ServiceManagerContents.printServiceOrder,
|
||||||
category=UiStrings.File)
|
category=UiStrings().File)
|
||||||
self.FileExitItem = shortcut_action(mainWindow, u'FileExitItem',
|
self.FileExitItem = shortcut_action(mainWindow, u'FileExitItem',
|
||||||
[QtGui.QKeySequence(u'Alt+F4')], mainWindow.close,
|
[QtGui.QKeySequence(u'Alt+F4')], mainWindow.close,
|
||||||
u':/system/system_exit.png', category=UiStrings.File)
|
u':/system/system_exit.png', category=UiStrings().File)
|
||||||
action_list.add_category(UiStrings.Import, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().Import, CategoryOrder.standardMenu)
|
||||||
self.ImportThemeItem = base_action(
|
self.ImportThemeItem = base_action(
|
||||||
mainWindow, u'ImportThemeItem', UiStrings.Import)
|
mainWindow, u'ImportThemeItem', UiStrings().Import)
|
||||||
self.ImportLanguageItem = base_action(
|
self.ImportLanguageItem = base_action(
|
||||||
mainWindow, u'ImportLanguageItem')#, UiStrings.Import)
|
mainWindow, u'ImportLanguageItem')#, UiStrings().Import)
|
||||||
action_list.add_category(UiStrings.Export, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().Export, CategoryOrder.standardMenu)
|
||||||
self.ExportThemeItem = base_action(
|
self.ExportThemeItem = base_action(
|
||||||
mainWindow, u'ExportThemeItem', UiStrings.Export)
|
mainWindow, u'ExportThemeItem', UiStrings().Export)
|
||||||
self.ExportLanguageItem = base_action(
|
self.ExportLanguageItem = base_action(
|
||||||
mainWindow, u'ExportLanguageItem')#, UiStrings.Export)
|
mainWindow, u'ExportLanguageItem')#, UiStrings().Export)
|
||||||
action_list.add_category(UiStrings.View, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().View, CategoryOrder.standardMenu)
|
||||||
self.ViewMediaManagerItem = shortcut_action(mainWindow,
|
self.ViewMediaManagerItem = shortcut_action(mainWindow,
|
||||||
u'ViewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
|
u'ViewMediaManagerItem', [QtGui.QKeySequence(u'F8')],
|
||||||
self.toggleMediaManager, u':/system/system_mediamanager.png',
|
self.toggleMediaManager, u':/system/system_mediamanager.png',
|
||||||
self.mediaManagerDock.isVisible(), UiStrings.View)
|
self.mediaManagerDock.isVisible(), UiStrings().View)
|
||||||
self.ViewThemeManagerItem = shortcut_action(mainWindow,
|
self.ViewThemeManagerItem = shortcut_action(mainWindow,
|
||||||
u'ViewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
|
u'ViewThemeManagerItem', [QtGui.QKeySequence(u'F10')],
|
||||||
self.toggleThemeManager, u':/system/system_thememanager.png',
|
self.toggleThemeManager, u':/system/system_thememanager.png',
|
||||||
self.themeManagerDock.isVisible(), UiStrings.View)
|
self.themeManagerDock.isVisible(), UiStrings().View)
|
||||||
self.ViewServiceManagerItem = shortcut_action(mainWindow,
|
self.ViewServiceManagerItem = shortcut_action(mainWindow,
|
||||||
u'ViewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
|
u'ViewServiceManagerItem', [QtGui.QKeySequence(u'F9')],
|
||||||
self.toggleServiceManager, u':/system/system_servicemanager.png',
|
self.toggleServiceManager, u':/system/system_servicemanager.png',
|
||||||
self.serviceManagerDock.isVisible(), UiStrings.View)
|
self.serviceManagerDock.isVisible(), UiStrings().View)
|
||||||
self.ViewPreviewPanel = shortcut_action(mainWindow,
|
self.ViewPreviewPanel = shortcut_action(mainWindow,
|
||||||
u'ViewPreviewPanel', [QtGui.QKeySequence(u'F11')],
|
u'ViewPreviewPanel', [QtGui.QKeySequence(u'F11')],
|
||||||
self.setPreviewPanelVisibility, checked=previewVisible,
|
self.setPreviewPanelVisibility, checked=previewVisible,
|
||||||
category=UiStrings.View)
|
category=UiStrings().View)
|
||||||
self.ViewLivePanel = shortcut_action(mainWindow, u'ViewLivePanel',
|
self.ViewLivePanel = shortcut_action(mainWindow, u'ViewLivePanel',
|
||||||
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
||||||
checked=liveVisible, category=UiStrings.View)
|
checked=liveVisible, category=UiStrings().View)
|
||||||
action_list.add_category(UiStrings.ViewMode, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standardMenu)
|
||||||
self.ModeDefaultItem = checkable_action(
|
self.ModeDefaultItem = checkable_action(
|
||||||
mainWindow, u'ModeDefaultItem', category=UiStrings.ViewMode)
|
mainWindow, u'ModeDefaultItem', category=UiStrings().ViewMode)
|
||||||
self.ModeSetupItem = checkable_action(
|
self.ModeSetupItem = checkable_action(
|
||||||
mainWindow, u'ModeLiveItem', category=UiStrings.ViewMode)
|
mainWindow, u'ModeLiveItem', category=UiStrings().ViewMode)
|
||||||
self.ModeLiveItem = checkable_action(
|
self.ModeLiveItem = checkable_action(
|
||||||
mainWindow, u'ModeLiveItem', True, UiStrings.ViewMode)
|
mainWindow, u'ModeLiveItem', True, UiStrings().ViewMode)
|
||||||
self.ModeGroup = QtGui.QActionGroup(mainWindow)
|
self.ModeGroup = QtGui.QActionGroup(mainWindow)
|
||||||
self.ModeGroup.addAction(self.ModeDefaultItem)
|
self.ModeGroup.addAction(self.ModeDefaultItem)
|
||||||
self.ModeGroup.addAction(self.ModeSetupItem)
|
self.ModeGroup.addAction(self.ModeSetupItem)
|
||||||
self.ModeGroup.addAction(self.ModeLiveItem)
|
self.ModeGroup.addAction(self.ModeLiveItem)
|
||||||
self.ModeDefaultItem.setChecked(True)
|
self.ModeDefaultItem.setChecked(True)
|
||||||
action_list.add_category(UiStrings.Tools, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().Tools, CategoryOrder.standardMenu)
|
||||||
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem',
|
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem',
|
||||||
u':/tools/tools_add.png', category=UiStrings.Tools)
|
u':/tools/tools_add.png', category=UiStrings().Tools)
|
||||||
self.ToolsOpenDataFolder = icon_action(mainWindow,
|
self.ToolsOpenDataFolder = icon_action(mainWindow,
|
||||||
u'ToolsOpenDataFolder', u':/general/general_open.png',
|
u'ToolsOpenDataFolder', u':/general/general_open.png',
|
||||||
category=UiStrings.Tools)
|
category=UiStrings().Tools)
|
||||||
action_list.add_category(UiStrings.Settings, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().Settings, CategoryOrder.standardMenu)
|
||||||
self.settingsPluginListItem = shortcut_action(mainWindow,
|
self.settingsPluginListItem = shortcut_action(mainWindow,
|
||||||
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
||||||
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
||||||
category=UiStrings.Settings)
|
category=UiStrings().Settings)
|
||||||
# i18n Language Items
|
# i18n Language Items
|
||||||
self.AutoLanguageItem = checkable_action(mainWindow,
|
self.AutoLanguageItem = checkable_action(mainWindow,
|
||||||
u'AutoLanguageItem', LanguageManager.auto_language)
|
u'AutoLanguageItem', LanguageManager.auto_language)
|
||||||
@ -255,25 +255,25 @@ class Ui_MainWindow(object):
|
|||||||
self.SettingsShortcutsItem = icon_action(mainWindow,
|
self.SettingsShortcutsItem = icon_action(mainWindow,
|
||||||
u'SettingsShortcutsItem',
|
u'SettingsShortcutsItem',
|
||||||
u':/system/system_configure_shortcuts.png',
|
u':/system/system_configure_shortcuts.png',
|
||||||
category=UiStrings.Settings)
|
category=UiStrings().Settings)
|
||||||
self.DisplayTagItem = icon_action(mainWindow,
|
self.DisplayTagItem = icon_action(mainWindow,
|
||||||
u'DisplayTagItem', u':/system/tag_editor.png',
|
u'DisplayTagItem', u':/system/tag_editor.png',
|
||||||
category=UiStrings.Settings)
|
category=UiStrings().Settings)
|
||||||
self.SettingsConfigureItem = icon_action(mainWindow,
|
self.SettingsConfigureItem = icon_action(mainWindow,
|
||||||
u'SettingsConfigureItem', u':/system/system_settings.png',
|
u'SettingsConfigureItem', u':/system/system_settings.png',
|
||||||
category=UiStrings.Settings)
|
category=UiStrings().Settings)
|
||||||
action_list.add_category(UiStrings.Help, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().Help, CategoryOrder.standardMenu)
|
||||||
self.HelpDocumentationItem = icon_action(mainWindow,
|
self.HelpDocumentationItem = icon_action(mainWindow,
|
||||||
u'HelpDocumentationItem', u':/system/system_help_contents.png',
|
u'HelpDocumentationItem', u':/system/system_help_contents.png',
|
||||||
category=None)#UiStrings.Help)
|
category=None)#UiStrings().Help)
|
||||||
self.HelpDocumentationItem.setEnabled(False)
|
self.HelpDocumentationItem.setEnabled(False)
|
||||||
self.HelpAboutItem = shortcut_action(mainWindow, u'HelpAboutItem',
|
self.HelpAboutItem = shortcut_action(mainWindow, u'HelpAboutItem',
|
||||||
[QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked,
|
[QtGui.QKeySequence(u'Ctrl+F1')], self.onHelpAboutItemClicked,
|
||||||
u':/system/system_about.png', category=UiStrings.Help)
|
u':/system/system_about.png', category=UiStrings().Help)
|
||||||
self.HelpOnlineHelpItem = base_action(
|
self.HelpOnlineHelpItem = base_action(
|
||||||
mainWindow, u'HelpOnlineHelpItem', category=UiStrings.Help)
|
mainWindow, u'HelpOnlineHelpItem', category=UiStrings().Help)
|
||||||
self.helpWebSiteItem = base_action(
|
self.helpWebSiteItem = base_action(
|
||||||
mainWindow, u'helpWebSiteItem', category=UiStrings.Help)
|
mainWindow, u'helpWebSiteItem', category=UiStrings().Help)
|
||||||
add_actions(self.FileImportMenu,
|
add_actions(self.FileImportMenu,
|
||||||
(self.ImportThemeItem, self.ImportLanguageItem))
|
(self.ImportThemeItem, self.ImportLanguageItem))
|
||||||
add_actions(self.FileExportMenu,
|
add_actions(self.FileExportMenu,
|
||||||
@ -320,7 +320,7 @@ class Ui_MainWindow(object):
|
|||||||
"""
|
"""
|
||||||
Set up the translation system
|
Set up the translation system
|
||||||
"""
|
"""
|
||||||
mainWindow.mainTitle = UiStrings.OLPV2
|
mainWindow.mainTitle = UiStrings().OLPV2
|
||||||
mainWindow.setWindowTitle(mainWindow.mainTitle)
|
mainWindow.setWindowTitle(mainWindow.mainTitle)
|
||||||
self.FileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
|
self.FileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
|
||||||
self.FileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))
|
self.FileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))
|
||||||
@ -339,14 +339,14 @@ class Ui_MainWindow(object):
|
|||||||
self.themeManagerDock.setWindowTitle(
|
self.themeManagerDock.setWindowTitle(
|
||||||
translate('OpenLP.MainWindow', 'Theme Manager'))
|
translate('OpenLP.MainWindow', 'Theme Manager'))
|
||||||
self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
|
self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
|
||||||
self.FileNewItem.setToolTip(UiStrings.NewService)
|
self.FileNewItem.setToolTip(UiStrings().NewService)
|
||||||
self.FileNewItem.setStatusTip(UiStrings.CreateService)
|
self.FileNewItem.setStatusTip(UiStrings().CreateService)
|
||||||
self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
|
self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
|
||||||
self.FileOpenItem.setToolTip(UiStrings.OpenService)
|
self.FileOpenItem.setToolTip(UiStrings().OpenService)
|
||||||
self.FileOpenItem.setStatusTip(
|
self.FileOpenItem.setStatusTip(
|
||||||
translate('OpenLP.MainWindow', 'Open an existing service.'))
|
translate('OpenLP.MainWindow', 'Open an existing service.'))
|
||||||
self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
|
self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
|
||||||
self.FileSaveItem.setToolTip(UiStrings.SaveService)
|
self.FileSaveItem.setToolTip(UiStrings().SaveService)
|
||||||
self.FileSaveItem.setStatusTip(
|
self.FileSaveItem.setStatusTip(
|
||||||
translate('OpenLP.MainWindow', 'Save the current service to disk.'))
|
translate('OpenLP.MainWindow', 'Save the current service to disk.'))
|
||||||
self.FileSaveAsItem.setText(
|
self.FileSaveAsItem.setText(
|
||||||
@ -355,7 +355,7 @@ class Ui_MainWindow(object):
|
|||||||
translate('OpenLP.MainWindow', 'Save Service As'))
|
translate('OpenLP.MainWindow', 'Save Service As'))
|
||||||
self.FileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow',
|
self.FileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
'Save the current service under a new name.'))
|
'Save the current service under a new name.'))
|
||||||
self.printServiceOrderItem.setText(UiStrings.PrintServiceOrder)
|
self.printServiceOrderItem.setText(UiStrings().PrintServiceOrder)
|
||||||
self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow',
|
self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
'Print the current Service Order.'))
|
'Print the current Service Order.'))
|
||||||
self.FileExitItem.setText(
|
self.FileExitItem.setText(
|
||||||
@ -896,7 +896,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
def toggleThemeManager(self):
|
def toggleThemeManager(self):
|
||||||
self.themeManagerDock.setVisible(not self.themeManagerDock.isVisible())
|
self.themeManagerDock.setVisible(not self.themeManagerDock.isVisible())
|
||||||
|
|
||||||
def setPreviewPanelVisibility(self, visible=None):
|
def setPreviewPanelVisibility(self, visible):
|
||||||
"""
|
"""
|
||||||
Sets the visibility of the preview panel including saving the setting
|
Sets the visibility of the preview panel including saving the setting
|
||||||
and updating the menu.
|
and updating the menu.
|
||||||
@ -906,14 +906,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
True - Visible
|
True - Visible
|
||||||
False - Hidden
|
False - Hidden
|
||||||
"""
|
"""
|
||||||
if visible is None:
|
|
||||||
visible = self.ViewPreviewPanel.isVisible()
|
|
||||||
self.previewController.panel.setVisible(visible)
|
self.previewController.panel.setVisible(visible)
|
||||||
QtCore.QSettings().setValue(u'user interface/preview panel',
|
QtCore.QSettings().setValue(u'user interface/preview panel',
|
||||||
QtCore.QVariant(visible))
|
QtCore.QVariant(visible))
|
||||||
self.ViewPreviewPanel.setChecked(visible)
|
self.ViewPreviewPanel.setChecked(visible)
|
||||||
|
|
||||||
def setLivePanelVisibility(self, visible=None):
|
def setLivePanelVisibility(self, visible):
|
||||||
"""
|
"""
|
||||||
Sets the visibility of the live panel including saving the setting and
|
Sets the visibility of the live panel including saving the setting and
|
||||||
updating the menu.
|
updating the menu.
|
||||||
@ -923,8 +921,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
True - Visible
|
True - Visible
|
||||||
False - Hidden
|
False - Hidden
|
||||||
"""
|
"""
|
||||||
if visible is None:
|
|
||||||
visible = self.ViewLivePanel.isVisible()
|
|
||||||
self.liveController.panel.setVisible(visible)
|
self.liveController.panel.setVisible(visible)
|
||||||
QtCore.QSettings().setValue(u'user interface/live panel',
|
QtCore.QSettings().setValue(u'user interface/live panel',
|
||||||
QtCore.QVariant(visible))
|
QtCore.QVariant(visible))
|
||||||
|
@ -84,5 +84,5 @@ class MediaDockManager(object):
|
|||||||
if self.media_dock.widget(dock_index):
|
if self.media_dock.widget(dock_index):
|
||||||
if self.media_dock.widget(dock_index).settingsSection == \
|
if self.media_dock.widget(dock_index).settingsSection == \
|
||||||
media_item.plugin.name.lower():
|
media_item.plugin.name.lower():
|
||||||
self.media_dock.widget(dock_index).hide()
|
self.media_dock.widget(dock_index).setVisible(False)
|
||||||
self.media_dock.removeItem(dock_index)
|
self.media_dock.removeItem(dock_index)
|
||||||
|
@ -78,11 +78,11 @@ class Ui_PluginViewDialog(object):
|
|||||||
translate('OpenLP.PluginForm', 'Plugin List'))
|
translate('OpenLP.PluginForm', 'Plugin List'))
|
||||||
self.pluginInfoGroupBox.setTitle(
|
self.pluginInfoGroupBox.setTitle(
|
||||||
translate('OpenLP.PluginForm', 'Plugin Details'))
|
translate('OpenLP.PluginForm', 'Plugin Details'))
|
||||||
self.versionLabel.setText(u'%s:' % UiStrings.Version)
|
self.versionLabel.setText(u'%s:' % UiStrings().Version)
|
||||||
self.aboutLabel.setText(u'%s:' % UiStrings.About)
|
self.aboutLabel.setText(u'%s:' % UiStrings().About)
|
||||||
self.statusLabel.setText(
|
self.statusLabel.setText(
|
||||||
translate('OpenLP.PluginForm', 'Status:'))
|
translate('OpenLP.PluginForm', 'Status:'))
|
||||||
self.statusComboBox.setItemText(0,
|
self.statusComboBox.setItemText(0,
|
||||||
translate('OpenLP.PluginForm', 'Active'))
|
translate('OpenLP.PluginForm', 'Active'))
|
||||||
self.statusComboBox.setItemText(1,
|
self.statusComboBox.setItemText(1,
|
||||||
translate('OpenLP.PluginForm', 'Inactive'))
|
translate('OpenLP.PluginForm', 'Inactive'))
|
@ -148,7 +148,7 @@ class Ui_PrintServiceDialog(object):
|
|||||||
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
|
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
|
||||||
|
|
||||||
def retranslateUi(self, printServiceDialog):
|
def retranslateUi(self, printServiceDialog):
|
||||||
printServiceDialog.setWindowTitle(UiStrings.PrintServiceOrder)
|
printServiceDialog.setWindowTitle(UiStrings().PrintServiceOrder)
|
||||||
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
|
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
|
||||||
'Include slide text if available'))
|
'Include slide text if available'))
|
||||||
self.pageBreakAfterText.setText(translate('OpenLP.PrintServiceForm',
|
self.pageBreakAfterText.setText(translate('OpenLP.PrintServiceForm',
|
||||||
@ -164,4 +164,4 @@ class Ui_PrintServiceDialog(object):
|
|||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.OneHundred])
|
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.OneHundred])
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.SeventyFive])
|
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.SeventyFive])
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Fifty])
|
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Fifty])
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.TwentyFive])
|
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.TwentyFive])
|
@ -222,6 +222,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
unicode(datetime.timedelta(seconds=tme)), title)
|
unicode(datetime.timedelta(seconds=tme)), title)
|
||||||
# Add the custom service notes:
|
# Add the custom service notes:
|
||||||
if self.footerTextEdit.toPlainText():
|
if self.footerTextEdit.toPlainText():
|
||||||
|
div = self._addChildToParent(u'div', parent=html_data.body)
|
||||||
self._addChildToParent(u'span', translate('OpenLP.ServiceManager',
|
self._addChildToParent(u'span', translate('OpenLP.ServiceManager',
|
||||||
u'Custom Service Notes:'), div, u'class', u'customNotesTitle')
|
u'Custom Service Notes:'), div, u'class', u'customNotesTitle')
|
||||||
self._addChildToParent(
|
self._addChildToParent(
|
||||||
@ -353,9 +354,9 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
Called when html copy check box is selected.
|
Called when html copy check box is selected.
|
||||||
"""
|
"""
|
||||||
if value == QtCore.Qt.Checked:
|
if value == QtCore.Qt.Checked:
|
||||||
self.copyTextButton.setText(UiStrings.CopyToHtml)
|
self.copyTextButton.setText(UiStrings().CopyToHtml)
|
||||||
else:
|
else:
|
||||||
self.copyTextButton.setText(UiStrings.CopyToText)
|
self.copyTextButton.setText(UiStrings().CopyToText)
|
||||||
|
|
||||||
def onSlideTextCheckBoxChanged(self, state):
|
def onSlideTextCheckBoxChanged(self, state):
|
||||||
"""
|
"""
|
||||||
@ -379,4 +380,4 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
QtCore.QVariant(self.metaDataCheckBox.isChecked()))
|
QtCore.QVariant(self.metaDataCheckBox.isChecked()))
|
||||||
settings.setValue(u'print notes',
|
settings.setValue(u'print notes',
|
||||||
QtCore.QVariant(self.notesCheckBox.isChecked()))
|
QtCore.QVariant(self.notesCheckBox.isChecked()))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
@ -111,18 +111,18 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
# Create the top toolbar
|
# Create the top toolbar
|
||||||
self.toolbar = OpenLPToolbar(self)
|
self.toolbar = OpenLPToolbar(self)
|
||||||
self.toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
UiStrings.NewService, u':/general/general_new.png',
|
UiStrings().NewService, u':/general/general_new.png',
|
||||||
UiStrings.CreateService, self.onNewServiceClicked)
|
UiStrings().CreateService, self.onNewServiceClicked)
|
||||||
self.toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
UiStrings.OpenService, u':/general/general_open.png',
|
UiStrings().OpenService, u':/general/general_open.png',
|
||||||
translate('OpenLP.ServiceManager', 'Load an existing service'),
|
translate('OpenLP.ServiceManager', 'Load an existing service'),
|
||||||
self.onLoadServiceClicked)
|
self.onLoadServiceClicked)
|
||||||
self.toolbar.addToolbarButton(
|
self.toolbar.addToolbarButton(
|
||||||
UiStrings.SaveService, u':/general/general_save.png',
|
UiStrings().SaveService, u':/general/general_save.png',
|
||||||
translate('OpenLP.ServiceManager', 'Save this service'),
|
translate('OpenLP.ServiceManager', 'Save this service'),
|
||||||
self.saveFile)
|
self.saveFile)
|
||||||
self.toolbar.addSeparator()
|
self.toolbar.addSeparator()
|
||||||
self.themeLabel = QtGui.QLabel(u'%s:' % UiStrings.Theme, self)
|
self.themeLabel = QtGui.QLabel(u'%s:' % UiStrings().Theme, self)
|
||||||
self.themeLabel.setMargin(3)
|
self.themeLabel.setMargin(3)
|
||||||
self.themeLabel.setObjectName(u'themeLabel')
|
self.themeLabel.setObjectName(u'themeLabel')
|
||||||
self.toolbar.addToolbarWidget(u'ThemeLabel', self.themeLabel)
|
self.toolbar.addToolbarWidget(u'ThemeLabel', self.themeLabel)
|
||||||
@ -169,9 +169,10 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.onServiceTop, shortcuts=[QtCore.Qt.Key_Home])
|
self.onServiceTop, shortcuts=[QtCore.Qt.Key_Home])
|
||||||
self.serviceManagerList.moveTop.setObjectName(u'moveTop')
|
self.serviceManagerList.moveTop.setObjectName(u'moveTop')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(UiStrings.Service, CategoryOrder.standardToolbar)
|
action_list.add_category(
|
||||||
|
UiStrings().Service, CategoryOrder.standardToolbar)
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveTop, UiStrings.Service)
|
self.serviceManagerList.moveTop, UiStrings().Service)
|
||||||
self.serviceManagerList.moveUp = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.moveUp = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move &up'),
|
translate('OpenLP.ServiceManager', 'Move &up'),
|
||||||
u':/services/service_up.png',
|
u':/services/service_up.png',
|
||||||
@ -179,7 +180,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
'Move item up one position in the service.'),
|
'Move item up one position in the service.'),
|
||||||
self.onServiceUp, shortcuts=[QtCore.Qt.Key_PageUp])
|
self.onServiceUp, shortcuts=[QtCore.Qt.Key_PageUp])
|
||||||
self.serviceManagerList.moveUp.setObjectName(u'moveUp')
|
self.serviceManagerList.moveUp.setObjectName(u'moveUp')
|
||||||
action_list.add_action(self.serviceManagerList.moveUp, UiStrings.Service)
|
action_list.add_action(
|
||||||
|
self.serviceManagerList.moveUp, UiStrings().Service)
|
||||||
self.serviceManagerList.moveDown = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.moveDown = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move &down'),
|
translate('OpenLP.ServiceManager', 'Move &down'),
|
||||||
u':/services/service_down.png',
|
u':/services/service_down.png',
|
||||||
@ -188,7 +190,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.onServiceDown, shortcuts=[QtCore.Qt.Key_PageDown])
|
self.onServiceDown, shortcuts=[QtCore.Qt.Key_PageDown])
|
||||||
self.serviceManagerList.moveDown.setObjectName(u'moveDown')
|
self.serviceManagerList.moveDown.setObjectName(u'moveDown')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveDown, UiStrings.Service)
|
self.serviceManagerList.moveDown, UiStrings().Service)
|
||||||
self.serviceManagerList.moveBottom = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.moveBottom = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move to &bottom'),
|
translate('OpenLP.ServiceManager', 'Move to &bottom'),
|
||||||
u':/services/service_bottom.png',
|
u':/services/service_bottom.png',
|
||||||
@ -197,7 +199,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.onServiceEnd, shortcuts=[QtCore.Qt.Key_End])
|
self.onServiceEnd, shortcuts=[QtCore.Qt.Key_End])
|
||||||
self.serviceManagerList.moveBottom.setObjectName(u'moveBottom')
|
self.serviceManagerList.moveBottom.setObjectName(u'moveBottom')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.moveBottom, UiStrings.Service)
|
self.serviceManagerList.moveBottom, UiStrings().Service)
|
||||||
self.serviceManagerList.down = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.down = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Move &down'),
|
translate('OpenLP.ServiceManager', 'Move &down'),
|
||||||
None,
|
None,
|
||||||
@ -231,7 +233,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
'Expand all the service items.'),
|
'Expand all the service items.'),
|
||||||
self.onExpandAll, shortcuts=[QtCore.Qt.Key_Plus])
|
self.onExpandAll, shortcuts=[QtCore.Qt.Key_Plus])
|
||||||
self.serviceManagerList.expand.setObjectName(u'expand')
|
self.serviceManagerList.expand.setObjectName(u'expand')
|
||||||
action_list.add_action(self.serviceManagerList.expand, UiStrings.Service)
|
action_list.add_action(
|
||||||
|
self.serviceManagerList.expand, UiStrings().Service)
|
||||||
self.serviceManagerList.collapse = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.collapse = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', '&Collapse all'),
|
translate('OpenLP.ServiceManager', '&Collapse all'),
|
||||||
u':/services/service_collapse_all.png',
|
u':/services/service_collapse_all.png',
|
||||||
@ -240,7 +243,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.onCollapseAll, shortcuts=[QtCore.Qt.Key_Minus])
|
self.onCollapseAll, shortcuts=[QtCore.Qt.Key_Minus])
|
||||||
self.serviceManagerList.collapse.setObjectName(u'collapse')
|
self.serviceManagerList.collapse.setObjectName(u'collapse')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.collapse, UiStrings.Service)
|
self.serviceManagerList.collapse, UiStrings().Service)
|
||||||
self.orderToolbar.addSeparator()
|
self.orderToolbar.addSeparator()
|
||||||
self.serviceManagerList.makeLive = self.orderToolbar.addToolbarButton(
|
self.serviceManagerList.makeLive = self.orderToolbar.addToolbarButton(
|
||||||
translate('OpenLP.ServiceManager', 'Go Live'),
|
translate('OpenLP.ServiceManager', 'Go Live'),
|
||||||
@ -250,7 +253,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
shortcuts=[QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return])
|
shortcuts=[QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return])
|
||||||
self.serviceManagerList.makeLive.setObjectName(u'orderToolbar')
|
self.serviceManagerList.makeLive.setObjectName(u'orderToolbar')
|
||||||
action_list.add_action(
|
action_list.add_action(
|
||||||
self.serviceManagerList.makeLive, UiStrings.Service)
|
self.serviceManagerList.makeLive, UiStrings().Service)
|
||||||
self.layout.addWidget(self.orderToolbar)
|
self.layout.addWidget(self.orderToolbar)
|
||||||
# Connect up our signals and slots
|
# Connect up our signals and slots
|
||||||
QtCore.QObject.connect(self.themeComboBox,
|
QtCore.QObject.connect(self.themeComboBox,
|
||||||
@ -344,7 +347,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
has been modified.
|
has been modified.
|
||||||
"""
|
"""
|
||||||
self._modified = modified
|
self._modified = modified
|
||||||
serviceFile = self.shortFileName() or u'Untitled Service'
|
serviceFile = self.shortFileName() or translate(
|
||||||
|
'OpenLP.ServiceManager', 'Untitled Service')
|
||||||
self.mainwindow.setServiceModified(modified, serviceFile)
|
self.mainwindow.setServiceModified(modified, serviceFile)
|
||||||
|
|
||||||
def isModified(self):
|
def isModified(self):
|
||||||
@ -525,7 +529,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
save the file.
|
save the file.
|
||||||
"""
|
"""
|
||||||
fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow,
|
fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow,
|
||||||
UiStrings.SaveService,
|
UiStrings().SaveService,
|
||||||
SettingsManager.get_last_dir(
|
SettingsManager.get_last_dir(
|
||||||
self.mainwindow.serviceSettingsSection),
|
self.mainwindow.serviceSettingsSection),
|
||||||
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)')))
|
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)')))
|
||||||
@ -611,7 +615,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
u'%s' % fileName)
|
u'%s' % fileName)
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
translate('OpenLP.ServiceManager', 'Corrupt File'),
|
translate('OpenLP.ServiceManager', 'Corrupt File'),
|
||||||
translate('OpenLP.ServiceManager', 'This file is either'
|
translate('OpenLP.ServiceManager', 'This file is either '
|
||||||
'corrupt or not an OpenLP 2.0 service file.'))
|
'corrupt or not an OpenLP 2.0 service file.'))
|
||||||
return
|
return
|
||||||
finally:
|
finally:
|
||||||
|
@ -32,18 +32,29 @@ from openlp.core.lib.ui import create_accept_reject_button_box
|
|||||||
class Ui_SettingsDialog(object):
|
class Ui_SettingsDialog(object):
|
||||||
def setupUi(self, settingsDialog):
|
def setupUi(self, settingsDialog):
|
||||||
settingsDialog.setObjectName(u'settingsDialog')
|
settingsDialog.setObjectName(u'settingsDialog')
|
||||||
settingsDialog.resize(700, 500)
|
settingsDialog.resize(800, 500)
|
||||||
settingsDialog.setWindowIcon(
|
settingsDialog.setWindowIcon(
|
||||||
build_icon(u':/system/system_settings.png'))
|
build_icon(u':/system/system_settings.png'))
|
||||||
self.settingsLayout = QtGui.QVBoxLayout(settingsDialog)
|
self.dialogLayout = QtGui.QGridLayout(settingsDialog)
|
||||||
self.settingsLayout.setObjectName(u'settingsLayout')
|
self.dialogLayout.setObjectName(u'dialogLayout')
|
||||||
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
|
self.dialogLayout.setMargin(8)
|
||||||
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
self.settingListWidget = QtGui.QListWidget(settingsDialog)
|
||||||
self.settingsLayout.addWidget(self.settingsTabWidget)
|
self.settingListWidget.setUniformItemSizes(True)
|
||||||
|
self.settingListWidget.setMinimumSize(QtCore.QSize(150, 0))
|
||||||
|
self.settingListWidget.setHorizontalScrollBarPolicy(
|
||||||
|
QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
|
self.settingListWidget.setObjectName(u'settingListWidget')
|
||||||
|
self.dialogLayout.addWidget(self.settingListWidget, 0, 0, 1, 1)
|
||||||
|
self.stackedLayout = QtGui.QStackedLayout()
|
||||||
|
self.stackedLayout.setObjectName(u'stackedLayout')
|
||||||
|
self.dialogLayout.addLayout(self.stackedLayout, 0, 1, 1, 1)
|
||||||
self.buttonBox = create_accept_reject_button_box(settingsDialog, True)
|
self.buttonBox = create_accept_reject_button_box(settingsDialog, True)
|
||||||
self.settingsLayout.addWidget(self.buttonBox)
|
self.dialogLayout.addWidget(self.buttonBox, 1, 1, 1, 1)
|
||||||
self.retranslateUi(settingsDialog)
|
self.retranslateUi(settingsDialog)
|
||||||
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
||||||
|
QtCore.QObject.connect(self.settingListWidget,
|
||||||
|
QtCore.SIGNAL(u'currentRowChanged(int)'),
|
||||||
|
self.stackedLayout.setCurrentIndex)
|
||||||
|
|
||||||
def retranslateUi(self, settingsDialog):
|
def retranslateUi(self, settingsDialog):
|
||||||
settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',
|
settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',
|
||||||
|
@ -28,9 +28,9 @@ The :mod:`settingsform` provides a user interface for the OpenLP settings
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui, QtCore
|
||||||
|
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver, build_icon, PluginStatus
|
||||||
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab
|
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab
|
||||||
from settingsdialog import Ui_SettingsDialog
|
from settingsdialog import Ui_SettingsDialog
|
||||||
|
|
||||||
@ -47,48 +47,52 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# General tab
|
# General tab
|
||||||
generalTab = GeneralTab(screens)
|
self.generalTab = GeneralTab(self, screens)
|
||||||
self.addTab(u'General', generalTab)
|
|
||||||
# Themes tab
|
# Themes tab
|
||||||
themesTab = ThemesTab(mainWindow)
|
self.themesTab = ThemesTab(self, mainWindow)
|
||||||
self.addTab(u'Themes', themesTab)
|
|
||||||
# Advanced tab
|
# Advanced tab
|
||||||
advancedTab = AdvancedTab()
|
self.advancedTab = AdvancedTab(self)
|
||||||
self.addTab(u'Advanced', advancedTab)
|
|
||||||
|
|
||||||
def addTab(self, name, tab):
|
def exec_(self):
|
||||||
"""
|
# load all the settings
|
||||||
Add a tab to the form
|
self.settingListWidget.clear()
|
||||||
"""
|
for tabIndex in range(0, self.stackedLayout.count() + 1):
|
||||||
log.info(u'Adding %s tab' % tab.tabTitle)
|
# take at 0 and the rest shuffell up.
|
||||||
self.settingsTabWidget.addTab(tab, tab.tabTitleVisible)
|
self.stackedLayout.takeAt(0)
|
||||||
|
self.insertTab(self.generalTab, 0, PluginStatus.Active)
|
||||||
|
self.insertTab(self.themesTab, 1, PluginStatus.Active)
|
||||||
|
self.insertTab(self.advancedTab, 2, PluginStatus.Active)
|
||||||
|
count = 3
|
||||||
|
for plugin in self.plugins:
|
||||||
|
if plugin.settings_tab:
|
||||||
|
self.insertTab(plugin.settings_tab, count, plugin.status)
|
||||||
|
count += 1
|
||||||
|
self.settingListWidget.setCurrentRow(0)
|
||||||
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def insertTab(self, tab, location):
|
def insertTab(self, tab, location, is_active):
|
||||||
"""
|
"""
|
||||||
Add a tab to the form at a specific location
|
Add a tab to the form at a specific location
|
||||||
"""
|
"""
|
||||||
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
||||||
# 14 : There are 3 tables currently and locations starts at -10
|
# add the tab to get it to display in the correct part of the screen
|
||||||
self.settingsTabWidget.insertTab(
|
pos = self.stackedLayout.addWidget(tab)
|
||||||
location + 14, tab, tab.tabTitleVisible)
|
if is_active:
|
||||||
|
item_name = QtGui.QListWidgetItem(tab.tabTitleVisible)
|
||||||
def removeTab(self, tab):
|
icon = build_icon(tab.icon_path)
|
||||||
"""
|
item_name.setIcon(icon)
|
||||||
Remove a tab from the form
|
self.settingListWidget.insertItem(location, item_name)
|
||||||
"""
|
else:
|
||||||
log.debug(u'remove %s tab' % tab.tabTitleVisible)
|
# then remove tab to stop the UI displaying it even if
|
||||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
# it is not required.
|
||||||
if self.settingsTabWidget.widget(tabIndex):
|
self.stackedLayout.takeAt(pos)
|
||||||
if self.settingsTabWidget.widget(tabIndex).tabTitleVisible == \
|
|
||||||
tab.tabTitleVisible:
|
|
||||||
self.settingsTabWidget.removeTab(tabIndex)
|
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
"""
|
"""
|
||||||
Process the form saving the settings
|
Process the form saving the settings
|
||||||
"""
|
"""
|
||||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
for tabIndex in range(0, self.stackedLayout.count()):
|
||||||
self.settingsTabWidget.widget(tabIndex).save()
|
self.stackedLayout.widget(tabIndex).save()
|
||||||
# Must go after all settings are save
|
# Must go after all settings are save
|
||||||
Receiver.send_message(u'config_updated')
|
Receiver.send_message(u'config_updated')
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
@ -97,13 +101,17 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
"""
|
"""
|
||||||
Process the form saving the settings
|
Process the form saving the settings
|
||||||
"""
|
"""
|
||||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
for tabIndex in range(0, self.stackedLayout.count()):
|
||||||
self.settingsTabWidget.widget(tabIndex).cancel()
|
self.stackedLayout.widget(tabIndex).cancel()
|
||||||
return QtGui.QDialog.reject(self)
|
return QtGui.QDialog.reject(self)
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self):
|
||||||
"""
|
"""
|
||||||
Run any post-setup code for the tabs on the form
|
Run any post-setup code for the tabs on the form
|
||||||
"""
|
"""
|
||||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
self.generalTab.postSetUp()
|
||||||
self.settingsTabWidget.widget(tabIndex).postSetUp()
|
self.themesTab.postSetUp()
|
||||||
|
self.advancedTab.postSetUp()
|
||||||
|
for plugin in self.plugins:
|
||||||
|
if plugin.settings_tab:
|
||||||
|
plugin.settings_tab.postSetUp()
|
||||||
|
@ -88,11 +88,11 @@ class SlideController(QtGui.QWidget):
|
|||||||
# Type label for the top of the slide controller
|
# Type label for the top of the slide controller
|
||||||
self.typeLabel = QtGui.QLabel(self.panel)
|
self.typeLabel = QtGui.QLabel(self.panel)
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.typeLabel.setText(UiStrings.Live)
|
self.typeLabel.setText(UiStrings().Live)
|
||||||
self.split = 1
|
self.split = 1
|
||||||
self.typePrefix = u'live'
|
self.typePrefix = u'live'
|
||||||
else:
|
else:
|
||||||
self.typeLabel.setText(UiStrings.Preview)
|
self.typeLabel.setText(UiStrings().Preview)
|
||||||
self.split = 0
|
self.split = 0
|
||||||
self.typePrefix = u'preview'
|
self.typePrefix = u'preview'
|
||||||
self.typeLabel.setStyleSheet(u'font-weight: bold; font-size: 12pt;')
|
self.typeLabel.setStyleSheet(u'font-weight: bold; font-size: 12pt;')
|
||||||
@ -161,18 +161,18 @@ class SlideController(QtGui.QWidget):
|
|||||||
translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
||||||
self.blankScreen = shortcut_action(self.hideMenu, u'blankScreen',
|
self.blankScreen = shortcut_action(self.hideMenu, u'blankScreen',
|
||||||
[QtCore.Qt.Key_Period], self.onBlankDisplay,
|
[QtCore.Qt.Key_Period], self.onBlankDisplay,
|
||||||
u':/slides/slide_blank.png', False, UiStrings.LiveToolbar)
|
u':/slides/slide_blank.png', False, UiStrings().LiveToolbar)
|
||||||
self.blankScreen.setText(
|
self.blankScreen.setText(
|
||||||
translate('OpenLP.SlideController', 'Blank Screen'))
|
translate('OpenLP.SlideController', 'Blank Screen'))
|
||||||
self.themeScreen = shortcut_action(self.hideMenu, u'themeScreen',
|
self.themeScreen = shortcut_action(self.hideMenu, u'themeScreen',
|
||||||
[QtGui.QKeySequence(u'T')], self.onThemeDisplay,
|
[QtGui.QKeySequence(u'T')], self.onThemeDisplay,
|
||||||
u':/slides/slide_theme.png', False, UiStrings.LiveToolbar)
|
u':/slides/slide_theme.png', False, UiStrings().LiveToolbar)
|
||||||
self.themeScreen.setText(
|
self.themeScreen.setText(
|
||||||
translate('OpenLP.SlideController', 'Blank to Theme'))
|
translate('OpenLP.SlideController', 'Blank to Theme'))
|
||||||
self.desktopScreen = shortcut_action(self.hideMenu,
|
self.desktopScreen = shortcut_action(self.hideMenu,
|
||||||
u'desktopScreen', [QtGui.QKeySequence(u'D')],
|
u'desktopScreen', [QtGui.QKeySequence(u'D')],
|
||||||
self.onHideDisplay, u':/slides/slide_desktop.png', False,
|
self.onHideDisplay, u':/slides/slide_desktop.png', False,
|
||||||
UiStrings.LiveToolbar)
|
UiStrings().LiveToolbar)
|
||||||
self.desktopScreen.setText(
|
self.desktopScreen.setText(
|
||||||
translate('OpenLP.SlideController', 'Show Desktop'))
|
translate('OpenLP.SlideController', 'Show Desktop'))
|
||||||
self.hideMenu.setDefaultAction(self.blankScreen)
|
self.hideMenu.setDefaultAction(self.blankScreen)
|
||||||
@ -194,7 +194,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.delaySpinBox.setMinimum(1)
|
self.delaySpinBox.setMinimum(1)
|
||||||
self.delaySpinBox.setMaximum(180)
|
self.delaySpinBox.setMaximum(180)
|
||||||
self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
|
self.toolbar.addToolbarWidget(u'Image SpinBox', self.delaySpinBox)
|
||||||
self.delaySpinBox.setSuffix(UiStrings.Seconds)
|
self.delaySpinBox.setSuffix(UiStrings().Seconds)
|
||||||
self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
|
self.delaySpinBox.setToolTip(translate('OpenLP.SlideController',
|
||||||
'Delay between slides in seconds'))
|
'Delay between slides in seconds'))
|
||||||
else:
|
else:
|
||||||
@ -365,34 +365,32 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
||||||
|
|
||||||
def setPreviewHotkeys(self, parent=None):
|
def setPreviewHotkeys(self, parent=None):
|
||||||
self.previousItem.setObjectName(u'previousItemPreview')
|
self.previousItem.setObjectName(u'previousItemPreview')
|
||||||
self.nextItem.setObjectName(u'nextItemPreview')
|
self.nextItem.setObjectName(u'nextItemPreview')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(
|
action_list.add_action(self.previousItem)
|
||||||
UiStrings.PreviewToolbar, CategoryOrder.standardToolbar)
|
action_list.add_action(self.nextItem)
|
||||||
action_list.add_action(self.previousItem, UiStrings.PreviewToolbar)
|
|
||||||
action_list.add_action(self.nextItem, UiStrings.PreviewToolbar)
|
|
||||||
|
|
||||||
def setLiveHotkeys(self, parent=None):
|
def setLiveHotkeys(self, parent=None):
|
||||||
self.previousItem.setObjectName(u'previousItemLive')
|
self.previousItem.setObjectName(u'previousItemLive')
|
||||||
self.nextItem.setObjectName(u'nextItemLive')
|
self.nextItem.setObjectName(u'nextItemLive')
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_category(
|
action_list.add_category(
|
||||||
UiStrings.LiveToolbar, CategoryOrder.standardToolbar)
|
UiStrings().LiveToolbar, CategoryOrder.standardToolbar)
|
||||||
action_list.add_action(self.previousItem, UiStrings.LiveToolbar)
|
action_list.add_action(self.previousItem)
|
||||||
action_list.add_action(self.nextItem, UiStrings.LiveToolbar)
|
action_list.add_action(self.nextItem)
|
||||||
self.previousService = shortcut_action(parent, u'previousService',
|
self.previousService = shortcut_action(parent, u'previousService',
|
||||||
[QtCore.Qt.Key_Left], self.servicePrevious, UiStrings.LiveToolbar)
|
[QtCore.Qt.Key_Left], self.servicePrevious, UiStrings().LiveToolbar)
|
||||||
self.previousService.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
self.previousService.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.previousService.setText(
|
self.previousService.setText(
|
||||||
translate('OpenLP.SlideController', 'Previous Service'))
|
translate('OpenLP.SlideController', 'Previous Service'))
|
||||||
self.nextService = shortcut_action(parent, 'nextService',
|
self.nextService = shortcut_action(parent, 'nextService',
|
||||||
[QtCore.Qt.Key_Right], self.serviceNext, UiStrings.LiveToolbar)
|
[QtCore.Qt.Key_Right], self.serviceNext, UiStrings().LiveToolbar)
|
||||||
self.nextService.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
self.nextService.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.nextService.setText(
|
self.nextService.setText(
|
||||||
translate('OpenLP.SlideController', 'Next Service'))
|
translate('OpenLP.SlideController', 'Next Service'))
|
||||||
self.escapeItem = shortcut_action(parent, 'escapeItem',
|
self.escapeItem = shortcut_action(parent, 'escapeItem',
|
||||||
[QtCore.Qt.Key_Escape], self.liveEscape, UiStrings.LiveToolbar)
|
[QtCore.Qt.Key_Escape], self.liveEscape, UiStrings().LiveToolbar)
|
||||||
self.escapeItem.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
self.escapeItem.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
|
||||||
self.escapeItem.setText(
|
self.escapeItem.setText(
|
||||||
translate('OpenLP.SlideController', 'Escape Item'))
|
translate('OpenLP.SlideController', 'Escape Item'))
|
||||||
@ -467,7 +465,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
request = unicode(self.sender().text())
|
request = unicode(self.sender().text())
|
||||||
slideno = self.slideList[request]
|
slideno = self.slideList[request]
|
||||||
self.__updatePreviewSelection(slideno)
|
self.__updatePreviewSelection(slideno)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
|
|
||||||
def receiveSpinDelay(self, value):
|
def receiveSpinDelay(self, value):
|
||||||
"""
|
"""
|
||||||
@ -563,7 +561,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
# If service item is the same as the current on only change slide
|
# If service item is the same as the current on only change slide
|
||||||
if item.__eq__(self.serviceItem):
|
if item.__eq__(self.serviceItem):
|
||||||
self.__checkUpdateSelectedSlide(slideno)
|
self.__checkUpdateSelectedSlide(slideno)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
return
|
return
|
||||||
self._processItem(item, slideno)
|
self._processItem(item, slideno)
|
||||||
|
|
||||||
@ -574,24 +572,15 @@ class SlideController(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'processManagerItem live = %s' % self.isLive)
|
log.debug(u'processManagerItem live = %s' % self.isLive)
|
||||||
self.onStopLoop()
|
self.onStopLoop()
|
||||||
# If old item was a command tell it to stop
|
old_item = self.serviceItem
|
||||||
if self.serviceItem:
|
self.serviceItem = serviceItem
|
||||||
if self.serviceItem.is_command():
|
if old_item and self.isLive and old_item.is_capable(
|
||||||
Receiver.send_message(u'%s_stop' %
|
ItemCapabilities.ProvidesOwnDisplay):
|
||||||
self.serviceItem.name.lower(), [serviceItem, self.isLive])
|
self._resetBlank()
|
||||||
if self.serviceItem.is_media():
|
|
||||||
self.onMediaClose()
|
|
||||||
if self.isLive:
|
|
||||||
if serviceItem.is_capable(ItemCapabilities.ProvidesOwnDisplay):
|
|
||||||
self._forceUnblank()
|
|
||||||
blanked = self.blankScreen.isChecked()
|
|
||||||
else:
|
|
||||||
blanked = False
|
|
||||||
Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
|
Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
|
||||||
[serviceItem, self.isLive, blanked, slideno])
|
[serviceItem, self.isLive, self.hideMode(), slideno])
|
||||||
self.slideList = {}
|
self.slideList = {}
|
||||||
width = self.parent.controlSplitter.sizes()[self.split]
|
width = self.parent.controlSplitter.sizes()[self.split]
|
||||||
self.serviceItem = serviceItem
|
|
||||||
self.previewListWidget.clear()
|
self.previewListWidget.clear()
|
||||||
self.previewListWidget.setRowCount(0)
|
self.previewListWidget.setRowCount(0)
|
||||||
self.previewListWidget.setColumnWidth(0, width)
|
self.previewListWidget.setColumnWidth(0, width)
|
||||||
@ -650,12 +639,25 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.previewListWidget.viewport().size().width())
|
self.previewListWidget.viewport().size().width())
|
||||||
self.__updatePreviewSelection(slideno)
|
self.__updatePreviewSelection(slideno)
|
||||||
self.enableToolBar(serviceItem)
|
self.enableToolBar(serviceItem)
|
||||||
# Pass to display for viewing
|
# Pass to display for viewing.
|
||||||
self.display.buildHtml(self.serviceItem)
|
# Postpone image build, we need to do this later to avoid the theme
|
||||||
|
# flashing on the screen
|
||||||
|
if not self.serviceItem.is_image():
|
||||||
|
self.display.buildHtml(self.serviceItem)
|
||||||
if serviceItem.is_media():
|
if serviceItem.is_media():
|
||||||
self.onMediaStart(serviceItem)
|
self.onMediaStart(serviceItem)
|
||||||
self.onSlideSelected()
|
self.slideSelected(True)
|
||||||
self.previewListWidget.setFocus()
|
self.previewListWidget.setFocus()
|
||||||
|
if old_item:
|
||||||
|
# Close the old item after the new one is opened
|
||||||
|
# This avoids the service theme/desktop flashing on screen
|
||||||
|
# However opening a new item of the same type will automatically
|
||||||
|
# close the previous, so make sure we don't close the new one.
|
||||||
|
if old_item.is_command() and not serviceItem.is_command():
|
||||||
|
Receiver.send_message(u'%s_stop' %
|
||||||
|
old_item.name.lower(), [old_item, self.isLive])
|
||||||
|
if old_item.is_media() and not serviceItem.is_media():
|
||||||
|
self.onMediaClose()
|
||||||
Receiver.send_message(u'slidecontroller_%s_started' % self.typePrefix,
|
Receiver.send_message(u'slidecontroller_%s_started' % self.typePrefix,
|
||||||
[serviceItem])
|
[serviceItem])
|
||||||
|
|
||||||
@ -702,7 +704,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.updatePreview()
|
self.updatePreview()
|
||||||
else:
|
else:
|
||||||
self.previewListWidget.selectRow(0)
|
self.previewListWidget.selectRow(0)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
|
|
||||||
def onSlideSelectedIndex(self, message):
|
def onSlideSelectedIndex(self, message):
|
||||||
"""
|
"""
|
||||||
@ -717,7 +719,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.updatePreview()
|
self.updatePreview()
|
||||||
else:
|
else:
|
||||||
self.__checkUpdateSelectedSlide(index)
|
self.__checkUpdateSelectedSlide(index)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
|
|
||||||
def mainDisplaySetBackground(self):
|
def mainDisplaySetBackground(self):
|
||||||
"""
|
"""
|
||||||
@ -760,15 +762,13 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.themeScreen.setChecked(False)
|
self.themeScreen.setChecked(False)
|
||||||
self.desktopScreen.setChecked(False)
|
self.desktopScreen.setChecked(False)
|
||||||
if checked:
|
if checked:
|
||||||
Receiver.send_message(u'maindisplay_hide', HideMode.Blank)
|
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.parent.generalSettingsSection + u'/screen blank',
|
self.parent.generalSettingsSection + u'/screen blank',
|
||||||
QtCore.QVariant(u'blanked'))
|
QtCore.QVariant(u'blanked'))
|
||||||
else:
|
else:
|
||||||
Receiver.send_message(u'maindisplay_show')
|
|
||||||
QtCore.QSettings().remove(
|
QtCore.QSettings().remove(
|
||||||
self.parent.generalSettingsSection + u'/screen blank')
|
self.parent.generalSettingsSection + u'/screen blank')
|
||||||
self.blankPlugin(checked)
|
self.blankPlugin()
|
||||||
self.updatePreview()
|
self.updatePreview()
|
||||||
|
|
||||||
def onThemeDisplay(self, checked=None):
|
def onThemeDisplay(self, checked=None):
|
||||||
@ -783,15 +783,13 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.themeScreen.setChecked(checked)
|
self.themeScreen.setChecked(checked)
|
||||||
self.desktopScreen.setChecked(False)
|
self.desktopScreen.setChecked(False)
|
||||||
if checked:
|
if checked:
|
||||||
Receiver.send_message(u'maindisplay_hide', HideMode.Theme)
|
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.parent.generalSettingsSection + u'/screen blank',
|
self.parent.generalSettingsSection + u'/screen blank',
|
||||||
QtCore.QVariant(u'themed'))
|
QtCore.QVariant(u'themed'))
|
||||||
else:
|
else:
|
||||||
Receiver.send_message(u'maindisplay_show')
|
|
||||||
QtCore.QSettings().remove(
|
QtCore.QSettings().remove(
|
||||||
self.parent.generalSettingsSection + u'/screen blank')
|
self.parent.generalSettingsSection + u'/screen blank')
|
||||||
self.blankPlugin(checked)
|
self.blankPlugin()
|
||||||
self.updatePreview()
|
self.updatePreview()
|
||||||
|
|
||||||
def onHideDisplay(self, checked=None):
|
def onHideDisplay(self, checked=None):
|
||||||
@ -806,28 +804,31 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.themeScreen.setChecked(False)
|
self.themeScreen.setChecked(False)
|
||||||
self.desktopScreen.setChecked(checked)
|
self.desktopScreen.setChecked(checked)
|
||||||
if checked:
|
if checked:
|
||||||
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.parent.generalSettingsSection + u'/screen blank',
|
self.parent.generalSettingsSection + u'/screen blank',
|
||||||
QtCore.QVariant(u'hidden'))
|
QtCore.QVariant(u'hidden'))
|
||||||
else:
|
else:
|
||||||
Receiver.send_message(u'maindisplay_show')
|
|
||||||
QtCore.QSettings().remove(
|
QtCore.QSettings().remove(
|
||||||
self.parent.generalSettingsSection + u'/screen blank')
|
self.parent.generalSettingsSection + u'/screen blank')
|
||||||
self.hidePlugin(checked)
|
self.hidePlugin(checked)
|
||||||
self.updatePreview()
|
self.updatePreview()
|
||||||
|
|
||||||
def blankPlugin(self, blank):
|
def blankPlugin(self):
|
||||||
"""
|
"""
|
||||||
Blank the display screen within a plugin if required.
|
Blank/Hide the display screen within a plugin if required.
|
||||||
"""
|
"""
|
||||||
log.debug(u'blankPlugin %s ', blank)
|
hide_mode = self.hideMode()
|
||||||
|
log.debug(u'blankPlugin %s ', hide_mode)
|
||||||
if self.serviceItem is not None:
|
if self.serviceItem is not None:
|
||||||
if blank:
|
if hide_mode:
|
||||||
|
if not self.serviceItem.is_command():
|
||||||
|
Receiver.send_message(u'maindisplay_hide', hide_mode)
|
||||||
Receiver.send_message(u'%s_blank'
|
Receiver.send_message(u'%s_blank'
|
||||||
% self.serviceItem.name.lower(),
|
% self.serviceItem.name.lower(),
|
||||||
[self.serviceItem, self.isLive])
|
[self.serviceItem, self.isLive, hide_mode])
|
||||||
else:
|
else:
|
||||||
|
if not self.serviceItem.is_command():
|
||||||
|
Receiver.send_message(u'maindisplay_show')
|
||||||
Receiver.send_message(u'%s_unblank'
|
Receiver.send_message(u'%s_unblank'
|
||||||
% self.serviceItem.name.lower(),
|
% self.serviceItem.name.lower(),
|
||||||
[self.serviceItem, self.isLive])
|
[self.serviceItem, self.isLive])
|
||||||
@ -839,15 +840,24 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.debug(u'hidePlugin %s ', hide)
|
log.debug(u'hidePlugin %s ', hide)
|
||||||
if self.serviceItem is not None:
|
if self.serviceItem is not None:
|
||||||
if hide:
|
if hide:
|
||||||
|
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||||
Receiver.send_message(u'%s_hide'
|
Receiver.send_message(u'%s_hide'
|
||||||
% self.serviceItem.name.lower(),
|
% self.serviceItem.name.lower(),
|
||||||
[self.serviceItem, self.isLive])
|
[self.serviceItem, self.isLive])
|
||||||
else:
|
else:
|
||||||
|
if not self.serviceItem.is_command():
|
||||||
|
Receiver.send_message(u'maindisplay_show')
|
||||||
Receiver.send_message(u'%s_unblank'
|
Receiver.send_message(u'%s_unblank'
|
||||||
% self.serviceItem.name.lower(),
|
% self.serviceItem.name.lower(),
|
||||||
[self.serviceItem, self.isLive])
|
[self.serviceItem, self.isLive])
|
||||||
|
|
||||||
def onSlideSelected(self):
|
def onSlideSelected(self, start=False):
|
||||||
|
"""
|
||||||
|
Slide selected in controller
|
||||||
|
"""
|
||||||
|
self.slideSelected()
|
||||||
|
|
||||||
|
def slideSelected(self, start=False):
|
||||||
"""
|
"""
|
||||||
Generate the preview when you click on a slide.
|
Generate the preview when you click on a slide.
|
||||||
if this is the Live Controller also display on the screen
|
if this is the Live Controller also display on the screen
|
||||||
@ -856,7 +866,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.selectedRow = 0
|
self.selectedRow = 0
|
||||||
if row > -1 and row < self.previewListWidget.rowCount():
|
if row > -1 and row < self.previewListWidget.rowCount():
|
||||||
if self.serviceItem.is_command():
|
if self.serviceItem.is_command():
|
||||||
if self.isLive:
|
if self.isLive and not start:
|
||||||
Receiver.send_message(
|
Receiver.send_message(
|
||||||
u'%s_slide' % self.serviceItem.name.lower(),
|
u'%s_slide' % self.serviceItem.name.lower(),
|
||||||
[self.serviceItem, self.isLive, row])
|
[self.serviceItem, self.isLive, row])
|
||||||
@ -866,7 +876,11 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.serviceItem.is_text():
|
if self.serviceItem.is_text():
|
||||||
frame = self.display.text(toDisplay)
|
frame = self.display.text(toDisplay)
|
||||||
else:
|
else:
|
||||||
frame = self.display.image(toDisplay)
|
if start:
|
||||||
|
self.display.buildHtml(self.serviceItem, toDisplay)
|
||||||
|
frame = self.display.preview()
|
||||||
|
else:
|
||||||
|
frame = self.display.image(toDisplay)
|
||||||
# reset the store used to display first image
|
# reset the store used to display first image
|
||||||
self.serviceItem.bg_image_bytes = None
|
self.serviceItem.bg_image_bytes = None
|
||||||
self.slidePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
self.slidePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||||
@ -932,7 +946,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
Receiver.send_message('servicemanager_next_item')
|
Receiver.send_message('servicemanager_next_item')
|
||||||
return
|
return
|
||||||
self.__checkUpdateSelectedSlide(row)
|
self.__checkUpdateSelectedSlide(row)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
|
|
||||||
def onSlideSelectedPreviousNoloop(self):
|
def onSlideSelectedPreviousNoloop(self):
|
||||||
self.onSlideSelectedPrevious(False)
|
self.onSlideSelectedPrevious(False)
|
||||||
@ -955,7 +969,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
row = 0
|
row = 0
|
||||||
self.__checkUpdateSelectedSlide(row)
|
self.__checkUpdateSelectedSlide(row)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
|
|
||||||
def __checkUpdateSelectedSlide(self, row):
|
def __checkUpdateSelectedSlide(self, row):
|
||||||
if row + 1 < self.previewListWidget.rowCount():
|
if row + 1 < self.previewListWidget.rowCount():
|
||||||
@ -976,7 +990,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.previewListWidget.selectRow(
|
self.previewListWidget.selectRow(
|
||||||
self.previewListWidget.rowCount() - 1)
|
self.previewListWidget.rowCount() - 1)
|
||||||
self.onSlideSelected()
|
self.slideSelected()
|
||||||
|
|
||||||
def onStartLoop(self):
|
def onStartLoop(self):
|
||||||
"""
|
"""
|
||||||
@ -1108,20 +1122,32 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.slidePreview.clear()
|
self.slidePreview.clear()
|
||||||
self.slidePreview.show()
|
self.slidePreview.show()
|
||||||
|
|
||||||
def _forceUnblank(self):
|
def _resetBlank(self):
|
||||||
"""
|
"""
|
||||||
Used by command items which provide their own displays to reset the
|
Used by command items which provide their own displays to reset the
|
||||||
screen hide attributes
|
screen hide attributes
|
||||||
"""
|
"""
|
||||||
blank = None
|
hide_mode = self.hideMode()
|
||||||
if self.blankScreen.isChecked:
|
if hide_mode == HideMode.Blank:
|
||||||
blank = self.blankScreen
|
self.onBlankDisplay(True)
|
||||||
if self.themeScreen.isChecked:
|
elif hide_mode == HideMode.Theme:
|
||||||
blank = self.themeScreen
|
self.onThemeDisplay(True)
|
||||||
if self.desktopScreen.isChecked:
|
elif hide_mode == HideMode.Screen:
|
||||||
blank = self.desktopScreen
|
self.onHideDisplay(True)
|
||||||
if blank:
|
else:
|
||||||
blank.setChecked(False)
|
self.hidePlugin(False)
|
||||||
self.hideMenu.setDefaultAction(blank)
|
|
||||||
QtCore.QSettings().remove(
|
def hideMode(self):
|
||||||
self.parent.generalSettingsSection + u'/screen blank')
|
"""
|
||||||
|
Determine what the hide mode should be according to the blank button
|
||||||
|
"""
|
||||||
|
if not self.isLive:
|
||||||
|
return None
|
||||||
|
elif self.blankScreen.isChecked():
|
||||||
|
return HideMode.Blank
|
||||||
|
elif self.themeScreen.isChecked():
|
||||||
|
return HideMode.Theme
|
||||||
|
elif self.desktopScreen.isChecked():
|
||||||
|
return HideMode.Screen
|
||||||
|
else:
|
||||||
|
return None
|
@ -107,15 +107,15 @@ class Ui_StartTimeDialog(object):
|
|||||||
def retranslateUi(self, StartTimeDialog):
|
def retranslateUi(self, StartTimeDialog):
|
||||||
self.setWindowTitle(translate('OpenLP.StartTimeForm',
|
self.setWindowTitle(translate('OpenLP.StartTimeForm',
|
||||||
'Item Start and Finish Time'))
|
'Item Start and Finish Time'))
|
||||||
self.hourSpinBox.setSuffix(UiStrings.Hours)
|
self.hourSpinBox.setSuffix(UiStrings().Hours)
|
||||||
self.minuteSpinBox.setSuffix(UiStrings.Minutes)
|
self.minuteSpinBox.setSuffix(UiStrings().Minutes)
|
||||||
self.secondSpinBox.setSuffix(UiStrings.Seconds)
|
self.secondSpinBox.setSuffix(UiStrings().Seconds)
|
||||||
self.hourFinishSpinBox.setSuffix(UiStrings.Hours)
|
self.hourFinishSpinBox.setSuffix(UiStrings().Hours)
|
||||||
self.minuteFinishSpinBox.setSuffix(UiStrings.Minutes)
|
self.minuteFinishSpinBox.setSuffix(UiStrings().Minutes)
|
||||||
self.secondFinishSpinBox.setSuffix(UiStrings.Seconds)
|
self.secondFinishSpinBox.setSuffix(UiStrings().Seconds)
|
||||||
self.hourLabel.setText(translate('OpenLP.StartTimeForm', 'Hours:'))
|
self.hourLabel.setText(translate('OpenLP.StartTimeForm', 'Hours:'))
|
||||||
self.minuteLabel.setText(translate('OpenLP.StartTimeForm', 'Minutes:'))
|
self.minuteLabel.setText(translate('OpenLP.StartTimeForm', 'Minutes:'))
|
||||||
self.secondLabel.setText(translate('OpenLP.StartTimeForm', 'Seconds:'))
|
self.secondLabel.setText(translate('OpenLP.StartTimeForm', 'Seconds:'))
|
||||||
self.startLabel.setText(translate('OpenLP.StartTimeForm', 'Start'))
|
self.startLabel.setText(translate('OpenLP.StartTimeForm', 'Start'))
|
||||||
self.finishLabel.setText(translate('OpenLP.StartTimeForm', 'Finish'))
|
self.finishLabel.setText(translate('OpenLP.StartTimeForm', 'Finish'))
|
||||||
self.lengthLabel.setText(translate('OpenLP.StartTimeForm', 'Length'))
|
self.lengthLabel.setText(translate('OpenLP.StartTimeForm', 'Length'))
|
@ -53,11 +53,12 @@ class StartTimeForm(QtGui.QDialog, Ui_StartTimeDialog):
|
|||||||
self.hourFinishSpinBox.setValue(hours)
|
self.hourFinishSpinBox.setValue(hours)
|
||||||
self.minuteFinishSpinBox.setValue(minutes)
|
self.minuteFinishSpinBox.setValue(minutes)
|
||||||
self.secondFinishSpinBox.setValue(seconds)
|
self.secondFinishSpinBox.setValue(seconds)
|
||||||
self.hourFinishLabel.setText(u'%s%s' % (unicode(hour), UiStrings.Hours))
|
self.hourFinishLabel.setText(u'%s%s' % (unicode(hour),
|
||||||
|
UiStrings().Hours))
|
||||||
self.minuteFinishLabel.setText(u'%s%s' %
|
self.minuteFinishLabel.setText(u'%s%s' %
|
||||||
(unicode(minutes), UiStrings.Minutes))
|
(unicode(minutes), UiStrings().Minutes))
|
||||||
self.secondFinishLabel.setText(u'%s%s' %
|
self.secondFinishLabel.setText(u'%s%s' %
|
||||||
(unicode(seconds), UiStrings.Seconds))
|
(unicode(seconds), UiStrings().Seconds))
|
||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
@ -290,7 +290,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
'Edit Theme - %s')) % self.theme.theme_name)
|
'Edit Theme - %s')) % self.theme.theme_name)
|
||||||
self.next()
|
self.next()
|
||||||
else:
|
else:
|
||||||
self.setWindowTitle(UiStrings.NewTheme)
|
self.setWindowTitle(UiStrings().NewTheme)
|
||||||
return QtGui.QWizard.exec_(self)
|
return QtGui.QWizard.exec_(self)
|
||||||
|
|
||||||
def initializePage(self, id):
|
def initializePage(self, id):
|
||||||
@ -473,7 +473,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
"""
|
"""
|
||||||
images_filter = get_images_filter()
|
images_filter = get_images_filter()
|
||||||
images_filter = u'%s;;%s (*.*) (*)' % (
|
images_filter = u'%s;;%s (*.*) (*)' % (
|
||||||
images_filter, UiStrings.AllFiles)
|
images_filter, UiStrings().AllFiles)
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||||
translate('OpenLP.ThemeForm', 'Select Image'), u'',
|
translate('OpenLP.ThemeForm', 'Select Image'), u'',
|
||||||
images_filter)
|
images_filter)
|
||||||
@ -589,4 +589,4 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
QtGui.QColor(field), self)
|
QtGui.QColor(field), self)
|
||||||
if new_color.isValid():
|
if new_color.isValid():
|
||||||
field = new_color.name()
|
field = new_color.name()
|
||||||
return field
|
return field
|
@ -63,7 +63,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.layout.setMargin(0)
|
self.layout.setMargin(0)
|
||||||
self.layout.setObjectName(u'layout')
|
self.layout.setObjectName(u'layout')
|
||||||
self.toolbar = OpenLPToolbar(self)
|
self.toolbar = OpenLPToolbar(self)
|
||||||
self.toolbar.addToolbarButton(UiStrings.NewTheme,
|
self.toolbar.addToolbarButton(UiStrings().NewTheme,
|
||||||
u':/themes/theme_new.png',
|
u':/themes/theme_new.png',
|
||||||
translate('OpenLP.ThemeManager', 'Create a new theme.'),
|
translate('OpenLP.ThemeManager', 'Create a new theme.'),
|
||||||
self.onAddTheme)
|
self.onAddTheme)
|
||||||
@ -280,6 +280,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
||||||
if self.fileRenameForm.exec_():
|
if self.fileRenameForm.exec_():
|
||||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||||
|
if oldThemeName == newThemeName:
|
||||||
|
return
|
||||||
if self.checkIfThemeExists(newThemeName):
|
if self.checkIfThemeExists(newThemeName):
|
||||||
oldThemeData = self.getThemeData(oldThemeName)
|
oldThemeData = self.getThemeData(oldThemeName)
|
||||||
self.cloneThemeData(oldThemeData, newThemeName)
|
self.cloneThemeData(oldThemeData, newThemeName)
|
||||||
@ -333,6 +335,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.oldBackgroundImage = theme.background_filename
|
self.oldBackgroundImage = theme.background_filename
|
||||||
self.themeForm.theme = theme
|
self.themeForm.theme = theme
|
||||||
self.themeForm.exec_(True)
|
self.themeForm.exec_(True)
|
||||||
|
self.oldBackgroundImage = None
|
||||||
|
|
||||||
def onDeleteTheme(self):
|
def onDeleteTheme(self):
|
||||||
"""
|
"""
|
||||||
@ -449,7 +452,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
# No themes have been found so create one
|
# No themes have been found so create one
|
||||||
if len(files) == 0:
|
if len(files) == 0:
|
||||||
theme = ThemeXML()
|
theme = ThemeXML()
|
||||||
theme.theme_name = UiStrings.Default
|
theme.theme_name = UiStrings().Default
|
||||||
self._writeTheme(theme, None, None)
|
self._writeTheme(theme, None, None)
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.settingsSection + u'/global theme',
|
self.settingsSection + u'/global theme',
|
||||||
@ -803,4 +806,4 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
vAlignCorrection = VerticalType.Bottom
|
vAlignCorrection = VerticalType.Bottom
|
||||||
newtheme.display_horizontal_align = theme.HorizontalAlign
|
newtheme.display_horizontal_align = theme.HorizontalAlign
|
||||||
newtheme.display_vertical_align = vAlignCorrection
|
newtheme.display_vertical_align = vAlignCorrection
|
||||||
return newtheme.extract_xml()
|
return newtheme.extract_xml()
|
@ -34,9 +34,11 @@ class ThemesTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
ThemesTab is the theme settings tab in the settings dialog.
|
ThemesTab is the theme settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, parent):
|
def __init__(self, parent, mainwindow):
|
||||||
self.parent = parent
|
self.mainwindow = mainwindow
|
||||||
SettingsTab.__init__(self, u'Themes')
|
generalTranslated = translate('ThemeTab', 'Themes')
|
||||||
|
SettingsTab.__init__(self, parent, u'Themes', generalTranslated)
|
||||||
|
self.icon_path = u':/themes/theme_new.png'
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'ThemesTab')
|
self.setObjectName(u'ThemesTab')
|
||||||
@ -100,7 +102,7 @@ class ThemesTab(SettingsTab):
|
|||||||
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.tabTitleVisible = UiStrings.Themes
|
self.tabTitleVisible = UiStrings().Themes
|
||||||
self.GlobalGroupBox.setTitle(
|
self.GlobalGroupBox.setTitle(
|
||||||
translate('OpenLP.ThemesTab', 'Global Theme'))
|
translate('OpenLP.ThemesTab', 'Global Theme'))
|
||||||
self.LevelGroupBox.setTitle(
|
self.LevelGroupBox.setTitle(
|
||||||
@ -147,7 +149,7 @@ class ThemesTab(SettingsTab):
|
|||||||
settings.setValue(u'global theme',
|
settings.setValue(u'global theme',
|
||||||
QtCore.QVariant(self.global_theme))
|
QtCore.QVariant(self.global_theme))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.parent.renderManager.set_global_theme(
|
self.mainwindow.renderManager.set_global_theme(
|
||||||
self.global_theme, self.theme_level)
|
self.global_theme, self.theme_level)
|
||||||
Receiver.send_message(u'theme_update_global', self.global_theme)
|
Receiver.send_message(u'theme_update_global', self.global_theme)
|
||||||
|
|
||||||
@ -165,7 +167,7 @@ class ThemesTab(SettingsTab):
|
|||||||
|
|
||||||
def onDefaultComboBoxChanged(self, value):
|
def onDefaultComboBoxChanged(self, value):
|
||||||
self.global_theme = unicode(self.DefaultComboBox.currentText())
|
self.global_theme = unicode(self.DefaultComboBox.currentText())
|
||||||
self.parent.renderManager.set_global_theme(
|
self.mainwindow.renderManager.set_global_theme(
|
||||||
self.global_theme, self.theme_level)
|
self.global_theme, self.theme_level)
|
||||||
self.__previewGlobalTheme()
|
self.__previewGlobalTheme()
|
||||||
|
|
||||||
@ -186,7 +188,7 @@ class ThemesTab(SettingsTab):
|
|||||||
for theme in theme_list:
|
for theme in theme_list:
|
||||||
self.DefaultComboBox.addItem(theme)
|
self.DefaultComboBox.addItem(theme)
|
||||||
find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
|
find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
|
||||||
self.parent.renderManager.set_global_theme(
|
self.mainwindow.renderManager.set_global_theme(
|
||||||
self.global_theme, self.theme_level)
|
self.global_theme, self.theme_level)
|
||||||
if self.global_theme is not u'':
|
if self.global_theme is not u'':
|
||||||
self.__previewGlobalTheme()
|
self.__previewGlobalTheme()
|
||||||
@ -195,7 +197,7 @@ class ThemesTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
Utility method to update the global theme preview image.
|
Utility method to update the global theme preview image.
|
||||||
"""
|
"""
|
||||||
image = self.parent.themeManagerContents.getPreviewImage(
|
image = self.mainwindow.themeManagerContents.getPreviewImage(
|
||||||
self.global_theme)
|
self.global_theme)
|
||||||
preview = QtGui.QPixmap(unicode(image))
|
preview = QtGui.QPixmap(unicode(image))
|
||||||
if not preview.isNull():
|
if not preview.isNull():
|
||||||
|
@ -424,7 +424,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.backgroundComboBox.setItemText(BackgroundType.Gradient,
|
self.backgroundComboBox.setItemText(BackgroundType.Gradient,
|
||||||
translate('OpenLP.ThemeWizard', 'Gradient'))
|
translate('OpenLP.ThemeWizard', 'Gradient'))
|
||||||
self.backgroundComboBox.setItemText(
|
self.backgroundComboBox.setItemText(
|
||||||
BackgroundType.Image, UiStrings.Image)
|
BackgroundType.Image, UiStrings().Image)
|
||||||
self.colorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
self.colorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||||
self.gradientStartLabel.setText(
|
self.gradientStartLabel.setText(
|
||||||
translate(u'OpenLP.ThemeWizard', 'Starting color:'))
|
translate(u'OpenLP.ThemeWizard', 'Starting color:'))
|
||||||
@ -442,7 +442,7 @@ class Ui_ThemeWizard(object):
|
|||||||
translate('OpenLP.ThemeWizard', 'Top Left - Bottom Right'))
|
translate('OpenLP.ThemeWizard', 'Top Left - Bottom Right'))
|
||||||
self.gradientComboBox.setItemText(BackgroundGradientType.LeftBottom,
|
self.gradientComboBox.setItemText(BackgroundGradientType.LeftBottom,
|
||||||
translate('OpenLP.ThemeWizard', 'Bottom Left - Top Right'))
|
translate('OpenLP.ThemeWizard', 'Bottom Left - Top Right'))
|
||||||
self.imageLabel.setText(u'%s:' % UiStrings.Image)
|
self.imageLabel.setText(u'%s:' % UiStrings().Image)
|
||||||
self.mainAreaPage.setTitle(
|
self.mainAreaPage.setTitle(
|
||||||
translate('OpenLP.ThemeWizard', 'Main Area Font Details'))
|
translate('OpenLP.ThemeWizard', 'Main Area Font Details'))
|
||||||
self.mainAreaPage.setSubTitle(
|
self.mainAreaPage.setSubTitle(
|
||||||
@ -451,17 +451,17 @@ class Ui_ThemeWizard(object):
|
|||||||
self.mainFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
|
self.mainFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
|
||||||
self.mainColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
self.mainColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||||
self.mainSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
self.mainSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.mainSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
|
self.mainSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.lineSpacingLabel.setText(
|
self.lineSpacingLabel.setText(
|
||||||
translate('OpenLP.ThemeWizard', 'Line Spacing:'))
|
translate('OpenLP.ThemeWizard', 'Line Spacing:'))
|
||||||
self.lineSpacingSpinBox.setSuffix(UiStrings.FontSizePtUnit)
|
self.lineSpacingSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.outlineCheckBox.setText(
|
self.outlineCheckBox.setText(
|
||||||
translate('OpenLP.ThemeWizard', '&Outline:'))
|
translate('OpenLP.ThemeWizard', '&Outline:'))
|
||||||
self.outlineSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
self.outlineSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.outlineSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
|
self.outlineSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:'))
|
self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:'))
|
||||||
self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.shadowSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
|
self.shadowSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.mainBoldCheckBox.setText(translate('OpenLP.ThemeWizard', 'Bold'))
|
self.mainBoldCheckBox.setText(translate('OpenLP.ThemeWizard', 'Bold'))
|
||||||
self.mainItalicsCheckBox.setText(
|
self.mainItalicsCheckBox.setText(
|
||||||
translate('OpenLP.ThemeWizard', 'Italic'))
|
translate('OpenLP.ThemeWizard', 'Italic'))
|
||||||
@ -473,7 +473,7 @@ class Ui_ThemeWizard(object):
|
|||||||
self.footerFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
|
self.footerFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
|
||||||
self.footerColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
self.footerColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||||
self.footerSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
self.footerSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.footerSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
|
self.footerSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.alignmentPage.setTitle(
|
self.alignmentPage.setTitle(
|
||||||
translate('OpenLP.ThemeWizard', 'Text Formatting Details'))
|
translate('OpenLP.ThemeWizard', 'Text Formatting Details'))
|
||||||
self.alignmentPage.setSubTitle(
|
self.alignmentPage.setSubTitle(
|
||||||
@ -537,4 +537,4 @@ class Ui_ThemeWizard(object):
|
|||||||
labelWidth = max(self.backgroundLabel.minimumSizeHint().width(),
|
labelWidth = max(self.backgroundLabel.minimumSizeHint().width(),
|
||||||
self.horizontalLabel.minimumSizeHint().width())
|
self.horizontalLabel.minimumSizeHint().width())
|
||||||
self.spacer.changeSize(labelWidth, 0,
|
self.spacer.changeSize(labelWidth, 0,
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
@ -212,11 +212,11 @@ class OpenLPWizard(QtGui.QWizard):
|
|||||||
"""
|
"""
|
||||||
if filters:
|
if filters:
|
||||||
filters += u';;'
|
filters += u';;'
|
||||||
filters += u'%s (*)' % UiStrings.AllFiles
|
filters += u'%s (*)' % UiStrings().AllFiles
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self, title,
|
filename = QtGui.QFileDialog.getOpenFileName(self, title,
|
||||||
os.path.dirname(SettingsManager.get_last_dir(
|
os.path.dirname(SettingsManager.get_last_dir(
|
||||||
self.plugin.settingsSection, 1)), filters)
|
self.plugin.settingsSection, 1)), filters)
|
||||||
if filename:
|
if filename:
|
||||||
editbox.setText(filename)
|
editbox.setText(filename)
|
||||||
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
SettingsManager.set_last_dir(self.plugin.settingsSection,
|
||||||
filename, 1)
|
filename, 1)
|
@ -43,9 +43,10 @@ class AlertsPlugin(Plugin):
|
|||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
Plugin.__init__(self, u'Alerts', plugin_helpers,
|
Plugin.__init__(self, u'Alerts', plugin_helpers,
|
||||||
settingsTabClass=AlertsTab)
|
settings_tab_class=AlertsTab)
|
||||||
self.weight = -3
|
self.weight = -3
|
||||||
self.icon = build_icon(u':/plugins/plugin_alerts.png')
|
self.icon_path = u':/plugins/plugin_alerts.png'
|
||||||
|
self.icon = build_icon(self.icon_path)
|
||||||
self.alertsmanager = AlertsManager(self)
|
self.alertsmanager = AlertsManager(self)
|
||||||
self.manager = Manager(u'alerts', init_schema)
|
self.manager = Manager(u'alerts', init_schema)
|
||||||
self.alertForm = AlertForm(self)
|
self.alertForm = AlertForm(self)
|
||||||
@ -76,7 +77,7 @@ class AlertsPlugin(Plugin):
|
|||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.toolsAlertItem.setVisible(True)
|
self.toolsAlertItem.setVisible(True)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.toolsAlertItem, UiStrings.Tools)
|
action_list.add_action(self.toolsAlertItem, UiStrings().Tools)
|
||||||
self.liveController.alertTab = self.settings_tab
|
self.liveController.alertTab = self.settings_tab
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
@ -117,4 +118,4 @@ class AlertsPlugin(Plugin):
|
|||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.textStrings[StringContent.VisibleName] = {
|
self.textStrings[StringContent.VisibleName] = {
|
||||||
u'title': translate('AlertsPlugin', 'Alerts', 'container title')
|
u'title': translate('AlertsPlugin', 'Alerts', 'container title')
|
||||||
}
|
}
|
@ -61,6 +61,12 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
QtCore.QObject.connect(self.alertListWidget,
|
QtCore.QObject.connect(self.alertListWidget,
|
||||||
QtCore.SIGNAL(u'currentRowChanged(int)'), self.onCurrentRowChanged)
|
QtCore.SIGNAL(u'currentRowChanged(int)'), self.onCurrentRowChanged)
|
||||||
|
|
||||||
|
def exec_(self):
|
||||||
|
self.displayButton.setEnabled(False)
|
||||||
|
self.displayCloseButton.setEnabled(False)
|
||||||
|
self.alertTextEdit.setText(u'')
|
||||||
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def loadList(self):
|
def loadList(self):
|
||||||
"""
|
"""
|
||||||
Loads the list with alerts.
|
Loads the list with alerts.
|
||||||
@ -125,6 +131,12 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
# Only enable the button, if we are editing an item.
|
# Only enable the button, if we are editing an item.
|
||||||
if self.item_id:
|
if self.item_id:
|
||||||
self.saveButton.setEnabled(True)
|
self.saveButton.setEnabled(True)
|
||||||
|
if self.alertTextEdit.text():
|
||||||
|
self.displayButton.setEnabled(True)
|
||||||
|
self.displayCloseButton.setEnabled(True)
|
||||||
|
else:
|
||||||
|
self.displayButton.setEnabled(False)
|
||||||
|
self.displayCloseButton.setEnabled(False)
|
||||||
|
|
||||||
def onDoubleClick(self):
|
def onDoubleClick(self):
|
||||||
"""
|
"""
|
||||||
|
@ -33,8 +33,8 @@ class AlertsTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
AlertsTab is the alerts settings tab in the settings dialog.
|
AlertsTab is the alerts settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, name, visible_title):
|
def __init__(self, parent, name, visible_title, icon_path):
|
||||||
SettingsTab.__init__(self, name, visible_title)
|
SettingsTab.__init__(self, parent, name, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'AlertsTab')
|
self.setObjectName(u'AlertsTab')
|
||||||
@ -109,12 +109,12 @@ class AlertsTab(SettingsTab):
|
|||||||
translate('AlertsPlugin.AlertsTab', 'Background color:'))
|
translate('AlertsPlugin.AlertsTab', 'Background color:'))
|
||||||
self.FontSizeLabel.setText(
|
self.FontSizeLabel.setText(
|
||||||
translate('AlertsPlugin.AlertsTab', 'Font size:'))
|
translate('AlertsPlugin.AlertsTab', 'Font size:'))
|
||||||
self.FontSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
|
self.FontSizeSpinBox.setSuffix(UiStrings().FontSizePtUnit)
|
||||||
self.TimeoutLabel.setText(
|
self.TimeoutLabel.setText(
|
||||||
translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
|
translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
|
||||||
self.TimeoutSpinBox.setSuffix(UiStrings.Seconds)
|
self.TimeoutSpinBox.setSuffix(UiStrings().Seconds)
|
||||||
self.PreviewGroupBox.setTitle(UiStrings.Preview)
|
self.PreviewGroupBox.setTitle(UiStrings().Preview)
|
||||||
self.FontPreview.setText(UiStrings.OLPV2)
|
self.FontPreview.setText(UiStrings().OLPV2)
|
||||||
|
|
||||||
def onBackgroundColorButtonClicked(self):
|
def onBackgroundColorButtonClicked(self):
|
||||||
new_color = QtGui.QColorDialog.getColor(
|
new_color = QtGui.QColorDialog.getColor(
|
||||||
@ -191,4 +191,4 @@ class AlertsTab(SettingsTab):
|
|||||||
font.setPointSize(self.font_size)
|
font.setPointSize(self.font_size)
|
||||||
self.FontPreview.setFont(font)
|
self.FontPreview.setFont(font)
|
||||||
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
|
||||||
(self.bg_color, self.font_color))
|
(self.bg_color, self.font_color))
|
@ -53,9 +53,9 @@ class BiblePlugin(Plugin):
|
|||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.importBibleItem.setVisible(True)
|
self.importBibleItem.setVisible(True)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.importBibleItem, UiStrings.Import)
|
action_list.add_action(self.importBibleItem, UiStrings().Import)
|
||||||
# Do not add the action to the list yet.
|
# Do not add the action to the list yet.
|
||||||
#action_list.add_action(self.exportBibleItem, UiStrings.Export)
|
#action_list.add_action(self.exportBibleItem, UiStrings().Export)
|
||||||
# Set to invisible until we can export bibles
|
# Set to invisible until we can export bibles
|
||||||
self.exportBibleItem.setVisible(False)
|
self.exportBibleItem.setVisible(False)
|
||||||
|
|
||||||
@ -67,9 +67,9 @@ class BiblePlugin(Plugin):
|
|||||||
self.manager.finalise()
|
self.manager.finalise()
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.remove_action(self.importBibleItem, UiStrings.Import)
|
action_list.remove_action(self.importBibleItem, UiStrings().Import)
|
||||||
self.importBibleItem.setVisible(False)
|
self.importBibleItem.setVisible(False)
|
||||||
#action_list.remove_action(self.exportBibleItem, UiStrings.Export)
|
#action_list.remove_action(self.exportBibleItem, UiStrings().Export)
|
||||||
self.exportBibleItem.setVisible(False)
|
self.exportBibleItem.setVisible(False)
|
||||||
|
|
||||||
def addImportMenuItem(self, import_menu):
|
def addImportMenuItem(self, import_menu):
|
||||||
@ -146,4 +146,4 @@ class BiblePlugin(Plugin):
|
|||||||
u'service': translate('BiblesPlugin',
|
u'service': translate('BiblesPlugin',
|
||||||
'Add the selected Bible to the service')
|
'Add the selected Bible to the service')
|
||||||
}
|
}
|
||||||
self.setPluginUiTextStrings(tooltips)
|
self.setPluginUiTextStrings(tooltips)
|
@ -377,7 +377,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.formatComboBox.setItemText(BibleFormat.OpenSong, WizardStrings.OS)
|
self.formatComboBox.setItemText(BibleFormat.OpenSong, WizardStrings.OS)
|
||||||
self.formatComboBox.setItemText(BibleFormat.WebDownload,
|
self.formatComboBox.setItemText(BibleFormat.WebDownload,
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Web Download'))
|
translate('BiblesPlugin.ImportWizardForm', 'Web Download'))
|
||||||
self.formatComboBox.setItemText(BibleFormat.OpenLP1, UiStrings.OLPV1)
|
self.formatComboBox.setItemText(BibleFormat.OpenLP1, UiStrings().OLPV1)
|
||||||
self.openlp1FileLabel.setText(
|
self.openlp1FileLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
translate('BiblesPlugin.ImportWizardForm', 'Bible file:'))
|
||||||
self.osisFileLabel.setText(
|
self.osisFileLabel.setText(
|
||||||
@ -451,13 +451,13 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
elif self.currentPage() == self.selectPage:
|
elif self.currentPage() == self.selectPage:
|
||||||
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
|
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
|
||||||
if not self.field(u'osis_location').toString():
|
if not self.field(u'osis_location').toString():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.OSIS)
|
WizardStrings.YouSpecifyFile % WizardStrings.OSIS)
|
||||||
self.osisFileEdit.setFocus()
|
self.osisFileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
||||||
if not self.field(u'csv_testamentsfile').toString():
|
if not self.field(u'csv_testamentsfile').toString():
|
||||||
answer = critical_error_message_box(UiStrings.NFSs,
|
answer = critical_error_message_box(UiStrings().NFSs,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You have not specified a testaments file. Do you '
|
'You have not specified a testaments file. Do you '
|
||||||
'want to proceed with the import?'), question=True)
|
'want to proceed with the import?'), question=True)
|
||||||
@ -465,14 +465,14 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.csvTestamentsEdit.setFocus()
|
self.csvTestamentsEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
if not self.field(u'csv_booksfile').toString():
|
if not self.field(u'csv_booksfile').toString():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to specify a file with books of '
|
'You need to specify a file with books of '
|
||||||
'the Bible to use in the import.'))
|
'the Bible to use in the import.'))
|
||||||
self.csvBooksEdit.setFocus()
|
self.csvBooksEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif not self.field(u'csv_versefile').toString():
|
elif not self.field(u'csv_versefile').toString():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to specify a file of Bible '
|
'You need to specify a file of Bible '
|
||||||
'verses to import.'))
|
'verses to import.'))
|
||||||
@ -481,14 +481,14 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
elif self.field(u'source_format').toInt()[0] == \
|
elif self.field(u'source_format').toInt()[0] == \
|
||||||
BibleFormat.OpenSong:
|
BibleFormat.OpenSong:
|
||||||
if not self.field(u'opensong_file').toString():
|
if not self.field(u'opensong_file').toString():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.OS)
|
WizardStrings.YouSpecifyFile % WizardStrings.OS)
|
||||||
self.openSongFileEdit.setFocus()
|
self.openSongFileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.OpenLP1:
|
elif self.field(u'source_format').toInt()[0] == BibleFormat.OpenLP1:
|
||||||
if not self.field(u'openlp1_location').toString():
|
if not self.field(u'openlp1_location').toString():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
WizardStrings.YouSpecifyFile % UiStrings.OLPV1)
|
WizardStrings.YouSpecifyFile % UiStrings().OLPV1)
|
||||||
self.openlp1FileEdit.setFocus()
|
self.openlp1FileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -497,13 +497,13 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
license_copyright = \
|
license_copyright = \
|
||||||
unicode(self.field(u'license_copyright').toString())
|
unicode(self.field(u'license_copyright').toString())
|
||||||
if not license_version:
|
if not license_version:
|
||||||
critical_error_message_box(UiStrings.EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to specify a version name for your Bible.'))
|
'You need to specify a version name for your Bible.'))
|
||||||
self.versionNameEdit.setFocus()
|
self.versionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif not license_copyright:
|
elif not license_copyright:
|
||||||
critical_error_message_box(UiStrings.EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'You need to set a copyright for your Bible. '
|
'You need to set a copyright for your Bible. '
|
||||||
'Bibles in the Public Domain need to be marked as such.'))
|
'Bibles in the Public Domain need to be marked as such.'))
|
||||||
@ -576,7 +576,7 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Show the file open dialog for the openlp.org 1.x file.
|
Show the file open dialog for the openlp.org 1.x file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % UiStrings.OLPV1,
|
self.getFileName(WizardStrings.OpenTypeFile % UiStrings().OLPV1,
|
||||||
self.openlp1FileEdit, u'%s (*.bible)' %
|
self.openlp1FileEdit, u'%s (*.bible)' %
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'openlp.org 1.x Bible Files'))
|
'openlp.org 1.x Bible Files'))
|
||||||
@ -765,4 +765,4 @@ class BibleImportForm(OpenLPWizard):
|
|||||||
self.progressLabel.setText(translate(
|
self.progressLabel.setText(translate(
|
||||||
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
|
'BiblesPlugin.ImportWizardForm', 'Your Bible import failed.'))
|
||||||
del self.manager.db_cache[importer.name]
|
del self.manager.db_cache[importer.name]
|
||||||
delete_database(self.plugin.settingsSection, importer.file)
|
delete_database(self.plugin.settingsSection, importer.file)
|
@ -40,11 +40,11 @@ class BiblesTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
log.info(u'Bible Tab loaded')
|
log.info(u'Bible Tab loaded')
|
||||||
|
|
||||||
def __init__(self, title, visible_title):
|
def __init__(self, parent, title, visible_title, icon_path):
|
||||||
self.paragraph_style = True
|
self.paragraph_style = True
|
||||||
self.show_new_chapters = False
|
self.show_new_chapters = False
|
||||||
self.display_style = 0
|
self.display_style = 0
|
||||||
SettingsTab.__init__(self, title, visible_title)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'BiblesTab')
|
self.setObjectName(u'BiblesTab')
|
||||||
@ -118,17 +118,16 @@ class BiblesTab(SettingsTab):
|
|||||||
self.newChaptersCheckBox.setText(
|
self.newChaptersCheckBox.setText(
|
||||||
translate('BiblesPlugin.BiblesTab',
|
translate('BiblesPlugin.BiblesTab',
|
||||||
'Only show new chapter numbers'))
|
'Only show new chapter numbers'))
|
||||||
self.layoutStyleLabel.setText(
|
self.layoutStyleLabel.setText(UiStrings().LayoutStyle)
|
||||||
translate('BiblesPlugin.BiblesTab', 'Layout style:'))
|
self.displayStyleLabel.setText(UiStrings().DisplayStyle)
|
||||||
self.displayStyleLabel.setText(UiStrings.DisplayStyle)
|
|
||||||
self.bibleThemeLabel.setText(
|
self.bibleThemeLabel.setText(
|
||||||
translate('BiblesPlugin.BiblesTab', 'Bible theme:'))
|
translate('BiblesPlugin.BiblesTab', 'Bible theme:'))
|
||||||
self.layoutStyleComboBox.setItemText(LayoutStyle.VersePerSlide,
|
self.layoutStyleComboBox.setItemText(LayoutStyle.VersePerSlide,
|
||||||
UiStrings.VersePerSlide)
|
UiStrings().VersePerSlide)
|
||||||
self.layoutStyleComboBox.setItemText(LayoutStyle.VersePerLine,
|
self.layoutStyleComboBox.setItemText(LayoutStyle.VersePerLine,
|
||||||
UiStrings.VersePerLine)
|
UiStrings().VersePerLine)
|
||||||
self.layoutStyleComboBox.setItemText(LayoutStyle.Continuous,
|
self.layoutStyleComboBox.setItemText(LayoutStyle.Continuous,
|
||||||
UiStrings.Continuous)
|
UiStrings().Continuous)
|
||||||
self.displayStyleComboBox.setItemText(DisplayStyle.NoBrackets,
|
self.displayStyleComboBox.setItemText(DisplayStyle.NoBrackets,
|
||||||
translate('BiblesPlugin.BiblesTab', 'No Brackets'))
|
translate('BiblesPlugin.BiblesTab', 'No Brackets'))
|
||||||
self.displayStyleComboBox.setItemText(DisplayStyle.Round,
|
self.displayStyleComboBox.setItemText(DisplayStyle.Round,
|
||||||
@ -208,4 +207,4 @@ class BiblesTab(SettingsTab):
|
|||||||
self.bibleThemeComboBox.addItem(u'')
|
self.bibleThemeComboBox.addItem(u'')
|
||||||
for theme in theme_list:
|
for theme in theme_list:
|
||||||
self.bibleThemeComboBox.addItem(theme)
|
self.bibleThemeComboBox.addItem(theme)
|
||||||
find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme)
|
find_and_set_in_combo_box(self.bibleThemeComboBox, self.bible_theme)
|
@ -177,10 +177,7 @@ class BibleDB(QtCore.QObject, Manager):
|
|||||||
Returns the version name of the Bible.
|
Returns the version name of the Bible.
|
||||||
"""
|
"""
|
||||||
version_name = self.get_object(BibleMeta, u'Version')
|
version_name = self.get_object(BibleMeta, u'Version')
|
||||||
if version_name:
|
self.name = version_name.value if version_name else None
|
||||||
self.name = version_name.value
|
|
||||||
else:
|
|
||||||
self.name = None
|
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
def clean_filename(self, old_filename):
|
def clean_filename(self, old_filename):
|
||||||
@ -256,10 +253,10 @@ class BibleDB(QtCore.QObject, Manager):
|
|||||||
# Text list has book and chapter as first two elements of the array.
|
# Text list has book and chapter as first two elements of the array.
|
||||||
for verse_number, verse_text in textlist.iteritems():
|
for verse_number, verse_text in textlist.iteritems():
|
||||||
verse = Verse.populate(
|
verse = Verse.populate(
|
||||||
book_id = book_id,
|
book_id=book_id,
|
||||||
chapter = chapter,
|
chapter=chapter,
|
||||||
verse = verse_number,
|
verse=verse_number,
|
||||||
text = verse_text
|
text=verse_text
|
||||||
)
|
)
|
||||||
self.session.add(verse)
|
self.session.add(verse)
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
@ -383,15 +380,13 @@ class BibleDB(QtCore.QObject, Manager):
|
|||||||
log.debug(u'BibleDB.verse_search("%s")', text)
|
log.debug(u'BibleDB.verse_search("%s")', text)
|
||||||
verses = self.session.query(Verse)
|
verses = self.session.query(Verse)
|
||||||
if text.find(u',') > -1:
|
if text.find(u',') > -1:
|
||||||
or_clause = []
|
keywords = \
|
||||||
keywords = [u'%%%s%%' % keyword.strip()
|
[u'%%%s%%' % keyword.strip() for keyword in text.split(u',')]
|
||||||
for keyword in text.split(u',')]
|
or_clause = [Verse.text.like(keyword) for keyword in keywords]
|
||||||
for keyword in keywords:
|
|
||||||
or_clause.append(Verse.text.like(keyword))
|
|
||||||
verses = verses.filter(or_(*or_clause))
|
verses = verses.filter(or_(*or_clause))
|
||||||
else:
|
else:
|
||||||
keywords = [u'%%%s%%' % keyword.strip()
|
keywords = \
|
||||||
for keyword in text.split(u' ')]
|
[u'%%%s%%' % keyword.strip() for keyword in text.split(u' ')]
|
||||||
for keyword in keywords:
|
for keyword in keywords:
|
||||||
verses = verses.filter(Verse.text.like(keyword))
|
verses = verses.filter(Verse.text.like(keyword))
|
||||||
verses = verses.all()
|
verses = verses.all()
|
||||||
|
@ -58,6 +58,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
MediaManagerItem.__init__(self, parent, plugin, icon)
|
MediaManagerItem.__init__(self, parent, plugin, icon)
|
||||||
# Place to store the search results for both bibles.
|
# Place to store the search results for both bibles.
|
||||||
self.settings = self.parent.settings_tab
|
self.settings = self.parent.settings_tab
|
||||||
|
self.quickPreviewAllowed = True
|
||||||
self.search_results = {}
|
self.search_results = {}
|
||||||
self.second_search_results = {}
|
self.second_search_results = {}
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
@ -99,12 +100,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.quickSearchEdit = SearchEdit(self.quickTab)
|
self.quickSearchEdit = SearchEdit(self.quickTab)
|
||||||
self.quickSearchEdit.setObjectName(u'quickSearchEdit')
|
self.quickSearchEdit.setObjectName(u'quickSearchEdit')
|
||||||
self.quickSearchLabel.setBuddy(self.quickSearchEdit)
|
self.quickSearchLabel.setBuddy(self.quickSearchEdit)
|
||||||
self.quickSearchEdit.setSearchTypes([
|
|
||||||
(BibleSearch.Reference, u':/bibles/bibles_search_reference.png',
|
|
||||||
translate('BiblesPlugin.MediaItem', 'Scripture Reference')),
|
|
||||||
(BibleSearch.Text, u':/bibles/bibles_search_text.png',
|
|
||||||
translate('BiblesPlugin.MediaItem', 'Text Search'))
|
|
||||||
])
|
|
||||||
self.quickLayout.addRow(self.quickSearchLabel, self.quickSearchEdit)
|
self.quickLayout.addRow(self.quickSearchLabel, self.quickSearchEdit)
|
||||||
self.quickLayoutLabel = QtGui.QLabel(self.quickTab)
|
self.quickLayoutLabel = QtGui.QLabel(self.quickTab)
|
||||||
self.quickLayoutLabel.setObjectName(u'quickClearLabel')
|
self.quickLayoutLabel.setObjectName(u'quickClearLabel')
|
||||||
@ -198,7 +193,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.advancedSearchButtonLayout.addWidget(self.advancedSearchButton)
|
self.advancedSearchButtonLayout.addWidget(self.advancedSearchButton)
|
||||||
self.advancedLayout.addLayout(
|
self.advancedLayout.addLayout(
|
||||||
self.advancedSearchButtonLayout, 7, 0, 1, 3)
|
self.advancedSearchButtonLayout, 7, 0, 1, 3)
|
||||||
self.searchTabWidget.addTab(self.advancedTab, UiStrings.Advanced)
|
self.searchTabWidget.addTab(self.advancedTab, UiStrings().Advanced)
|
||||||
# Add the search tab widget to the page layout.
|
# Add the search tab widget to the page layout.
|
||||||
self.pageLayout.addWidget(self.searchTabWidget)
|
self.pageLayout.addWidget(self.searchTabWidget)
|
||||||
# Combo Boxes
|
# Combo Boxes
|
||||||
@ -247,15 +242,15 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
log.debug(u'retranslateUi')
|
log.debug(u'retranslateUi')
|
||||||
self.quickVersionLabel.setText(u'%s:' % UiStrings.Version)
|
self.quickVersionLabel.setText(u'%s:' % UiStrings().Version)
|
||||||
self.quickSecondLabel.setText(
|
self.quickSecondLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Second:'))
|
translate('BiblesPlugin.MediaItem', 'Second:'))
|
||||||
self.quickSearchLabel.setText(
|
self.quickSearchLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Find:'))
|
translate('BiblesPlugin.MediaItem', 'Find:'))
|
||||||
self.quickSearchButton.setText(UiStrings.Search)
|
self.quickSearchButton.setText(UiStrings().Search)
|
||||||
self.quickClearLabel.setText(
|
self.quickClearLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Results:'))
|
translate('BiblesPlugin.MediaItem', 'Results:'))
|
||||||
self.advancedVersionLabel.setText(u'%s:' % UiStrings.Version)
|
self.advancedVersionLabel.setText(u'%s:' % UiStrings().Version)
|
||||||
self.advancedSecondLabel.setText(
|
self.advancedSecondLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Second:'))
|
translate('BiblesPlugin.MediaItem', 'Second:'))
|
||||||
self.advancedBookLabel.setText(
|
self.advancedBookLabel.setText(
|
||||||
@ -270,7 +265,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
translate('BiblesPlugin.MediaItem', 'To:'))
|
translate('BiblesPlugin.MediaItem', 'To:'))
|
||||||
self.advancedClearLabel.setText(
|
self.advancedClearLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Results:'))
|
translate('BiblesPlugin.MediaItem', 'Results:'))
|
||||||
self.advancedSearchButton.setText(UiStrings.Search)
|
self.advancedSearchButton.setText(UiStrings().Search)
|
||||||
self.quickClearComboBox.addItem(
|
self.quickClearComboBox.addItem(
|
||||||
translate('BiblesPlugin.MediaItem', 'Clear'))
|
translate('BiblesPlugin.MediaItem', 'Clear'))
|
||||||
self.quickClearComboBox.addItem(
|
self.quickClearComboBox.addItem(
|
||||||
@ -279,13 +274,13 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
translate('BiblesPlugin.MediaItem', 'Clear'))
|
translate('BiblesPlugin.MediaItem', 'Clear'))
|
||||||
self.advancedClearComboBox.addItem(
|
self.advancedClearComboBox.addItem(
|
||||||
translate('BiblesPlugin.MediaItem', 'Keep'))
|
translate('BiblesPlugin.MediaItem', 'Keep'))
|
||||||
self.quickLayoutLabel.setText(UiStrings.DisplayStyle)
|
self.quickLayoutLabel.setText(UiStrings().LayoutStyle)
|
||||||
self.quickLayoutComboBox.setItemText(LayoutStyle.VersePerSlide,
|
self.quickLayoutComboBox.setItemText(LayoutStyle.VersePerSlide,
|
||||||
UiStrings.VersePerSlide)
|
UiStrings().VersePerSlide)
|
||||||
self.quickLayoutComboBox.setItemText(LayoutStyle.VersePerLine,
|
self.quickLayoutComboBox.setItemText(LayoutStyle.VersePerLine,
|
||||||
UiStrings.VersePerLine)
|
UiStrings().VersePerLine)
|
||||||
self.quickLayoutComboBox.setItemText(LayoutStyle.Continuous,
|
self.quickLayoutComboBox.setItemText(LayoutStyle.Continuous,
|
||||||
UiStrings.Continuous)
|
UiStrings().Continuous)
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.debug(u'bible manager initialise')
|
log.debug(u'bible manager initialise')
|
||||||
@ -295,7 +290,15 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.settingsSection + u'/quick bible', QtCore.QVariant(
|
self.settingsSection + u'/quick bible', QtCore.QVariant(
|
||||||
self.quickVersionComboBox.currentText())).toString()
|
self.quickVersionComboBox.currentText())).toString()
|
||||||
find_and_set_in_combo_box(self.quickVersionComboBox, bible)
|
find_and_set_in_combo_box(self.quickVersionComboBox, bible)
|
||||||
self.updateAutoCompleter()
|
self.quickSearchEdit.setSearchTypes([
|
||||||
|
(BibleSearch.Reference, u':/bibles/bibles_search_reference.png',
|
||||||
|
translate('BiblesPlugin.MediaItem', 'Scripture Reference')),
|
||||||
|
(BibleSearch.Text, u':/bibles/bibles_search_text.png',
|
||||||
|
translate('BiblesPlugin.MediaItem', 'Text Search'))
|
||||||
|
])
|
||||||
|
self.quickSearchEdit.setCurrentSearchType(QtCore.QSettings().value(
|
||||||
|
u'%s/last search type' % self.settingsSection,
|
||||||
|
QtCore.QVariant(BibleSearch.Reference)).toInt()[0])
|
||||||
self.configUpdated()
|
self.configUpdated()
|
||||||
log.debug(u'bible manager initialise complete')
|
log.debug(u'bible manager initialise complete')
|
||||||
|
|
||||||
@ -386,6 +389,11 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
completion depends on the bible. It is only updated when we are doing a
|
completion depends on the bible. It is only updated when we are doing a
|
||||||
reference search, otherwise the auto completion list is removed.
|
reference search, otherwise the auto completion list is removed.
|
||||||
"""
|
"""
|
||||||
|
# Save the current search type to the configuration.
|
||||||
|
QtCore.QSettings().setValue(u'%s/last search type' %
|
||||||
|
self.settingsSection,
|
||||||
|
QtCore.QVariant(self.quickSearchEdit.currentSearchType()))
|
||||||
|
# Save the current bible to the configuration.
|
||||||
QtCore.QSettings().setValue(self.settingsSection + u'/quick bible',
|
QtCore.QSettings().setValue(self.settingsSection + u'/quick bible',
|
||||||
QtCore.QVariant(self.quickVersionComboBox.currentText()))
|
QtCore.QVariant(self.quickVersionComboBox.currentText()))
|
||||||
books = []
|
books = []
|
||||||
@ -841,4 +849,4 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.settings.layout_style)
|
self.settings.layout_style)
|
||||||
QtCore.QSettings().setValue(
|
QtCore.QSettings().setValue(
|
||||||
self.settingsSection + u'/verse layout style',
|
self.settingsSection + u'/verse layout style',
|
||||||
QtCore.QVariant(self.settings.layout_style))
|
QtCore.QVariant(self.settings.layout_style))
|
@ -107,11 +107,11 @@ class Ui_CustomEditDialog(object):
|
|||||||
translate('CustomPlugin.EditCustomForm', 'Edit Custom Slides'))
|
translate('CustomPlugin.EditCustomForm', 'Edit Custom Slides'))
|
||||||
self.titleLabel.setText(
|
self.titleLabel.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', '&Title:'))
|
translate('CustomPlugin.EditCustomForm', '&Title:'))
|
||||||
self.addButton.setText(UiStrings.Add)
|
self.addButton.setText(UiStrings().Add)
|
||||||
self.addButton.setToolTip(
|
self.addButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Add a new slide at '
|
translate('CustomPlugin.EditCustomForm', 'Add a new slide at '
|
||||||
'bottom.'))
|
'bottom.'))
|
||||||
self.editButton.setText(UiStrings.Edit)
|
self.editButton.setText(UiStrings().Edit)
|
||||||
self.editButton.setToolTip(
|
self.editButton.setToolTip(
|
||||||
translate('CustomPlugin.EditCustomForm', 'Edit the selected '
|
translate('CustomPlugin.EditCustomForm', 'Edit the selected '
|
||||||
'slide.'))
|
'slide.'))
|
||||||
@ -124,4 +124,4 @@ class Ui_CustomEditDialog(object):
|
|||||||
translate('CustomPlugin.EditCustomForm', 'The&me:'))
|
translate('CustomPlugin.EditCustomForm', 'The&me:'))
|
||||||
self.creditLabel.setText(
|
self.creditLabel.setText(
|
||||||
translate('CustomPlugin.EditCustomForm', '&Credits:'))
|
translate('CustomPlugin.EditCustomForm', '&Credits:'))
|
||||||
self.previewButton.setText(UiStrings.SaveAndPreview)
|
self.previewButton.setText(UiStrings().SaveAndPreview)
|
@ -32,8 +32,8 @@ class CustomTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
CustomTab is the Custom settings tab in the settings dialog.
|
CustomTab is the Custom settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, visible_title):
|
def __init__(self, parent, title, visible_title, icon_path):
|
||||||
SettingsTab.__init__(self, title, visible_title)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'CustomTab')
|
self.setObjectName(u'CustomTab')
|
||||||
|
@ -110,7 +110,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Edit a custom item
|
Edit a custom item
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.listView, UiStrings.SelectEdit):
|
if check_item_selected(self.listView, UiStrings().SelectEdit):
|
||||||
item = self.listView.currentItem()
|
item = self.listView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.parent.edit_custom_form.loadCustom(item_id, False)
|
self.parent.edit_custom_form.loadCustom(item_id, False)
|
||||||
@ -121,7 +121,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a custom item from the list and database
|
Remove a custom item from the list and database
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.listView, UiStrings.SelectDelete):
|
if check_item_selected(self.listView, UiStrings().SelectDelete):
|
||||||
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
||||||
row_list.sort(reverse=True)
|
row_list.sort(reverse=True)
|
||||||
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
@ -160,4 +160,4 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
else:
|
else:
|
||||||
raw_footer.append(u'')
|
raw_footer.append(u'')
|
||||||
service_item.raw_footer = raw_footer
|
service_item.raw_footer = raw_footer
|
||||||
return True
|
return True
|
@ -55,11 +55,11 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
'Select Image(s)')
|
'Select Image(s)')
|
||||||
file_formats = get_images_filter()
|
file_formats = get_images_filter()
|
||||||
self.onNewFileMasks = u'%s;;%s (*.*) (*)' % (file_formats,
|
self.onNewFileMasks = u'%s;;%s (*.*) (*)' % (file_formats,
|
||||||
UiStrings.AllFiles)
|
UiStrings().AllFiles)
|
||||||
self.replaceAction.setText(UiStrings.ReplaceBG)
|
self.replaceAction.setText(UiStrings().ReplaceBG)
|
||||||
self.replaceAction.setToolTip(UiStrings.ReplaceLiveBG)
|
self.replaceAction.setToolTip(UiStrings().ReplaceLiveBG)
|
||||||
self.resetAction.setText(UiStrings.ResetBG)
|
self.resetAction.setText(UiStrings().ResetBG)
|
||||||
self.resetAction.setToolTip(UiStrings.ResetLiveBG)
|
self.resetAction.setToolTip(UiStrings().ResetLiveBG)
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
@ -198,7 +198,7 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
self.parent.liveController.display.directImage(name, filename)
|
self.parent.liveController.display.directImage(name, filename)
|
||||||
self.resetAction.setVisible(True)
|
self.resetAction.setVisible(True)
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(UiStrings.LiveBGError,
|
critical_error_message_box(UiStrings().LiveBGError,
|
||||||
unicode(translate('ImagePlugin.MediaItem',
|
unicode(translate('ImagePlugin.MediaItem',
|
||||||
'There was a problem replacing your background, '
|
'There was a problem replacing your background, '
|
||||||
'the image file "%s" no longer exists.')) % filename)
|
'the image file "%s" no longer exists.')) % filename)
|
@ -60,11 +60,11 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.onNewFileMasks = unicode(translate('MediaPlugin.MediaItem',
|
self.onNewFileMasks = unicode(translate('MediaPlugin.MediaItem',
|
||||||
'Videos (%s);;Audio (%s);;%s (*)')) % (
|
'Videos (%s);;Audio (%s);;%s (*)')) % (
|
||||||
u' '.join(self.parent.video_extensions_list),
|
u' '.join(self.parent.video_extensions_list),
|
||||||
u' '.join(self.parent.audio_extensions_list), UiStrings.AllFiles)
|
u' '.join(self.parent.audio_extensions_list), UiStrings().AllFiles)
|
||||||
self.replaceAction.setText(UiStrings.ReplaceBG)
|
self.replaceAction.setText(UiStrings().ReplaceBG)
|
||||||
self.replaceAction.setToolTip(UiStrings.ReplaceLiveBG)
|
self.replaceAction.setToolTip(UiStrings().ReplaceLiveBG)
|
||||||
self.resetAction.setText(UiStrings.ResetBG)
|
self.resetAction.setText(UiStrings().ResetBG)
|
||||||
self.resetAction.setToolTip(UiStrings.ResetLiveBG)
|
self.resetAction.setToolTip(UiStrings().ResetLiveBG)
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
@ -111,7 +111,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.parent.liveController.display.video(filename, 0, True)
|
self.parent.liveController.display.video(filename, 0, True)
|
||||||
self.resetAction.setVisible(True)
|
self.resetAction.setVisible(True)
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(UiStrings.LiveBGError,
|
critical_error_message_box(UiStrings().LiveBGError,
|
||||||
unicode(translate('MediaPlugin.MediaItem',
|
unicode(translate('MediaPlugin.MediaItem',
|
||||||
'There was a problem replacing your background, '
|
'There was a problem replacing your background, '
|
||||||
'the media file "%s" no longer exists.')) % filename)
|
'the media file "%s" no longer exists.')) % filename)
|
||||||
@ -209,4 +209,4 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
|
img = QtGui.QPixmap(u':/media/media_video.png').toImage()
|
||||||
item_name.setIcon(build_icon(img))
|
item_name.setIcon(build_icon(img))
|
||||||
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(file))
|
||||||
self.listView.addItem(item_name)
|
self.listView.addItem(item_name)
|
@ -32,8 +32,8 @@ class MediaTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
MediaTab is the Media settings tab in the settings dialog.
|
MediaTab is the Media settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, visible_title):
|
def __init__(self, parent, title, visible_title, icon_path):
|
||||||
SettingsTab.__init__(self, title, visible_title)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'MediaTab')
|
self.setObjectName(u'MediaTab')
|
||||||
|
@ -203,7 +203,7 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a presentation item from the list
|
Remove a presentation item from the list
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.listView, UiStrings.SelectDelete):
|
if check_item_selected(self.listView, UiStrings().SelectDelete):
|
||||||
items = self.listView.selectedIndexes()
|
items = self.listView.selectedIndexes()
|
||||||
row_list = [item.row() for item in items]
|
row_list = [item.row() for item in items]
|
||||||
row_list.sort(reverse=True)
|
row_list.sort(reverse=True)
|
||||||
@ -296,4 +296,4 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
if self.controllers[controller].enabled():
|
if self.controllers[controller].enabled():
|
||||||
if filetype in self.controllers[controller].alsosupports:
|
if filetype in self.controllers[controller].alsosupports:
|
||||||
return controller
|
return controller
|
||||||
return None
|
return None
|
@ -49,7 +49,7 @@ class Controller(object):
|
|||||||
self.doc = None
|
self.doc = None
|
||||||
log.info(u'%s controller loaded' % live)
|
log.info(u'%s controller loaded' % live)
|
||||||
|
|
||||||
def add_handler(self, controller, file, is_blank):
|
def add_handler(self, controller, file, hide_mode, slide_no):
|
||||||
"""
|
"""
|
||||||
Add a handler, which is an instance of a presentation and
|
Add a handler, which is an instance of a presentation and
|
||||||
slidecontroller combination. If the slidecontroller has a display
|
slidecontroller combination. If the slidecontroller has a display
|
||||||
@ -64,12 +64,21 @@ class Controller(object):
|
|||||||
# Display error message to user
|
# Display error message to user
|
||||||
# Inform slidecontroller that the action failed?
|
# Inform slidecontroller that the action failed?
|
||||||
return
|
return
|
||||||
|
self.doc.slidenumber = slide_no
|
||||||
if self.is_live:
|
if self.is_live:
|
||||||
self.doc.start_presentation()
|
if hide_mode == HideMode.Screen:
|
||||||
if is_blank:
|
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||||
self.blank()
|
self.stop()
|
||||||
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
elif hide_mode == HideMode.Theme:
|
||||||
self.doc.slidenumber = 0
|
self.blank(hide_mode)
|
||||||
|
elif hide_mode == HideMode.Blank:
|
||||||
|
self.blank(hide_mode)
|
||||||
|
else:
|
||||||
|
self.doc.start_presentation()
|
||||||
|
Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
|
||||||
|
self.doc.slidenumber = 0
|
||||||
|
if slide_no > 1:
|
||||||
|
self.slide(slide_no)
|
||||||
|
|
||||||
def activate(self):
|
def activate(self):
|
||||||
"""
|
"""
|
||||||
@ -164,14 +173,10 @@ class Controller(object):
|
|||||||
Based on the handler passed at startup triggers slide show to shut down
|
Based on the handler passed at startup triggers slide show to shut down
|
||||||
"""
|
"""
|
||||||
log.debug(u'Live = %s, shutdown' % self.is_live)
|
log.debug(u'Live = %s, shutdown' % self.is_live)
|
||||||
if self.is_live:
|
|
||||||
Receiver.send_message(u'maindisplay_show')
|
|
||||||
self.doc.close_presentation()
|
self.doc.close_presentation()
|
||||||
self.doc = None
|
self.doc = None
|
||||||
#self.doc.slidenumber = 0
|
|
||||||
#self.timer.stop()
|
|
||||||
|
|
||||||
def blank(self):
|
def blank(self, hide_mode):
|
||||||
"""
|
"""
|
||||||
Instruct the controller to blank the presentation
|
Instruct the controller to blank the presentation
|
||||||
"""
|
"""
|
||||||
@ -182,6 +187,8 @@ class Controller(object):
|
|||||||
return
|
return
|
||||||
if not self.doc.is_active():
|
if not self.doc.is_active():
|
||||||
return
|
return
|
||||||
|
if hide_mode == HideMode.Theme:
|
||||||
|
Receiver.send_message(u'maindisplay_hide', HideMode.Theme)
|
||||||
self.doc.blank_screen()
|
self.doc.blank_screen()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
@ -261,7 +268,7 @@ class MessageListener(object):
|
|||||||
is_live = message[1]
|
is_live = message[1]
|
||||||
item = message[0]
|
item = message[0]
|
||||||
log.debug(u'Startup called with message %s' % message)
|
log.debug(u'Startup called with message %s' % message)
|
||||||
is_blank = message[2]
|
hide_mode = message[2]
|
||||||
file = os.path.join(item.get_frame_path(),
|
file = os.path.join(item.get_frame_path(),
|
||||||
item.get_frame_title())
|
item.get_frame_title())
|
||||||
self.handler = item.title
|
self.handler = item.title
|
||||||
@ -273,7 +280,8 @@ class MessageListener(object):
|
|||||||
controller = self.live_handler
|
controller = self.live_handler
|
||||||
else:
|
else:
|
||||||
controller = self.preview_handler
|
controller = self.preview_handler
|
||||||
controller.add_handler(self.controllers[self.handler], file, is_blank)
|
controller.add_handler(self.controllers[self.handler], file, hide_mode,
|
||||||
|
message[3])
|
||||||
|
|
||||||
def slide(self, message):
|
def slide(self, message):
|
||||||
"""
|
"""
|
||||||
@ -333,7 +341,6 @@ class MessageListener(object):
|
|||||||
"""
|
"""
|
||||||
is_live = message[1]
|
is_live = message[1]
|
||||||
if is_live:
|
if is_live:
|
||||||
Receiver.send_message(u'maindisplay_show')
|
|
||||||
self.live_handler.shutdown()
|
self.live_handler.shutdown()
|
||||||
else:
|
else:
|
||||||
self.preview_handler.shutdown()
|
self.preview_handler.shutdown()
|
||||||
@ -351,8 +358,9 @@ class MessageListener(object):
|
|||||||
React to the message to blank the display
|
React to the message to blank the display
|
||||||
"""
|
"""
|
||||||
is_live = message[1]
|
is_live = message[1]
|
||||||
|
hide_mode = message[2]
|
||||||
if is_live:
|
if is_live:
|
||||||
self.live_handler.blank()
|
self.live_handler.blank(hide_mode)
|
||||||
|
|
||||||
def unblank(self, message):
|
def unblank(self, message):
|
||||||
"""
|
"""
|
||||||
|
@ -251,14 +251,13 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
win32ui.GetForegroundWindow().GetDC().GetDeviceCaps(88)
|
win32ui.GetForegroundWindow().GetDC().GetDeviceCaps(88)
|
||||||
except win32ui.error:
|
except win32ui.error:
|
||||||
dpi = 96
|
dpi = 96
|
||||||
self.presentation.SlideShowSettings.Run()
|
|
||||||
self.presentation.SlideShowWindow.View.GotoSlide(1)
|
|
||||||
rendermanager = self.controller.plugin.renderManager
|
rendermanager = self.controller.plugin.renderManager
|
||||||
rect = rendermanager.screens.current[u'size']
|
rect = rendermanager.screens.current[u'size']
|
||||||
self.presentation.SlideShowWindow.Top = rect.y() * 72 / dpi
|
ppt_window = self.presentation.SlideShowSettings.Run()
|
||||||
self.presentation.SlideShowWindow.Height = rect.height() * 72 / dpi
|
ppt_window.Top = rect.y() * 72 / dpi
|
||||||
self.presentation.SlideShowWindow.Left = rect.x() * 72 / dpi
|
ppt_window.Height = rect.height() * 72 / dpi
|
||||||
self.presentation.SlideShowWindow.Width = rect.width() * 72 / dpi
|
ppt_window.Left = rect.x() * 72 / dpi
|
||||||
|
ppt_window.Width = rect.width() * 72 / dpi
|
||||||
|
|
||||||
def get_slide_number(self):
|
def get_slide_number(self):
|
||||||
"""
|
"""
|
||||||
|
@ -33,12 +33,12 @@ class PresentationTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
PresentationsTab is the Presentations settings tab in the settings dialog.
|
PresentationsTab is the Presentations settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, visible_title, controllers):
|
def __init__(self, parent, title, visible_title, controllers, icon_path):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Constructor
|
||||||
"""
|
"""
|
||||||
self.controllers = controllers
|
self.controllers = controllers
|
||||||
SettingsTab.__init__(self, title, visible_title)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
"""
|
"""
|
||||||
@ -86,7 +86,7 @@ class PresentationTab(SettingsTab):
|
|||||||
checkbox.setText(
|
checkbox.setText(
|
||||||
unicode(translate('PresentationPlugin.PresentationTab',
|
unicode(translate('PresentationPlugin.PresentationTab',
|
||||||
'%s (unavailable)')) % controller.name)
|
'%s (unavailable)')) % controller.name)
|
||||||
self.AdvancedGroupBox.setTitle(UiStrings.Advanced)
|
self.AdvancedGroupBox.setTitle(UiStrings().Advanced)
|
||||||
self.OverrideAppCheckBox.setText(
|
self.OverrideAppCheckBox.setText(
|
||||||
translate('PresentationPlugin.PresentationTab',
|
translate('PresentationPlugin.PresentationTab',
|
||||||
'Allow presentation application to be overriden'))
|
'Allow presentation application to be overriden'))
|
||||||
@ -131,4 +131,4 @@ class PresentationTab(SettingsTab):
|
|||||||
QtCore.QVariant(self.OverrideAppCheckBox.checkState()))
|
QtCore.QVariant(self.OverrideAppCheckBox.checkState()))
|
||||||
changed = True
|
changed = True
|
||||||
if changed:
|
if changed:
|
||||||
Receiver.send_message(u'mediaitem_presentation_rebuild')
|
Receiver.send_message(u'mediaitem_presentation_rebuild')
|
@ -56,13 +56,13 @@ class PresentationPlugin(Plugin):
|
|||||||
self.icon_path = u':/plugins/plugin_presentations.png'
|
self.icon_path = u':/plugins/plugin_presentations.png'
|
||||||
self.icon = build_icon(self.icon_path)
|
self.icon = build_icon(self.icon_path)
|
||||||
|
|
||||||
def getSettingsTab(self):
|
def getSettingsTab(self, parent):
|
||||||
"""
|
"""
|
||||||
Create the settings Tab
|
Create the settings Tab
|
||||||
"""
|
"""
|
||||||
visible_name = self.getString(StringContent.VisibleName)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return PresentationTab(self.name, visible_name[u'title'],
|
return PresentationTab(parent, self.name, visible_name[u'title'],
|
||||||
self.controllers)
|
self.controllers, self.icon_path)
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
"""
|
"""
|
||||||
@ -71,7 +71,6 @@ class PresentationPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
log.info(u'Presentations Initialising')
|
log.info(u'Presentations Initialising')
|
||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.insertToolboxItem()
|
|
||||||
for controller in self.controllers:
|
for controller in self.controllers:
|
||||||
if self.controllers[controller].enabled():
|
if self.controllers[controller].enabled():
|
||||||
try:
|
try:
|
||||||
|
@ -32,8 +32,8 @@ class RemoteTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
RemoteTab is the Remotes settings tab in the settings dialog.
|
RemoteTab is the Remotes settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, visible_title):
|
def __init__(self, parent, title, visible_title, icon_path):
|
||||||
SettingsTab.__init__(self, title, visible_title)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'RemoteTab')
|
self.setObjectName(u'RemoteTab')
|
||||||
|
@ -39,8 +39,9 @@ class RemotesPlugin(Plugin):
|
|||||||
remotes constructor
|
remotes constructor
|
||||||
"""
|
"""
|
||||||
Plugin.__init__(self, u'Remotes', plugin_helpers,
|
Plugin.__init__(self, u'Remotes', plugin_helpers,
|
||||||
settingsTabClass=RemoteTab)
|
settings_tab_class=RemoteTab)
|
||||||
self.icon = build_icon(u':/plugins/plugin_remote.png')
|
self.icon_path = u':/plugins/plugin_remote.png'
|
||||||
|
self.icon = build_icon(self.icon_path)
|
||||||
self.weight = -1
|
self.weight = -1
|
||||||
self.server = None
|
self.server = None
|
||||||
|
|
||||||
@ -50,7 +51,6 @@ class RemotesPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'initialise')
|
log.debug(u'initialise')
|
||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.insertToolboxItem()
|
|
||||||
self.server = HttpServer(self)
|
self.server = HttpServer(self)
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
|
@ -260,11 +260,11 @@ class Ui_EditSongDialog(object):
|
|||||||
translate('SongsPlugin.EditSongForm', '&Lyrics:'))
|
translate('SongsPlugin.EditSongForm', '&Lyrics:'))
|
||||||
self.verseOrderLabel.setText(
|
self.verseOrderLabel.setText(
|
||||||
translate('SongsPlugin.EditSongForm', '&Verse order:'))
|
translate('SongsPlugin.EditSongForm', '&Verse order:'))
|
||||||
self.verseAddButton.setText(UiStrings.Add)
|
self.verseAddButton.setText(UiStrings().Add)
|
||||||
self.verseEditButton.setText(UiStrings.Edit)
|
self.verseEditButton.setText(UiStrings().Edit)
|
||||||
self.verseEditAllButton.setText(
|
self.verseEditAllButton.setText(
|
||||||
translate('SongsPlugin.EditSongForm', 'Ed&it All'))
|
translate('SongsPlugin.EditSongForm', 'Ed&it All'))
|
||||||
self.verseDeleteButton.setText(UiStrings.Delete)
|
self.verseDeleteButton.setText(UiStrings().Delete)
|
||||||
self.songTabWidget.setTabText(
|
self.songTabWidget.setTabText(
|
||||||
self.songTabWidget.indexOf(self.lyricsTab),
|
self.songTabWidget.indexOf(self.lyricsTab),
|
||||||
translate('SongsPlugin.EditSongForm', 'Title && Lyrics'))
|
translate('SongsPlugin.EditSongForm', 'Title && Lyrics'))
|
||||||
@ -289,13 +289,13 @@ class Ui_EditSongDialog(object):
|
|||||||
self.songTabWidget.indexOf(self.authorsTab),
|
self.songTabWidget.indexOf(self.authorsTab),
|
||||||
translate('SongsPlugin.EditSongForm',
|
translate('SongsPlugin.EditSongForm',
|
||||||
'Authors, Topics && Song Book'))
|
'Authors, Topics && Song Book'))
|
||||||
self.themeGroupBox.setTitle(UiStrings.Theme)
|
self.themeGroupBox.setTitle(UiStrings().Theme)
|
||||||
self.themeAddButton.setText(
|
self.themeAddButton.setText(
|
||||||
translate('SongsPlugin.EditSongForm', 'New &Theme'))
|
translate('SongsPlugin.EditSongForm', 'New &Theme'))
|
||||||
self.rightsGroupBox.setTitle(
|
self.rightsGroupBox.setTitle(
|
||||||
translate('SongsPlugin.EditSongForm', 'Copyright Information'))
|
translate('SongsPlugin.EditSongForm', 'Copyright Information'))
|
||||||
self.copyrightInsertButton.setText(SongStrings.CopyrightSymbol)
|
self.copyrightInsertButton.setText(SongStrings.CopyrightSymbol)
|
||||||
self.CCLILabel.setText(UiStrings.CCLINumberLabel)
|
self.CCLILabel.setText(UiStrings().CCLINumberLabel)
|
||||||
self.commentsGroupBox.setTitle(
|
self.commentsGroupBox.setTitle(
|
||||||
translate('SongsPlugin.EditSongForm', 'Comments'))
|
translate('SongsPlugin.EditSongForm', 'Comments'))
|
||||||
self.songTabWidget.setTabText(
|
self.songTabWidget.setTabText(
|
||||||
@ -313,4 +313,4 @@ def editSongDialogComboBox(parent, name):
|
|||||||
comboBox.setEditable(True)
|
comboBox.setEditable(True)
|
||||||
comboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
|
comboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
|
||||||
comboBox.setObjectName(name)
|
comboBox.setObjectName(name)
|
||||||
return comboBox
|
return comboBox
|
@ -96,7 +96,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
QtCore.SIGNAL(u'theme_update_list'), self.loadThemes)
|
QtCore.SIGNAL(u'theme_update_list'), self.loadThemes)
|
||||||
self.previewButton = QtGui.QPushButton()
|
self.previewButton = QtGui.QPushButton()
|
||||||
self.previewButton.setObjectName(u'previewButton')
|
self.previewButton.setObjectName(u'previewButton')
|
||||||
self.previewButton.setText(UiStrings.SaveAndPreview)
|
self.previewButton.setText(UiStrings().SaveAndPreview)
|
||||||
self.buttonBox.addButton(
|
self.buttonBox.addButton(
|
||||||
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
||||||
QtCore.QObject.connect(self.buttonBox,
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
@ -355,7 +355,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.__addAuthorToList(author)
|
self.__addAuthorToList(author)
|
||||||
self.authorsComboBox.setCurrentIndex(0)
|
self.authorsComboBox.setCurrentIndex(0)
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.warning(self, UiStrings.NISs,
|
QtGui.QMessageBox.warning(self, UiStrings().NISs,
|
||||||
translate('SongsPlugin.EditSongForm', 'You have not selected '
|
translate('SongsPlugin.EditSongForm', 'You have not selected '
|
||||||
'a valid author. Either select an author from the list, '
|
'a valid author. Either select an author from the list, '
|
||||||
'or type in a new author and click the "Add Author to '
|
'or type in a new author and click the "Add Author to '
|
||||||
@ -414,7 +414,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.topicsListView.addItem(topic_item)
|
self.topicsListView.addItem(topic_item)
|
||||||
self.topicsComboBox.setCurrentIndex(0)
|
self.topicsComboBox.setCurrentIndex(0)
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.warning(self, UiStrings.NISs,
|
QtGui.QMessageBox.warning(self, UiStrings().NISs,
|
||||||
translate('SongsPlugin.EditSongForm', 'You have not selected '
|
translate('SongsPlugin.EditSongForm', 'You have not selected '
|
||||||
'a valid topic. Either select a topic from the list, or '
|
'a valid topic. Either select a topic from the list, or '
|
||||||
'type in a new topic and click the "Add Topic to Song" '
|
'type in a new topic and click the "Add Topic to Song" '
|
||||||
|
@ -175,7 +175,7 @@ class SongExportForm(OpenLPWizard):
|
|||||||
self.availableSongsPage.setSubTitle(
|
self.availableSongsPage.setSubTitle(
|
||||||
translate('SongsPlugin.ExportWizardForm',
|
translate('SongsPlugin.ExportWizardForm',
|
||||||
'Check the songs you want to export.'))
|
'Check the songs you want to export.'))
|
||||||
self.searchLabel.setText(u'%s:' % UiStrings.Search)
|
self.searchLabel.setText(u'%s:' % UiStrings().Search)
|
||||||
self.uncheckButton.setText(
|
self.uncheckButton.setText(
|
||||||
translate('SongsPlugin.ExportWizardForm', 'Uncheck All'))
|
translate('SongsPlugin.ExportWizardForm', 'Uncheck All'))
|
||||||
self.checkButton.setText(
|
self.checkButton.setText(
|
||||||
@ -207,7 +207,7 @@ class SongExportForm(OpenLPWizard):
|
|||||||
self.availableListWidget) if item.checkState()
|
self.availableListWidget) if item.checkState()
|
||||||
]
|
]
|
||||||
if not items:
|
if not items:
|
||||||
critical_error_message_box(UiStrings.NISp,
|
critical_error_message_box(UiStrings().NISp,
|
||||||
translate('SongsPlugin.ExportWizardForm',
|
translate('SongsPlugin.ExportWizardForm',
|
||||||
'You need to add at least one Song to export.'))
|
'You need to add at least one Song to export.'))
|
||||||
return False
|
return False
|
||||||
@ -360,4 +360,4 @@ class SongExportForm(OpenLPWizard):
|
|||||||
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
||||||
options=QtGui.QFileDialog.ShowDirsOnly))
|
options=QtGui.QFileDialog.ShowDirsOnly))
|
||||||
SettingsManager.set_last_dir(self.plugin.settingsSection, path, 1)
|
SettingsManager.set_last_dir(self.plugin.settingsSection, path, 1)
|
||||||
self.directoryLineEdit.setText(path)
|
self.directoryLineEdit.setText(path)
|
@ -235,8 +235,8 @@ class SongImportForm(OpenLPWizard):
|
|||||||
self.sourcePage.setTitle(WizardStrings.ImportSelect)
|
self.sourcePage.setTitle(WizardStrings.ImportSelect)
|
||||||
self.sourcePage.setSubTitle(WizardStrings.ImportSelectLong)
|
self.sourcePage.setSubTitle(WizardStrings.ImportSelectLong)
|
||||||
self.formatLabel.setText(WizardStrings.FormatLabel)
|
self.formatLabel.setText(WizardStrings.FormatLabel)
|
||||||
self.formatComboBox.setItemText(SongFormat.OpenLP2, UiStrings.OLPV2)
|
self.formatComboBox.setItemText(SongFormat.OpenLP2, UiStrings().OLPV2)
|
||||||
self.formatComboBox.setItemText(SongFormat.OpenLP1, UiStrings.OLPV1)
|
self.formatComboBox.setItemText(SongFormat.OpenLP1, UiStrings().OLPV1)
|
||||||
self.formatComboBox.setItemText(
|
self.formatComboBox.setItemText(
|
||||||
SongFormat.OpenLyrics, WizardStrings.OL)
|
SongFormat.OpenLyrics, WizardStrings.OL)
|
||||||
self.formatComboBox.setItemText(SongFormat.OpenSong, WizardStrings.OS)
|
self.formatComboBox.setItemText(SongFormat.OpenSong, WizardStrings.OS)
|
||||||
@ -261,10 +261,10 @@ class SongImportForm(OpenLPWizard):
|
|||||||
# self.formatComboBox.setItemText(SongFormat.CSV, WizardStrings.CSV)
|
# self.formatComboBox.setItemText(SongFormat.CSV, WizardStrings.CSV)
|
||||||
self.openLP2FilenameLabel.setText(
|
self.openLP2FilenameLabel.setText(
|
||||||
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
||||||
self.openLP2BrowseButton.setText(UiStrings.Browse)
|
self.openLP2BrowseButton.setText(UiStrings().Browse)
|
||||||
self.openLP1FilenameLabel.setText(
|
self.openLP1FilenameLabel.setText(
|
||||||
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
||||||
self.openLP1BrowseButton.setText(UiStrings.Browse)
|
self.openLP1BrowseButton.setText(UiStrings().Browse)
|
||||||
self.openLP1DisabledLabel.setText(WizardStrings.NoSqlite)
|
self.openLP1DisabledLabel.setText(WizardStrings.NoSqlite)
|
||||||
self.openLyricsAddButton.setText(
|
self.openLyricsAddButton.setText(
|
||||||
translate('SongsPlugin.ImportWizardForm', 'Add Files...'))
|
translate('SongsPlugin.ImportWizardForm', 'Add Files...'))
|
||||||
@ -305,10 +305,10 @@ class SongImportForm(OpenLPWizard):
|
|||||||
'find OpenOffice.org on your computer.'))
|
'find OpenOffice.org on your computer.'))
|
||||||
self.easiSlidesFilenameLabel.setText(
|
self.easiSlidesFilenameLabel.setText(
|
||||||
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
||||||
self.easiSlidesBrowseButton.setText(UiStrings.Browse)
|
self.easiSlidesBrowseButton.setText(UiStrings().Browse)
|
||||||
self.ewFilenameLabel.setText(
|
self.ewFilenameLabel.setText(
|
||||||
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
||||||
self.ewBrowseButton.setText(UiStrings.Browse)
|
self.ewBrowseButton.setText(UiStrings().Browse)
|
||||||
self.songBeamerAddButton.setText(
|
self.songBeamerAddButton.setText(
|
||||||
translate('SongsPlugin.ImportWizardForm', 'Add Files...'))
|
translate('SongsPlugin.ImportWizardForm', 'Add Files...'))
|
||||||
self.songBeamerRemoveButton.setText(
|
self.songBeamerRemoveButton.setText(
|
||||||
@ -323,7 +323,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
translate('SongsPlugin.ImportWizardForm', 'Remove File(s)'))
|
translate('SongsPlugin.ImportWizardForm', 'Remove File(s)'))
|
||||||
# self.csvFilenameLabel.setText(
|
# self.csvFilenameLabel.setText(
|
||||||
# translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
# translate('SongsPlugin.ImportWizardForm', 'Filename:'))
|
||||||
# self.csvBrowseButton.setText(UiStrings.Browse)
|
# self.csvBrowseButton.setText(UiStrings().Browse)
|
||||||
self.progressPage.setTitle(WizardStrings.Importing)
|
self.progressPage.setTitle(WizardStrings.Importing)
|
||||||
self.progressPage.setSubTitle(
|
self.progressPage.setSubTitle(
|
||||||
translate('SongsPlugin.ImportWizardForm',
|
translate('SongsPlugin.ImportWizardForm',
|
||||||
@ -346,49 +346,49 @@ class SongImportForm(OpenLPWizard):
|
|||||||
source_format = self.formatComboBox.currentIndex()
|
source_format = self.formatComboBox.currentIndex()
|
||||||
if source_format == SongFormat.OpenLP2:
|
if source_format == SongFormat.OpenLP2:
|
||||||
if self.openLP2FilenameEdit.text().isEmpty():
|
if self.openLP2FilenameEdit.text().isEmpty():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
WizardStrings.YouSpecifyFile % UiStrings.OLPV2)
|
WizardStrings.YouSpecifyFile % UiStrings().OLPV2)
|
||||||
self.openLP2BrowseButton.setFocus()
|
self.openLP2BrowseButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.OpenLP1:
|
elif source_format == SongFormat.OpenLP1:
|
||||||
if self.openLP1FilenameEdit.text().isEmpty():
|
if self.openLP1FilenameEdit.text().isEmpty():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
WizardStrings.YouSpecifyFile % UiStrings.OLPV1)
|
WizardStrings.YouSpecifyFile % UiStrings().OLPV1)
|
||||||
self.openLP1BrowseButton.setFocus()
|
self.openLP1BrowseButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.OpenLyrics:
|
elif source_format == SongFormat.OpenLyrics:
|
||||||
if self.openLyricsFileListWidget.count() == 0:
|
if self.openLyricsFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.OL)
|
WizardStrings.YouSpecifyFile % WizardStrings.OL)
|
||||||
self.openLyricsAddButton.setFocus()
|
self.openLyricsAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.OpenSong:
|
elif source_format == SongFormat.OpenSong:
|
||||||
if self.openSongFileListWidget.count() == 0:
|
if self.openSongFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.OS)
|
WizardStrings.YouSpecifyFile % WizardStrings.OS)
|
||||||
self.openSongAddButton.setFocus()
|
self.openSongAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.WordsOfWorship:
|
elif source_format == SongFormat.WordsOfWorship:
|
||||||
if self.wordsOfWorshipFileListWidget.count() == 0:
|
if self.wordsOfWorshipFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.WoW)
|
WizardStrings.YouSpecifyFile % WizardStrings.WoW)
|
||||||
self.wordsOfWorshipAddButton.setFocus()
|
self.wordsOfWorshipAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.CCLI:
|
elif source_format == SongFormat.CCLI:
|
||||||
if self.ccliFileListWidget.count() == 0:
|
if self.ccliFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.CCLI)
|
WizardStrings.YouSpecifyFile % WizardStrings.CCLI)
|
||||||
self.ccliAddButton.setFocus()
|
self.ccliAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.SongsOfFellowship:
|
elif source_format == SongFormat.SongsOfFellowship:
|
||||||
if self.songsOfFellowshipFileListWidget.count() == 0:
|
if self.songsOfFellowshipFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.SoF)
|
WizardStrings.YouSpecifyFile % WizardStrings.SoF)
|
||||||
self.songsOfFellowshipAddButton.setFocus()
|
self.songsOfFellowshipAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.Generic:
|
elif source_format == SongFormat.Generic:
|
||||||
if self.genericFileListWidget.count() == 0:
|
if self.genericFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
translate('SongsPlugin.ImportWizardForm',
|
translate('SongsPlugin.ImportWizardForm',
|
||||||
'You need to specify at least one document or '
|
'You need to specify at least one document or '
|
||||||
'presentation file to import from.'))
|
'presentation file to import from.'))
|
||||||
@ -396,31 +396,31 @@ class SongImportForm(OpenLPWizard):
|
|||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.EasiSlides:
|
elif source_format == SongFormat.EasiSlides:
|
||||||
if self.easiSlidesFilenameEdit.text().isEmpty():
|
if self.easiSlidesFilenameEdit.text().isEmpty():
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.ES)
|
WizardStrings.YouSpecifyFile % WizardStrings.ES)
|
||||||
self.easiSlidesBrowseButton.setFocus()
|
self.easiSlidesBrowseButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.EasyWorship:
|
elif source_format == SongFormat.EasyWorship:
|
||||||
if self.ewFilenameEdit.text().isEmpty():
|
if self.ewFilenameEdit.text().isEmpty():
|
||||||
critical_error_message_box(UiStrings.NFSs,
|
critical_error_message_box(UiStrings().NFSs,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.EW)
|
WizardStrings.YouSpecifyFile % WizardStrings.EW)
|
||||||
self.ewBrowseButton.setFocus()
|
self.ewBrowseButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.SongBeamer:
|
elif source_format == SongFormat.SongBeamer:
|
||||||
if self.songBeamerFileListWidget.count() == 0:
|
if self.songBeamerFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.SB)
|
WizardStrings.YouSpecifyFile % WizardStrings.SB)
|
||||||
self.songBeamerAddButton.setFocus()
|
self.songBeamerAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.SongShowPlus:
|
elif source_format == SongFormat.SongShowPlus:
|
||||||
if self.songShowPlusFileListWidget.count() == 0:
|
if self.songShowPlusFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.SSP)
|
WizardStrings.YouSpecifyFile % WizardStrings.SSP)
|
||||||
self.wordsOfWorshipAddButton.setFocus()
|
self.wordsOfWorshipAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.FoilPresenter:
|
elif source_format == SongFormat.FoilPresenter:
|
||||||
if self.foilPresenterFileListWidget.count() == 0:
|
if self.foilPresenterFileListWidget.count() == 0:
|
||||||
critical_error_message_box(UiStrings.NFSp,
|
critical_error_message_box(UiStrings().NFSp,
|
||||||
WizardStrings.YouSpecifyFile % WizardStrings.FP)
|
WizardStrings.YouSpecifyFile % WizardStrings.FP)
|
||||||
self.foilPresenterAddButton.setFocus()
|
self.foilPresenterAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
@ -446,7 +446,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
if filters:
|
if filters:
|
||||||
filters += u';;'
|
filters += u';;'
|
||||||
filters += u'%s (*)' % UiStrings.AllFiles
|
filters += u'%s (*)' % UiStrings().AllFiles
|
||||||
filenames = QtGui.QFileDialog.getOpenFileNames(self, title,
|
filenames = QtGui.QFileDialog.getOpenFileNames(self, title,
|
||||||
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
||||||
filters)
|
filters)
|
||||||
@ -476,7 +476,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Get OpenLP v2 song database file
|
Get OpenLP v2 song database file
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % UiStrings.OLPV2,
|
self.getFileName(WizardStrings.OpenTypeFile % UiStrings().OLPV2,
|
||||||
self.openLP2FilenameEdit, u'%s (*.sqlite)'
|
self.openLP2FilenameEdit, u'%s (*.sqlite)'
|
||||||
% (translate('SongsPlugin.ImportWizardForm',
|
% (translate('SongsPlugin.ImportWizardForm',
|
||||||
'OpenLP 2.0 Databases'))
|
'OpenLP 2.0 Databases'))
|
||||||
@ -486,7 +486,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
Get OpenLP v1 song database file
|
Get OpenLP v1 song database file
|
||||||
"""
|
"""
|
||||||
self.getFileName(WizardStrings.OpenTypeFile % UiStrings.OLPV1,
|
self.getFileName(WizardStrings.OpenTypeFile % UiStrings().OLPV1,
|
||||||
self.openLP1FilenameEdit, u'%s (*.olp)'
|
self.openLP1FilenameEdit, u'%s (*.olp)'
|
||||||
% translate('SongsPlugin.ImportWizardForm',
|
% translate('SongsPlugin.ImportWizardForm',
|
||||||
'openlp.org v1.x Databases')
|
'openlp.org v1.x Databases')
|
||||||
@ -836,4 +836,4 @@ class SongImportForm(OpenLPWizard):
|
|||||||
setattr(self, prefix + u'DisabledLayout', disabledLayout)
|
setattr(self, prefix + u'DisabledLayout', disabledLayout)
|
||||||
setattr(self, prefix + u'DisabledLabel', disabledLabel)
|
setattr(self, prefix + u'DisabledLabel', disabledLabel)
|
||||||
setattr(self, prefix + u'ImportWidget', importWidget)
|
setattr(self, prefix + u'ImportWidget', importWidget)
|
||||||
return importWidget
|
return importWidget
|
@ -149,17 +149,17 @@ class Ui_SongMaintenanceDialog(object):
|
|||||||
self.listItemAuthors.setText(SongStrings.Authors)
|
self.listItemAuthors.setText(SongStrings.Authors)
|
||||||
self.listItemTopics.setText(SongStrings.Topics)
|
self.listItemTopics.setText(SongStrings.Topics)
|
||||||
self.listItemBooks.setText(SongStrings.SongBooks)
|
self.listItemBooks.setText(SongStrings.SongBooks)
|
||||||
self.authorsAddButton.setText(UiStrings.Add)
|
self.authorsAddButton.setText(UiStrings().Add)
|
||||||
self.authorsEditButton.setText(UiStrings.Edit)
|
self.authorsEditButton.setText(UiStrings().Edit)
|
||||||
self.authorsDeleteButton.setText(UiStrings.Delete)
|
self.authorsDeleteButton.setText(UiStrings().Delete)
|
||||||
self.topicsAddButton.setText(UiStrings.Add)
|
self.topicsAddButton.setText(UiStrings().Add)
|
||||||
self.topicsEditButton.setText(UiStrings.Edit)
|
self.topicsEditButton.setText(UiStrings().Edit)
|
||||||
self.topicsDeleteButton.setText(UiStrings.Delete)
|
self.topicsDeleteButton.setText(UiStrings().Delete)
|
||||||
self.booksAddButton.setText(UiStrings.Add)
|
self.booksAddButton.setText(UiStrings().Add)
|
||||||
self.booksEditButton.setText(UiStrings.Edit)
|
self.booksEditButton.setText(UiStrings().Edit)
|
||||||
self.booksDeleteButton.setText(UiStrings.Delete)
|
self.booksDeleteButton.setText(UiStrings().Delete)
|
||||||
typeListWidth = max(self.fontMetrics().width(SongStrings.Authors),
|
typeListWidth = max(self.fontMetrics().width(SongStrings.Authors),
|
||||||
self.fontMetrics().width(SongStrings.Topics),
|
self.fontMetrics().width(SongStrings.Topics),
|
||||||
self.fontMetrics().width(SongStrings.SongBooks))
|
self.fontMetrics().width(SongStrings.SongBooks))
|
||||||
self.typeListWidget.setFixedWidth(typeListWidth +
|
self.typeListWidget.setFixedWidth(typeListWidth +
|
||||||
self.typeListWidget.iconSize().width() + 32)
|
self.typeListWidget.iconSize().width() + 32)
|
@ -115,7 +115,7 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
else:
|
else:
|
||||||
critical_error_message_box(dlg_title, err_text)
|
critical_error_message_box(dlg_title, err_text)
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(dlg_title, UiStrings.NISs)
|
critical_error_message_box(dlg_title, UiStrings().NISs)
|
||||||
|
|
||||||
def resetAuthors(self):
|
def resetAuthors(self):
|
||||||
"""
|
"""
|
||||||
@ -503,4 +503,4 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
editButton.setEnabled(False)
|
editButton.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
deleteButton.setEnabled(True)
|
deleteButton.setEnabled(True)
|
||||||
editButton.setEnabled(True)
|
editButton.setEnabled(True)
|
@ -137,8 +137,8 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
QtCore.QVariant(u'True')).toBool()
|
QtCore.QVariant(u'True')).toBool()
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.searchTextLabel.setText(u'%s:' % UiStrings.Search)
|
self.searchTextLabel.setText(u'%s:' % UiStrings().Search)
|
||||||
self.searchTextButton.setText(UiStrings.Search)
|
self.searchTextButton.setText(UiStrings().Search)
|
||||||
self.maintenanceAction.setText(SongStrings.SongMaintenance)
|
self.maintenanceAction.setText(SongStrings.SongMaintenance)
|
||||||
self.maintenanceAction.setToolTip(translate('SongsPlugin.MediaItem',
|
self.maintenanceAction.setToolTip(translate('SongsPlugin.MediaItem',
|
||||||
'Maintain the lists of authors, topics and books'))
|
'Maintain the lists of authors, topics and books'))
|
||||||
@ -153,11 +153,19 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
translate('SongsPlugin.MediaItem', 'Lyrics')),
|
translate('SongsPlugin.MediaItem', 'Lyrics')),
|
||||||
(SongSearch.Authors, u':/songs/song_search_author.png',
|
(SongSearch.Authors, u':/songs/song_search_author.png',
|
||||||
SongStrings.Authors),
|
SongStrings.Authors),
|
||||||
(SongSearch.Themes, u':/slides/slide_theme.png', UiStrings.Themes)
|
(SongSearch.Themes, u':/slides/slide_theme.png', UiStrings().Themes)
|
||||||
])
|
])
|
||||||
|
self.searchTextEdit.setCurrentSearchType(QtCore.QSettings().value(
|
||||||
|
u'%s/last search type' % self.settingsSection,
|
||||||
|
QtCore.QVariant(SongSearch.Entire)).toInt()[0])
|
||||||
self.configUpdated()
|
self.configUpdated()
|
||||||
|
|
||||||
def onSearchTextButtonClick(self):
|
def onSearchTextButtonClick(self):
|
||||||
|
# Save the current search type to the configuration.
|
||||||
|
QtCore.QSettings().setValue(u'%s/last search type' %
|
||||||
|
self.settingsSection,
|
||||||
|
QtCore.QVariant(self.searchTextEdit.currentSearchType()))
|
||||||
|
# Reload the list considering the new search type.
|
||||||
search_keywords = unicode(self.searchTextEdit.displayText())
|
search_keywords = unicode(self.searchTextEdit.displayText())
|
||||||
search_results = []
|
search_results = []
|
||||||
search_type = self.searchTextEdit.currentSearchType()
|
search_type = self.searchTextEdit.currentSearchType()
|
||||||
@ -304,7 +312,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
Edit a song
|
Edit a song
|
||||||
"""
|
"""
|
||||||
log.debug(u'onEditClick')
|
log.debug(u'onEditClick')
|
||||||
if check_item_selected(self.listView, UiStrings.SelectEdit):
|
if check_item_selected(self.listView, UiStrings().SelectEdit):
|
||||||
self.editItem = self.listView.currentItem()
|
self.editItem = self.listView.currentItem()
|
||||||
item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.edit_song_form.loadSong(item_id, False)
|
self.edit_song_form.loadSong(item_id, False)
|
||||||
@ -315,7 +323,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a song from the list and database
|
Remove a song from the list and database
|
||||||
"""
|
"""
|
||||||
if check_item_selected(self.listView, UiStrings.SelectDelete):
|
if check_item_selected(self.listView, UiStrings().SelectDelete):
|
||||||
items = self.listView.selectedIndexes()
|
items = self.listView.selectedIndexes()
|
||||||
if QtGui.QMessageBox.question(self,
|
if QtGui.QMessageBox.question(self,
|
||||||
translate('SongsPlugin.MediaItem', 'Delete Song(s)?'),
|
translate('SongsPlugin.MediaItem', 'Delete Song(s)?'),
|
||||||
@ -464,4 +472,4 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
Locale aware collation of song titles
|
Locale aware collation of song titles
|
||||||
"""
|
"""
|
||||||
return locale.strcoll(unicode(song_1.title.lower()),
|
return locale.strcoll(unicode(song_1.title.lower()),
|
||||||
unicode(song_2.title.lower()))
|
unicode(song_2.title.lower()))
|
@ -32,8 +32,8 @@ class SongsTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
SongsTab is the Songs settings tab in the settings dialog.
|
SongsTab is the Songs settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, title, visible_title):
|
def __init__(self, parent, title, visible_title, icon_path):
|
||||||
SettingsTab.__init__(self, title, visible_title)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'SongsTab')
|
self.setObjectName(u'SongsTab')
|
||||||
|
@ -67,11 +67,9 @@ class SongsPlugin(Plugin):
|
|||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
self.toolsReindexItem.setVisible(True)
|
self.toolsReindexItem.setVisible(True)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(self.SongImportItem, UiStrings.Import)
|
action_list.add_action(self.SongImportItem, UiStrings().Import)
|
||||||
action_list.add_action(self.SongExportItem, UiStrings.Export)
|
action_list.add_action(self.SongExportItem, UiStrings().Export)
|
||||||
action_list.add_action(self.toolsReindexItem, UiStrings.Tools)
|
action_list.add_action(self.toolsReindexItem, UiStrings().Tools)
|
||||||
self.mediaItem.displayResultsSong(
|
|
||||||
self.manager.get_all_objects(Song, order_by_ref=Song.search_title))
|
|
||||||
|
|
||||||
def addImportMenuItem(self, import_menu):
|
def addImportMenuItem(self, import_menu):
|
||||||
"""
|
"""
|
||||||
@ -141,7 +139,7 @@ class SongsPlugin(Plugin):
|
|||||||
if maxSongs == 0:
|
if maxSongs == 0:
|
||||||
return
|
return
|
||||||
progressDialog = QtGui.QProgressDialog(
|
progressDialog = QtGui.QProgressDialog(
|
||||||
translate('SongsPlugin', 'Reindexing songs...'), UiStrings.Cancel,
|
translate('SongsPlugin', 'Reindexing songs...'), UiStrings().Cancel,
|
||||||
0, maxSongs, self.formparent)
|
0, maxSongs, self.formparent)
|
||||||
progressDialog.setWindowModality(QtCore.Qt.WindowModal)
|
progressDialog.setWindowModality(QtCore.Qt.WindowModal)
|
||||||
songs = self.manager.get_all_objects(Song)
|
songs = self.manager.get_all_objects(Song)
|
||||||
@ -260,7 +258,7 @@ class SongsPlugin(Plugin):
|
|||||||
self.manager.finalise()
|
self.manager.finalise()
|
||||||
self.toolsReindexItem.setVisible(False)
|
self.toolsReindexItem.setVisible(False)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.remove_action(self.SongImportItem, UiStrings.Import)
|
action_list.remove_action(self.SongImportItem, UiStrings().Import)
|
||||||
action_list.remove_action(self.SongExportItem, UiStrings.Export)
|
action_list.remove_action(self.SongExportItem, UiStrings().Export)
|
||||||
action_list.remove_action(self.toolsReindexItem, UiStrings.Tools)
|
action_list.remove_action(self.toolsReindexItem, UiStrings().Tools)
|
||||||
Plugin.finalise(self)
|
Plugin.finalise(self)
|
@ -14,565 +14,75 @@
|
|||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="../images/openlp-2.qrc">
|
<iconset>
|
||||||
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
|
<normaloff>:/icon/openlp.org-icon-32.bmp</normaloff>:/icon/openlp.org-icon-32.bmp</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="SettingsLayout">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="spacing">
|
<property name="geometry">
|
||||||
<number>8</number>
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>30</y>
|
||||||
|
<width>691</width>
|
||||||
|
<height>441</height>
|
||||||
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<number>8</number>
|
<item row="0" column="0">
|
||||||
</property>
|
<widget class="QStackedWidget" name="tagStackedWidget">
|
||||||
<item>
|
<property name="minimumSize">
|
||||||
<widget class="QTabWidget" name="SettingsTabWidget">
|
<size>
|
||||||
<property name="currentIndex">
|
<width>500</width>
|
||||||
<number>2</number>
|
<height>0</height>
|
||||||
</property>
|
</size>
|
||||||
<widget class="QWidget" name="GeneralTab">
|
</property>
|
||||||
<attribute name="title">
|
<widget class="QWidget" name="page">
|
||||||
<string>General</string>
|
<widget class="QListWidget" name="settingListWidget">
|
||||||
</attribute>
|
<property name="geometry">
|
||||||
<layout class="QHBoxLayout" name="GeneralLayout">
|
<rect>
|
||||||
<property name="spacing">
|
<x>0</x>
|
||||||
<number>8</number>
|
<y>0</y>
|
||||||
</property>
|
<width>211</width>
|
||||||
<property name="margin">
|
<height>409</height>
|
||||||
<number>8</number>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="minimumSize">
|
||||||
<widget class="QWidget" name="GeneralLeftWidget" native="true">
|
<size>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<width>200</width>
|
||||||
<item>
|
<height>0</height>
|
||||||
<widget class="QGroupBox" name="MonitorGroupBox">
|
</size>
|
||||||
<property name="title">
|
</property>
|
||||||
<string>Monitors</string>
|
<property name="horizontalScrollBarPolicy">
|
||||||
</property>
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
<layout class="QVBoxLayout" name="MonitorLayout">
|
</property>
|
||||||
<property name="spacing">
|
</widget>
|
||||||
<number>8</number>
|
</widget>
|
||||||
</property>
|
<widget class="QWidget" name="page_2"/>
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="MonitorLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select monitor for output display:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="MonitorComboBox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Monitor 1 on X11 Windowing System</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Monitor 2 on X11 Windowing System</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="BlankScreenGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Blank Screen</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="BlankScreenLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="WarningCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show warning on startup</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="AutoOpenGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Auto Open Last Service</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="AutoOpenLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="AutoOpenCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Automatically open the last service at startup</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="GeneralLeftSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="GeneralRightWidget" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="GeneralRightLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="CCLIGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>CCLI Details</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="CCLILayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="NumberLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>CCLI Number:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="NumberEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="UsernameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>SongSelect Username:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="UsernameEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="PasswordLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>SongSelect Password:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="PasswordEdit">
|
|
||||||
<property name="echoMode">
|
|
||||||
<enum>QLineEdit::Password</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="GeneralRightSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="ThemesTab">
|
</item>
|
||||||
<attribute name="title">
|
<item row="1" column="0">
|
||||||
<string>Themes</string>
|
<widget class="QDialogButtonBox" name="ButtonsBox">
|
||||||
</attribute>
|
<property name="sizePolicy">
|
||||||
<layout class="QHBoxLayout" name="ThemesTabLayout">
|
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||||
<property name="spacing">
|
<horstretch>0</horstretch>
|
||||||
<number>8</number>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
<property name="margin">
|
</property>
|
||||||
<number>8</number>
|
<property name="maximumSize">
|
||||||
</property>
|
<size>
|
||||||
<item>
|
<width>16777215</width>
|
||||||
<widget class="QGroupBox" name="GlobalGroupBox">
|
<height>16777215</height>
|
||||||
<property name="title">
|
</size>
|
||||||
<string>Global theme</string>
|
</property>
|
||||||
</property>
|
<property name="orientation">
|
||||||
<layout class="QVBoxLayout" name="GlobalGroupBoxLayout">
|
<enum>Qt::Horizontal</enum>
|
||||||
<property name="spacing">
|
</property>
|
||||||
<number>8</number>
|
<property name="standardButtons">
|
||||||
</property>
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
<property name="margin">
|
</property>
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="DefaultComboBox">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>African Sunset</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Snowy Mountains</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Wilderness</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListView" name="DefaultListView"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="LevelGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Theme level</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<property name="labelAlignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="formAlignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QRadioButton" name="SongLevelRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Song level</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="SongLevelLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use the theme from each song in the database. If a song doesn't have a theme associated with it, then use the service's theme. If the service doesn't have a theme, then use the global theme.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QRadioButton" name="ServiceLevelRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Service level</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="ServiceLevelLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use the theme from the service, overriding any of the individual songs' themes. If the service doesn't have a theme, then use the global theme.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QRadioButton" name="GlobalLevelRadioButton">
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Global level</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="GlobalLevelLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use the global theme, overriding any themes associated with either the service or the songs.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="AlertsTab">
|
</item>
|
||||||
<attribute name="title">
|
</layout>
|
||||||
<string>Alerts</string>
|
</widget>
|
||||||
</attribute>
|
|
||||||
<layout class="QHBoxLayout" name="AlertsLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="AlertLeftColumn" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="SlideLeftLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="FontGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Font</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="FontLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="FontLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Font Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFontComboBox" name="FontComboBox"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="ColorWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="FontColorLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Font Color:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="FontColourButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="ColorSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="BackgroundColorLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Background Color:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="BackgroundColourButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="LengthWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="LengthLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="LengthLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Display length:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="LengthSpinBox">
|
|
||||||
<property name="value">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string>s</string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>180</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="LengthSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>147</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SlideLeftSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>94</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SlideRightColumn" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="SlideRightLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="PreviewGroupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Preview</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="PreviewLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGraphicsView" name="FontPreview">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="SlideRightSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="ButtonsBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images/openlp-2.qrc"/>
|
<include location="../images/openlp-2.qrc"/>
|
||||||
|