Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp. Requested reviews: OpenLP Core (openlp-core)
Fix Slide Controller edit Add Verse buttons to SlideController - Icons needed -- https://code.launchpad.net/~trb143/openlp/fixes/+merge/13966 Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py' --- openlp/core/ui/slidecontroller.py 2009-10-25 21:36:04 +0000 +++ openlp/core/ui/slidecontroller.py 2009-10-26 16:25:23 +0000 @@ -26,7 +26,7 @@ import time from PyQt4 import QtCore, QtGui -from openlp.core.lib import OpenLPToolbar, Receiver, ServiceType +from openlp.core.lib import OpenLPToolbar, Receiver, ServiceType, str_to_bool, PluginConfig class SlideList(QtGui.QTableWidget): """ @@ -72,6 +72,7 @@ self.settingsmanager = settingsmanager self.isLive = isLive self.parent = parent + self.songsconfig = PluginConfig(u'Songs') self.image_list = [ u'Start Loop', u'Stop Loop', @@ -119,6 +120,7 @@ self.PreviewListWidget.setColumnWidth(1, self.Controller.width()) self.PreviewListWidget.isLive = self.isLive self.PreviewListWidget.setObjectName(u'PreviewListWidget') + self.PreviewListWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.ControllerLayout.addWidget(self.PreviewListWidget) # Build the full toolbar self.Toolbar = OpenLPToolbar(self) @@ -169,8 +171,25 @@ u'Image SpinBox', self.DelaySpinBox) self.DelaySpinBox.setSuffix(self.trUtf8(u's')) self.DelaySpinBox.setToolTip(self.trUtf8(u'Delay between slides in seconds')) - self.ControllerLayout.addWidget(self.Toolbar) + # Build the Song Toolbar + if isLive: + self.Songbar = OpenLPToolbar(self) + self.Songbar.addToolbarButton( + u'Bridge', u':/media/media_time.png', + self.trUtf8(u'Bridge'), + self.onSongBarHandler) + self.Songbar.addToolbarButton( + u'Chorus', u':/media/media_time.png', + self.trUtf8(u'Chorus'), + self.onSongBarHandler) + for verse in range(1, 9): + self.Songbar.addToolbarButton( + unicode(verse), u':/media/media_time.png', + unicode(self.trUtf8(u'Verse %s'))%verse, + self.onSongBarHandler) + self.ControllerLayout.addWidget(self.Songbar) + self.Songbar.setVisible(False) # Screen preview area self.PreviewFrame = QtGui.QFrame(self.Splitter) self.PreviewFrame.setGeometry(QtCore.QRect(0, 0, 300, 225)) @@ -225,6 +244,21 @@ QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'slidecontroller_change'), self.onSlideChange) + def onSongBarHandler(self): + request = self.sender().text() + if request == u'Bridge': + pass + elif request == u'Chorus': + pass + else: + #Remember list is 1 out! + slideno = int(request) - 1 + if slideno > self.PreviewListWidget.rowCount(): + self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount()) + else: + self.PreviewListWidget.selectRow(slideno) + self.onSlideSelected() + def receiveSpinDelay(self, value): self.DelaySpinBox.setValue(int(value)) @@ -244,6 +278,11 @@ """ if item.service_item_type == ServiceType.Text: self.Toolbar.makeWidgetsInvisible(self.image_list) + if item.name == u'Songs' and \ + str_to_bool(self.songsconfig.get_config(u'display songbar', True)): + self.Songbar.setVisible(True) + else: + self.Songbar.setVisible(False) elif item.service_item_type == ServiceType.Image: #Not sensible to allow loops with 1 frame if len(item.frames) > 1: === modified file 'openlp/plugins/audit/forms/auditdetailform.py' --- openlp/plugins/audit/forms/auditdetailform.py 2009-10-25 14:41:15 +0000 +++ openlp/plugins/audit/forms/auditdetailform.py 2009-10-26 16:25:23 +0000 @@ -21,6 +21,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### +import os from PyQt4 import QtCore, QtGui @@ -97,10 +98,6 @@ self.ThirdToTimeEdit.setEnabled(True) def accept(self): - print self.DetailedReport.isChecked() - print self.SummaryReport.isChecked() - print self.FromDateEdit.date() - print self.ToDateEdit.date() if self.DetailedReport.isChecked(): self.detailedReport() else: @@ -112,7 +109,15 @@ filename = u'audit_det_%s_%s.txt' % \ (self.FromDateEdit.date().toString(u'ddMMyyyy'), self.ToDateEdit.date().toString(u'ddMMyyyy')) - print filename + audits = self.parent.auditmanager.get_all_audits() + outname = os.path.join(unicode(self.FileLineEdit.text()), filename) + file = open(outname, u'w') + for audit in audits: + record = u'\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"\n' % \ + (audit.auditdate,audit.audittime, audit.title, + audit.copyright, audit.ccl_number , audit.authors) + file.write(record) + file.close() def summaryReport(self): print "summary" === modified file 'openlp/plugins/audit/lib/manager.py' --- openlp/plugins/audit/lib/manager.py 2009-09-28 20:45:04 +0000 +++ openlp/plugins/audit/lib/manager.py 2009-10-26 16:25:23 +0000 @@ -63,7 +63,7 @@ """ Returns the details of a audit """ - return self.session.query(AuditItem).order_by(AuditItem.title).all() + return self.session.query(AuditItem).order_by(AuditItem.auditdate, AuditItem.audittime ).all() def insert_audit(self, audititem): """ === modified file 'openlp/plugins/bibles/lib/bibleHTTPimpl.py' --- openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-09-28 20:45:04 +0000 +++ openlp/plugins/bibles/lib/bibleHTTPimpl.py 2009-10-26 16:25:23 +0000 @@ -35,27 +35,24 @@ log.debug(u'init %s', proxyurl) self.proxyurl = proxyurl - def get_bible_chapter(self, version, bookid, bookname, chapter) : + def get_bible_chapter(self, version, bookname, chapter) : """ Access and decode bibles via the BibleGateway website ``Version`` The version of the bible like 31 for New International version - ``bookid`` - Book id for the book of the bible - eg 1 for Genesis - ``bookname`` - Not used + Name of the Book ``chapter`` Chapter number """ - log.debug(u'get_bible_chapter %s,%s,%s,%s', - version, bookid, bookname, chapter) - urlstring = u'http://www.biblegateway.com/passage/?book_id=' + \ - unicode(bookid) + u'&chapter' + unicode(chapter) + u'&version=' + \ - unicode(version) + log.debug(u'get_bible_chapter %s,%s,%s', + version, bookname, chapter) + urlstring = \ + u'http://www.biblegateway.com/passage/?search=%s %s&version=%s' % \ + (bookname, unicode(chapter) , version) xml_string = self._get_web_text(urlstring, self.proxyurl) VerseSearch = u'class=' + u'"' + u'sup' + u'"' + u'>' verse = 1 @@ -95,18 +92,15 @@ log.debug(u'init %s', proxyurl) self.proxyurl = proxyurl - def get_bible_chapter(self, version, bookid, bookname, chapter) : - log.debug(u'getBibleChapter %s,%s,%s,%s', - version, bookid, bookname, chapter) + def get_bible_chapter(self, version, bookname, chapter) : + log.debug(u'getBibleChapter %s,%s,%s', + version,bookname, chapter) """ Access and decode bibles via the Crosswalk website ``version`` The version of the bible like niv for New International Version - ``bookid`` - Not used - ``bookname`` Text name of in english e.g. 'gen' for Genesis === modified file 'openlp/plugins/songs/lib/songstab.py' --- openlp/plugins/songs/lib/songstab.py 2009-10-24 16:40:36 +0000 +++ openlp/plugins/songs/lib/songstab.py 2009-10-26 16:25:23 +0000 @@ -46,26 +46,43 @@ self.SearchAsTypeCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox) self.SearchAsTypeCheckBox.setObjectName(u'SearchAsTypeCheckBox') self.SongsModeLayout.addWidget(self.SearchAsTypeCheckBox) + self.SongBarActiveCheckBox = QtGui.QCheckBox(self.SongsModeGroupBox) + self.SongBarActiveCheckBox.setObjectName(u'SearchAsTypeCheckBox') + self.SongsModeLayout.addWidget(self.SongBarActiveCheckBox) self.SongsLayout.setWidget( 0, QtGui.QFormLayout.LabelRole, self.SongsModeGroupBox) QtCore.QObject.connect(self.SearchAsTypeCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), self.onSearchAsTypeCheckBoxChanged) + QtCore.QObject.connect(self.SongBarActiveCheckBox, + QtCore.SIGNAL(u'stateChanged(int)'), + self.SongBarActiveCheckBoxChanged) def retranslateUi(self): self.SongsModeGroupBox.setTitle(self.trUtf8(u'Songs Mode')) self.SearchAsTypeCheckBox.setText(self.trUtf8(u'Enable search as you type:')) + self.SongBarActiveCheckBox.setText(self.trUtf8(u'Display Verses on Live Tool bar:')) def onSearchAsTypeCheckBoxChanged(self, check_state): - self.bible_search = False - # we have a set value convert to True/False - if check_state == QtCore.Qt.Checked: - self.bible_search = True + self.song_search = False + # we have a set value convert to True/False + if check_state == QtCore.Qt.Checked: + self.song_search = True + + def SongBarActiveCheckBoxChanged(self, check_state): + self.song_bar = False + # we have a set value convert to True/False + if check_state == QtCore.Qt.Checked: + self.song_bar = True def load(self): - self.bible_search = str_to_bool( - self.config.get_config(u'search as type', u'False')) - self.SearchAsTypeCheckBox.setChecked(self.bible_search) + self.song_search = str_to_bool( + self.config.get_config(u'search as type', False)) + self.song_bar = str_to_bool( + self.config.get_config(u'display songbar', True)) + self.SearchAsTypeCheckBox.setChecked(self.song_search) + self.SongBarActiveCheckBox.setChecked(self.song_bar) def save(self): - self.config.set_config(u'search as type', unicode(self.bible_search)) + self.config.set_config(u'search as type', unicode(self.song_search)) + self.config.set_config(u'display songbar', unicode(self.song_bar))
_______________________________________________ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp