Update UI

Fix database name retrival
Use ORM for get_Authors method.

bzr-revno: 269
This commit is contained in:
Tim Bentley 2009-01-06 18:36:54 +00:00
parent c9c3317483
commit d6462a6ff4
8 changed files with 319 additions and 371 deletions

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'editsongdialog.ui' # Form implementation generated from reading ui file 'editsongdialog.ui'
# #
# Created: Thu Jan 1 09:56:53 2009 # Created: Mon Jan 5 19:38:13 2009
# by: PyQt4 UI code generator 4.4.3 # by: PyQt4 UI code generator 4.4.3
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -49,20 +49,17 @@ class Ui_EditSongDialog(object):
self.LyricsTextEdit.setAcceptRichText(False) self.LyricsTextEdit.setAcceptRichText(False)
self.LyricsTextEdit.setObjectName("LyricsTextEdit") self.LyricsTextEdit.setObjectName("LyricsTextEdit")
self.gridLayout.addWidget(self.LyricsTextEdit, 5, 0, 1, 1) self.gridLayout.addWidget(self.LyricsTextEdit, 5, 0, 1, 1)
self.AuthorWidget = QtGui.QWidget(self.TopWidget) self.Selectedroup = QtGui.QWidget(self.TopWidget)
self.AuthorWidget.setGeometry(QtCore.QRect(329, 0, 381, 431)) self.Selectedroup.setGeometry(QtCore.QRect(329, 0, 381, 431))
self.AuthorWidget.setObjectName("AuthorWidget") self.Selectedroup.setObjectName("Selectedroup")
self.AuthorsLabel = QtGui.QLabel(self.AuthorWidget) self.AuthorsGroupBox = QtGui.QGroupBox(self.Selectedroup)
self.AuthorsLabel.setGeometry(QtCore.QRect(0, 10, 45, 17)) self.AuthorsGroupBox.setGeometry(QtCore.QRect(0, 0, 381, 66))
self.AuthorsLabel.setObjectName("AuthorsLabel") self.AuthorsGroupBox.setObjectName("AuthorsGroupBox")
self.AuthorSelectWidget = QtGui.QWidget(self.AuthorWidget) self.horizontalLayout = QtGui.QHBoxLayout(self.AuthorsGroupBox)
self.AuthorSelectWidget.setGeometry(QtCore.QRect(0, 25, 361, 27)) self.horizontalLayout.setSpacing(2)
self.AuthorSelectWidget.setObjectName("AuthorSelectWidget") self.horizontalLayout.setMargin(2)
self.AuthorSelectWidgetLayout = QtGui.QHBoxLayout(self.AuthorSelectWidget) self.horizontalLayout.setObjectName("horizontalLayout")
self.AuthorSelectWidgetLayout.setSpacing(8) self.AuthorsSelectionComboItem = QtGui.QComboBox(self.AuthorsGroupBox)
self.AuthorSelectWidgetLayout.setMargin(0)
self.AuthorSelectWidgetLayout.setObjectName("AuthorSelectWidgetLayout")
self.AuthorsSelectionComboItem = QtGui.QComboBox(self.AuthorSelectWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -73,89 +70,75 @@ class Ui_EditSongDialog(object):
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) self.AuthorsSelectionComboItem.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
self.AuthorsSelectionComboItem.setMinimumContentsLength(8) self.AuthorsSelectionComboItem.setMinimumContentsLength(8)
self.AuthorsSelectionComboItem.setObjectName("AuthorsSelectionComboItem") self.AuthorsSelectionComboItem.setObjectName("AuthorsSelectionComboItem")
self.AuthorSelectWidgetLayout.addWidget(self.AuthorsSelectionComboItem) self.horizontalLayout.addWidget(self.AuthorsSelectionComboItem)
self.AuthorAddtoSongItem = QtGui.QPushButton(self.AuthorSelectWidget) self.AuthorAddtoSongItem = QtGui.QPushButton(self.AuthorsGroupBox)
self.AuthorAddtoSongItem.setMaximumSize(QtCore.QSize(110, 16777215)) self.AuthorAddtoSongItem.setMaximumSize(QtCore.QSize(110, 16777215))
self.AuthorAddtoSongItem.setObjectName("AuthorAddtoSongItem") self.AuthorAddtoSongItem.setObjectName("AuthorAddtoSongItem")
self.AuthorSelectWidgetLayout.addWidget(self.AuthorAddtoSongItem) self.horizontalLayout.addWidget(self.AuthorAddtoSongItem)
self.AddAuthorsButton = QtGui.QPushButton(self.AuthorSelectWidget) self.AddAuthorsButton = QtGui.QPushButton(self.AuthorsGroupBox)
self.AddAuthorsButton.setObjectName("AddAuthorsButton") self.AddAuthorsButton.setObjectName("AddAuthorsButton")
self.AuthorSelectWidgetLayout.addWidget(self.AddAuthorsButton) self.horizontalLayout.addWidget(self.AddAuthorsButton)
self.SongBookGroup = QtGui.QWidget(self.AuthorWidget) self.SongBookGroup = QtGui.QGroupBox(self.Selectedroup)
self.SongBookGroup.setGeometry(QtCore.QRect(0, 85, 351, 27)) self.SongBookGroup.setGeometry(QtCore.QRect(0, 65, 381, 61))
self.SongBookGroup.setObjectName("SongBookGroup") self.SongBookGroup.setObjectName("SongBookGroup")
self.layoutWidget = QtGui.QWidget(self.SongBookGroup) self.gridLayout_2 = QtGui.QGridLayout(self.SongBookGroup)
self.layoutWidget.setGeometry(QtCore.QRect(0, 0, 351, 29)) self.gridLayout_2.setMargin(2)
self.layoutWidget.setObjectName("layoutWidget") self.gridLayout_2.setSpacing(2)
self.SongBookLayout = QtGui.QHBoxLayout(self.layoutWidget) self.gridLayout_2.setObjectName("gridLayout_2")
self.SongBookLayout.setObjectName("SongBookLayout") self.SongbookCombo = QtGui.QComboBox(self.SongBookGroup)
self.SongbookCombo = QtGui.QComboBox(self.layoutWidget)
self.SongbookCombo.setObjectName("SongbookCombo") self.SongbookCombo.setObjectName("SongbookCombo")
self.SongBookLayout.addWidget(self.SongbookCombo) self.gridLayout_2.addWidget(self.SongbookCombo, 0, 0, 1, 1)
self.AddSongBookButton = QtGui.QPushButton(self.layoutWidget) self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
self.AddSongBookButton.setObjectName("AddSongBookButton") self.AddSongBookButton.setObjectName("AddSongBookButton")
self.SongBookLayout.addWidget(self.AddSongBookButton) self.gridLayout_2.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
self.SelectedAuthorsLabel = QtGui.QLabel(self.AuthorWidget) self.TopicGroupBox = QtGui.QGroupBox(self.Selectedroup)
self.SelectedAuthorsLabel.setGeometry(QtCore.QRect(10, 160, 96, 17)) self.TopicGroupBox.setGeometry(QtCore.QRect(0, 130, 381, 66))
self.SelectedAuthorsLabel.setObjectName("SelectedAuthorsLabel") self.TopicGroupBox.setObjectName("TopicGroupBox")
self.CopyrightWidget = QtGui.QWidget(self.AuthorWidget) self.gridLayout_3 = QtGui.QGridLayout(self.TopicGroupBox)
self.CopyrightWidget.setGeometry(QtCore.QRect(0, 368, 147, 27)) self.gridLayout_3.setMargin(2)
self.CopyrightWidget.setObjectName("CopyrightWidget") self.gridLayout_3.setSpacing(2)
self.CopyrightWidgetLayout = QtGui.QHBoxLayout(self.CopyrightWidget) self.gridLayout_3.setObjectName("gridLayout_3")
self.CopyrightWidgetLayout.setSpacing(8) self.SongTopicCombo = QtGui.QComboBox(self.TopicGroupBox)
self.CopyrightWidgetLayout.setMargin(0) self.SongTopicCombo.setObjectName("SongTopicCombo")
self.CopyrightWidgetLayout.setObjectName("CopyrightWidgetLayout") self.gridLayout_3.addWidget(self.SongTopicCombo, 0, 0, 1, 1)
self.SongBookLabel = QtGui.QLabel(self.AuthorWidget) self.AddTopicsToSongButton = QtGui.QPushButton(self.TopicGroupBox)
self.SongBookLabel.setGeometry(QtCore.QRect(0, 50, 57, 27)) self.AddTopicsToSongButton.setObjectName("AddTopicsToSongButton")
self.SongBookLabel.setObjectName("SongBookLabel") self.gridLayout_3.addWidget(self.AddTopicsToSongButton, 0, 1, 1, 1)
self.Topiclabel = QtGui.QLabel(self.AuthorWidget) self.AddTopicButton = QtGui.QPushButton(self.TopicGroupBox)
self.Topiclabel.setGeometry(QtCore.QRect(0, 110, 242, 27)) self.AddTopicButton.setObjectName("AddTopicButton")
self.Topiclabel.setObjectName("Topiclabel") self.gridLayout_3.addWidget(self.AddTopicButton, 0, 2, 1, 1)
self.SelectedTopicsLabel = QtGui.QLabel(self.AuthorWidget) self.SelectedAuthorGroupBox = QtGui.QGroupBox(self.Selectedroup)
self.SelectedTopicsLabel.setGeometry(QtCore.QRect(180, 160, 96, 17)) self.SelectedAuthorGroupBox.setGeometry(QtCore.QRect(0, 200, 191, 231))
self.SelectedTopicsLabel.setObjectName("SelectedTopicsLabel") self.SelectedAuthorGroupBox.setObjectName("SelectedAuthorGroupBox")
self.layoutWidget1 = QtGui.QWidget(self.AuthorWidget) self.verticalLayout = QtGui.QVBoxLayout(self.SelectedAuthorGroupBox)
self.layoutWidget1.setGeometry(QtCore.QRect(10, 180, 341, 191)) self.verticalLayout.setSpacing(2)
self.layoutWidget1.setObjectName("layoutWidget1") self.verticalLayout.setMargin(2)
self.SelectedAuthorsGroup = QtGui.QHBoxLayout(self.layoutWidget1) self.verticalLayout.setObjectName("verticalLayout")
self.SelectedAuthorsGroup.setObjectName("SelectedAuthorsGroup") self.AuthorsListView = QtGui.QTableWidget(self.SelectedAuthorGroupBox)
self.AuthorsListView = QtGui.QTableWidget(self.layoutWidget1)
self.AuthorsListView.setAlternatingRowColors(True) self.AuthorsListView.setAlternatingRowColors(True)
self.AuthorsListView.setObjectName("AuthorsListView") self.AuthorsListView.setObjectName("AuthorsListView")
self.AuthorsListView.setColumnCount(0) self.AuthorsListView.setColumnCount(0)
self.AuthorsListView.setRowCount(0) self.AuthorsListView.setRowCount(0)
self.SelectedAuthorsGroup.addWidget(self.AuthorsListView) self.verticalLayout.addWidget(self.AuthorsListView)
self.ToticsListView = QtGui.QTableWidget(self.layoutWidget1) self.AuthorRemoveItem = QtGui.QPushButton(self.SelectedAuthorGroupBox)
self.AuthorRemoveItem.setObjectName("AuthorRemoveItem")
self.verticalLayout.addWidget(self.AuthorRemoveItem)
self.SelectedTopicGroupBox = QtGui.QGroupBox(self.Selectedroup)
self.SelectedTopicGroupBox.setGeometry(QtCore.QRect(190, 200, 181, 231))
self.SelectedTopicGroupBox.setObjectName("SelectedTopicGroupBox")
self.verticalLayout_2 = QtGui.QVBoxLayout(self.SelectedTopicGroupBox)
self.verticalLayout_2.setSpacing(2)
self.verticalLayout_2.setMargin(2)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.ToticsListView = QtGui.QTableWidget(self.SelectedTopicGroupBox)
self.ToticsListView.setAlternatingRowColors(True) self.ToticsListView.setAlternatingRowColors(True)
self.ToticsListView.setObjectName("ToticsListView") self.ToticsListView.setObjectName("ToticsListView")
self.ToticsListView.setColumnCount(0) self.ToticsListView.setColumnCount(0)
self.ToticsListView.setRowCount(0) self.ToticsListView.setRowCount(0)
self.SelectedAuthorsGroup.addWidget(self.ToticsListView) self.verticalLayout_2.addWidget(self.ToticsListView)
self.layoutWidget2 = QtGui.QWidget(self.AuthorWidget) self.pushButton = QtGui.QPushButton(self.SelectedTopicGroupBox)
self.layoutWidget2.setGeometry(QtCore.QRect(3, 130, 341, 29))
self.layoutWidget2.setObjectName("layoutWidget2")
self.SongTopicLayout = QtGui.QHBoxLayout(self.layoutWidget2)
self.SongTopicLayout.setObjectName("SongTopicLayout")
self.comboBox = QtGui.QComboBox(self.layoutWidget2)
self.comboBox.setObjectName("comboBox")
self.SongTopicLayout.addWidget(self.comboBox)
self.AddTopicsToSongButton = QtGui.QPushButton(self.layoutWidget2)
self.AddTopicsToSongButton.setObjectName("AddTopicsToSongButton")
self.SongTopicLayout.addWidget(self.AddTopicsToSongButton)
self.AddTopicButton = QtGui.QPushButton(self.layoutWidget2)
self.AddTopicButton.setObjectName("AddTopicButton")
self.SongTopicLayout.addWidget(self.AddTopicButton)
self.layoutWidget3 = QtGui.QWidget(self.AuthorWidget)
self.layoutWidget3.setGeometry(QtCore.QRect(10, 380, 341, 29))
self.layoutWidget3.setObjectName("layoutWidget3")
self.RemoveAuthorsLayout = QtGui.QHBoxLayout(self.layoutWidget3)
self.RemoveAuthorsLayout.setObjectName("RemoveAuthorsLayout")
self.AuthorRemoveItem = QtGui.QPushButton(self.layoutWidget3)
self.AuthorRemoveItem.setObjectName("AuthorRemoveItem")
self.RemoveAuthorsLayout.addWidget(self.AuthorRemoveItem)
self.pushButton = QtGui.QPushButton(self.layoutWidget3)
self.pushButton.setObjectName("pushButton") self.pushButton.setObjectName("pushButton")
self.RemoveAuthorsLayout.addWidget(self.pushButton) self.verticalLayout_2.addWidget(self.pushButton)
self.ThemeWidget = QtGui.QWidget(EditSongDialog) self.ThemeWidget = QtGui.QWidget(EditSongDialog)
self.ThemeWidget.setGeometry(QtCore.QRect(10, 520, 641, 45)) self.ThemeWidget.setGeometry(QtCore.QRect(10, 520, 641, 45))
self.ThemeWidget.setObjectName("ThemeWidget") self.ThemeWidget.setObjectName("ThemeWidget")
@ -176,32 +159,39 @@ class Ui_EditSongDialog(object):
self.ButtonBox.setGeometry(QtCore.QRect(500, 570, 156, 27)) self.ButtonBox.setGeometry(QtCore.QRect(500, 570, 156, 27))
self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save) self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
self.ButtonBox.setObjectName("ButtonBox") self.ButtonBox.setObjectName("ButtonBox")
self.layoutWidget4 = QtGui.QWidget(EditSongDialog) self.layoutWidget = QtGui.QWidget(EditSongDialog)
self.layoutWidget4.setGeometry(QtCore.QRect(20, 490, 311, 25)) self.layoutWidget.setGeometry(QtCore.QRect(20, 490, 311, 25))
self.layoutWidget4.setObjectName("layoutWidget4") self.layoutWidget.setObjectName("layoutWidget")
self.VerseOrderLayout = QtGui.QHBoxLayout(self.layoutWidget4) self.VerseOrderLayout = QtGui.QHBoxLayout(self.layoutWidget)
self.VerseOrderLayout.setObjectName("VerseOrderLayout") self.VerseOrderLayout.setObjectName("VerseOrderLayout")
self.VerseOrderLabel = QtGui.QLabel(self.layoutWidget4) self.VerseOrderLabel = QtGui.QLabel(self.layoutWidget)
self.VerseOrderLabel.setObjectName("VerseOrderLabel") self.VerseOrderLabel.setObjectName("VerseOrderLabel")
self.VerseOrderLayout.addWidget(self.VerseOrderLabel) self.VerseOrderLayout.addWidget(self.VerseOrderLabel)
self.VerseOrderEdit = QtGui.QLineEdit(self.layoutWidget4) self.VerseOrderEdit = QtGui.QLineEdit(self.layoutWidget)
self.VerseOrderEdit.setObjectName("VerseOrderEdit") self.VerseOrderEdit.setObjectName("VerseOrderEdit")
self.VerseOrderLayout.addWidget(self.VerseOrderEdit) self.VerseOrderLayout.addWidget(self.VerseOrderEdit)
self.layoutWidget5 = QtGui.QWidget(EditSongDialog) self.layoutWidget1 = QtGui.QWidget(EditSongDialog)
self.layoutWidget5.setGeometry(QtCore.QRect(341, 461, 371, 52)) self.layoutWidget1.setGeometry(QtCore.QRect(340, 440, 381, 110))
self.layoutWidget5.setObjectName("layoutWidget5") self.layoutWidget1.setObjectName("layoutWidget1")
self.CopyrightLayout = QtGui.QGridLayout(self.layoutWidget5) self.CopyrightLayout = QtGui.QFormLayout(self.layoutWidget1)
self.CopyrightLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
self.CopyrightLayout.setObjectName("CopyrightLayout") self.CopyrightLayout.setObjectName("CopyrightLayout")
self.CopyrightInfoLabel = QtGui.QLabel(self.layoutWidget5) self.CopyrightInfoLabel = QtGui.QLabel(self.layoutWidget1)
self.CopyrightInfoLabel.setObjectName("CopyrightInfoLabel") self.CopyrightInfoLabel.setObjectName("CopyrightInfoLabel")
self.CopyrightLayout.addWidget(self.CopyrightInfoLabel, 0, 0, 1, 1) self.CopyrightLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.CopyrightInfoLabel)
self.CopyrightEditItem = QtGui.QLineEdit(self.layoutWidget5) self.CopyrightEditItem = QtGui.QLineEdit(self.layoutWidget1)
self.CopyrightEditItem.setObjectName("CopyrightEditItem") self.CopyrightEditItem.setObjectName("CopyrightEditItem")
self.CopyrightLayout.addWidget(self.CopyrightEditItem, 1, 0, 1, 1) self.CopyrightLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.CopyrightEditItem)
self.CopyrightInsertItem = QtGui.QPushButton(self.layoutWidget5) self.CCLLabel = QtGui.QLabel(self.layoutWidget1)
self.CCLLabel.setObjectName("CCLLabel")
self.CopyrightLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.CCLLabel)
self.CCLNumberEdit = QtGui.QLineEdit(self.layoutWidget1)
self.CCLNumberEdit.setObjectName("CCLNumberEdit")
self.CopyrightLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.CCLNumberEdit)
self.CopyrightInsertItem = QtGui.QPushButton(self.layoutWidget1)
self.CopyrightInsertItem.setMaximumSize(QtCore.QSize(29, 16777215)) self.CopyrightInsertItem.setMaximumSize(QtCore.QSize(29, 16777215))
self.CopyrightInsertItem.setObjectName("CopyrightInsertItem") self.CopyrightInsertItem.setObjectName("CopyrightInsertItem")
self.CopyrightLayout.addWidget(self.CopyrightInsertItem, 1, 1, 1, 1) self.CopyrightLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.CopyrightInsertItem)
self.retranslateUi(EditSongDialog) self.retranslateUi(EditSongDialog)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("rejected()"), EditSongDialog.close) QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("rejected()"), EditSongDialog.close)
@ -213,20 +203,22 @@ class Ui_EditSongDialog(object):
self.TitleLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Title:", None, QtGui.QApplication.UnicodeUTF8)) self.TitleLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Title:", None, QtGui.QApplication.UnicodeUTF8))
self.AlternativeTitleLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Alternative Title:", None, QtGui.QApplication.UnicodeUTF8)) self.AlternativeTitleLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Alternative Title:", None, QtGui.QApplication.UnicodeUTF8))
self.LyricsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Lyrics:", None, QtGui.QApplication.UnicodeUTF8)) self.LyricsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Lyrics:", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Authors:", None, QtGui.QApplication.UnicodeUTF8)) self.AuthorsGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Authors", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorAddtoSongItem.setText(QtGui.QApplication.translate("EditSongDialog", "Add to Song", None, QtGui.QApplication.UnicodeUTF8)) self.AuthorAddtoSongItem.setText(QtGui.QApplication.translate("EditSongDialog", "Add to Song", None, QtGui.QApplication.UnicodeUTF8))
self.AddAuthorsButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add Authors", None, QtGui.QApplication.UnicodeUTF8)) self.AddAuthorsButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add Authors", None, QtGui.QApplication.UnicodeUTF8))
self.SongBookGroup.setTitle(QtGui.QApplication.translate("EditSongDialog", "SongBook", None, QtGui.QApplication.UnicodeUTF8))
self.AddSongBookButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add Song Book", None, QtGui.QApplication.UnicodeUTF8)) self.AddSongBookButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add Song Book", None, QtGui.QApplication.UnicodeUTF8))
self.SelectedAuthorsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Selected Authors:", None, QtGui.QApplication.UnicodeUTF8)) self.TopicGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Topic", None, QtGui.QApplication.UnicodeUTF8))
self.SongBookLabel.setText(QtGui.QApplication.translate("EditSongDialog", "SongBook", None, QtGui.QApplication.UnicodeUTF8))
self.Topiclabel.setText(QtGui.QApplication.translate("EditSongDialog", "SongTopic", None, QtGui.QApplication.UnicodeUTF8))
self.SelectedTopicsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Selected Topics:", None, QtGui.QApplication.UnicodeUTF8))
self.AddTopicsToSongButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add to Song", None, QtGui.QApplication.UnicodeUTF8)) self.AddTopicsToSongButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add to Song", None, QtGui.QApplication.UnicodeUTF8))
self.AddTopicButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add Topic", None, QtGui.QApplication.UnicodeUTF8)) self.AddTopicButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add Topic", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorRemoveItem.setText(QtGui.QApplication.translate("EditSongDialog", "Remove Selected Author(s)", None, QtGui.QApplication.UnicodeUTF8)) self.SelectedAuthorGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Selected Authors", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton.setText(QtGui.QApplication.translate("EditSongDialog", "Remove Selected Topics", None, QtGui.QApplication.UnicodeUTF8)) self.AuthorRemoveItem.setText(QtGui.QApplication.translate("EditSongDialog", "Remove", None, QtGui.QApplication.UnicodeUTF8))
self.SelectedTopicGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Selected Topics", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton.setText(QtGui.QApplication.translate("EditSongDialog", "Remove", None, QtGui.QApplication.UnicodeUTF8))
self.ThemeLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Theme", None, QtGui.QApplication.UnicodeUTF8)) self.ThemeLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Theme", None, QtGui.QApplication.UnicodeUTF8))
self.ThemeAddItem.setText(QtGui.QApplication.translate("EditSongDialog", "Add a Theme", None, QtGui.QApplication.UnicodeUTF8)) self.ThemeAddItem.setText(QtGui.QApplication.translate("EditSongDialog", "Add a Theme", None, QtGui.QApplication.UnicodeUTF8))
self.VerseOrderLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Verse Order:", None, QtGui.QApplication.UnicodeUTF8)) self.VerseOrderLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Verse Order:", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightInfoLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Copyright Info:", None, QtGui.QApplication.UnicodeUTF8)) self.CopyrightInfoLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Copyright Info:", None, QtGui.QApplication.UnicodeUTF8))
self.CCLLabel.setText(QtGui.QApplication.translate("EditSongDialog", "CCL Number:", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightInsertItem.setText(QtGui.QApplication.translate("EditSongDialog", "©", None, QtGui.QApplication.UnicodeUTF8)) self.CopyrightInsertItem.setText(QtGui.QApplication.translate("EditSongDialog", "©", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -27,6 +27,8 @@ from songbookform import SongBookForm
from editsongdialog import Ui_EditSongDialog from editsongdialog import Ui_EditSongDialog
from openlp.plugins.songs.lib.songtable import Author
class EditSongForm(QWidget, Ui_EditSongDialog): class EditSongForm(QWidget, Ui_EditSongDialog):
""" """
Class documentation goes here. Class documentation goes here.
@ -46,9 +48,8 @@ class EditSongForm(QWidget, Ui_EditSongDialog):
def initialise(self): def initialise(self):
list = self.songmanager.get_authors() list = self.songmanager.get_authors()
self.AuthorsSelectionComboItem.clear() self.AuthorsSelectionComboItem.clear()
#print list for i in list:
for l in list: self.AuthorsSelectionComboItem.addItem( i.get_author_name())
self.AuthorsSelectionComboItem.addItem(str(l[1]))
def load_song(self, songid): def load_song(self, songid):
self.songid = songid self.songid = songid

View File

@ -15,7 +15,8 @@ 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA Place, Suite 330, Boston, MA 02111-1307 USA
""" """
import os, os.path import os
import os.path
import sys import sys
import time import time
import datetime import datetime
@ -25,10 +26,12 @@ import string
from sqlalchemy import * from sqlalchemy import *
from sqlalchemy.sql import select from sqlalchemy.sql import select
from sqlalchemy.orm import sessionmaker, mapper from sqlalchemy.orm import sessionmaker, mapper
from sqlalchemy.types import Text, Unicode
from openlp.plugins.bibles.lib.biblecommon import BibleCommon
from openlp.core.utils import ConfigHelper from openlp.core.utils import ConfigHelper
from songtable import Author
import logging import logging
class SongDBException(Exception): class SongDBException(Exception):
@ -40,40 +43,30 @@ metadata = MetaData()
author_table = Table('authors', metadata, author_table = Table('authors', metadata,
Column('authorid', Integer, primary_key=True), Column('authorid', Integer, primary_key=True),
Column('authorname', String(40)), Column('authorname', Unicode(length=40)),
Column('first_name', String(40)), Column('first_name', Unicode(length=40)),
Column('last_name', String(40)), Column('last_name',Unicode(length=40)),
) )
class Author(object):
def __init__(self, authorname, first_name, last_name):
#self.authorid = authorid
self.authorname =authorname
self.first_name =first_name
self.last_name =last_name
def __repr__(self):
return "<authormeta(%s,%s,%s)>" , self.authorname, self.first_name, self.last_name
mapper(Author,author_table) mapper(Author,author_table)
class SongDBImpl(BibleCommon): class SongDBImpl():
global log global log
log=logging.getLogger("SongDBImpl") log=logging.getLogger("SongDBImpl")
log.info("SongDBImpl loaded") log.info("SongDBImpl loaded")
def __init__(self, songpath , suffix, btype = 'sqlite'): def __init__(self, songpath , songname, suffix, btype = 'sqlite'):
# Connect to database # Connect to database
self.songfile = os.path.join(songpath, "songs."+suffix) self.songfile = os.path.join(songpath, songname)
log.debug( "Load Song on path %s", self.songfile) log.debug( "Load Song on path %s", self.songfile)
if btype == 'sqlite': if btype == 'sqlite':
self.db = create_engine("sqlite:///"+self.songfile, convert_unicode=True) self.db = create_engine("sqlite:///"+self.songfile, encoding='utf-8' , convert_unicode=False, assert_unicode=False)
elif btype == 'mysql': elif btype == 'mysql':
self.db = create_engine("mysql://tim:@192.168.0.100:3306/openlp_rsv_bible") self.db = create_engine("mysql://tim:@192.168.0.100:3306/openlp_song")
else: else:
raise BibleInvalidDatabaseError("Database not mysql or sqlite") raise SongInvalidDatabaseError("Database not mysql or sqlite")
self.db.echo = True self.db.echo = True
self.db.convert_unicode=False #self.db.convert_unicode=False
metadata.bind = self.db metadata.bind = self.db
metadata.bind.echo = False metadata.bind.echo = False
self.Session = sessionmaker(autoflush=True, autocommit=False) self.Session = sessionmaker(autoflush=True, autocommit=False)
@ -83,17 +76,6 @@ class SongDBImpl(BibleCommon):
#self.songauthors = Table('songauthors', metadata, autoload=True) #self.songauthors = Table('songauthors', metadata, autoload=True)
#self.songs = Table('songs', metadata, autoload=True) #self.songs = Table('songs', metadata, autoload=True)
def create_tables(self):
log.debug( "createTables")
if os.path.exists(self.biblefile): # delete bible file and set it up again
os.remove(self.biblefile)
meta_table.create()
testament_table.create()
book_table.create()
verse_table.create()
self.save_meta("dbversion", "2")
self._loadTestaments()
def add_author(self, author_name, first_name, last_name): def add_author(self, author_name, first_name, last_name):
log.debug( "add_author %s,%s,%s", author_name, first_name, last_name) log.debug( "add_author %s,%s,%s", author_name, first_name, last_name)
metadata.bind.echo = True metadata.bind.echo = True
@ -127,8 +109,8 @@ class SongDBImpl(BibleCommon):
def get_authors(self): def get_authors(self):
log.debug( "get_authors ") log.debug( "get_authors ")
metadata.bind.echo = False metadata.bind.echo = False
s = text (""" select authorid, authorname FROM authors order by authorname """) session = self.Session()
return self.db.execute(s).fetchall() return session.query(Author).order_by(Author.authorname).all()
def get_author(self, authorid): def get_author(self, authorid):
log.debug( "get_author %s" , authorid) log.debug( "get_author %s" , authorid)
@ -160,42 +142,6 @@ class SongDBImpl(BibleCommon):
s = text (""" select * FROM songauthors where songid = :c """) s = text (""" select * FROM songauthors where songid = :c """)
return self.db.execute(s, c=songid).fetchall() return self.db.execute(s, c=songid).fetchall()
def get_max_bible_book_verses(self, bookname, chapter):
log.debug( "get_max_bible_book_verses %s,%s ", bookname , chapter)
metadata.bind.echo = False
s = text (""" select max(verse.verse) from verse,book where chapter = :c and book_id = book.id and book.name = :b """)
return self.db.execute(s, c=chapter, b=bookname).fetchone()
def get_max_bible_book_chapter(self, bookname):
log.debug( "get_max_bible_book_chapter %s ", bookname )
metadata.bind.echo = False
s = text (""" select max(verse.chapter) from verse,book where book_id = book.id and book.name = :b """)
return self.db.execute(s, b=bookname).fetchone()
def get_bible_book(self, bookname):
log.debug( "get_bible_book %s", bookname)
metadata.bind.echo = False
s = text (""" select name FROM book where book.name == :b """)
return self.db.execute(s, b=bookname).fetchone()
def get_bible_book_Id(self, bookname):
log.debug( "get_bible_book_id %s", bookname)
metadata.bind.echo = False
s = text (""" select id FROM book where book.name == :b """)
return self.db.execute(s, b=bookname).fetchone()
def get_bible_chapter(self, bookname, chapter):
log.debug( "get_bible_chapter %s,%s", bookname, chapter )
metadata.bind.echo = False
s = text (""" select book.name FROM verse,book where verse.book_id == book.id AND verse.chapter == :c and book.name == :b """)
return self.db.execute(s, c=chapter, b=bookname).fetchone()
def get_bible_text(self, bookname, chapter, sverse, everse):
log.debug( "get_bible_text %s,%s,%s,%s ", bookname, chapter, sverse, everse)
metadata.bind.echo = False
s = text (""" select name,chapter,verse.verse, verse.text FROM verse , book where verse.book_id == book.id AND verse.chapter == :c AND (verse.verse between :v1 and :v2) and book.name == :b """)
return self.db.execute(s, c=chapter, v1=sverse , v2=everse, b=bookname).fetchall()
def get_song_from_lyrics(self,searchtext): def get_song_from_lyrics(self,searchtext):
log.debug( "get_song_from_lyrics %s",searchtext) log.debug( "get_song_from_lyrics %s",searchtext)
metadata.bind.echo = False metadata.bind.echo = False

View File

@ -23,7 +23,6 @@ import sys
from songDBimpl import SongDBImpl from songDBimpl import SongDBImpl
import logging import logging
class SongManager(): class SongManager():
@ -40,6 +39,7 @@ class SongManager():
""" """
self.config = config self.config = config
log.debug( "Song Initialising") log.debug( "Song Initialising")
self.songDBCache = None
self.authorcache = None self.authorcache = None
self.songPath = self.config.get_data_path() self.songPath = self.config.get_data_path()
self.songSuffix = self.config.get_config("suffix name", u'olp3,sqlite') self.songSuffix = self.config.get_config("suffix name", u'olp3,sqlite')
@ -49,9 +49,14 @@ class SongManager():
files = self.config.get_files() files = self.config.get_files()
if len(files) > 0: if len(files) > 0:
log.debug("Song File %s", files ) log.debug("Song File %s", files )
self.songDBCache = SongDBImpl(self.songPath, self.songSuffix) self.songDBCache = SongDBImpl(self.songPath,files[0], self.songSuffix)
log.debug( "Song Initialised") log.debug( "Song Initialised")
def have_song_database(self):
if self.songDBCache == None:
return False
return True
def process_dialog(self, dialogobject): def process_dialog(self, dialogobject):
self.dialogobject = dialogobject self.dialogobject = dialogobject

View File

@ -52,7 +52,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="3"> <item row="0" column="1" colspan="4">
<widget class="QLineEdit" name="DisplayEdit"/> <widget class="QLineEdit" name="DisplayEdit"/>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
@ -62,7 +62,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="3"> <item row="1" column="1" colspan="4">
<widget class="QLineEdit" name="FirstNameEdit"/> <widget class="QLineEdit" name="FirstNameEdit"/>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
@ -72,7 +72,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" colspan="3"> <item row="2" column="1" colspan="4">
<widget class="QLineEdit" name="LastNameEdit"/> <widget class="QLineEdit" name="LastNameEdit"/>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">
@ -88,7 +88,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="3" column="2"> <item row="3" column="3">
<widget class="QPushButton" name="DeleteButton"> <widget class="QPushButton" name="DeleteButton">
<property name="toolTip"> <property name="toolTip">
<string>Delete Author</string> <string>Delete Author</string>
@ -102,7 +102,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="3"> <item row="3" column="4">
<widget class="QPushButton" name="AddUpdateButton"> <widget class="QPushButton" name="AddUpdateButton">
<property name="toolTip"> <property name="toolTip">
<string>Add Update Author</string> <string>Add Update Author</string>
@ -116,6 +116,20 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2">
<widget class="QPushButton" name="ClearButton">
<property name="toolTip">
<string>Clear Selection</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/songs/song_edit.png</normaloff>:/songs/song_edit.png</iconset>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QLabel" name="MessageLabel"> <widget class="QLabel" name="MessageLabel">
@ -140,14 +154,21 @@
<height>301</height> <height>301</height>
</rect> </rect>
</property> </property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="alternatingRowColors"> <property name="alternatingRowColors">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="columnCount"> <property name="columnCount">
<number>2</number> <number>0</number>
</property> </property>
<column/> <attribute name="verticalHeaderVisible">
<column/> <bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget> </widget>
</widget> </widget>
<resources> <resources>

View File

@ -82,7 +82,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="AuthorWidget" native="true"> <widget class="QWidget" name="Selectedroup" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>329</x> <x>329</x>
@ -91,34 +91,24 @@
<height>431</height> <height>431</height>
</rect> </rect>
</property> </property>
<widget class="QLabel" name="AuthorsLabel"> <widget class="QGroupBox" name="AuthorsGroupBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>10</y> <y>0</y>
<width>45</width> <width>381</width>
<height>17</height> <height>66</height>
</rect> </rect>
</property> </property>
<property name="text"> <property name="title">
<string>Authors:</string> <string>Authors</string>
</property> </property>
</widget> <layout class="QHBoxLayout" name="horizontalLayout">
<widget class="QWidget" name="AuthorSelectWidget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>25</y>
<width>361</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="AuthorSelectWidgetLayout">
<property name="spacing"> <property name="spacing">
<number>8</number> <number>2</number>
</property> </property>
<property name="margin"> <property name="margin">
<number>0</number> <number>2</number>
</property> </property>
<item> <item>
<widget class="QComboBox" name="AuthorsSelectionComboItem"> <widget class="QComboBox" name="AuthorsSelectionComboItem">
@ -164,155 +154,67 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="SongBookGroup" native="true"> <widget class="QGroupBox" name="SongBookGroup">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>85</y> <y>65</y>
<width>351</width> <width>381</width>
<height>27</height> <height>61</height>
</rect> </rect>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <property name="title">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>351</width>
<height>29</height>
</rect>
</property>
<layout class="QHBoxLayout" name="SongBookLayout">
<item>
<widget class="QComboBox" name="SongbookCombo"/>
</item>
<item>
<widget class="QPushButton" name="AddSongBookButton">
<property name="text">
<string>Add Song Book</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QLabel" name="SelectedAuthorsLabel">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>96</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Selected Authors:</string>
</property>
</widget>
<widget class="QWidget" name="CopyrightWidget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>368</y>
<width>147</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="CopyrightWidgetLayout">
<property name="spacing">
<number>8</number>
</property>
<property name="margin">
<number>0</number>
</property>
</layout>
</widget>
<widget class="QLabel" name="SongBookLabel">
<property name="geometry">
<rect>
<x>0</x>
<y>50</y>
<width>57</width>
<height>27</height>
</rect>
</property>
<property name="text">
<string>SongBook</string> <string>SongBook</string>
</property> </property>
</widget> <layout class="QGridLayout" name="gridLayout_2">
<widget class="QLabel" name="Topiclabel"> <property name="margin">
<property name="geometry"> <number>2</number>
<rect> </property>
<x>0</x> <property name="spacing">
<y>110</y> <number>2</number>
<width>242</width> </property>
<height>27</height> <item row="0" column="0">
</rect> <widget class="QComboBox" name="SongbookCombo"/>
</property>
<property name="text">
<string>SongTopic</string>
</property>
</widget>
<widget class="QLabel" name="SelectedTopicsLabel">
<property name="geometry">
<rect>
<x>180</x>
<y>160</y>
<width>96</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Selected Topics:</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
<width>341</width>
<height>191</height>
</rect>
</property>
<layout class="QHBoxLayout" name="SelectedAuthorsGroup">
<item>
<widget class="QTableWidget" name="AuthorsListView">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QTableWidget" name="ToticsListView"> <widget class="QPushButton" name="AddSongBookButton">
<property name="alternatingRowColors"> <property name="text">
<bool>true</bool> <string>Add Song Book</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QGroupBox" name="TopicGroupBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>3</x> <x>0</x>
<y>130</y> <y>130</y>
<width>341</width> <width>381</width>
<height>29</height> <height>66</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="SongTopicLayout"> <property name="title">
<item> <string>Topic</string>
<widget class="QComboBox" name="comboBox"/> </property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<number>2</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<item row="0" column="0">
<widget class="QComboBox" name="SongTopicCombo"/>
</item> </item>
<item> <item row="0" column="1">
<widget class="QPushButton" name="AddTopicsToSongButton"> <widget class="QPushButton" name="AddTopicsToSongButton">
<property name="text"> <property name="text">
<string>Add to Song</string> <string>Add to Song</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="2">
<widget class="QPushButton" name="AddTopicButton"> <widget class="QPushButton" name="AddTopicButton">
<property name="text"> <property name="text">
<string>Add Topic</string> <string>Add Topic</string>
@ -321,33 +223,79 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget"> <widget class="QGroupBox" name="SelectedAuthorGroupBox">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>0</x>
<y>380</y> <y>200</y>
<width>341</width> <width>191</width>
<height>29</height> <height>231</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="RemoveAuthorsLayout"> <property name="title">
<string>Selected Authors</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QTableWidget" name="AuthorsListView">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="AuthorRemoveItem"> <widget class="QPushButton" name="AuthorRemoveItem">
<property name="text"> <property name="text">
<string>Remove Selected Author(s)</string> <string>Remove</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="SelectedTopicGroupBox">
<property name="geometry">
<rect>
<x>190</x>
<y>200</y>
<width>181</width>
<height>231</height>
</rect>
</property>
<property name="title">
<string>Selected Topics</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QTableWidget" name="ToticsListView">
<property name="alternatingRowColors">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="pushButton">
<property name="text"> <property name="text">
<string>Remove Selected Topics</string> <string>Remove</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
<zorder>Selectedroup</zorder>
<zorder>TextWidget</zorder>
</widget> </widget>
<widget class="QWidget" name="ThemeWidget" native="true"> <widget class="QWidget" name="ThemeWidget" native="true">
<property name="geometry"> <property name="geometry">
@ -428,13 +376,16 @@
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>341</x> <x>340</x>
<y>461</y> <y>440</y>
<width>371</width> <width>381</width>
<height>52</height> <height>110</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="CopyrightLayout"> <layout class="QFormLayout" name="CopyrightLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="CopyrightInfoLabel"> <widget class="QLabel" name="CopyrightInfoLabel">
<property name="text"> <property name="text">
@ -445,6 +396,16 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLineEdit" name="CopyrightEditItem"/> <widget class="QLineEdit" name="CopyrightEditItem"/>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="CCLLabel">
<property name="text">
<string>CCL Number:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="CCLNumberEdit"/>
</item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="CopyrightInsertItem"> <widget class="QPushButton" name="CopyrightInsertItem">
<property name="maximumSize"> <property name="maximumSize">
@ -460,11 +421,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<zorder>layoutWidget</zorder>
<zorder>TopWidget</zorder>
<zorder>ThemeWidget</zorder>
<zorder>ButtonBox</zorder>
<zorder>layoutWidget</zorder>
</widget> </widget>
<resources> <resources>
<include location="../images/openlp-2.qrc"/> <include location="../images/openlp-2.qrc"/>

View File

@ -30,7 +30,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="3"> <item row="0" column="1" colspan="4">
<widget class="QLineEdit" name="NameEdit"/> <widget class="QLineEdit" name="NameEdit"/>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
@ -40,7 +40,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" colspan="3"> <item row="1" column="1" colspan="4">
<widget class="QLineEdit" name="PublisherEdit"/> <widget class="QLineEdit" name="PublisherEdit"/>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
@ -56,7 +56,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="2"> <item row="2" column="3">
<widget class="QPushButton" name="DeleteButton"> <widget class="QPushButton" name="DeleteButton">
<property name="toolTip"> <property name="toolTip">
<string>Delete Author</string> <string>Delete Author</string>
@ -70,7 +70,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="3"> <item row="2" column="4">
<widget class="QPushButton" name="AddUpdateButton"> <widget class="QPushButton" name="AddUpdateButton">
<property name="toolTip"> <property name="toolTip">
<string>Add Update Author</string> <string>Add Update Author</string>
@ -84,6 +84,20 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2">
<widget class="QPushButton" name="ClearButton">
<property name="toolTip">
<string>Clear Selection</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/songs/song_edit.png</normaloff>:/songs/song_edit.png</iconset>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -14,9 +14,6 @@
<string>Topic Maintenance</string> <string>Topic Maintenance</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QTableWidget" name="TopicsListView"/>
</item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="TopicGroupBox"> <widget class="QGroupBox" name="TopicGroupBox">
<property name="title"> <property name="title">
@ -30,7 +27,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="3"> <item row="0" column="1" colspan="4">
<widget class="QLineEdit" name="TopicNameEdit"/> <widget class="QLineEdit" name="TopicNameEdit"/>
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
@ -46,7 +43,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="2"> <item row="1" column="3">
<widget class="QPushButton" name="DeleteButton"> <widget class="QPushButton" name="DeleteButton">
<property name="toolTip"> <property name="toolTip">
<string>Delete Author</string> <string>Delete Author</string>
@ -60,7 +57,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3"> <item row="1" column="4">
<widget class="QPushButton" name="AddUpdateButton"> <widget class="QPushButton" name="AddUpdateButton">
<property name="toolTip"> <property name="toolTip">
<string>Add Update Author</string> <string>Add Update Author</string>
@ -74,9 +71,33 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2">
<widget class="QPushButton" name="ClearButton">
<property name="toolTip">
<string>Clear Selection</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<normaloff>:/songs/song_edit.png</normaloff>:/songs/song_edit.png</iconset>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="MessageLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QTableWidget" name="TopicsListView"/>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QDialogButtonBox" name="ButtonBox"> <widget class="QDialogButtonBox" name="ButtonBox">
<property name="orientation"> <property name="orientation">
@ -87,16 +108,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="MessageLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout> </layout>
<zorder>TopicGroupBox</zorder> <zorder>TopicGroupBox</zorder>
<zorder>TopicListView</zorder>
<zorder>MessageLabel</zorder> <zorder>MessageLabel</zorder>
<zorder>TopicsListView</zorder> <zorder>TopicsListView</zorder>
<zorder>ButtonBox</zorder> <zorder>ButtonBox</zorder>