forked from openlp/openlp
start of a plugin
bzr-revno: 139
This commit is contained in:
parent
35b9c195b3
commit
2cc73c6c74
@ -26,7 +26,6 @@ from openlp.plugins.biblemanager.bibleOSISImpl import BibleOSISImpl
|
||||
from openlp.plugins.biblemanager.bibleCSVImpl import BibleCSVImpl
|
||||
from openlp.plugins.biblemanager.bibleDBImpl import BibleDBImpl
|
||||
from openlp.plugins.biblemanager.bibleHTTPImpl import BibleHTTPImpl
|
||||
#from openlp.plugins.biblemanager.bibleLibrary import BibleLibrary
|
||||
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
@ -51,7 +50,6 @@ class BibleManager():
|
||||
self.bibleDBCache = {} # dict of bible database classes
|
||||
self.bibleHTTPCache = {} # dict of bible http readers
|
||||
self.biblePath = ConfigHelper.getBiblePath()
|
||||
#self.bibleLibrary = BibleLibrary()
|
||||
#log.debug( self.biblePath )
|
||||
files = os.listdir(self.biblePath)
|
||||
for f in files:
|
||||
|
88
openlp/plugins/biblemanager/bibleplugin.py
Normal file
88
openlp/plugins/biblemanager/bibleplugin.py
Normal file
@ -0,0 +1,88 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
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 openlp.resources import *
|
||||
from openlp.core import Plugin
|
||||
|
||||
class BiblePlugin(Plugin):
|
||||
def __init__(self):
|
||||
# Call the parent constructor
|
||||
Plugin.__init__('Bible', '1.9.0')
|
||||
# Create the plugin icon
|
||||
self.Icon = QtGui.QIcon()
|
||||
self.Icon.addPixmap(QtGui.QPixmap(':/media/media_Bible.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
# Create the MediaManagerItem object
|
||||
self.MediaManagerItem = MediaManagerItem(self.Icon, 'Bibles')
|
||||
# Add a toolbar
|
||||
self.MediaManagerItem.addToolbar()
|
||||
# Create buttons for the toolbar
|
||||
## New Bible Button ##
|
||||
self.MediaManagerItem.addToolbarButton('New Bible', 'Add a new Bible',
|
||||
':/Bibles/Bible_new.png', self.onBibleNewClick, 'BibleNewItem')
|
||||
## Separator Line ##
|
||||
self.MediaManagerItem.addToolbarLine()
|
||||
## Preview Bible Button ##
|
||||
self.MediaManagerItem.addToolbarButton('Preview Bible', 'Preview the selected Bible Verse',
|
||||
':/system/system_preview.png', self.onBiblePreviewClick, 'BiblePreviewItem')
|
||||
## Live Bible Button ##
|
||||
self.MediaManagerItem.addToolbarButton('Go Live', 'Send the selected Bible Verse(s) live',
|
||||
':/system/system_live.png', self.onBibleLiveClick, 'BibleLiveItem')
|
||||
## Add Bible Button ##
|
||||
self.MediaManagerItem.addToolbarButton('Add Bible Verse(s) To Service',
|
||||
'Add the selected Bible(s) to the service', ':/system/system_add.png',
|
||||
self.onBibleAddClick, 'BibleAddItem')
|
||||
## Spacer ##
|
||||
self.BibleSpacerItem = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.MediaManagerItem.addToolbarItem(self.BibleSpacerItem)
|
||||
# Add the Biblelist widget
|
||||
self.BibleList = QtGui.QTableWidget(self.MediaManagerItem)
|
||||
self.BibleList.setObjectName("BibleList")
|
||||
self.BibleList.setColumnCount(0)
|
||||
self.BibleList.setRowCount(0)
|
||||
self.MediaManagerItem.PageLayout.addWidget(self.BibleList)
|
||||
|
||||
def onBibleNewClick(self):
|
||||
pass
|
||||
|
||||
def onBiblePreviewClick(self):
|
||||
pass
|
||||
|
||||
def onBibleLiveClick(self):
|
||||
pass
|
||||
|
||||
def onBibleAddClick(self):
|
||||
pass
|
||||
|
||||
|
||||
class runner(QtGui.QApplication):
|
||||
|
||||
def run(self):
|
||||
values = ["Genesis","Matthew","Revelation"]
|
||||
self.bim = BibleImportDialog()
|
||||
self.bim.show()
|
||||
self.processEvents()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = runner(sys.argv)
|
||||
app.run()
|
Loading…
Reference in New Issue
Block a user