forked from openlp/openlp
Remote Edit for Custom
This commit is contained in:
parent
cfd5b536c7
commit
4f495da735
@ -21,6 +21,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
import logging
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -32,6 +33,9 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
|||||||
"""
|
"""
|
||||||
Class documentation goes here.
|
Class documentation goes here.
|
||||||
"""
|
"""
|
||||||
|
global log
|
||||||
|
log = logging.getLogger(u'EditCustomForm')
|
||||||
|
log.info(u'Custom Editor loaded')
|
||||||
def __init__(self, custommanager, parent = None):
|
def __init__(self, custommanager, parent = None):
|
||||||
"""
|
"""
|
||||||
Constructor
|
Constructor
|
||||||
@ -40,6 +44,12 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
|||||||
#self.parent = parent
|
#self.parent = parent
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# Connecting signals and slots
|
# Connecting signals and slots
|
||||||
|
self.previewButton = QtGui.QPushButton()
|
||||||
|
self.previewButton.setText(self.trUtf8(u'Save && Preview'))
|
||||||
|
self.buttonBox.addButton(
|
||||||
|
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
||||||
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
|
QtCore.SIGNAL(u'clicked(QAbstractButton*)'), self.onPreview)
|
||||||
QtCore.QObject.connect(self.AddButton,
|
QtCore.QObject.connect(self.AddButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onAddButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onAddButtonPressed)
|
||||||
QtCore.QObject.connect(self.EditButton,
|
QtCore.QObject.connect(self.EditButton,
|
||||||
@ -68,6 +78,12 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
|||||||
self.custommanager = custommanager
|
self.custommanager = custommanager
|
||||||
self.initialise()
|
self.initialise()
|
||||||
|
|
||||||
|
def onPreview(self, button):
|
||||||
|
log.debug(u'onPreview')
|
||||||
|
if button.text() == unicode(self.trUtf8(u'Save && Preview')) \
|
||||||
|
and self.saveSong():
|
||||||
|
Receiver().send_message(u'preview_custom')
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
self.editAll = False
|
self.editAll = False
|
||||||
self.DeleteButton.setEnabled(False)
|
self.DeleteButton.setEnabled(False)
|
||||||
|
Loading…
Reference in New Issue
Block a user