openlp/openlp/core/ui/serviceitemeditdialog.py

68 lines
4.0 KiB
Python
Raw Normal View History

2010-03-17 21:08:18 +00:00
# -*- coding: utf-8 -*-
2010-03-19 07:23:48 +00:00
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
2010-03-17 21:08:18 +00:00
2010-03-19 07:23:48 +00:00
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
2011-12-27 10:33:55 +00:00
# Copyright (c) 2008-2012 Raoul Snyman #
# Portions copyright (c) 2008-2012 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
2012-11-11 21:16:14 +00:00
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
2012-10-21 13:16:22 +00:00
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
2010-03-19 07:23:48 +00:00
# --------------------------------------------------------------------------- #
# 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 #
###############################################################################
2010-03-17 21:08:18 +00:00
2012-05-21 12:41:33 +00:00
from PyQt4 import QtGui
2011-02-03 22:39:18 +00:00
from openlp.core.lib import translate
from openlp.core.lib.ui import create_button_box, create_button
2010-03-17 21:08:18 +00:00
class Ui_ServiceItemEditDialog(object):
2010-07-27 08:22:01 +00:00
def setupUi(self, serviceItemEditDialog):
serviceItemEditDialog.setObjectName(u'serviceItemEditDialog')
self.dialogLayout = QtGui.QGridLayout(serviceItemEditDialog)
2011-06-28 19:24:29 +00:00
self.dialogLayout.setContentsMargins(8, 8, 8, 8)
self.dialogLayout.setSpacing(8)
self.dialogLayout.setObjectName(u'dialogLayout')
self.listWidget = QtGui.QListWidget(serviceItemEditDialog)
2010-03-17 21:08:18 +00:00
self.listWidget.setAlternatingRowColors(True)
2010-03-19 07:23:48 +00:00
self.listWidget.setObjectName(u'listWidget')
self.dialogLayout.addWidget(self.listWidget, 0, 0)
2010-03-18 22:06:51 +00:00
self.buttonLayout = QtGui.QVBoxLayout()
2010-03-19 07:23:48 +00:00
self.buttonLayout.setObjectName(u'buttonLayout')
self.deleteButton = create_button(serviceItemEditDialog,
u'deleteButton', role=u'delete',
click=serviceItemEditDialog.onDeleteButtonClicked)
2010-03-18 22:06:51 +00:00
self.buttonLayout.addWidget(self.deleteButton)
self.buttonLayout.addStretch()
self.upButton = create_button(serviceItemEditDialog, u'upButton',
role=u'up', click=serviceItemEditDialog.onUpButtonClicked)
self.downButton = create_button(serviceItemEditDialog, u'downButton',
role=u'down', click=serviceItemEditDialog.onDownButtonClicked)
self.buttonLayout.addWidget(self.upButton)
2010-03-18 22:06:51 +00:00
self.buttonLayout.addWidget(self.downButton)
self.dialogLayout.addLayout(self.buttonLayout, 0, 1)
self.buttonBox = create_button_box(serviceItemEditDialog, u'buttonBox',
[u'cancel', u'save'])
2012-04-03 17:58:42 +00:00
self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2)
2010-07-27 08:22:01 +00:00
self.retranslateUi(serviceItemEditDialog)
2010-03-17 21:08:18 +00:00
2010-07-27 08:22:01 +00:00
def retranslateUi(self, serviceItemEditDialog):
serviceItemEditDialog.setWindowTitle(
2010-07-22 06:02:31 +00:00
translate('OpenLP.ServiceItemEditForm', 'Reorder Service Item'))