openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01441
[Merge] lp:~raoul-snyman/openlp/songtweaks into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/songtweaks into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Added autocompletion to the authors, topics, song books, and themes comboboxes.
--
https://code.launchpad.net/~raoul-snyman/openlp/songtweaks/+merge/23649
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py 2010-03-21 23:58:01 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py 2010-04-19 05:35:24 +0000
@@ -135,7 +135,7 @@
sizePolicy.setHeightForWidth(
self.AuthorsSelectionComboItem.sizePolicy().hasHeightForWidth())
self.AuthorsSelectionComboItem.setSizePolicy(sizePolicy)
- self.AuthorsSelectionComboItem.setEditable(False)
+ self.AuthorsSelectionComboItem.setEditable(True)
self.AuthorsSelectionComboItem.setInsertPolicy(
QtGui.QComboBox.InsertAlphabetically)
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(
@@ -212,6 +212,7 @@
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
self.SongTopicCombo.sizePolicy().hasHeightForWidth())
+ self.SongTopicCombo.setEditable(True)
self.SongTopicCombo.setSizePolicy(sizePolicy)
self.SongTopicCombo.setObjectName(u'SongTopicCombo')
self.TopicAddLayout.addWidget(self.SongTopicCombo)
@@ -256,6 +257,7 @@
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SongbookCombo.sizePolicy().hasHeightForWidth())
+ self.SongbookCombo.setEditable(True)
self.SongbookCombo.setSizePolicy(sizePolicy)
self.SongbookCombo.setObjectName(u'SongbookCombo')
self.SongbookLayout.addWidget(self.SongbookCombo, 0, 0, 1, 1)
@@ -293,6 +295,7 @@
self.ThemeLayout.setMargin(8)
self.ThemeLayout.setObjectName(u'ThemeLayout')
self.ThemeSelectionComboItem = QtGui.QComboBox(self.ThemeGroupBox)
+ self.ThemeSelectionComboItem.setEditable(True)
self.ThemeSelectionComboItem.setObjectName(u'ThemeSelectionComboItem')
self.ThemeLayout.addWidget(self.ThemeSelectionComboItem)
self.ThemeAddButton = QtGui.QPushButton(self.ThemeGroupBox)
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2010-04-03 11:59:17 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2010-04-19 05:35:24 +0000
@@ -122,6 +122,11 @@
def loadAuthors(self):
authors = self.songmanager.get_authors()
+ authorsCompleter = QtGui.QCompleter(
+ [author.display_name for author in authors],
+ self.AuthorsSelectionComboItem)
+ authorsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
+ self.AuthorsSelectionComboItem.setCompleter(authorsCompleter);
self.AuthorsSelectionComboItem.clear()
for author in authors:
row = self.AuthorsSelectionComboItem.count()
@@ -131,6 +136,11 @@
def loadTopics(self):
topics = self.songmanager.get_topics()
+ topicsCompleter = QtGui.QCompleter(
+ [topic.name for topic in topics],
+ self.SongTopicCombo)
+ topicsCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
+ self.SongTopicCombo.setCompleter(topicsCompleter);
self.SongTopicCombo.clear()
for topic in topics:
row = self.SongTopicCombo.count()
@@ -139,6 +149,11 @@
def loadBooks(self):
books = self.songmanager.get_books()
+ booksCompleter = QtGui.QCompleter(
+ [book.name for book in books],
+ self.SongbookCombo)
+ booksCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
+ self.SongbookCombo.setCompleter(booksCompleter);
self.SongbookCombo.clear()
self.SongbookCombo.addItem(u' ')
for book in books:
@@ -147,6 +162,11 @@
self.SongbookCombo.setItemData(row, QtCore.QVariant(book.id))
def loadThemes(self, theme_list):
+ themesCompleter = QtGui.QCompleter(
+ [theme for theme in theme_list],
+ self.ThemeSelectionComboItem)
+ themesCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive);
+ self.ThemeSelectionComboItem.setCompleter(themesCompleter);
self.ThemeSelectionComboItem.clear()
self.ThemeSelectionComboItem.addItem(u' ')
for theme in theme_list:
Follow ups