forked from openlp/openlp
Small refactorings
This commit is contained in:
parent
78a6d20bb3
commit
5868a37018
@ -56,13 +56,6 @@ class CSVBible(BibleDB):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
Stops the import of the Bible.
|
||||
"""
|
||||
log.debug('Stopping import!')
|
||||
self.stop_import_flag = True
|
||||
|
||||
def do_import(self):
|
||||
#Populate the Tables
|
||||
success = True
|
||||
|
@ -92,6 +92,13 @@ class BibleDB(QtCore.QObject):
|
||||
if u'file' in kwargs:
|
||||
self.get_name()
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
Stops the import of the Bible.
|
||||
"""
|
||||
log.debug('Stopping import')
|
||||
self.stop_import_flag = True
|
||||
|
||||
def get_name(self):
|
||||
"""
|
||||
Returns the version name of the Bible.
|
||||
|
@ -51,13 +51,6 @@ class OpenSongBible(BibleDB):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
Stops the import of the Bible.
|
||||
"""
|
||||
log.debug('Stopping import!')
|
||||
self.stop_import_flag = True
|
||||
|
||||
def do_import(self):
|
||||
"""
|
||||
Loads a Bible from file.
|
||||
|
@ -86,13 +86,6 @@ class OSISBible(BibleDB):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'bibles_stop_import'), self.stop_import)
|
||||
|
||||
def stop_import(self):
|
||||
"""
|
||||
Stops the import of the Bible.
|
||||
"""
|
||||
log.debug('Stopping import!')
|
||||
self.stop_import_flag = True
|
||||
|
||||
def do_import(self):
|
||||
"""
|
||||
Loads a Bible from file.
|
||||
|
@ -370,21 +370,6 @@ class ImpressDocument(PresentationDocument):
|
||||
"""
|
||||
self.control.gotoPreviousSlide()
|
||||
|
||||
def get_slide_preview_file(self, slide_no):
|
||||
"""
|
||||
Returns an image path containing a preview for the
|
||||
requested slide
|
||||
|
||||
``slide_no``
|
||||
The slide an image is required for, starting at 1
|
||||
"""
|
||||
path = os.path.join(self.thumbnailpath,
|
||||
self.controller.thumbnailprefix + unicode(slide_no) + u'.png')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_slide_text(self, slide_no):
|
||||
"""
|
||||
Returns the text on the slide
|
||||
|
@ -269,20 +269,6 @@ class PowerpointDocument(PresentationDocument):
|
||||
"""
|
||||
self.presentation.SlideShowWindow.View.Previous()
|
||||
|
||||
def get_slide_preview_file(self, slide_no):
|
||||
"""
|
||||
Returns an image path containing a preview for the requested slide
|
||||
|
||||
``slide_no``
|
||||
The slide an image is required for, starting at 1
|
||||
"""
|
||||
path = os.path.join(self.thumbnailpath,
|
||||
self.controller.thumbnailprefix + unicode(slide_no) + u'.png')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_slide_text(self, slide_no):
|
||||
"""
|
||||
Returns the text on the slide
|
||||
|
@ -357,7 +357,12 @@ class PresentationDocument(object):
|
||||
``slide_no``
|
||||
The slide an image is required for, starting at 1
|
||||
"""
|
||||
return None
|
||||
path = os.path.join(self.thumbnailpath,
|
||||
self.controller.thumbnailprefix + unicode(slide_no) + u'.png')
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
else:
|
||||
return None
|
||||
|
||||
def poll_slidenumber(self, is_live):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user