forked from openlp/openlp
More UI bits
bzr-revno: 167
This commit is contained in:
parent
cb6538f1b1
commit
80eb8c9dc1
@ -32,7 +32,7 @@ class BiblePlugin(Plugin):
|
|||||||
self.Weight = -9
|
self.Weight = -9
|
||||||
#Register the bible Manager
|
#Register the bible Manager
|
||||||
#self.biblemanager = BibleManager()
|
#self.biblemanager = BibleManager()
|
||||||
|
self.textsearch = True
|
||||||
|
|
||||||
def getMediaManagerItem(self):
|
def getMediaManagerItem(self):
|
||||||
# Create the plugin icon
|
# Create the plugin icon
|
||||||
@ -59,31 +59,78 @@ class BiblePlugin(Plugin):
|
|||||||
self.MediaManagerItem.addToolbarButton('Add Bible Verse(s) To Service',
|
self.MediaManagerItem.addToolbarButton('Add Bible Verse(s) To Service',
|
||||||
'Add the selected Bible(s) to the service', ':/system/system_add.png',
|
'Add the selected Bible(s) to the service', ':/system/system_add.png',
|
||||||
self.onBibleAddClick, 'BibleAddItem')
|
self.onBibleAddClick, 'BibleAddItem')
|
||||||
|
## Separator Line ##
|
||||||
|
self.MediaManagerItem.addToolbarSeparator()
|
||||||
|
## Add Bible Button ##
|
||||||
|
self.MediaManagerItem.addToolbarButton('Change Search Style',
|
||||||
|
'Swap between the Bible search styles', ':/system/system_add.png',
|
||||||
|
self.onBibleSearchChangeClick, 'BibleSearchChange')
|
||||||
# Add the Biblelist Tables
|
# Add the Biblelist Tables
|
||||||
self.groupBox = QtGui.QGroupBox(self.MediaManagerItem)
|
self.groupBox = QtGui.QGroupBox(self.MediaManagerItem)
|
||||||
self.groupBox.setGeometry(QtCore.QRect(5, 5, 271, 391))
|
self.groupBox.setGeometry(QtCore.QRect(5, 5, 271, 391))
|
||||||
self.groupBox.setObjectName("groupBox")
|
self.groupBox.setObjectName("groupBox")
|
||||||
self.lineEdit = QtGui.QLineEdit(self.groupBox)
|
|
||||||
self.lineEdit.setGeometry(QtCore.QRect(70, 50, 161, 23))
|
self.biblelabel = QtGui.QLabel(self.groupBox)
|
||||||
self.lineEdit.setObjectName("lineEdit")
|
self.biblelabel.setGeometry(QtCore.QRect(10, 20, 80, 25))
|
||||||
self.label = QtGui.QLabel(self.groupBox)
|
self.biblelabel.setObjectName("biblelabel")
|
||||||
self.label.setGeometry(QtCore.QRect(20, 20, 54, 17))
|
self.biblelabel.setText("Translation:")
|
||||||
self.label.setObjectName("label")
|
self.biblecomboBox = QtGui.QComboBox(self.groupBox)
|
||||||
self.comboBox = QtGui.QComboBox(self.groupBox)
|
self.biblecomboBox.setGeometry(QtCore.QRect(120, 20, 150, 25))
|
||||||
self.comboBox.setGeometry(QtCore.QRect(100, 20, 74, 22))
|
self.biblecomboBox.setObjectName("biblecomboBox")
|
||||||
self.comboBox.setObjectName("comboBox")
|
self.biblecomboBox.addItem("NIV")
|
||||||
self.comboBox_2 = QtGui.QComboBox(self.groupBox)
|
self.biblecomboBox.addItem("KJC")
|
||||||
self.comboBox_2.setGeometry(QtCore.QRect(70, 80, 74, 22))
|
|
||||||
self.comboBox_2.setObjectName("comboBox_2")
|
self.searchcomboBox = QtGui.QComboBox(self.groupBox)
|
||||||
self.comboBox_3 = QtGui.QComboBox(self.groupBox)
|
self.searchcomboBox.setGeometry(QtCore.QRect(10, 50, 105, 25))
|
||||||
self.comboBox_3.setGeometry(QtCore.QRect(160, 80, 74, 22))
|
self.searchcomboBox.setObjectName("searchcomboBox")
|
||||||
self.comboBox_3.setObjectName("comboBox_3")
|
self.searchcomboBox.addItem("Verse Search")
|
||||||
self.comboBox_4 = QtGui.QComboBox(self.groupBox)
|
self.searchcomboBox.addItem("Text Search")
|
||||||
self.comboBox_4.setGeometry(QtCore.QRect(70, 110, 74, 22))
|
self.searchEdit = QtGui.QLineEdit(self.groupBox)
|
||||||
self.comboBox_4.setObjectName("comboBox_4")
|
self.searchEdit.setGeometry(QtCore.QRect(120, 50, 150, 25))
|
||||||
self.comboBox_5 = QtGui.QComboBox(self.groupBox)
|
self.searchEdit.setObjectName("searchEdit")
|
||||||
self.comboBox_5.setGeometry(QtCore.QRect(160, 110, 74, 22))
|
|
||||||
self.comboBox_5.setObjectName("comboBox_5")
|
self.chapterlabel = QtGui.QLabel(self.groupBox)
|
||||||
|
self.chapterlabel.setGeometry(QtCore.QRect(10, 80, 50, 25))
|
||||||
|
self.chapterlabel.setObjectName("chapterlabel")
|
||||||
|
self.chapterlabel.setText("Chapter:")
|
||||||
|
self.verselabel = QtGui.QLabel(self.groupBox)
|
||||||
|
self.verselabel.setGeometry(QtCore.QRect(10, 110, 50, 25))
|
||||||
|
self.verselabel.setObjectName("verselabel")
|
||||||
|
self.verselabel.setText("Verse:")
|
||||||
|
self.fromlabel = QtGui.QLabel(self.groupBox)
|
||||||
|
self.fromlabel.setGeometry(QtCore.QRect(120, 50, 50, 25))
|
||||||
|
self.fromlabel.setObjectName("fromlabel")
|
||||||
|
self.fromlabel.setText("From:")
|
||||||
|
self.tolabel = QtGui.QLabel(self.groupBox)
|
||||||
|
self.tolabel.setGeometry(QtCore.QRect(210, 50, 50, 25))
|
||||||
|
self.tolabel.setObjectName("tolabel")
|
||||||
|
self.tolabel.setText("To:")
|
||||||
|
self.fromcomboBox_c = QtGui.QComboBox(self.groupBox)
|
||||||
|
self.fromcomboBox_c.setGeometry(QtCore.QRect(120, 80, 45, 25))
|
||||||
|
self.fromcomboBox_c.setObjectName("fromcomboBox_c")
|
||||||
|
self.fromcomboBox_v = QtGui.QComboBox(self.groupBox)
|
||||||
|
self.fromcomboBox_v.setGeometry(QtCore.QRect(200, 80, 45, 25))
|
||||||
|
self.fromcomboBox_v.setObjectName("fromcomboBox_v")
|
||||||
|
self.tocomboBox_c = QtGui.QComboBox(self.groupBox)
|
||||||
|
self.tocomboBox_c.setGeometry(QtCore.QRect(120, 110, 45, 22))
|
||||||
|
self.tocomboBox_c.setObjectName("tocomboBox_c")
|
||||||
|
self.tocomboBox_v = QtGui.QComboBox(self.groupBox)
|
||||||
|
self.tocomboBox_v.setGeometry(QtCore.QRect(200, 110, 45, 22))
|
||||||
|
self.tocomboBox_v.setObjectName("tocomboBox_v")
|
||||||
|
for i in range(1, 20):
|
||||||
|
self.fromcomboBox_c.addItem(str(i))
|
||||||
|
self.tocomboBox_c.addItem(str(i))
|
||||||
|
for i in range(1, 10):
|
||||||
|
self.fromcomboBox_v.addItem(str(i))
|
||||||
|
self.tocomboBox_v.addItem(str(i))
|
||||||
|
|
||||||
|
self.searchButton = QtGui.QPushButton(self.groupBox)
|
||||||
|
self.searchButton.setGeometry(QtCore.QRect(170, 140, 75, 27))
|
||||||
|
self.searchButton.setObjectName("searchButton")
|
||||||
|
self.searchButton.setText("Search")
|
||||||
|
QtCore.QObject.connect(self.searchButton, QtCore.SIGNAL("pressed()"), self.onBibleSearchClick)
|
||||||
|
|
||||||
|
|
||||||
self.listView = QtGui.QListView(self.groupBox)
|
self.listView = QtGui.QListView(self.groupBox)
|
||||||
self.listView.setGeometry(QtCore.QRect(10, 180, 256, 192))
|
self.listView.setGeometry(QtCore.QRect(10, 180, 256, 192))
|
||||||
self.listView.setObjectName("listView")
|
self.listView.setObjectName("listView")
|
||||||
@ -109,6 +156,7 @@ class BiblePlugin(Plugin):
|
|||||||
# self.BibleList.setColumnCount(0)
|
# self.BibleList.setColumnCount(0)
|
||||||
# self.BibleList.setRowCount(0)
|
# self.BibleList.setRowCount(0)
|
||||||
#self.MediaManagerItem.PageLayout.addWidget(self.BibleList)
|
#self.MediaManagerItem.PageLayout.addWidget(self.BibleList)
|
||||||
|
self.textsearchmode()
|
||||||
return self.MediaManagerItem
|
return self.MediaManagerItem
|
||||||
|
|
||||||
def onBibleNewClick(self):
|
def onBibleNewClick(self):
|
||||||
@ -124,3 +172,40 @@ class BiblePlugin(Plugin):
|
|||||||
|
|
||||||
def onBibleAddClick(self):
|
def onBibleAddClick(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def onBibleSearchClick(self):
|
||||||
|
if self.textsearch == True:
|
||||||
|
print "Text / Verse Search"
|
||||||
|
else:
|
||||||
|
print "Combo Search"
|
||||||
|
|
||||||
|
|
||||||
|
def onBibleSearchChangeClick(self):
|
||||||
|
self.textsearchmode()
|
||||||
|
|
||||||
|
def textsearchmode(self):
|
||||||
|
if self.textsearch == True:
|
||||||
|
self.searchcomboBox.hide()
|
||||||
|
self.searchEdit.hide()
|
||||||
|
self.textsearch = False
|
||||||
|
self.fromcomboBox_c.show()
|
||||||
|
self.fromcomboBox_v.show()
|
||||||
|
self.tocomboBox_c.show()
|
||||||
|
self.tocomboBox_v.show()
|
||||||
|
self.chapterlabel.show()
|
||||||
|
self.verselabel.show()
|
||||||
|
self.fromlabel.show()
|
||||||
|
self.tolabel.show()
|
||||||
|
else:
|
||||||
|
self.textsearch = True
|
||||||
|
self.searchcomboBox.show()
|
||||||
|
self.searchEdit.show()
|
||||||
|
self.fromcomboBox_c.hide()
|
||||||
|
self.fromcomboBox_v.hide()
|
||||||
|
self.tocomboBox_c.hide()
|
||||||
|
self.tocomboBox_v.hide()
|
||||||
|
self.chapterlabel.hide()
|
||||||
|
self.verselabel.hide()
|
||||||
|
self.fromlabel.hide()
|
||||||
|
self.tolabel.hide()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user