diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index c2f571c3b..98d85089d 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -23,7 +23,8 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### -from serviceitemform import ServiceItemNoteForm +from servicenoteform import ServiceNoteForm +from serviceitemeditform import ServiceItemEditForm from screen import ScreenList from maindisplay import MainDisplay from amendthemeform import AmendThemeForm diff --git a/openlp/core/ui/serviceitemeditdialog.py b/openlp/core/ui/serviceitemeditdialog.py new file mode 100644 index 000000000..f8d643a94 --- /dev/null +++ b/openlp/core/ui/serviceitemeditdialog.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'serviceitemeditdialog.ui' +# +# Created: Wed Mar 17 20:55:46 2010 +# by: PyQt4 UI code generator 4.7 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_ServiceItemEditDialog(object): + def setupUi(self, ServiceItemEditDialog): + ServiceItemEditDialog.setObjectName("ServiceItemEditDialog") + ServiceItemEditDialog.resize(400, 287) + self.widget = QtGui.QWidget(ServiceItemEditDialog) + self.widget.setGeometry(QtCore.QRect(20, 20, 351, 241)) + self.widget.setObjectName("widget") + self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.horizontalLayout = QtGui.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.listWidget = QtGui.QListWidget(self.widget) + self.listWidget.setAlternatingRowColors(True) + self.listWidget.setObjectName("listWidget") + self.horizontalLayout.addWidget(self.listWidget) + self.verticalLayout = QtGui.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + self.upButton = QtGui.QPushButton(self.widget) + self.upButton.setObjectName("upButton") + self.verticalLayout.addWidget(self.upButton) + self.downButton = QtGui.QPushButton(self.widget) + self.downButton.setObjectName("downButton") + self.verticalLayout.addWidget(self.downButton) + self.deleteButton = QtGui.QPushButton(self.widget) + self.deleteButton.setObjectName("deleteButton") + self.verticalLayout.addWidget(self.deleteButton) + self.horizontalLayout.addLayout(self.verticalLayout) + self.verticalLayout_2.addLayout(self.horizontalLayout) + self.buttonBox = QtGui.QDialogButtonBox(self.widget) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout_2.addWidget(self.buttonBox) + + self.retranslateUi(ServiceItemEditDialog) + QtCore.QMetaObject.connectSlotsByName(ServiceItemEditDialog) + + def retranslateUi(self, ServiceItemEditDialog): + ServiceItemEditDialog.setWindowTitle(QtGui.QApplication.translate("ServiceItemEditDialog", "Service Item Maintenance", None, QtGui.QApplication.UnicodeUTF8)) + self.upButton.setText(QtGui.QApplication.translate("ServiceItemEditDialog", "Up", None, QtGui.QApplication.UnicodeUTF8)) + self.downButton.setText(QtGui.QApplication.translate("ServiceItemEditDialog", "Down", None, QtGui.QApplication.UnicodeUTF8)) + self.deleteButton.setText(QtGui.QApplication.translate("ServiceItemEditDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8)) + diff --git a/openlp/core/ui/serviceitemeditform.py b/openlp/core/ui/serviceitemeditform.py new file mode 100644 index 000000000..f251140a5 --- /dev/null +++ b/openlp/core/ui/serviceitemeditform.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # +# Carsten Tinggaard # +# --------------------------------------------------------------------------- # +# 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. # +# # +# 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 PyQt4 import QtCore, QtGui +from serviceitemeditdialog import Ui_ServiceItemEditDialog + +class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog): + """ + This is the form that is used to edit the verses of the song. + """ + def __init__(self, parent=None): + """ + Constructor + """ + QtGui.QDialog.__init__(self, parent) + self.setupUi(self) + QtCore.QObject.connect(self.buttonBox, + QtCore.SIGNAL(u'accepted()'), + self.accept) + QtCore.QObject.connect(self.buttonBox, + QtCore.SIGNAL(u'rejected()'), + self.reject) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index fff903648..9c429e88c 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -34,7 +34,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \ contextMenuAction, Receiver, str_to_bool, build_icon -from openlp.core.ui import ServiceItemNoteForm +from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm class ServiceManagerList(QtGui.QTreeWidget): @@ -106,7 +106,7 @@ class ServiceManager(QtGui.QWidget): #Indicates if remoteTriggering is active. If it is the next addServiceItem call #will replace the currently selected one. self.remoteEditTriggered = False - self.serviceItemNoteForm = ServiceItemNoteForm() + self.serviceNoteForm = ServiceNoteForm() #start with the layout self.Layout = QtGui.QVBoxLayout(self) self.Layout.setSpacing(0) @@ -257,11 +257,11 @@ class ServiceManager(QtGui.QWidget): def onServiceItemNoteForm(self): item, count = self.findServiceItem() - self.serviceItemNoteForm.textEdit.setPlainText( + self.serviceNoteForm.textEdit.setPlainText( self.serviceItems[item][u'service_item'].notes) - if self.serviceItemNoteForm.exec_(): + if self.serviceNoteForm.exec_(): self.serviceItems[item][u'service_item'].notes = \ - self.serviceItemNoteForm.textEdit.toPlainText() + self.serviceNoteForm.textEdit.toPlainText() self.repaintServiceList(item, 0) def nextItem(self): diff --git a/openlp/core/ui/serviceitemdialog.py b/openlp/core/ui/servicenotedialog.py similarity index 100% rename from openlp/core/ui/serviceitemdialog.py rename to openlp/core/ui/servicenotedialog.py diff --git a/openlp/core/ui/serviceitemform.py b/openlp/core/ui/servicenoteform.py similarity index 97% rename from openlp/core/ui/serviceitemform.py rename to openlp/core/ui/servicenoteform.py index 43011ead8..9ec4c9696 100644 --- a/openlp/core/ui/serviceitemform.py +++ b/openlp/core/ui/servicenoteform.py @@ -26,7 +26,7 @@ from PyQt4 import QtCore, QtGui from serviceitemdialog import Ui_ServiceNoteEdit -class ServiceItemNoteForm(QtGui.QDialog, Ui_ServiceNoteEdit): +class ServiceNoteForm(QtGui.QDialog, Ui_ServiceNoteEdit): """ This is the form that is used to edit the verses of the song. """ diff --git a/resources/forms/serviceitemeditdialog.ui b/resources/forms/serviceitemeditdialog.ui new file mode 100644 index 000000000..7e2be8087 --- /dev/null +++ b/resources/forms/serviceitemeditdialog.ui @@ -0,0 +1,74 @@ + + + ServiceItemEditDialog + + + + 0 + 0 + 400 + 287 + + + + Service Item Maintenance + + + + + 20 + 20 + 351 + 241 + + + + + + + + + true + + + + + + + + + Up + + + + + + + Down + + + + + + + Delete + + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Save + + + + + + + + + diff --git a/resources/forms/serviceitemdialog.ui b/resources/forms/servicenotedialog.ui similarity index 100% rename from resources/forms/serviceitemdialog.ui rename to resources/forms/servicenotedialog.ui