forked from openlp/openlp
Fixed the displayResults method of SongMediaItem to display 1 song + all authors, rather than an instance of a song for each author of that song.
Fixed up the topics management dialog a bit. Corrected the spacing on the eventreceiver.py file. Corrected the calling of the receiver to use the static methods without creating an instance of the Receiver class each time. bzr-revno: 403
This commit is contained in:
parent
86bde695ea
commit
051b314da8
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
||||
<!-- eric4 user project file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2009-03-07, 23:44:51 -->
|
||||
<!-- Saved: 2009-03-10, 19:41:39 -->
|
||||
<!-- Copyright (C) 2009 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||
<UserProject version="4.0">
|
||||
</UserProject>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
||||
<!-- eric4 tasks file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2009-03-07, 23:45:01 -->
|
||||
<!-- Saved: 2009-03-10, 19:41:39 -->
|
||||
<Tasks version="4.2">
|
||||
<Task priority="1" completed="False" bugfix="False">
|
||||
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-4.6.dtd">
|
||||
<!-- eric4 project file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2009-03-08, 15:39:49 -->
|
||||
<!-- Saved: 2009-03-09, 22:34:51 -->
|
||||
<!-- Copyright (C) 2009 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||
<Project version="4.6">
|
||||
<Language>en</Language>
|
||||
@ -151,6 +151,12 @@
|
||||
<Source>openlp/plugins/custom/lib/models.py</Source>
|
||||
<Source>openlp/plugins/custom/lib/manager.py</Source>
|
||||
<Source>openlp/plugins/images/lib/mediaitem.py</Source>
|
||||
<Source>openlp/plugins/songs/lib/mediaitem.py</Source>
|
||||
<Source>resources/forms/Ui_editsongdialog.py</Source>
|
||||
<Source>resources/forms/Ui_editversedialog.py</Source>
|
||||
<Source>resources/forms/Ui_settings.py</Source>
|
||||
<Source>resources/forms/Ui_authorsdialog.py</Source>
|
||||
<Source>resources/forms/Ui_songbookdialog.py</Source>
|
||||
</Sources>
|
||||
<Forms>
|
||||
<Form>resources/forms/openlpexportform.ui</Form>
|
||||
@ -187,7 +193,7 @@
|
||||
</Others>
|
||||
<MainScript>openlp.pyw</MainScript>
|
||||
<Vcs>
|
||||
<VcsType>None</VcsType>
|
||||
<VcsType>Subversion</VcsType>
|
||||
<VcsOptions>
|
||||
<dict>
|
||||
<key>
|
||||
|
@ -38,8 +38,8 @@ class OpenLP(QtGui.QApplication):
|
||||
|
||||
def run(self):
|
||||
#provide a listener for widgets to reqest a screen update.
|
||||
QtCore.QObject.connect(Receiver().get_receiver(),
|
||||
QtCore.SIGNAL('openlpprocessevents'),self.processEvents)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL('openlpprocessevents'), self.processEvents)
|
||||
|
||||
self.setApplicationName('openlp.org')
|
||||
self.setApplicationVersion('1.9.0')
|
||||
|
@ -33,6 +33,7 @@ class EventReceiver(QObject):
|
||||
def received(self, msg=None):
|
||||
print msg
|
||||
|
||||
|
||||
class Receiver():
|
||||
"""
|
||||
Class to allow events to be passed from different parts of the system.
|
||||
@ -45,14 +46,16 @@ class Receiver():
|
||||
Receive Message
|
||||
QtCore.QObject.connect(Receiver().get_receiver(),QtCore.SIGNAL("openlprepaint"),<<ACTION>>)
|
||||
"""
|
||||
eventreceiver=EventReceiver()
|
||||
eventreceiver = EventReceiver()
|
||||
|
||||
@staticmethod
|
||||
def send_message(event, msg=None):
|
||||
Receiver.eventreceiver.send_message(event, msg)
|
||||
|
||||
@staticmethod
|
||||
def receive():
|
||||
Receiver.eventreceiver.receive()
|
||||
|
||||
@staticmethod
|
||||
def get_receiver():
|
||||
return Receiver.eventreceiver
|
||||
|
||||
|
@ -111,17 +111,17 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.SongListView.horizontalHeader().setVisible(False)
|
||||
self.SongListView.verticalHeader().setVisible(False)
|
||||
self.SongListView.setGeometry(QtCore.QRect(10, 100, 256, 591))
|
||||
self.SongListView.setObjectName('listView')
|
||||
self.SongListView.setObjectName('SongListView')
|
||||
self.PageLayout.addWidget(self.SongListView)
|
||||
# Signals and slots
|
||||
QtCore.QObject.connect(self.SearchTextButton,
|
||||
QtCore.SIGNAL("pressed()"), self.onSearchTextButtonClick)
|
||||
QtCore.SIGNAL('pressed()'), self.onSearchTextButtonClick)
|
||||
QtCore.QObject.connect(self.ClearTextButton,
|
||||
QtCore.SIGNAL("pressed()"), self.onClearTextButtonClick)
|
||||
QtCore.SIGNAL('pressed()'), self.onClearTextButtonClick)
|
||||
QtCore.QObject.connect(self.SearchTextEdit,
|
||||
QtCore.SIGNAL("textChanged(const QString&)"), self.onSearchTextEditChanged)
|
||||
QtCore.SIGNAL('textChanged(const QString&)'), self.onSearchTextEditChanged)
|
||||
QtCore.QObject.connect(self.SongListView,
|
||||
QtCore.SIGNAL("itemPressed(QTableWidgetItem * item)"), self.onSongSelected)
|
||||
QtCore.SIGNAL('itemPressed(QTableWidgetItem * item)'), self.onSongSelected)
|
||||
#define and add the context menu
|
||||
self.SongListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.SongListView.addAction(self.contextMenuAction(self.SongListView,
|
||||
@ -157,15 +157,19 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.SongListView.setRowCount(0)
|
||||
#log.debug("Records returned from search %s", len(searchresults))
|
||||
for song in searchresults:
|
||||
row_count = self.SongListView.rowCount()
|
||||
self.SongListView.setRowCount(row_count + 1)
|
||||
song_index = QtGui.QTableWidgetItem(str(song.id))
|
||||
self.SongListView.setItem(row_count, 0, song_index)
|
||||
author_list = u''
|
||||
for author in song.authors:
|
||||
c = self.SongListView.rowCount()
|
||||
self.SongListView.setRowCount(c + 1)
|
||||
song_index = QtGui.QTableWidgetItem(str(song.id))
|
||||
self.SongListView.setItem(c , 0, song_index)
|
||||
song_detail = QtGui.QTableWidgetItem(
|
||||
u'%s (%s)' % (str(song.title), str(author.display_name)))
|
||||
self.SongListView.setItem(c , 1, song_detail)
|
||||
self.SongListView.setRowHeight(c, 20)
|
||||
if author_list != u'':
|
||||
author_list = author_list + u', '
|
||||
author_list = author_list + author.display_name
|
||||
song_detail = QtGui.QTableWidgetItem(
|
||||
u'%s (%s)' % (str(song.title), str(author_list)))
|
||||
self.SongListView.setItem(row_count, 1, song_detail)
|
||||
self.SongListView.setRowHeight(row_count, 20)
|
||||
|
||||
def onClearTextButtonClick(self):
|
||||
"""
|
||||
|
@ -38,10 +38,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="5" >
|
||||
<item row="0" column="1" colspan="6" >
|
||||
<widget class="QLineEdit" name="TopicNameEdit" />
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<item row="1" column="0" colspan="3" >
|
||||
<spacer name="ButtonsSpacer" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -54,7 +54,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="4" >
|
||||
<item row="1" column="5" >
|
||||
<widget class="QPushButton" name="DeleteButton" >
|
||||
<property name="toolTip" >
|
||||
<string>Delete Author</string>
|
||||
@ -68,31 +68,31 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<item row="1" column="4" >
|
||||
<widget class="QPushButton" name="AddUpdateButton" >
|
||||
<property name="toolTip" >
|
||||
<string>Add Update Author</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Add/Update</string>
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images/openlp-2.qrc" >
|
||||
<normaloff>:/system/system_settings.png</normaloff>:/system/system_settings.png</iconset>
|
||||
<normaloff>:/services/service_save.png</normaloff>:/services/service_save.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5" >
|
||||
<item row="1" column="3" >
|
||||
<widget class="QPushButton" name="ClearButton" >
|
||||
<property name="toolTip" >
|
||||
<string>Clear Selection</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Clear</string>
|
||||
<string>New</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="../images/openlp-2.qrc" >
|
||||
<normaloff>:/songs/song_edit.png</normaloff>:/songs/song_edit.png</iconset>
|
||||
<normaloff>:/services/service_new.png</normaloff>:/services/service_new.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user