This commit is contained in:
Tim Bentley 2009-08-06 18:47:38 +01:00
commit b38553bffe
8 changed files with 1060 additions and 861 deletions

View File

@ -24,8 +24,20 @@ from time import sleep
from openlp.core.lib import translate
class MainDisplay(QtGui.QWidget):
"""
This is the form that is used to display things on the projector.
"""
def __init__(self, parent , screens):
def __init__(self, parent, screens):
"""
The constructor for the display form.
``parent``
The parent widget.
``screens``
The list of screens.
"""
QtGui.QWidget.__init__(self, parent)
self.setWindowTitle(u'OpenLP Display')
self.screens = screens
@ -37,7 +49,7 @@ class MainDisplay(QtGui.QWidget):
self.display.setScaledContents(True)
self.layout.addWidget(self.display)
self.displayBlank = False
self.blankFrame= None
self.blankFrame = None
self.alertactive = False
self.alerttext = u''
self.alertTab = None
@ -48,6 +60,10 @@ class MainDisplay(QtGui.QWidget):
Sets up the screen on a particular screen.
@param (integer) screen This is the screen number.
"""
# Temporary fix until I can speak to Tim Bentley.
if screenNumber not in self.screens:
screenNumber = 0
# /Temporary fix
screen = self.screens[screenNumber]
if screen[u'number'] != screenNumber:
# We will most probably never actually hit this bit, but just in
@ -70,7 +86,8 @@ class MainDisplay(QtGui.QWidget):
painter_image.begin(self.InitialFrame)
painter_image.fillRect(self.InitialFrame.rect(), QtCore.Qt.white)
painter_image.drawImage((screen[u'size'].width() - splash_image.width()) / 2,
(screen[u'size'].height() - splash_image.height()) / 2 , splash_image)
(screen[u'size'].height() - splash_image.height()) / 2,
splash_image)
self.frameView(self.InitialFrame)
#Build a Black screen
painter = QtGui.QPainter()
@ -86,7 +103,6 @@ class MainDisplay(QtGui.QWidget):
``frame``
Image frame to be rendered
"""
self.frame = frame
if self.timer_id != 0 :
self.displayAlert()
@ -119,7 +135,9 @@ class MainDisplay(QtGui.QWidget):
alertframe = QtGui.QPixmap.fromImage(self.frame)
painter = QtGui.QPainter(alertframe)
top = alertframe.rect().height() * 0.9
painter.fillRect(QtCore.QRect(0, top , alertframe.rect().width(), alertframe.rect().height() - top), QtGui.QColor(self.alertTab.bg_color))
painter.fillRect(
QtCore.QRect(0, top, alertframe.rect().width(), alertframe.rect().height() - top),
QtGui.QColor(self.alertTab.bg_color))
font = QtGui.QFont()
font.setFamily(self.alertTab.font_face)
font.setBold(True)
@ -128,12 +146,13 @@ class MainDisplay(QtGui.QWidget):
painter.setPen(QtGui.QColor(self.alertTab.font_color))
x, y = (0, top)
metrics=QtGui.QFontMetrics(font)
painter.drawText(x, y+metrics.height()-metrics.descent()-1, self.alerttext)
painter.drawText(
x, y + metrics.height() - metrics.descent() - 1, self.alerttext)
painter.end()
self.display.setPixmap(alertframe)
# check to see if we have a timer running
if self.timer_id == 0:
self.timer_id = self.startTimer(int(self.alertTab.timeout) * 1000)
self.timer_id = self.startTimer(int(self.alertTab.timeout) * 1000)
def timerEvent(self, event):
if event.timerId() == self.timer_id:

View File

