Clean up service item form names

This commit is contained in:
Tim Bentley 2010-03-17 21:08:18 +00:00
parent a71505a10c
commit 72d2d8f83d
8 changed files with 179 additions and 7 deletions

View File

@ -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

View File

@ -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))

View File

@ -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)

View File

@ -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):

View File

@ -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.
"""

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ServiceItemEditDialog</class>
<widget class="QWidget" name="ServiceItemEditDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>287</height>
</rect>
</property>
<property name="windowTitle">
<string>Service Item Maintenance</string>
</property>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>351</width>
<height>241</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QListWidget" name="listWidget">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="upButton">
<property name="text">
<string>Up</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="downButton">
<property name="text">
<string>Down</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="deleteButton">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>