forked from openlp/openlp
Updates and Fixes
bzr-revno: 216
This commit is contained in:
parent
412a30f1b5
commit
1b28a4d4c7
@ -205,6 +205,7 @@ class BiblePlugin(Plugin):
|
|||||||
|
|
||||||
def onBibleNewClick(self):
|
def onBibleNewClick(self):
|
||||||
self.bibleimportform = BibleImportForm(self.biblemanager)
|
self.bibleimportform = BibleImportForm(self.biblemanager)
|
||||||
|
self.bibleimportform.setModal(True)
|
||||||
self.bibleimportform.show()
|
self.bibleimportform.show()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -316,7 +317,6 @@ class BiblePlugin(Plugin):
|
|||||||
|
|
||||||
def _displayResults(self):
|
def _displayResults(self):
|
||||||
self.listView.clear() # clear the results
|
self.listView.clear() # clear the results
|
||||||
print self.searchresults
|
|
||||||
for book, chap, vse , txt in self.searchresults:
|
for book, chap, vse , txt in self.searchresults:
|
||||||
self.listView.addItem(book + " " +str(chap) + ":"+ str(vse))
|
self.listView.addItem(book + " " +str(chap) + ":"+ str(vse))
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'bibleimport.ui'
|
# Form implementation generated from reading ui file 'bibleimport.ui'
|
||||||
#
|
#
|
||||||
# Created: Sat Dec 6 16:19:54 2008
|
# Created: Wed Dec 10 20:59:43 2008
|
||||||
# by: PyQt4 UI code generator 4.4.3
|
# by: PyQt4 UI code generator 4.4.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -19,10 +19,10 @@ class Ui_BibleImportDialog(object):
|
|||||||
self.BibleImportButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
|
self.BibleImportButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
|
||||||
self.BibleImportButtonBox.setObjectName("BibleImportButtonBox")
|
self.BibleImportButtonBox.setObjectName("BibleImportButtonBox")
|
||||||
self.ImportToolBox = QtGui.QToolBox(BibleImportDialog)
|
self.ImportToolBox = QtGui.QToolBox(BibleImportDialog)
|
||||||
self.ImportToolBox.setGeometry(QtCore.QRect(0, 0, 481, 431))
|
self.ImportToolBox.setGeometry(QtCore.QRect(10, 0, 471, 431))
|
||||||
self.ImportToolBox.setObjectName("ImportToolBox")
|
self.ImportToolBox.setObjectName("ImportToolBox")
|
||||||
self.FileImportPage = QtGui.QWidget()
|
self.FileImportPage = QtGui.QWidget()
|
||||||
self.FileImportPage.setGeometry(QtCore.QRect(0, 0, 471, 361))
|
self.FileImportPage.setGeometry(QtCore.QRect(0, 0, 461, 361))
|
||||||
self.FileImportPage.setObjectName("FileImportPage")
|
self.FileImportPage.setObjectName("FileImportPage")
|
||||||
self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage)
|
self.OSISGroupBox = QtGui.QGroupBox(self.FileImportPage)
|
||||||
self.OSISGroupBox.setGeometry(QtCore.QRect(8, 65, 451, 81))
|
self.OSISGroupBox.setGeometry(QtCore.QRect(8, 65, 451, 81))
|
||||||
@ -78,7 +78,7 @@ class Ui_BibleImportDialog(object):
|
|||||||
self.BibleNameLabel.setObjectName("BibleNameLabel")
|
self.BibleNameLabel.setObjectName("BibleNameLabel")
|
||||||
self.ImportToolBox.addItem(self.FileImportPage, "")
|
self.ImportToolBox.addItem(self.FileImportPage, "")
|
||||||
self.WebBiblePage = QtGui.QWidget()
|
self.WebBiblePage = QtGui.QWidget()
|
||||||
self.WebBiblePage.setGeometry(QtCore.QRect(0, 0, 471, 361))
|
self.WebBiblePage.setGeometry(QtCore.QRect(0, 0, 461, 361))
|
||||||
self.WebBiblePage.setObjectName("WebBiblePage")
|
self.WebBiblePage.setObjectName("WebBiblePage")
|
||||||
self.WebBibleLayout = QtGui.QVBoxLayout(self.WebBiblePage)
|
self.WebBibleLayout = QtGui.QVBoxLayout(self.WebBiblePage)
|
||||||
self.WebBibleLayout.setSpacing(8)
|
self.WebBibleLayout.setSpacing(8)
|
||||||
@ -179,15 +179,31 @@ class Ui_BibleImportDialog(object):
|
|||||||
self.ProgressGroupBox.setObjectName("ProgressGroupBox")
|
self.ProgressGroupBox.setObjectName("ProgressGroupBox")
|
||||||
self.gridLayout_3 = QtGui.QGridLayout(self.ProgressGroupBox)
|
self.gridLayout_3 = QtGui.QGridLayout(self.ProgressGroupBox)
|
||||||
self.gridLayout_3.setObjectName("gridLayout_3")
|
self.gridLayout_3.setObjectName("gridLayout_3")
|
||||||
self.progressBar = QtGui.QProgressBar(self.ProgressGroupBox)
|
self.ProgressBar = QtGui.QProgressBar(self.ProgressGroupBox)
|
||||||
self.progressBar.setProperty("value", QtCore.QVariant(0))
|
self.ProgressBar.setProperty("value", QtCore.QVariant(0))
|
||||||
self.progressBar.setInvertedAppearance(False)
|
self.ProgressBar.setInvertedAppearance(False)
|
||||||
self.progressBar.setObjectName("progressBar")
|
self.ProgressBar.setObjectName("ProgressBar")
|
||||||
self.gridLayout_3.addWidget(self.progressBar, 0, 0, 1, 1)
|
self.gridLayout_3.addWidget(self.ProgressBar, 0, 0, 1, 1)
|
||||||
|
|
||||||
self.retranslateUi(BibleImportDialog)
|
self.retranslateUi(BibleImportDialog)
|
||||||
self.ImportToolBox.setCurrentIndex(0)
|
self.ImportToolBox.setCurrentIndex(1)
|
||||||
QtCore.QMetaObject.connectSlotsByName(BibleImportDialog)
|
QtCore.QMetaObject.connectSlotsByName(BibleImportDialog)
|
||||||
|
BibleImportDialog.setTabOrder(self.BibleNameEdit, self.OSISLocationEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.OSISLocationEdit, self.OsisFileButton)
|
||||||
|
BibleImportDialog.setTabOrder(self.OsisFileButton, self.BooksLocationEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.BooksLocationEdit, self.BooksFileButton)
|
||||||
|
BibleImportDialog.setTabOrder(self.BooksFileButton, self.VerseLocationEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.VerseLocationEdit, self.VersesFileButton)
|
||||||
|
BibleImportDialog.setTabOrder(self.VersesFileButton, self.LocationComboBox)
|
||||||
|
BibleImportDialog.setTabOrder(self.LocationComboBox, self.TypeComboBox)
|
||||||
|
BibleImportDialog.setTabOrder(self.TypeComboBox, self.BibleComboBox)
|
||||||
|
BibleImportDialog.setTabOrder(self.BibleComboBox, self.AddressEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.AddressEdit, self.UsernameEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.UsernameEdit, self.PasswordEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.PasswordEdit, self.VersionNameEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.VersionNameEdit, self.CopyrightEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.CopyrightEdit, self.PermisionEdit)
|
||||||
|
BibleImportDialog.setTabOrder(self.PermisionEdit, self.BibleImportButtonBox)
|
||||||
|
|
||||||
def retranslateUi(self, BibleImportDialog):
|
def retranslateUi(self, BibleImportDialog):
|
||||||
BibleImportDialog.setWindowTitle(QtGui.QApplication.translate("BibleImportDialog", "Bible Registration", None, QtGui.QApplication.UnicodeUTF8))
|
BibleImportDialog.setWindowTitle(QtGui.QApplication.translate("BibleImportDialog", "Bible Registration", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
@ -218,5 +234,5 @@ class Ui_BibleImportDialog(object):
|
|||||||
self.CopyrightLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Copyright:", None, QtGui.QApplication.UnicodeUTF8))
|
self.CopyrightLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Copyright:", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.PermisionLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Permission:", None, QtGui.QApplication.UnicodeUTF8))
|
self.PermisionLabel.setText(QtGui.QApplication.translate("BibleImportDialog", "Permission:", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.ProgressGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Import Progress", None, QtGui.QApplication.UnicodeUTF8))
|
self.ProgressGroupBox.setTitle(QtGui.QApplication.translate("BibleImportDialog", "Import Progress", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.progressBar.setFormat(QtGui.QApplication.translate("BibleImportDialog", "%p", None, QtGui.QApplication.UnicodeUTF8))
|
self.ProgressBar.setFormat(QtGui.QApplication.translate("BibleImportDialog", "%p", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
||||||
|
@ -47,8 +47,16 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog):
|
|||||||
def on_OsisFileButton_clicked(self):
|
def on_OsisFileButton_clicked(self):
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self, 'Open file','/home')
|
filename = QtGui.QFileDialog.getOpenFileName(self, 'Open file','/home')
|
||||||
self.OSISLocationEdit.setText(filename)
|
self.OSISLocationEdit.setText(filename)
|
||||||
|
|
||||||
def on_OSISLocationEdit_lostFocus(self):
|
def on_OSISLocationEdit_lostFocus(self):
|
||||||
|
if len(self.OSISLocationEdit.displayText() ) > 1:
|
||||||
|
self.BooksLocationEdit.setReadOnly(True)
|
||||||
|
self.VerseLocationEdit.setReadOnly(True)
|
||||||
|
else:
|
||||||
|
self.BooksLocationEdit.setReadOnly(False)
|
||||||
|
self.VerseLocationEdit.setReadOnly(False)
|
||||||
self.validate()
|
self.validate()
|
||||||
|
|
||||||
def on_BooksLocationEdit_lostFocus(self):
|
def on_BooksLocationEdit_lostFocus(self):
|
||||||
self.validate()
|
self.validate()
|
||||||
def on_CopyrightEdit_lostFocus(self):
|
def on_CopyrightEdit_lostFocus(self):
|
||||||
@ -73,6 +81,7 @@ class BibleImportForm(QDialog, Ui_BibleImportDialog):
|
|||||||
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
print "validate"
|
||||||
valid = False
|
valid = False
|
||||||
validcount = 0
|
validcount = 0
|
||||||
if len(self.BibleNameEdit.displayText()) > 0:
|
if len(self.BibleNameEdit.displayText()) > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user