@ -129,13 +129,20 @@ class MainWindow(object):
Hook to close the main window and display windows on exit
"""
if self.oosNotSaved == True:
box = QtGui.QMessageBox()
box.setWindowTitle(translate(u'mainWindow', u'Question?'))
box.setText(translate(u'mainWindow', u'Save changes to Order of Service?'))
box.setIcon(QtGui.QMessageBox.Question)
box.setStandardButtons(QtGui.QMessageBox.Save | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel);
box.setDefaultButton(QtGui.QMessageBox.Save);
ret = box.exec_()
ret = QtGui.QMessageBox.question(self,
translate(u'mainWindow', u'Save Changes to Service?'),
translate(u'mainWindow', u'Your service has been changed, do you want to save those changes?'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Cancel | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Save),
QtGui.QMessageBox.Save)
#
#
# box = QtGui.QMessageBox()
# box.setWindowTitle(translate(u'mainWindow', u'Question?'))
# box.setText(translate(u'mainWindow', u'Save changes to Order of Service?'))
# box.setIcon(QtGui.QMessageBox.Question)
# box.setStandardButtons(QtGui.QMessageBox.Save | QtGui.QMessageBox.Discard | QtGui.QMessageBox.Cancel);
# box.setDefaultButton(QtGui.QMessageBox.Save);
# ret = box.exec_()
if ret == QtGui.QMessageBox.Save:
self.ServiceManagerContents.onSaveService()
self.mainDisplay.close()

View File

@ -24,7 +24,6 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab
from openlp.core.resources import *
from openlp.core.ui import GeneralTab, ThemesTab, AlertsTab
from settingsdialog import Ui_SettingsDialog
log = logging.getLogger(u'SettingsForm')
@ -49,6 +48,6 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
self.SettingsTabWidget.addTab(tab, tab.title())
def accept(self):
for tab_index in range(0, self.SettingsTabWidget.count()):
for tab_index in range(0, self.SettingsTabWidget.count()):
self.SettingsTabWidget.widget(tab_index).save()
return QtGui.QDialog.accept(self)
return QtGui.QDialog.accept(self)

View File

@ -1,151 +1,111 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
"""
OpenLP - Open Source Lyrics Projection
Copyright (c) 2008 Raoul Snyman
Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley,
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; version 2 of the License.
# Form implementation generated from reading ui file '/home/raoul/Projects/openlp/songmaintenance/resources/forms/editsongdialog.ui'
#
# Created: Mon Jul 27 22:18:20 2009
# by: PyQt4 UI code generator 4.4.4
#
# WARNING! All changes made in this file will be lost!
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""
from openlp.core.lib import translate
from PyQt4 import QtCore, QtGui
class Ui_EditSongDialog(object):
def setupUi(self, EditSongDialog):
EditSongDialog.setObjectName(u'EditSongDialog')
EditSongDialog.resize(786, 704)
EditSongDialog.setObjectName("EditSongDialog")
EditSongDialog.resize(645, 417)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
EditSongDialog.setWindowIcon(icon)
EditSongDialog.setModal(True)
self.EditSongLayout = QtGui.QVBoxLayout(EditSongDialog)
self.EditSongLayout.setSpacing(8)
self.EditSongLayout.setMargin(8)
self.EditSongLayout.setObjectName(u'EditSongLayout')
self.TopWidget = QtGui.QWidget(EditSongDialog)
self.TopWidget.setObjectName(u'TopWidget')
self.TopLayout = QtGui.QHBoxLayout(self.TopWidget)
self.TopLayout.setSpacing(8)
self.TopLayout.setMargin(0)
self.TopLayout.setObjectName(u'TopLayout')
self.TextWidget = QtGui.QWidget(self.TopWidget)
self.TextWidget.setObjectName(u'TextWidget')
self.DetailsLayout = QtGui.QVBoxLayout(self.TextWidget)
self.DetailsLayout.setSpacing(8)
self.DetailsLayout.setMargin(0)
self.DetailsLayout.setObjectName(u'DetailsLayout')
self.TitleLabel = QtGui.QLabel(self.TextWidget)
self.TitleLabel.setObjectName(u'TitleLabel')
self.DetailsLayout.addWidget(self.TitleLabel)
self.TitleEditItem = QtGui.QLineEdit(self.TextWidget)
self.verticalLayout = QtGui.QVBoxLayout(EditSongDialog)
self.verticalLayout.setMargin(8)
self.verticalLayout.setObjectName("verticalLayout")
self.SongTabWidget = QtGui.QTabWidget(EditSongDialog)
self.SongTabWidget.setObjectName("SongTabWidget")
self.LyricsTab = QtGui.QWidget()
self.LyricsTab.setObjectName("LyricsTab")
self.LyricsTabLayout = QtGui.QGridLayout(self.LyricsTab)
self.LyricsTabLayout.setMargin(8)
self.LyricsTabLayout.setSpacing(8)
self.LyricsTabLayout.setObjectName("LyricsTabLayout")
self.TitleLabel = QtGui.QLabel(self.LyricsTab)
self.TitleLabel.setObjectName("TitleLabel")
self.LyricsTabLayout.addWidget(self.TitleLabel, 0, 0, 1, 1)
self.TitleEditItem = QtGui.QLineEdit(self.LyricsTab)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TitleEditItem.sizePolicy().hasHeightForWidth())
self.TitleEditItem.setSizePolicy(sizePolicy)
self.TitleEditItem.setObjectName(u'TitleEditItem')
self.DetailsLayout.addWidget(self.TitleEditItem)
self.AlternativeTitleLabel = QtGui.QLabel(self.TextWidget)
self.AlternativeTitleLabel.setObjectName(u'AlternativeTitleLabel')
self.DetailsLayout.addWidget(self.AlternativeTitleLabel)
self.AlternativeEdit = QtGui.QLineEdit(self.TextWidget)
self.AlternativeEdit.setObjectName(u'AlternativeEdit')
self.DetailsLayout.addWidget(self.AlternativeEdit)
self.LyricsLabel = QtGui.QLabel(self.TextWidget)
self.LyricsLabel.setObjectName(u'LyricsLabel')
self.DetailsLayout.addWidget(self.LyricsLabel)
self.VerseEditWidget = QtGui.QWidget(self.TextWidget)
self.VerseEditWidget.setObjectName(u'VerseEditWidget')
self.VerseEditLayout = QtGui.QVBoxLayout(self.VerseEditWidget)
self.VerseEditLayout.setSpacing(8)
self.VerseEditLayout.setMargin(0)
self.VerseEditLayout.setObjectName(u'VerseEditLayout')
self.VerseListWidget = QtGui.QListWidget(self.VerseEditWidget)
self.VerseListWidget.setObjectName(u'VerseListWidget')
self.TitleEditItem.setObjectName("TitleEditItem")
self.LyricsTabLayout.addWidget(self.TitleEditItem, 0, 1, 1, 2)
self.AlternativeTitleLabel = QtGui.QLabel(self.LyricsTab)
self.AlternativeTitleLabel.setObjectName("AlternativeTitleLabel")
self.LyricsTabLayout.addWidget(self.AlternativeTitleLabel, 1, 0, 1, 1)
self.AlternativeEdit = QtGui.QLineEdit(self.LyricsTab)
self.AlternativeEdit.setObjectName("AlternativeEdit")
self.LyricsTabLayout.addWidget(self.AlternativeEdit, 1, 1, 1, 2)
self.LyricsLabel = QtGui.QLabel(self.LyricsTab)
self.LyricsLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.LyricsLabel.setObjectName("LyricsLabel")
self.LyricsTabLayout.addWidget(self.LyricsLabel, 2, 0, 1, 1)
self.VerseListWidget = QtGui.QListWidget(self.LyricsTab)
self.VerseListWidget.setSpacing(2)
self.VerseListWidget.setAlternatingRowColors(True)
self.VerseEditLayout.addWidget(self.VerseListWidget)
self.VerseButtonWidget = QtGui.QWidget(self.VerseEditWidget)
self.VerseButtonWidget.setObjectName(u'VerseButtonWidget')
self.VerseButtonLayout = QtGui.QHBoxLayout(self.VerseButtonWidget)
self.VerseButtonLayout.setSpacing(8)
self.VerseButtonLayout.setMargin(0)
self.VerseButtonLayout.setObjectName(u'VerseButtonLayout')
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.VerseButtonLayout.addItem(spacerItem)
self.AddButton = QtGui.QPushButton(self.VerseButtonWidget)
self.AddButton.setObjectName(u'AddButton')
self.VerseButtonLayout.addWidget(self.AddButton)
self.EditButton = QtGui.QPushButton(self.VerseButtonWidget)
self.EditButton.setObjectName(u'EditButton')
self.VerseButtonLayout.addWidget(self.EditButton)
self.DeleteButton = QtGui.QPushButton(self.VerseButtonWidget)
self.DeleteButton.setObjectName(u'DeleteButton')
self.VerseButtonLayout.addWidget(self.DeleteButton)
self.VerseEditLayout.addWidget(self.VerseButtonWidget)
self.DetailsLayout.addWidget(self.VerseEditWidget)
self.VerseOrderLabel = QtGui.QLabel(self.TextWidget)
self.VerseOrderLabel.setObjectName(u'VerseOrderLabel')
self.DetailsLayout.addWidget(self.VerseOrderLabel)
self.VerseOrderEdit = QtGui.QLineEdit(self.TextWidget)
self.VerseOrderEdit.setObjectName(u'VerseOrderEdit')
self.DetailsLayout.addWidget(self.VerseOrderEdit)
self.CommentsLabel = QtGui.QLabel(self.TextWidget)
self.CommentsLabel.setObjectName(u'CommentsLabel')
self.DetailsLayout.addWidget(self.CommentsLabel)
self.CommentsEdit = QtGui.QTextEdit(self.TextWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CommentsEdit.sizePolicy().hasHeightForWidth())
self.CommentsEdit.setSizePolicy(sizePolicy)
self.CommentsEdit.setMaximumSize(QtCore.QSize(16777215, 84))
self.CommentsEdit.setObjectName(u'CommentsEdit')
self.DetailsLayout.addWidget(self.CommentsEdit)
self.ThemeGroupBox = QtGui.QGroupBox(self.TextWidget)
self.ThemeGroupBox.setObjectName(u'ThemeGroupBox')
self.ThemeLayout = QtGui.QHBoxLayout(self.ThemeGroupBox)
self.ThemeLayout.setSpacing(8)
self.ThemeLayout.setMargin(8)
self.ThemeLayout.setObjectName(u'ThemeLayout')
self.ThemeSelectionComboItem = QtGui.QComboBox(self.ThemeGroupBox)
self.ThemeSelectionComboItem.setObjectName(u'ThemeSelectionComboItem')
self.ThemeLayout.addWidget(self.ThemeSelectionComboItem)
self.DetailsLayout.addWidget(self.ThemeGroupBox)
self.TopLayout.addWidget(self.TextWidget)
self.AdditionalWidget = QtGui.QWidget(self.TopWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AdditionalWidget.sizePolicy().hasHeightForWidth())
self.AdditionalWidget.setSizePolicy(sizePolicy)
self.AdditionalWidget.setMinimumSize(QtCore.QSize(100, 0))
self.AdditionalWidget.setObjectName(u'AdditionalWidget')
self.AdditionalLayout = QtGui.QVBoxLayout(self.AdditionalWidget)
self.AdditionalLayout.setSpacing(8)
self.AdditionalLayout.setMargin(0)
self.AdditionalLayout.setObjectName(u'AdditionalLayout')
self.AuthorsGroupBox = QtGui.QGroupBox(self.AdditionalWidget)
self.AuthorsGroupBox.setObjectName(u'AuthorsGroupBox')
self.VerseListWidget.setObjectName("VerseListWidget")
self.LyricsTabLayout.addWidget(self.VerseListWidget, 2, 1, 1, 1)
self.VerseOrderLabel = QtGui.QLabel(self.LyricsTab)
self.VerseOrderLabel.setObjectName("VerseOrderLabel")
self.LyricsTabLayout.addWidget(self.VerseOrderLabel, 4, 0, 1, 1)
self.VerseOrderEdit = QtGui.QLineEdit(self.LyricsTab)
self.VerseOrderEdit.setObjectName("VerseOrderEdit")
self.LyricsTabLayout.addWidget(self.VerseOrderEdit, 4, 1, 1, 2)
self.VerseButtonWidget = QtGui.QWidget(self.LyricsTab)
self.VerseButtonWidget.setObjectName("VerseButtonWidget")
self.VerseButtonsLayout = QtGui.QVBoxLayout(self.VerseButtonWidget)
self.VerseButtonsLayout.setSpacing(8)
self.VerseButtonsLayout.setMargin(0)
self.VerseButtonsLayout.setObjectName("VerseButtonsLayout")
self.VerseAddButton = QtGui.QPushButton(self.VerseButtonWidget)
self.VerseAddButton.setObjectName("VerseAddButton")
self.VerseButtonsLayout.addWidget(self.VerseAddButton)
self.VerseEditButton = QtGui.QPushButton(self.VerseButtonWidget)
self.VerseEditButton.setObjectName("VerseEditButton")
self.VerseButtonsLayout.addWidget(self.VerseEditButton)
self.VerseEditAllButton = QtGui.QPushButton(self.VerseButtonWidget)
self.VerseEditAllButton.setObjectName("VerseEditAllButton")
self.VerseButtonsLayout.addWidget(self.VerseEditAllButton)
self.VerseDeleteButton = QtGui.QPushButton(self.VerseButtonWidget)
self.VerseDeleteButton.setObjectName("VerseDeleteButton")
self.VerseButtonsLayout.addWidget(self.VerseDeleteButton)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.VerseButtonsLayout.addItem(spacerItem)
self.LyricsTabLayout.addWidget(self.VerseButtonWidget, 2, 2, 1, 1)
self.SongTabWidget.addTab(self.LyricsTab, "")
self.AuthorsTab = QtGui.QWidget()
self.AuthorsTab.setObjectName("AuthorsTab")
self.AuthorsTabLayout = QtGui.QHBoxLayout(self.AuthorsTab)
self.AuthorsTabLayout.setSpacing(8)
self.AuthorsTabLayout.setMargin(8)
self.AuthorsTabLayout.setObjectName("AuthorsTabLayout")
self.AuthorsMaintenanceWidget = QtGui.QWidget(self.AuthorsTab)
self.AuthorsMaintenanceWidget.setObjectName("AuthorsMaintenanceWidget")
self.AuthorsMaintenanceLayout = QtGui.QVBoxLayout(self.AuthorsMaintenanceWidget)
self.AuthorsMaintenanceLayout.setSpacing(8)
self.AuthorsMaintenanceLayout.setMargin(0)
self.AuthorsMaintenanceLayout.setObjectName("AuthorsMaintenanceLayout")
self.AuthorsGroupBox = QtGui.QGroupBox(self.AuthorsMaintenanceWidget)
self.AuthorsGroupBox.setObjectName("AuthorsGroupBox")
self.AuthorsLayout = QtGui.QVBoxLayout(self.AuthorsGroupBox)
self.AuthorsLayout.setSpacing(8)
self.AuthorsLayout.setMargin(8)
self.AuthorsLayout.setObjectName(u'AuthorsLayout')
self.AuthorsLayout.setObjectName("AuthorsLayout")
self.AuthorAddWidget = QtGui.QWidget(self.AuthorsGroupBox)
self.AuthorAddWidget.setObjectName(u'AuthorAddWidget')
self.AddAuthorLayout = QtGui.QHBoxLayout(self.AuthorAddWidget)
self.AddAuthorLayout.setSpacing(8)
self.AddAuthorLayout.setMargin(0)
self.AddAuthorLayout.setObjectName(u'AddAuthorLayout')
self.AuthorAddWidget.setObjectName("AuthorAddWidget")
self.AuthorAddLayout = QtGui.QHBoxLayout(self.AuthorAddWidget)
self.AuthorAddLayout.setSpacing(8)
self.AuthorAddLayout.setMargin(0)
self.AuthorAddLayout.setObjectName("AuthorAddLayout")
self.AuthorsSelectionComboItem = QtGui.QComboBox(self.AuthorAddWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@ -156,194 +116,283 @@ class Ui_EditSongDialog(object):
self.AuthorsSelectionComboItem.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
self.AuthorsSelectionComboItem.setMinimumContentsLength(8)
self.AuthorsSelectionComboItem.setObjectName(u'AuthorsSelectionComboItem')
self.AddAuthorLayout.addWidget(self.AuthorsSelectionComboItem)
self.AuthorAddtoSongItem = QtGui.QPushButton(self.AuthorAddWidget)
self.AuthorAddtoSongItem.setMaximumSize(QtCore.QSize(110, 16777215))
self.AuthorAddtoSongItem.setObjectName(u'AuthorAddtoSongItem')
self.AddAuthorLayout.addWidget(self.AuthorAddtoSongItem)
self.AuthorsSelectionComboItem.setObjectName("AuthorsSelectionComboItem")
self.AuthorAddLayout.addWidget(self.AuthorsSelectionComboItem)
self.AuthorAddButton = QtGui.QPushButton(self.AuthorAddWidget)
self.AuthorAddButton.setMaximumSize(QtCore.QSize(110, 16777215))
self.AuthorAddButton.setObjectName("AuthorAddButton")
self.AuthorAddLayout.addWidget(self.AuthorAddButton)
self.AuthorsLayout.addWidget(self.AuthorAddWidget)
self.AuthorsListView = QtGui.QListWidget(self.AuthorsGroupBox)
self.AuthorsListView.setAlternatingRowColors(True)
self.AuthorsListView.setObjectName(u'AuthorsListView')
self.AuthorsListView.setObjectName("AuthorsListView")
self.AuthorsLayout.addWidget(self.AuthorsListView)
self.AuthorRemoveWidget = QtGui.QWidget(self.AuthorsGroupBox)
self.AuthorRemoveWidget.setObjectName(u'AuthorRemoveWidget')
self.AuthorRemoveWidget.setObjectName("AuthorRemoveWidget")
self.AuthorRemoveLayout = QtGui.QHBoxLayout(self.AuthorRemoveWidget)
self.AuthorRemoveLayout.setSpacing(8)
self.AuthorRemoveLayout.setMargin(0)
self.AuthorRemoveLayout.setObjectName(u'AuthorRemoveLayout')
self.AuthorRemoveLayout.setObjectName("AuthorRemoveLayout")
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.AuthorRemoveLayout.addItem(spacerItem1)
self.AuthorRemoveItem = QtGui.QPushButton(self.AuthorRemoveWidget)
self.AuthorRemoveItem.setObjectName(u'AuthorRemoveItem')
self.AuthorRemoveLayout.addWidget(self.AuthorRemoveItem)
# self.AddAuthorsButton = QtGui.QPushButton(self.AuthorRemoveWidget)
# self.AddAuthorsButton.setObjectName(u'AddAuthorsButton')
# self.AuthorRemoveLayout.addWidget(self.AddAuthorsButton)
self.AuthorRemoveButton = QtGui.QPushButton(self.AuthorRemoveWidget)
self.AuthorRemoveButton.setObjectName("AuthorRemoveButton")
self.AuthorRemoveLayout.addWidget(self.AuthorRemoveButton)
self.AuthorsLayout.addWidget(self.AuthorRemoveWidget)
self.AdditionalLayout.addWidget(self.AuthorsGroupBox)
self.SongBookGroup = QtGui.QGroupBox(self.AdditionalWidget)
self.SongBookGroup.setObjectName(u'SongBookGroup')
self.SongbookLayout = QtGui.QGridLayout(self.SongBookGroup)
self.SongbookLayout.setMargin(8)
self.SongbookLayout.setSpacing(8)
self.SongbookLayout.setObjectName(u'SongbookLayout')
self.SongbookCombo = QtGui.QComboBox(self.SongBookGroup)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SongbookCombo.sizePolicy().hasHeightForWidth())
self.SongbookCombo.setSizePolicy(sizePolicy)
self.SongbookCombo.setObjectName(u'SongbookCombo')
self.SongbookLayout.addWidget(self.SongbookCombo, 0, 0, 1, 1)
# self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
# sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
# sizePolicy.setHorizontalStretch(0)
# sizePolicy.setVerticalStretch(0)
# sizePolicy.setHeightForWidth(self.AddSongBookButton.sizePolicy().hasHeightForWidth())
# self.AddSongBookButton.setSizePolicy(sizePolicy)
# self.AddSongBookButton.setObjectName(u'AddSongBookButton')
# self.SongbookLayout.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
self.AdditionalLayout.addWidget(self.SongBookGroup)
self.TopicGroupBox = QtGui.QGroupBox(self.AdditionalWidget)
self.AuthorsMaintenanceLayout.addWidget(self.AuthorsGroupBox)
self.MaintenanceWidget = QtGui.QWidget(self.AuthorsMaintenanceWidget)
self.MaintenanceWidget.setObjectName("MaintenanceWidget")
self.MaintenanceLayout = QtGui.QHBoxLayout(self.MaintenanceWidget)
self.MaintenanceLayout.setSpacing(0)
self.MaintenanceLayout.setMargin(0)
self.MaintenanceLayout.setObjectName("MaintenanceLayout")
self.MaintenanceButton = QtGui.QPushButton(self.MaintenanceWidget)
self.MaintenanceButton.setObjectName("MaintenanceButton")
self.MaintenanceLayout.addWidget(self.MaintenanceButton)
spacerItem2 = QtGui.QSpacerItem(66, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.MaintenanceLayout.addItem(spacerItem2)
self.AuthorsMaintenanceLayout.addWidget(self.MaintenanceWidget)
self.AuthorsTabLayout.addWidget(self.AuthorsMaintenanceWidget)
self.TopicBookWidget = QtGui.QWidget(self.AuthorsTab)
self.TopicBookWidget.setObjectName("TopicBookWidget")
self.TopicBookLayout = QtGui.QVBoxLayout(self.TopicBookWidget)
self.TopicBookLayout.setSpacing(8)
self.TopicBookLayout.setMargin(0)
self.TopicBookLayout.setObjectName("TopicBookLayout")
self.TopicGroupBox = QtGui.QGroupBox(self.TopicBookWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TopicGroupBox.sizePolicy().hasHeightForWidth())
self.TopicGroupBox.setSizePolicy(sizePolicy)
self.TopicGroupBox.setObjectName(u'TopicGroupBox')
self.TopicGroupBox.setObjectName("TopicGroupBox")
self.TopicLayout = QtGui.QVBoxLayout(self.TopicGroupBox)
self.TopicLayout.setSpacing(8)
self.TopicLayout.setMargin(8)
self.TopicLayout.setObjectName(u'TopicLayout')
self.TopicLayout.setObjectName("TopicLayout")
self.TopicAddWidget = QtGui.QWidget(self.TopicGroupBox)
self.TopicAddWidget.setObjectName(u'TopicAddWidget')
self.TopicAddWidget.setObjectName("TopicAddWidget")
self.TopicAddLayout = QtGui.QHBoxLayout(self.TopicAddWidget)
self.TopicAddLayout.setSpacing(8)
self.TopicAddLayout.setMargin(0)
self.TopicAddLayout.setObjectName(u'TopicAddLayout')
self.TopicAddLayout.setObjectName("TopicAddLayout")
self.SongTopicCombo = QtGui.QComboBox(self.TopicAddWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SongTopicCombo.sizePolicy().hasHeightForWidth())
self.SongTopicCombo.setSizePolicy(sizePolicy)
self.SongTopicCombo.setObjectName(u'SongTopicCombo')
self.SongTopicCombo.setObjectName("SongTopicCombo")
self.TopicAddLayout.addWidget(self.SongTopicCombo)
self.AddTopicsToSongButton = QtGui.QPushButton(self.TopicAddWidget)
self.TopicAddButton = QtGui.QPushButton(self.TopicAddWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AddTopicsToSongButton.sizePolicy().hasHeightForWidth())
self.AddTopicsToSongButton.setSizePolicy(sizePolicy)
self.AddTopicsToSongButton.setObjectName(u'AddTopicsToSongButton')
self.TopicAddLayout.addWidget(self.AddTopicsToSongButton)
sizePolicy.setHeightForWidth(self.TopicAddButton.sizePolicy().hasHeightForWidth())
self.TopicAddButton.setSizePolicy(sizePolicy)
self.TopicAddButton.setObjectName("TopicAddButton")
self.TopicAddLayout.addWidget(self.TopicAddButton)
self.TopicLayout.addWidget(self.TopicAddWidget)
self.TopicsListView = QtGui.QListWidget(self.TopicGroupBox)
self.TopicsListView.setAlternatingRowColors(True)
self.TopicsListView.setObjectName(u'TopicsListView')
self.TopicsListView.setObjectName("TopicsListView")
self.TopicLayout.addWidget(self.TopicsListView)
self.TopicRemoveWidget = QtGui.QWidget(self.TopicGroupBox)
self.TopicRemoveWidget.setObjectName(u'TopicRemoveWidget')
self.TopicRemoveWidget.setObjectName("TopicRemoveWidget")
self.TopicRemoveLayout = QtGui.QHBoxLayout(self.TopicRemoveWidget)
self.TopicRemoveLayout.setSpacing(8)
self.TopicRemoveLayout.setMargin(0)
self.TopicRemoveLayout.setObjectName(u'TopicRemoveLayout')
spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicRemoveLayout.addItem(spacerItem2)
self.TopicRemoveItem = QtGui.QPushButton(self.TopicRemoveWidget)
self.TopicRemoveItem.setObjectName(u'TopicRemoveItem')
self.TopicRemoveLayout.addWidget(self.TopicRemoveItem)
# self.AddTopicButton = QtGui.QPushButton(self.TopicRemoveWidget)
# self.AddTopicButton.setObjectName(u'AddTopicButton')
# self.TopicRemoveLayout.addWidget(self.AddTopicButton)
self.TopicRemoveLayout.setObjectName("TopicRemoveLayout")
spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicRemoveLayout.addItem(spacerItem3)
self.TopicRemoveButton = QtGui.QPushButton(self.TopicRemoveWidget)
self.TopicRemoveButton.setObjectName("TopicRemoveButton")
self.TopicRemoveLayout.addWidget(self.TopicRemoveButton)
self.TopicLayout.addWidget(self.TopicRemoveWidget)
self.AdditionalLayout.addWidget(self.TopicGroupBox)
self.CopyrightgroupBox = QtGui.QGroupBox(self.AdditionalWidget)
self.CopyrightgroupBox.setObjectName(u'CopyrightgroupBox')
self.CopyrightLayout = QtGui.QVBoxLayout(self.CopyrightgroupBox)
self.TopicBookLayout.addWidget(self.TopicGroupBox)
self.SongBookGroup = QtGui.QGroupBox(self.TopicBookWidget)
self.SongBookGroup.setObjectName("SongBookGroup")
self.SongbookLayout = QtGui.QGridLayout(self.SongBookGroup)
self.SongbookLayout.setMargin(8)
self.SongbookLayout.setSpacing(8)
self.SongbookLayout.setObjectName("SongbookLayout")
self.SongbookCombo = QtGui.QComboBox(self.SongBookGroup)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SongbookCombo.sizePolicy().hasHeightForWidth())
self.SongbookCombo.setSizePolicy(sizePolicy)
self.SongbookCombo.setObjectName("SongbookCombo")
self.SongbookLayout.addWidget(self.SongbookCombo, 0, 0, 1, 1)
self.TopicBookLayout.addWidget(self.SongBookGroup)
self.AuthorsTabLayout.addWidget(self.TopicBookWidget)
self.SongTabWidget.addTab(self.AuthorsTab, "")
self.ThemeTab = QtGui.QWidget()
self.ThemeTab.setObjectName("ThemeTab")
self.ThemeTabLayout = QtGui.QVBoxLayout(self.ThemeTab)
self.ThemeTabLayout.setSpacing(8)
self.ThemeTabLayout.setMargin(8)
self.ThemeTabLayout.setObjectName("ThemeTabLayout")
self.ThemeCopyCommentsWidget = QtGui.QWidget(self.ThemeTab)
self.ThemeCopyCommentsWidget.setObjectName("ThemeCopyCommentsWidget")
self.ThemeCopyCommentsLayout = QtGui.QHBoxLayout(self.ThemeCopyCommentsWidget)
self.ThemeCopyCommentsLayout.setSpacing(8)
self.ThemeCopyCommentsLayout.setMargin(0)
self.ThemeCopyCommentsLayout.setObjectName("ThemeCopyCommentsLayout")
self.TextWidget = QtGui.QWidget(self.ThemeCopyCommentsWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TextWidget.sizePolicy().hasHeightForWidth())
self.TextWidget.setSizePolicy(sizePolicy)
self.TextWidget.setObjectName("TextWidget")
self.DetailsLayout = QtGui.QVBoxLayout(self.TextWidget)
self.DetailsLayout.setSpacing(8)
self.DetailsLayout.setMargin(0)
self.DetailsLayout.setObjectName("DetailsLayout")
self.ThemeGroupBox = QtGui.QGroupBox(self.TextWidget)
self.ThemeGroupBox.setObjectName("ThemeGroupBox")
self.ThemeLayout = QtGui.QHBoxLayout(self.ThemeGroupBox)
self.ThemeLayout.setSpacing(8)
self.ThemeLayout.setMargin(8)
self.ThemeLayout.setObjectName("ThemeLayout")
self.ThemeSelectionComboItem = QtGui.QComboBox(self.ThemeGroupBox)
self.ThemeSelectionComboItem.setObjectName("ThemeSelectionComboItem")
self.ThemeLayout.addWidget(self.ThemeSelectionComboItem)
self.ThemeAddButton = QtGui.QPushButton(self.ThemeGroupBox)
self.ThemeAddButton.setMaximumSize(QtCore.QSize(110, 16777215))
self.ThemeAddButton.setObjectName("ThemeAddButton")
self.ThemeLayout.addWidget(self.ThemeAddButton)
self.DetailsLayout.addWidget(self.ThemeGroupBox)
self.CopyrightGroupBox = QtGui.QGroupBox(self.TextWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CopyrightGroupBox.sizePolicy().hasHeightForWidth())
self.CopyrightGroupBox.setSizePolicy(sizePolicy)
self.CopyrightGroupBox.setObjectName("CopyrightGroupBox")
self.CopyrightLayout = QtGui.QVBoxLayout(self.CopyrightGroupBox)
self.CopyrightLayout.setSpacing(8)
self.CopyrightLayout.setMargin(8)
self.CopyrightLayout.setObjectName(u'CopyrightLayout')
self.CopyrightWidget = QtGui.QWidget(self.CopyrightgroupBox)
self.CopyrightWidget.setObjectName(u'CopyrightWidget')
self.CopyrightLayout.setObjectName("CopyrightLayout")
self.CopyrightWidget = QtGui.QWidget(self.CopyrightGroupBox)
self.CopyrightWidget.setObjectName("CopyrightWidget")
self.CopyLayout = QtGui.QHBoxLayout(self.CopyrightWidget)
self.CopyLayout.setSpacing(8)
self.CopyLayout.setMargin(0)
self.CopyLayout.setObjectName(u'CopyLayout')
self.CopyLayout.setObjectName("CopyLayout")
self.CopyrightEditItem = QtGui.QLineEdit(self.CopyrightWidget)
self.CopyrightEditItem.setObjectName(u'CopyrightEditItem')
self.CopyrightEditItem.setObjectName("CopyrightEditItem")
self.CopyLayout.addWidget(self.CopyrightEditItem)
self.CopyrightInsertItem = QtGui.QPushButton(self.CopyrightWidget)
self.CopyrightInsertItem.setMaximumSize(QtCore.QSize(29, 16777215))
self.CopyrightInsertItem.setObjectName(u'CopyrightInsertItem')
self.CopyLayout.addWidget(self.CopyrightInsertItem)
self.CopyrightInsertButton = QtGui.QPushButton(self.CopyrightWidget)
self.CopyrightInsertButton.setMaximumSize(QtCore.QSize(29, 16777215))
self.CopyrightInsertButton.setObjectName("CopyrightInsertButton")
self.CopyLayout.addWidget(self.CopyrightInsertButton)
self.CopyrightLayout.addWidget(self.CopyrightWidget)
self.CcliWidget = QtGui.QWidget(self.CopyrightgroupBox)
self.CcliWidget.setObjectName(u'CcliWidget')
self.CcliWidget = QtGui.QWidget(self.CopyrightGroupBox)
self.CcliWidget.setObjectName("CcliWidget")
self.CCLILayout = QtGui.QHBoxLayout(self.CcliWidget)
self.CCLILayout.setSpacing(8)
self.CCLILayout.setMargin(0)
self.CCLILayout.setObjectName(u'CCLILayout')
self.CCLILayout.setObjectName("CCLILayout")
self.CCLILabel = QtGui.QLabel(self.CcliWidget)
self.CCLILabel.setObjectName(u'CCLILabel')
self.CCLILabel.setObjectName("CCLILabel")
self.CCLILayout.addWidget(self.CCLILabel)
self.CCLNumberEdit = QtGui.QLineEdit(self.CcliWidget)
self.CCLNumberEdit.setObjectName(u'CCLNumberEdit')
self.CCLNumberEdit.setObjectName("CCLNumberEdit")
self.CCLILayout.addWidget(self.CCLNumberEdit)
self.CopyrightLayout.addWidget(self.CcliWidget)
self.AdditionalLayout.addWidget(self.CopyrightgroupBox)
self.TopLayout.addWidget(self.AdditionalWidget)
self.EditSongLayout.addWidget(self.TopWidget)
self.DetailsLayout.addWidget(self.CopyrightGroupBox)
spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.DetailsLayout.addItem(spacerItem4)
self.ThemeCopyCommentsLayout.addWidget(self.TextWidget)
self.CommentsGroupBox = QtGui.QGroupBox(self.ThemeCopyCommentsWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CommentsGroupBox.sizePolicy().hasHeightForWidth())
self.CommentsGroupBox.setSizePolicy(sizePolicy)
self.CommentsGroupBox.setObjectName("CommentsGroupBox")
self.CommentsLayout = QtGui.QVBoxLayout(self.CommentsGroupBox)
self.CommentsLayout.setSpacing(0)
self.CommentsLayout.setMargin(8)
self.CommentsLayout.setObjectName("CommentsLayout")
self.CommentsEdit = QtGui.QTextEdit(self.CommentsGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CommentsEdit.sizePolicy().hasHeightForWidth())
self.CommentsEdit.setSizePolicy(sizePolicy)
self.CommentsEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.CommentsEdit.setObjectName("CommentsEdit")
self.CommentsLayout.addWidget(self.CommentsEdit)
self.ThemeCopyCommentsLayout.addWidget(self.CommentsGroupBox)
self.ThemeTabLayout.addWidget(self.ThemeCopyCommentsWidget)
spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.ThemeTabLayout.addItem(spacerItem5)
self.SongTabWidget.addTab(self.ThemeTab, "")
self.verticalLayout.addWidget(self.SongTabWidget)
self.ButtonBox = QtGui.QDialogButtonBox(EditSongDialog)
self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
self.ButtonBox.setObjectName(u'ButtonBox')
self.EditSongLayout.addWidget(self.ButtonBox)
self.ButtonBox.setObjectName("ButtonBox")
self.verticalLayout.addWidget(self.ButtonBox)
self.retranslateUi(EditSongDialog)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'rejected()'), EditSongDialog.close)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'accepted()'), self.onAccept)
self.SongTabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("rejected()"), EditSongDialog.close)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("accepted()"), EditSongDialog.close)
QtCore.QMetaObject.connectSlotsByName(EditSongDialog)
EditSongDialog.setTabOrder(self.SongTabWidget, self.TitleEditItem)
EditSongDialog.setTabOrder(self.TitleEditItem, self.AlternativeEdit)
EditSongDialog.setTabOrder(self.AlternativeEdit, self.VerseOrderEdit)
EditSongDialog.setTabOrder(self.VerseOrderEdit, self.CommentsEdit)
EditSongDialog.setTabOrder(self.CommentsEdit, self.ThemeSelectionComboItem)
EditSongDialog.setTabOrder(self.ThemeSelectionComboItem, self.AuthorAddtoSongItem)
EditSongDialog.setTabOrder(self.AuthorAddtoSongItem, self.AuthorsListView)
EditSongDialog.setTabOrder(self.AuthorsListView, self.AuthorRemoveItem)
EditSongDialog.setTabOrder(self.AuthorRemoveItem, self.SongbookCombo)
#EditSongDialog.setTabOrder(self.SongbookCombo, self.AddSongBookButton)
#EditSongDialog.setTabOrder(self.AddSongBookButton, self.SongTopicCombo)
EditSongDialog.setTabOrder(self.SongbookCombo, self.SongTopicCombo)
EditSongDialog.setTabOrder(self.SongTopicCombo, self.TopicsListView)
EditSongDialog.setTabOrder(self.TopicsListView, self.TopicRemoveItem)
EditSongDialog.setTabOrder(self.TopicRemoveItem, self.CopyrightEditItem)
EditSongDialog.setTabOrder(self.CopyrightEditItem, self.CopyrightInsertItem)
EditSongDialog.setTabOrder(self.CopyrightInsertItem, self.CCLNumberEdit)
EditSongDialog.setTabOrder(self.CCLNumberEdit, self.ButtonBox)
EditSongDialog.setTabOrder(self.AlternativeEdit, self.VerseListWidget)
EditSongDialog.setTabOrder(self.VerseListWidget, self.VerseAddButton)
EditSongDialog.setTabOrder(self.VerseAddButton, self.VerseEditButton)
EditSongDialog.setTabOrder(self.VerseEditButton, self.VerseEditAllButton)
EditSongDialog.setTabOrder(self.VerseEditAllButton, self.VerseDeleteButton)
EditSongDialog.setTabOrder(self.VerseDeleteButton, self.VerseOrderEdit)
EditSongDialog.setTabOrder(self.VerseOrderEdit, self.AuthorsSelectionComboItem)
EditSongDialog.setTabOrder(self.AuthorsSelectionComboItem, self.AuthorAddButton)
EditSongDialog.setTabOrder(self.AuthorAddButton, self.AuthorsListView)
EditSongDialog.setTabOrder(self.AuthorsListView, self.AuthorRemoveButton)
EditSongDialog.setTabOrder(self.AuthorRemoveButton, self.MaintenanceButton)
EditSongDialog.setTabOrder(self.MaintenanceButton, self.SongTopicCombo)
EditSongDialog.setTabOrder(self.SongTopicCombo, self.TopicAddButton)
EditSongDialog.setTabOrder(self.TopicAddButton, self.TopicsListView)
EditSongDialog.setTabOrder(self.TopicsListView, self.TopicRemoveButton)
EditSongDialog.setTabOrder(self.TopicRemoveButton, self.SongbookCombo)
EditSongDialog.setTabOrder(self.SongbookCombo, self.ThemeSelectionComboItem)
EditSongDialog.setTabOrder(self.ThemeSelectionComboItem, self.ThemeAddButton)
EditSongDialog.setTabOrder(self.ThemeAddButton, self.CopyrightEditItem)
EditSongDialog.setTabOrder(self.CopyrightEditItem, self.CopyrightInsertButton)
EditSongDialog.setTabOrder(self.CopyrightInsertButton, self.CCLNumberEdit)
EditSongDialog.setTabOrder(self.CCLNumberEdit, self.CommentsEdit)
EditSongDialog.setTabOrder(self.CommentsEdit, self.ButtonBox)
def retranslateUi(self, EditSongDialog):
EditSongDialog.setWindowTitle(translate(u'EditSongDialog', u'Song Editor'))
self.TitleLabel.setText(translate(u'EditSongDialog', u'Title:'))
self.AlternativeTitleLabel.setText(translate(u'EditSongDialog', u'Alternative Title:'))
self.LyricsLabel.setText(translate(u'EditSongDialog', u'Lyrics:'))
self.AddButton.setText(translate(u'EditSongDialog', u'Add'))
self.EditButton.setText(translate(u'EditSongDialog', u'Edit'))
self.DeleteButton.setText(translate(u'EditSongDialog', u'Delete'))
self.VerseOrderLabel.setText(translate(u'EditSongDialog', u'Verse Order:'))
self.CommentsLabel.setText(translate(u'EditSongDialog', u'Comments:'))
self.ThemeGroupBox.setTitle(translate(u'EditSongDialog', u'Theme'))
self.AuthorsGroupBox.setTitle(translate(u'EditSongDialog', u'Authors'))
self.AuthorAddtoSongItem.setText(translate(u'EditSongDialog', u'Add to Song'))
self.AuthorRemoveItem.setText(translate(u'EditSongDialog', u'Remove'))
#self.AddAuthorsButton.setText(translate(u'EditSongDialog', u'Manage Authors'))
self.SongBookGroup.setTitle(translate(u'EditSongDialog', u'Song Book'))
#self.AddSongBookButton.setText(translate(u'EditSongDialog', u'Manage Song Books'))
self.TopicGroupBox.setTitle(translate(u'EditSongDialog', u'Topic'))
self.AddTopicsToSongButton.setText(translate(u'EditSongDialog', u'Add to Song'))
self.TopicRemoveItem.setText(translate(u'EditSongDialog', u'Remove'))
#self.AddTopicButton.setText(translate(u'EditSongDialog', u'Manage Topics'))
self.CopyrightgroupBox.setTitle(translate(u'EditSongDialog', u'Copyright Infomaton'))
self.CopyrightInsertItem.setText(translate(u'EditSongDialog', u'(c)'))
self.CCLILabel.setText(translate(u'EditSongDialog', u'CCLI Number:'))
EditSongDialog.setWindowTitle(QtGui.QApplication.translate("EditSongDialog", "Song Editor", None, QtGui.QApplication.UnicodeUTF8))
self.TitleLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Title:", None, QtGui.QApplication.UnicodeUTF8))
self.AlternativeTitleLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Alternative Title:", None, QtGui.QApplication.UnicodeUTF8))
self.LyricsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Lyrics:", None, QtGui.QApplication.UnicodeUTF8))
self.VerseOrderLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Verse Order:", None, QtGui.QApplication.UnicodeUTF8))
self.VerseAddButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
self.VerseEditButton.setText(QtGui.QApplication.translate("EditSongDialog", "Edit", None, QtGui.QApplication.UnicodeUTF8))
self.VerseEditAllButton.setText(QtGui.QApplication.translate("EditSongDialog", "Edit All", None, QtGui.QApplication.UnicodeUTF8))
self.VerseDeleteButton.setText(QtGui.QApplication.translate("EditSongDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8))
self.SongTabWidget.setTabText(self.SongTabWidget.indexOf(self.LyricsTab), QtGui.QApplication.translate("EditSongDialog", "Title && Lyrics", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorsGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Authors", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorAddButton.setText(QtGui.QApplication.translate("EditSongDialog", "&Add to Song", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorRemoveButton.setText(QtGui.QApplication.translate("EditSongDialog", "&Remove", None, QtGui.QApplication.UnicodeUTF8))
self.MaintenanceButton.setText(QtGui.QApplication.translate("EditSongDialog", "&Manage Authors, Topics, Books", None, QtGui.QApplication.UnicodeUTF8))
self.TopicGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Topic", None, QtGui.QApplication.UnicodeUTF8))
self.TopicAddButton.setText(QtGui.QApplication.translate("EditSongDialog", "A&dd to Song", None, QtGui.QApplication.UnicodeUTF8))
self.TopicRemoveButton.setText(QtGui.QApplication.translate("EditSongDialog", "R&emove", None, QtGui.QApplication.UnicodeUTF8))
self.SongBookGroup.setTitle(QtGui.QApplication.translate("EditSongDialog", "Song Book", None, QtGui.QApplication.UnicodeUTF8))
self.SongTabWidget.setTabText(self.SongTabWidget.indexOf(self.AuthorsTab), QtGui.QApplication.translate("EditSongDialog", "Authors, Topics && Book", None, QtGui.QApplication.UnicodeUTF8))
self.ThemeGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Theme", None, QtGui.QApplication.UnicodeUTF8))
self.ThemeAddButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add a Theme", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Copyright Information", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightInsertButton.setText(QtGui.QApplication.translate("EditSongDialog", "©", None, QtGui.QApplication.UnicodeUTF8))
self.CCLILabel.setText(QtGui.QApplication.translate("EditSongDialog", "CCLI Number:", None, QtGui.QApplication.UnicodeUTF8))
self.CommentsGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Comments", None, QtGui.QApplication.UnicodeUTF8))
self.SongTabWidget.setTabText(self.SongTabWidget.indexOf(self.ThemeTab), QtGui.QApplication.translate("EditSongDialog", "Theme, Copyright Info && Comments", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -18,12 +18,13 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""
import logging
from PyQt4 import Qt, QtCore, QtGui
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Event, EventType, EventManager
from openlp.plugins.songs.forms import AuthorsForm, TopicsForm, SongBookForm, \
EditVerseForm
from openlp.plugins.songs.lib.models import Song
from PyQt4 import Qt, QtCore, QtGui
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Event, \
EventType, EventManager
from openlp.plugins.songs.forms import EditVerseForm
from openlp.plugins.songs.lib.models import Song
from editsongdialog import Ui_EditSongDialog
class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
@ -33,44 +34,46 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
global log
log = logging.getLogger(u'EditSongForm')
log.info(u'Song Editor loaded')
def __init__(self, songmanager, eventmanager, parent=None):
def __init__(self, songmanager, eventmanager, parent=None):
"""
Constructor
"""
QtGui.QDialog.__init__(self, parent)
self.setupUi(self)
# Connecting signals and slots
# QtCore.QObject.connect(self.AddAuthorsButton,
# QtCore.SIGNAL(u'clicked()'), self.onAddAuthorsButtonClicked)
QtCore.QObject.connect(self.AuthorAddtoSongItem,
QtCore.SIGNAL(u'clicked()'), self.onAuthorAddtoSongItemClicked)
QtCore.QObject.connect(self.AuthorRemoveItem,
QtCore.SIGNAL(u'clicked()'), self.onAuthorRemovefromSongItemClicked)
QtCore.QObject.connect(self.AuthorAddButton,
QtCore.SIGNAL(u'clicked()'), self.onAuthorAddButtonClicked)
QtCore.QObject.connect(self.AuthorRemoveButton,
QtCore.SIGNAL(u'clicked()'), self.onAuthorRemoveButtonClicked)
QtCore.QObject.connect(self.AuthorsListView,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onAuthorsListViewPressed)
QtCore.QObject.connect(self.AddTopicsToSongButton,
QtCore.SIGNAL(u'clicked()'), self.onTopicAddtoSongItemClicked)
QtCore.QObject.connect(self.TopicRemoveItem,
QtCore.SIGNAL(u'clicked()'), self.onTopicRemovefromSongItemClicked)
QtCore.QObject.connect(self.TopicAddButton,
QtCore.SIGNAL(u'clicked()'), self.onTopicAddButtonClicked)
QtCore.QObject.connect(self.TopicRemoveButton,
QtCore.SIGNAL(u'clicked()'), self.onTopicRemoveButtonClicked)
QtCore.QObject.connect(self.TopicsListView,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onTopicListViewPressed)
QtCore.QObject.connect(self.CopyrightInsertItem,
QtCore.SIGNAL(u'clicked()'), self.onCopyrightInsertItemTriggered)
QtCore.QObject.connect(self.AddButton,
QtCore.SIGNAL(u'clicked()'), self.onAddVerseButtonClicked)
QtCore.QObject.connect(self.EditButton,
QtCore.SIGNAL(u'clicked()'), self.onEditVerseButtonClicked)
QtCore.QObject.connect(self.DeleteButton,
QtCore.SIGNAL(u'clicked()'), self.onDeleteVerseButtonClicked)
QtCore.QObject.connect(self.CopyrightInsertButton,
QtCore.SIGNAL(u'clicked()'), self.onCopyrightInsertButtonTriggered)
QtCore.QObject.connect(self.VerseAddButton,
QtCore.SIGNAL(u'clicked()'), self.onVerseAddButtonClicked)
QtCore.QObject.connect(self.VerseEditButton,
QtCore.SIGNAL(u'clicked()'), self.onVerseEditButtonClicked)
QtCore.QObject.connect(self.VerseDeleteButton,
QtCore.SIGNAL(u'clicked()'), self.onVerseDeleteButtonClicked)
QtCore.QObject.connect(self.VerseListWidget,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onVerseListViewPressed)
QtCore.QObject.connect(self.SongbookCombo,
QtCore.SIGNAL(u'activated(int)'), self.onSongBookComboChanged)
QtCore.QObject.connect(self.ThemeSelectionComboItem,
QtCore.SIGNAL(u'activated(int)'), self.onThemeComboChanged)
QtCore.QObject.connect(self.MaintenanceButton,
QtCore.SIGNAL(u'clicked()'), self.onMaintenanceButtonClicked)
# Create other objects and forms
self.songmanager = songmanager
self.eventmanager = eventmanager
self.parent = parent
self.verse_form = EditVerseForm()
self.initialise()
self.AuthorsListView.setSortingEnabled(False)
@ -79,10 +82,10 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.TopicsListView.setAlternatingRowColors(True)
def initialise(self):
self.EditButton.setEnabled(False)
self.DeleteButton.setEnabled(False)
self.AuthorRemoveItem.setEnabled(False)
self.TopicRemoveItem.setEnabled(False)
self.VerseEditButton.setEnabled(False)
self.VerseDeleteButton.setEnabled(False)
self.AuthorRemoveButton.setEnabled(False)
self.TopicRemoveButton.setEnabled(False)
self.title_change = False
def loadAuthors(self):
@ -177,7 +180,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.CCLNumberEdit.setText(u'')
#lazy xml migration for now
if self.song.lyrics.startswith(u'<?xml version='):
songXML=SongXMLParser(self.song.lyrics)
songXML = SongXMLParser(self.song.lyrics)
verseList = songXML.get_verses()
for verse in verseList:
self.VerseListWidget.addItem(verse[1])
@ -201,7 +204,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.title_change = False
self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason)
def onAuthorAddtoSongItemClicked(self):
def onAuthorAddButtonClicked(self):
item = int(self.AuthorsSelectionComboItem.currentIndex())
if item > -1:
item_id = (self.AuthorsSelectionComboItem.itemData(item)).toInt()[0]
@ -213,9 +216,9 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
def onAuthorsListViewPressed(self):
if self.AuthorsListView.count() > 1:
self.AuthorRemoveItem.setEnabled(True)
self.AuthorRemoveButton.setEnabled(True)
def onAuthorRemovefromSongItemClicked(self):
def onAuthorRemoveButtonClicked(self):
self.AuthorRemoveItem.setEnabled(False)
item = self.AuthorsListView.currentItem()
author_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
@ -224,7 +227,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
row = self.AuthorsListView.row(item)
self.AuthorsListView.takeItem(row)
def onTopicAddtoSongItemClicked(self):
def onTopicAddButtonClicked(self):
item = int(self.SongTopicCombo.currentIndex())
if item > -1:
item_id = (self.SongTopicCombo.itemData(item)).toInt()[0]
@ -235,10 +238,10 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.TopicsListView.addItem(topic_item)
def onTopicListViewPressed(self):
self.TopicRemoveItem.setEnabled(True)
self.TopicRemoveButton.setEnabled(True)
def onTopicRemovefromSongItemClicked(self):
self.TopicRemoveItem.setEnabled(False)
def onTopicRemoveButtonClicked(self):
self.TopicRemoveButton.setEnabled(False)
item = self.TopicsListView.currentItem()
topic_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
topic = self.songmanager.get_topic(topic_id)
@ -262,29 +265,29 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.song.theme_name = them_name
def onVerseListViewPressed(self):
self.EditButton.setEnabled(True)
self.DeleteButton.setEnabled(True)
self.VerseEditButton.setEnabled(True)
self.VerseDeleteButton.setEnabled(True)
def onAddVerseButtonClicked(self):
def onVerseAddButtonClicked(self):
self.verse_form.setVerse(u'')
self.verse_form.exec_()
self.VerseListWidget.addItem(self.verse_form.getVerse())
def onEditVerseButtonClicked(self):
def onVerseEditButtonClicked(self):
item = self.VerseListWidget.currentItem()
if item is not None:
self.verse_form.setVerse(item.text())
self.verse_form.exec_()
item.setText(self.verse_form.getVerse())
self.VerseListWidget.repaint()
self.EditButton.setEnabled(False)
self.DeleteButton.setEnabled(False)
self.VerseEditButton.setEnabled(False)
self.VerseDeleteButton.setEnabled(False)
def onDeleteVerseButtonClicked(self):
def onVerseDeleteButtonClicked(self):
item = self.VerseListWidget.takeItem(self.VerseListWidget.currentRow())
item = None
self.EditButton.setEnabled(False)
self.DeleteButton.setEnabled(False)
self.VerseEditButton.setEnabled(False)
self.VerseDeleteButton.setEnabled(False)
def _validate_song(self):
"""
@ -323,7 +326,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
def on_CCLNumberEdit_lostFocus(self):
self.song.ccli_number = self.CCLNumberEdit.text()
def onCopyrightInsertItemTriggered(self):
def onCopyrightInsertButtonTriggered(self):
text = self.CopyrightEditItem.displayText()
pos = self.CopyrightEditItem.cursorPosition()
text = text[:pos] + u'©' + text[pos:]
@ -331,6 +334,12 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.CopyrightEditItem.setFocus()
self.CopyrightEditItem.setCursorPosition(pos + 1)
def onMaintenanceButtonClicked(self):
self.parent.song_maintenance_form.exec_()
self.loadAuthors()
self.loadBooks()
self.loadTopics()
def onAccept(self):
log.debug(u'OnAccept')
if not self._validate_song():

View File

@ -20,14 +20,14 @@ Place, Suite 330, Boston, MA 02111-1307 USA
import logging
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, translate, ServiceItem, \
SongXMLParser, contextMenuAction, contextMenuSeparator
from openlp.plugins.songs.forms import EditSongForm, AuthorsForm, \
TopicsForm, SongBookForm, SongMaintenanceForm
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm
class SongList(QtGui.QListWidget):
def __init__(self,parent=None,name=None):
def __init__(self, parent=None, name=None):
QtGui.QListWidget.__init__(self,parent)
def mouseMoveEvent(self, event):
@ -59,7 +59,7 @@ class SongMediaItem(MediaManagerItem):
self.PluginTextShort = u'Song'
self.ConfigSection = u'song'
MediaManagerItem.__init__(self, parent, icon, title)
self.edit_song_form = EditSongForm(self.parent.songmanager, self.parent.event_manager)
self.edit_song_form = EditSongForm(self.parent.songmanager, self.parent.event_manager, self)
self.song_maintenance_form = SongMaintenanceForm(self.parent.songmanager, self)
def setupUi(self):

View File

@ -71,15 +71,22 @@ class SongsPlugin(Plugin):
self.ImportSongMenu.setTitle(translate(u'main_window', u'&Song'))
self.ImportOpenSongItem.setText(translate(u'main_window', u'OpenSong'))
self.ImportOpenlp1Item.setText(translate(u'main_window', u'openlp.org 1.0'))
self.ImportOpenlp1Item.setToolTip(translate(u'main_window', u'Export songs in openlp.org 1.0 format'))
self.ImportOpenlp1Item.setStatusTip(translate(u'main_window', u'Export songs in openlp.org 1.0 format'))
self.ImportOpenlp1Item.setToolTip(
translate(u'main_window', u'Export songs in openlp.org 1.0 format'))
self.ImportOpenlp1Item.setStatusTip(
translate(u'main_window', u'Export songs in openlp.org 1.0 format'))
self.ImportOpenlp2Item.setText(translate(u'main_window', u'OpenLP 2.0'))
self.ImportOpenlp2Item.setToolTip(translate(u'main_window', u'Export songs in OpenLP 2.0 format'))
self.ImportOpenlp2Item.setStatusTip(translate(u'main_window', u'Export songs in OpenLP 2.0 format'))
self.ImportOpenlp2Item.setToolTip(
translate(u'main_window', u'Export songs in OpenLP 2.0 format'))
self.ImportOpenlp2Item.setStatusTip(
translate(u'main_window', u'Export songs in OpenLP 2.0 format'))
# Signals and slots
QtCore.QObject.connect(self.ImportOpenlp1Item, QtCore.SIGNAL(u'triggered()'), self.onImportOpenlp1ItemClick)
QtCore.QObject.connect(self.ImportOpenlp2Item, QtCore.SIGNAL(u'triggered()'), self.onImportOpenlp1ItemClick)
QtCore.QObject.connect(self.ImportOpenSongItem, QtCore.SIGNAL(u'triggered()'), self.onImportOpenSongItemClick)
QtCore.QObject.connect(self.ImportOpenlp1Item,
QtCore.SIGNAL(u'triggered()'), self.onImportOpenlp1ItemClick)
QtCore.QObject.connect(self.ImportOpenlp2Item,
QtCore.SIGNAL(u'triggered()'), self.onImportOpenlp1ItemClick)
QtCore.QObject.connect(self.ImportOpenSongItem,
QtCore.SIGNAL(u'triggered()'), self.onImportOpenSongItemClick)
def add_export_menu_item(self, export_menu):
self.ExportSongMenu = QtGui.QMenu(export_menu)
@ -101,8 +108,10 @@ class SongsPlugin(Plugin):
self.ExportOpenlp1Item.setText(translate(u'main_window', u'openlp.org 1.0'))
self.ExportOpenlp2Item.setText(translate(u'main_window', u'OpenLP 2.0'))
# Signals and slots
QtCore.QObject.connect(self.ExportOpenlp1Item, QtCore.SIGNAL(u'triggered()'), self.onExportOpenlp1ItemClicked)
QtCore.QObject.connect(self.ExportOpenSongItem, QtCore.SIGNAL(u'triggered()'), self.onExportOpenSongItemClicked)
QtCore.QObject.connect(self.ExportOpenlp1Item,
QtCore.SIGNAL(u'triggered()'), self.onExportOpenlp1ItemClicked)
QtCore.QObject.connect(self.ExportOpenSongItem,
QtCore.SIGNAL(u'triggered()'), self.onExportOpenSongItemClicked)
def initialise(self):
self.media_item.displayResultsSong(self.songmanager.get_songs())

File diff suppressed because it is too large Load Diff