Updated look and feel of the Edit Song dialog.

Changed the form.show() to form.exec_() for dialogs.
Added the code for the (c) button.

bzr-revno: 325
This commit is contained in:
Raoul Snyman 2009-02-19 22:25:58 +00:00
parent fae1490228
commit 58606e2563
11 changed files with 347 additions and 250 deletions

View File

@ -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-02-10, 23:33:45 -->
<!-- Saved: 2009-02-20, 00:23:18 -->
<!-- Copyright (C) 2009 Raoul Snyman, raoulsnyman@openlp.org -->
<UserProject version="4.0">
</UserProject>

View File

@ -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-02-10, 23:33:45 -->
<!-- Saved: 2009-02-20, 00:23:19 -->
<Tasks version="4.2">
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
<!-- eric4 project file for project openlp.org 2.0 -->
<!-- Saved: 2009-02-10, 23:33:45 -->
<!-- Saved: 2009-02-20, 00:23:11 -->
<!-- Copyright (C) 2009 Raoul Snyman, raoulsnyman@openlp.org -->
<Project version="4.4">
<ProgLanguage mixed="0">Python</ProgLanguage>
@ -118,9 +118,10 @@
<Source>openlp/core/test/testplugins/deeper/toodeep/plugin3toodeep.py</Source>
<Source>openlp/core/lib/serviceitem.py</Source>
<Source>openlp/core/ui/slidecontroller.py</Source>
<Source>openlp/core/lib/ImageServiceItem.py</Source>
<Source>openlp/core/lib/eventreceiver.py</Source>
<Source>openlp/core/lib/imageserviceitem.py</Source>
<Source>openlp/plugins/bibles/forms/bibleeditdialog.py</Source>
<Source>resources/forms/Ui_editsongdialog.py</Source>
</Sources>
<Forms>
<Form>resources/forms/openlpexportform.ui</Form>
@ -134,12 +135,12 @@
<Form>resources/forms/songexport.ui</Form>
<Form>resources/forms/openlpimportform.ui</Form>
<Form>resources/forms/splashscreen.ui</Form>
<Form>resources/forms/bibleimportprogress.ui</Form>
<Form>resources/forms/authorsdialog.ui</Form>
<Form>resources/forms/bibleimportdialog.ui</Form>
<Form>resources/forms/songbookdialog.ui</Form>
<Form>resources/forms/topicsdialog.ui</Form>
<Form>resources/forms/editsongdialog.ui</Form>
<Form>resources/forms/bibleeditdialog.ui</Form>
</Forms>
<Translations>
</Translations>

View File

@ -35,35 +35,40 @@ class AuthorsForm(QDialog, Ui_AuthorsDialog):
"""
QDialog.__init__(self, parent)
self.setupUi(self)
self.songmanager = songmanager
self.songmanager = songmanager
self.AuthorListView.setColumnCount(2)
self.AuthorListView.setColumnHidden(0, True)
self.AuthorListView.setColumnWidth(1, 300)
self.AuthorListView.setHorizontalHeaderLabels(QtCore.QStringList([" ","Author"]))
#self.AuthorListView.setHorizontalHeaderLabels(QtCore.QStringList([" ","Author"]))
self.AuthorListView.horizontalHeader().setVisible(False)
self.AuthorListView.verticalHeader().setVisible(False)
self.currentrow = 0
self.author = None
def load_form(self):
"""
Refresh the screen and rest fields
"""
"""
self.on_ClearButton_clicked() # tidy up screen
authors = self.songmanager.get_authors()
self.AuthorListView.clear() # clear the results
self.AuthorListView.setHorizontalHeaderLabels(QtCore.QStringList([" ","Author"]))
#self.AuthorListView.setHorizontalHeaderLabels(QtCore.QStringList([" ","Author"]))
self.AuthorListView.horizontalHeader().setVisible(False)
self.AuthorListView.verticalHeader().setVisible(False)
self.AuthorListView.setRowCount(0)
for author in authors:
c = self.AuthorListView.rowCount()
self.AuthorListView.setRowCount(c+1)
twi = QtGui.QTableWidgetItem(str(author.id))
self.AuthorListView.setItem(c , 0, twi)
twi = QtGui.QTableWidgetItem(str(author.display_name))
twi.setFlags(QtCore.Qt.ItemIsSelectable)
self.AuthorListView.setItem(c , 1, twi)
self.AuthorListView.setRowHeight(c, 20)
c = self.AuthorListView.rowCount()
if self.currentrow > c: # incase we have delete the last row of the table
self.currentrow = c
row_count = self.AuthorListView.rowCount()
self.AuthorListView.setRowCount(row_count + 1)
author_id = QtGui.QTableWidgetItem(str(author.id))
self.AuthorListView.setItem(row_count, 0, author_id)
display_name = QtGui.QTableWidgetItem(author.display_name)
display_name.setFlags(QtCore.Qt.ItemIsSelectable)
self.AuthorListView.setItem(row_count, 1, display_name)
self.AuthorListView.setRowHeight(row_count, 20)
row_count = self.AuthorListView.rowCount()
if self.currentrow > row_count:
# in case we have delete the last row of the table
self.currentrow = row_count
self.AuthorListView.selectRow(self.currentrow) # set selected row to previous selected row
self._validate_form()
@ -75,11 +80,11 @@ class AuthorsForm(QDialog, Ui_AuthorsDialog):
self.songmanager.delete_author(self.author.id)
self.on_ClearButton_clicked()
self.load_form()
@pyqtSignature("")
def on_DisplayEdit_lostFocus(self):
def on_DisplayEdit_lostFocus(self):
self._validate_form()
@pyqtSignature("")
def on_AddUpdateButton_clicked(self):
"""
@ -93,9 +98,9 @@ class AuthorsForm(QDialog, Ui_AuthorsDialog):
self.songmanager.save_author(self.author)
self.on_ClearButton_clicked()
self.load_form()
self._validate_form()
self._validate_form()
@pyqtSignature("")
def on_ClearButton_clicked(self):
"""
@ -107,8 +112,8 @@ class AuthorsForm(QDialog, Ui_AuthorsDialog):
self.MessageLabel.setText("")
self.DeleteButton.setEnabled(False)
self.author = None
self._validate_form()
self._validate_form()
@pyqtSignature("QTableWidgetItem*")
def on_AuthorListView_itemClicked(self, item):
"""
@ -122,15 +127,15 @@ class AuthorsForm(QDialog, Ui_AuthorsDialog):
self.DisplayEdit.setText(self.author.display_name)
self.FirstNameEdit.setText(self.author.first_name)
self.LastNameEdit.setText(self.author.last_name)
songs = self.songmanager.get_song_authors_for_author(id)
if len(songs) > 0:
#songs = self.songmanager.get_song_authors_for_author(id)
if len(self.author.songs) > 0:
self.MessageLabel.setText("Author in use 'Delete' is disabled")
self.DeleteButton.setEnabled(False)
else:
self.MessageLabel.setText("Author is not used")
self.DeleteButton.setEnabled(True)
self._validate_form()
self.DeleteButton.setEnabled(True)
self._validate_form()
def _validate_form(self):
if len(self.DisplayEdit.displayText()) == 0: # We need at lease a display name
self.AddUpdateButton.setEnabled(False)

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file '/home/raoul/Projects/openlp-2/resources/forms/editsongdialog.ui'
#
# Created: Tue Feb 17 22:32:47 2009
# Created: Thu Feb 19 23:35:35 2009
# by: PyQt4 UI code generator 4.4.4
#
# WARNING! All changes made in this file will be lost!
@ -11,29 +11,29 @@ from PyQt4 import QtCore, QtGui
class Ui_EditSongDialog(object):
def setupUi(self, EditSongDialog):
EditSongDialog.setObjectName('EditSongDialog')
EditSongDialog.resize(786, 634)
EditSongDialog.setObjectName("EditSongDialog")
EditSongDialog.resize(786, 669)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
EditSongDialog.setWindowIcon(icon)
self.EditSongLayout = QtGui.QVBoxLayout(EditSongDialog)
self.EditSongLayout.setSpacing(8)
self.EditSongLayout.setMargin(8)
self.EditSongLayout.setObjectName('EditSongLayout')
self.EditSongLayout.setObjectName("EditSongLayout")
self.TopWidget = QtGui.QWidget(EditSongDialog)
self.TopWidget.setObjectName('TopWidget')
self.TopWidget.setObjectName("TopWidget")
self.TopLayout = QtGui.QHBoxLayout(self.TopWidget)
self.TopLayout.setSpacing(8)
self.TopLayout.setMargin(0)
self.TopLayout.setObjectName('TopLayout')
self.TopLayout.setObjectName("TopLayout")
self.TextWidget = QtGui.QWidget(self.TopWidget)
self.TextWidget.setObjectName('TextWidget')
self.TextWidget.setObjectName("TextWidget")
self.DetailsLayout = QtGui.QVBoxLayout(self.TextWidget)
self.DetailsLayout.setSpacing(8)
self.DetailsLayout.setMargin(0)
self.DetailsLayout.setObjectName('DetailsLayout')
self.DetailsLayout.setObjectName("DetailsLayout")
self.TitleLabel = QtGui.QLabel(self.TextWidget)
self.TitleLabel.setObjectName('TitleLabel')
self.TitleLabel.setObjectName("TitleLabel")
self.DetailsLayout.addWidget(self.TitleLabel)
self.TitleEditItem = QtGui.QLineEdit(self.TextWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
@ -41,67 +41,83 @@ class Ui_EditSongDialog(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TitleEditItem.sizePolicy().hasHeightForWidth())
self.TitleEditItem.setSizePolicy(sizePolicy)
self.TitleEditItem.setObjectName('TitleEditItem')
self.TitleEditItem.setObjectName("TitleEditItem")
self.DetailsLayout.addWidget(self.TitleEditItem)
self.AlternativeTitleLabel = QtGui.QLabel(self.TextWidget)
self.AlternativeTitleLabel.setObjectName('AlternativeTitleLabel')
self.AlternativeTitleLabel.setObjectName("AlternativeTitleLabel")
self.DetailsLayout.addWidget(self.AlternativeTitleLabel)
self.AlternativeEdit = QtGui.QLineEdit(self.TextWidget)
self.AlternativeEdit.setObjectName('AlternativeEdit')
self.AlternativeEdit.setObjectName("AlternativeEdit")
self.DetailsLayout.addWidget(self.AlternativeEdit)
self.LyricsLabel = QtGui.QLabel(self.TextWidget)
self.LyricsLabel.setObjectName('LyricsLabel')
self.LyricsLabel.setObjectName("LyricsLabel")
self.DetailsLayout.addWidget(self.LyricsLabel)
self.LyricsTextEdit = QtGui.QTextEdit(self.TextWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.LyricsTextEdit.sizePolicy().hasHeightForWidth())
self.LyricsTextEdit.setSizePolicy(sizePolicy)
self.LyricsTextEdit.setLineWrapMode(QtGui.QTextEdit.NoWrap)
self.LyricsTextEdit.setAcceptRichText(False)
self.LyricsTextEdit.setObjectName('LyricsTextEdit')
self.LyricsTextEdit.setObjectName("LyricsTextEdit")
self.DetailsLayout.addWidget(self.LyricsTextEdit)
self.VerseOrderLabel = QtGui.QLabel(self.TextWidget)
self.VerseOrderLabel.setObjectName('VerseOrderLabel')
self.VerseOrderLabel.setObjectName("VerseOrderLabel")
self.DetailsLayout.addWidget(self.VerseOrderLabel)
self.VerseOrderEdit = QtGui.QLineEdit(self.TextWidget)
self.VerseOrderEdit.setObjectName('VerseOrderEdit')
self.VerseOrderEdit.setObjectName("VerseOrderEdit")
self.DetailsLayout.addWidget(self.VerseOrderEdit)
self.CommentsLabel = QtGui.QLabel(self.TextWidget)
self.CommentsLabel.setObjectName('CommentsLabel')
self.CommentsLabel.setObjectName("CommentsLabel")
self.DetailsLayout.addWidget(self.CommentsLabel)
self.CommentsEdit = QtGui.QTextEdit(self.TextWidget)
self.CommentsEdit.setObjectName('CommentsEdit')
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.CommentsEdit.sizePolicy().hasHeightForWidth())
self.CommentsEdit.setSizePolicy(sizePolicy)
self.CommentsEdit.setObjectName("CommentsEdit")
self.DetailsLayout.addWidget(self.CommentsEdit)
self.ThemeGroupBox = QtGui.QGroupBox(self.TextWidget)
self.ThemeGroupBox.setObjectName('ThemeGroupBox')
self.ThemeGroupBox.setObjectName("ThemeGroupBox")
self.ThemeLayout = QtGui.QHBoxLayout(self.ThemeGroupBox)
self.ThemeLayout.setSpacing(8)
self.ThemeLayout.setMargin(8)
self.ThemeLayout.setObjectName('ThemeLayout')
self.ThemeLayout.setObjectName("ThemeLayout")
self.ThemeSelectionComboItem = QtGui.QComboBox(self.ThemeGroupBox)
self.ThemeSelectionComboItem.setObjectName('ThemeSelectionComboItem')
self.ThemeSelectionComboItem.setObjectName("ThemeSelectionComboItem")
self.ThemeLayout.addWidget(self.ThemeSelectionComboItem)
self.ThemeAddItem = QtGui.QPushButton(self.ThemeGroupBox)
self.ThemeAddItem.setMaximumSize(QtCore.QSize(110, 16777215))
self.ThemeAddItem.setObjectName('ThemeAddItem')
self.ThemeAddItem.setObjectName("ThemeAddItem")
self.ThemeLayout.addWidget(self.ThemeAddItem)
self.DetailsLayout.addWidget(self.ThemeGroupBox)
self.TopLayout.addWidget(self.TextWidget)
self.AdditionalWidget = QtGui.QWidget(self.TopWidget)
self.AdditionalWidget.setObjectName('AdditionalWidget')
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AdditionalWidget.sizePolicy().hasHeightForWidth())
self.AdditionalWidget.setSizePolicy(sizePolicy)
self.AdditionalWidget.setMinimumSize(QtCore.QSize(100, 0))
self.AdditionalWidget.setObjectName("AdditionalWidget")
self.AdditionalLayout = QtGui.QVBoxLayout(self.AdditionalWidget)
self.AdditionalLayout.setSpacing(8)
self.AdditionalLayout.setMargin(0)
self.AdditionalLayout.setObjectName('AdditionalLayout')
self.AdditionalLayout.setObjectName("AdditionalLayout")
self.AuthorsGroupBox = QtGui.QGroupBox(self.AdditionalWidget)
self.AuthorsGroupBox.setObjectName('AuthorsGroupBox')
self.AuthorsGroupBox.setObjectName("AuthorsGroupBox")
self.AuthorsLayout = QtGui.QVBoxLayout(self.AuthorsGroupBox)
self.AuthorsLayout.setSpacing(8)
self.AuthorsLayout.setMargin(8)
self.AuthorsLayout.setObjectName('AuthorsLayout')
self.AuthorsLayout.setObjectName("AuthorsLayout")
self.AuthorAddWidget = QtGui.QWidget(self.AuthorsGroupBox)
self.AuthorAddWidget.setObjectName('AuthorAddWidget')
self.AuthorAddWidget.setObjectName("AuthorAddWidget")
self.AddAuthorLayout = QtGui.QHBoxLayout(self.AuthorAddWidget)
self.AddAuthorLayout.setSpacing(8)
self.AddAuthorLayout.setMargin(0)
self.AddAuthorLayout.setObjectName('AddAuthorLayout')
self.AddAuthorLayout.setObjectName("AddAuthorLayout")
self.AuthorsSelectionComboItem = QtGui.QComboBox(self.AuthorAddWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@ -112,43 +128,48 @@ class Ui_EditSongDialog(object):
self.AuthorsSelectionComboItem.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
self.AuthorsSelectionComboItem.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
self.AuthorsSelectionComboItem.setMinimumContentsLength(8)
self.AuthorsSelectionComboItem.setObjectName('AuthorsSelectionComboItem')
self.AuthorsSelectionComboItem.setObjectName("AuthorsSelectionComboItem")
self.AddAuthorLayout.addWidget(self.AuthorsSelectionComboItem)
self.AddAuthorsButton = QtGui.QPushButton(self.AuthorAddWidget)
self.AddAuthorsButton.setObjectName('AddAuthorsButton')
self.AddAuthorLayout.addWidget(self.AddAuthorsButton)
self.AuthorAddtoSongItem = QtGui.QPushButton(self.AuthorAddWidget)
self.AuthorAddtoSongItem.setMaximumSize(QtCore.QSize(110, 16777215))
self.AuthorAddtoSongItem.setObjectName('AuthorAddtoSongItem')
self.AuthorAddtoSongItem.setObjectName("AuthorAddtoSongItem")
self.AddAuthorLayout.addWidget(self.AuthorAddtoSongItem)
self.AuthorsLayout.addWidget(self.AuthorAddWidget)
self.AuthorsListView = QtGui.QTableWidget(self.AuthorsGroupBox)
self.AuthorsListView.setAlternatingRowColors(True)
self.AuthorsListView.setObjectName('AuthorsListView')
self.AuthorsListView.setObjectName("AuthorsListView")
self.AuthorsListView.setColumnCount(0)
self.AuthorsListView.setRowCount(0)
self.AuthorsLayout.addWidget(self.AuthorsListView)
self.AuthorRemoveWidget = QtGui.QWidget(self.AuthorsGroupBox)
self.AuthorRemoveWidget.setObjectName('AuthorRemoveWidget')
self.AuthorRemoveWidget.setObjectName("AuthorRemoveWidget")
self.AuthorRemoveLayout = QtGui.QHBoxLayout(self.AuthorRemoveWidget)
self.AuthorRemoveLayout.setSpacing(8)
self.AuthorRemoveLayout.setMargin(0)
self.AuthorRemoveLayout.setObjectName('AuthorRemoveLayout')
spacerItem = QtGui.QSpacerItem(263, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.AuthorRemoveLayout.setObjectName("AuthorRemoveLayout")
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.AuthorRemoveLayout.addItem(spacerItem)
self.AuthorRemoveItem = QtGui.QPushButton(self.AuthorRemoveWidget)
self.AuthorRemoveItem.setObjectName('AuthorRemoveItem')
self.AuthorRemoveItem.setObjectName("AuthorRemoveItem")
self.AuthorRemoveLayout.addWidget(self.AuthorRemoveItem)
self.AddAuthorsButton = QtGui.QPushButton(self.AuthorRemoveWidget)
self.AddAuthorsButton.setObjectName("AddAuthorsButton")
self.AuthorRemoveLayout.addWidget(self.AddAuthorsButton)
self.AuthorsLayout.addWidget(self.AuthorRemoveWidget)
self.AdditionalLayout.addWidget(self.AuthorsGroupBox)
self.SongBookGroup = QtGui.QGroupBox(self.AdditionalWidget)
self.SongBookGroup.setObjectName('SongBookGroup')
self.SongBookGroup.setObjectName("SongBookGroup")
self.SongbookLayout = QtGui.QGridLayout(self.SongBookGroup)
self.SongbookLayout.setMargin(8)
self.SongbookLayout.setSpacing(8)
self.SongbookLayout.setObjectName('SongbookLayout')
self.SongbookLayout.setObjectName("SongbookLayout")
self.SongbookCombo = QtGui.QComboBox(self.SongBookGroup)
self.SongbookCombo.setObjectName('SongbookCombo')
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SongbookCombo.sizePolicy().hasHeightForWidth())
self.SongbookCombo.setSizePolicy(sizePolicy)
self.SongbookCombo.setObjectName("SongbookCombo")
self.SongbookLayout.addWidget(self.SongbookCombo, 0, 0, 1, 1)
self.AddSongBookButton = QtGui.QPushButton(self.SongBookGroup)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
@ -156,81 +177,96 @@ class Ui_EditSongDialog(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AddSongBookButton.sizePolicy().hasHeightForWidth())
self.AddSongBookButton.setSizePolicy(sizePolicy)
self.AddSongBookButton.setObjectName('AddSongBookButton')
self.AddSongBookButton.setObjectName("AddSongBookButton")
self.SongbookLayout.addWidget(self.AddSongBookButton, 0, 1, 1, 1)
self.AdditionalLayout.addWidget(self.SongBookGroup)
self.TopicGroupBox = QtGui.QGroupBox(self.AdditionalWidget)
self.TopicGroupBox.setObjectName('TopicGroupBox')
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TopicGroupBox.sizePolicy().hasHeightForWidth())
self.TopicGroupBox.setSizePolicy(sizePolicy)
self.TopicGroupBox.setObjectName("TopicGroupBox")
self.TopicLayout = QtGui.QVBoxLayout(self.TopicGroupBox)
self.TopicLayout.setSpacing(8)
self.TopicLayout.setMargin(8)
self.TopicLayout.setObjectName('TopicLayout')
self.TopicLayout.setObjectName("TopicLayout")
self.TopicAddWidget = QtGui.QWidget(self.TopicGroupBox)
self.TopicAddWidget.setObjectName('TopicAddWidget')
self.TopicAddWidget.setObjectName("TopicAddWidget")
self.TopicAddLayout = QtGui.QHBoxLayout(self.TopicAddWidget)
self.TopicAddLayout.setSpacing(8)
self.TopicAddLayout.setMargin(0)
self.TopicAddLayout.setObjectName('TopicAddLayout')
self.TopicAddLayout.setObjectName("TopicAddLayout")
self.SongTopicCombo = QtGui.QComboBox(self.TopicAddWidget)
self.SongTopicCombo.setObjectName('SongTopicCombo')
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.SongTopicCombo.sizePolicy().hasHeightForWidth())
self.SongTopicCombo.setSizePolicy(sizePolicy)
self.SongTopicCombo.setObjectName("SongTopicCombo")
self.TopicAddLayout.addWidget(self.SongTopicCombo)
self.AddTopicsToSongButton = QtGui.QPushButton(self.TopicAddWidget)
self.AddTopicsToSongButton.setObjectName('AddTopicsToSongButton')
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.AddTopicsToSongButton.sizePolicy().hasHeightForWidth())
self.AddTopicsToSongButton.setSizePolicy(sizePolicy)
self.AddTopicsToSongButton.setObjectName("AddTopicsToSongButton")
self.TopicAddLayout.addWidget(self.AddTopicsToSongButton)
self.AddTopicButton = QtGui.QPushButton(self.TopicAddWidget)
self.AddTopicButton.setObjectName('AddTopicButton')
self.TopicAddLayout.addWidget(self.AddTopicButton)
self.TopicLayout.addWidget(self.TopicAddWidget)
self.ToticsListView = QtGui.QTableWidget(self.TopicGroupBox)
self.ToticsListView.setAlternatingRowColors(True)
self.ToticsListView.setObjectName('ToticsListView')
self.ToticsListView.setObjectName("ToticsListView")
self.ToticsListView.setColumnCount(0)
self.ToticsListView.setRowCount(0)
self.TopicLayout.addWidget(self.ToticsListView)
self.TopicRemoveWidget = QtGui.QWidget(self.TopicGroupBox)
self.TopicRemoveWidget.setObjectName('TopicRemoveWidget')
self.TopicRemoveWidget.setObjectName("TopicRemoveWidget")
self.TopicRemoveLayout = QtGui.QHBoxLayout(self.TopicRemoveWidget)
self.TopicRemoveLayout.setSpacing(8)
self.TopicRemoveLayout.setMargin(0)
self.TopicRemoveLayout.setObjectName('TopicRemoveLayout')
spacerItem1 = QtGui.QSpacerItem(263, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicRemoveLayout.setObjectName("TopicRemoveLayout")
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicRemoveLayout.addItem(spacerItem1)
self.pushButton = QtGui.QPushButton(self.TopicRemoveWidget)
self.pushButton.setObjectName('pushButton')
self.pushButton.setObjectName("pushButton")
self.TopicRemoveLayout.addWidget(self.pushButton)
self.AddTopicButton = QtGui.QPushButton(self.TopicRemoveWidget)
self.AddTopicButton.setObjectName("AddTopicButton")
self.TopicRemoveLayout.addWidget(self.AddTopicButton)
self.TopicLayout.addWidget(self.TopicRemoveWidget)
self.AdditionalLayout.addWidget(self.TopicGroupBox)
self.CopyrightgroupBox = QtGui.QGroupBox(self.AdditionalWidget)
self.CopyrightgroupBox.setObjectName('CopyrightgroupBox')
self.CopyrightgroupBox.setObjectName("CopyrightgroupBox")
self.CopyrightLayout = QtGui.QVBoxLayout(self.CopyrightgroupBox)
self.CopyrightLayout.setSpacing(8)
self.CopyrightLayout.setMargin(8)
self.CopyrightLayout.setObjectName('CopyrightLayout')
self.CopyrightLayout.setObjectName("CopyrightLayout")
self.CopyrightWidget = QtGui.QWidget(self.CopyrightgroupBox)
self.CopyrightWidget.setObjectName('CopyrightWidget')
self.CopyrightWidget.setObjectName("CopyrightWidget")
self.CopyLayout = QtGui.QHBoxLayout(self.CopyrightWidget)
self.CopyLayout.setSpacing(8)
self.CopyLayout.setMargin(0)
self.CopyLayout.setObjectName('CopyLayout')
self.CopyLayout.setObjectName("CopyLayout")
self.CopyrightEditItem = QtGui.QLineEdit(self.CopyrightWidget)
self.CopyrightEditItem.setObjectName('CopyrightEditItem')
self.CopyrightEditItem.setObjectName("CopyrightEditItem")
self.CopyLayout.addWidget(self.CopyrightEditItem)
self.CopyrightInsertItem = QtGui.QPushButton(self.CopyrightWidget)
self.CopyrightInsertItem.setMaximumSize(QtCore.QSize(29, 16777215))
self.CopyrightInsertItem.setObjectName('CopyrightInsertItem')
self.CopyrightInsertItem.setObjectName("CopyrightInsertItem")
self.CopyLayout.addWidget(self.CopyrightInsertItem)
self.CopyrightLayout.addWidget(self.CopyrightWidget)
self.CcliWidget = QtGui.QWidget(self.CopyrightgroupBox)
self.CcliWidget.setObjectName('CcliWidget')
self.CcliWidget.setObjectName("CcliWidget")
self.CCLILayout = QtGui.QHBoxLayout(self.CcliWidget)
self.CCLILayout.setSpacing(8)
self.CCLILayout.setMargin(0)
self.CCLILayout.setObjectName('CCLILayout')
self.CCLILayout.setObjectName("CCLILayout")
self.CCLILabel = QtGui.QLabel(self.CcliWidget)
self.CCLILabel.setObjectName('CCLILabel')
self.CCLILabel.setObjectName("CCLILabel")
self.CCLILayout.addWidget(self.CCLILabel)
self.CCLNumberEdit = QtGui.QLineEdit(self.CcliWidget)
self.CCLNumberEdit.setObjectName('CCLNumberEdit')
self.CCLNumberEdit.setObjectName("CCLNumberEdit")
self.CCLILayout.addWidget(self.CCLNumberEdit)
self.CopyrightLayout.addWidget(self.CcliWidget)
self.AdditionalLayout.addWidget(self.CopyrightgroupBox)
@ -238,12 +274,12 @@ class Ui_EditSongDialog(object):
self.EditSongLayout.addWidget(self.TopWidget)
self.ButtonBox = QtGui.QDialogButtonBox(EditSongDialog)
self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
self.ButtonBox.setObjectName('ButtonBox')
self.ButtonBox.setObjectName("ButtonBox")
self.EditSongLayout.addWidget(self.ButtonBox)
self.retranslateUi(EditSongDialog)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL('rejected()'), EditSongDialog.close)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL('accepted()'), EditSongDialog.close)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("rejected()"), EditSongDialog.close)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("accepted()"), EditSongDialog.close)
QtCore.QMetaObject.connectSlotsByName(EditSongDialog)
EditSongDialog.setTabOrder(self.TitleEditItem, self.AlternativeEdit)
EditSongDialog.setTabOrder(self.AlternativeEdit, self.LyricsTextEdit)
@ -251,17 +287,13 @@ class Ui_EditSongDialog(object):
EditSongDialog.setTabOrder(self.VerseOrderEdit, self.CommentsEdit)
EditSongDialog.setTabOrder(self.CommentsEdit, self.ThemeSelectionComboItem)
EditSongDialog.setTabOrder(self.ThemeSelectionComboItem, self.ThemeAddItem)
EditSongDialog.setTabOrder(self.ThemeAddItem, self.AuthorsSelectionComboItem)
EditSongDialog.setTabOrder(self.AuthorsSelectionComboItem, self.AddAuthorsButton)
EditSongDialog.setTabOrder(self.AddAuthorsButton, self.AuthorAddtoSongItem)
EditSongDialog.setTabOrder(self.ThemeAddItem, self.AuthorAddtoSongItem)
EditSongDialog.setTabOrder(self.AuthorAddtoSongItem, self.AuthorsListView)
EditSongDialog.setTabOrder(self.AuthorsListView, self.AuthorRemoveItem)
EditSongDialog.setTabOrder(self.AuthorRemoveItem, self.SongbookCombo)
EditSongDialog.setTabOrder(self.SongbookCombo, self.AddSongBookButton)
EditSongDialog.setTabOrder(self.AddSongBookButton, self.SongTopicCombo)
EditSongDialog.setTabOrder(self.SongTopicCombo, self.AddTopicsToSongButton)
EditSongDialog.setTabOrder(self.AddTopicsToSongButton, self.AddTopicButton)
EditSongDialog.setTabOrder(self.AddTopicButton, self.ToticsListView)
EditSongDialog.setTabOrder(self.SongTopicCombo, self.ToticsListView)
EditSongDialog.setTabOrder(self.ToticsListView, self.pushButton)
EditSongDialog.setTabOrder(self.pushButton, self.CopyrightEditItem)
EditSongDialog.setTabOrder(self.CopyrightEditItem, self.CopyrightInsertItem)
@ -269,24 +301,24 @@ class Ui_EditSongDialog(object):
EditSongDialog.setTabOrder(self.CCLNumberEdit, self.ButtonBox)
def retranslateUi(self, EditSongDialog):
EditSongDialog.setWindowTitle(QtGui.QApplication.translate('EditSongDialog', 'Song Editor', 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.LyricsLabel.setText(QtGui.QApplication.translate('EditSongDialog', 'Lyrics:', None, QtGui.QApplication.UnicodeUTF8))
self.VerseOrderLabel.setText(QtGui.QApplication.translate('EditSongDialog', 'Verse Order:', None, QtGui.QApplication.UnicodeUTF8))
self.CommentsLabel.setText(QtGui.QApplication.translate('EditSongDialog', 'Comments:', None, QtGui.QApplication.UnicodeUTF8))
self.ThemeGroupBox.setTitle(QtGui.QApplication.translate('EditSongDialog', 'Theme', None, QtGui.QApplication.UnicodeUTF8))
self.ThemeAddItem.setText(QtGui.QApplication.translate('EditSongDialog', 'Add a Theme', None, QtGui.QApplication.UnicodeUTF8))
self.AuthorsGroupBox.setTitle(QtGui.QApplication.translate('EditSongDialog', 'Authors', None, QtGui.QApplication.UnicodeUTF8))
self.AddAuthorsButton.setText(QtGui.QApplication.translate('EditSongDialog', 'New Author', None, QtGui.QApplication.UnicodeUTF8))
self.AuthorAddtoSongItem.setText(QtGui.QApplication.translate('EditSongDialog', 'Add to Song', None, QtGui.QApplication.UnicodeUTF8))
self.AuthorRemoveItem.setText(QtGui.QApplication.translate('EditSongDialog', 'Remove', None, QtGui.QApplication.UnicodeUTF8))
self.SongBookGroup.setTitle(QtGui.QApplication.translate('EditSongDialog', 'Song Book', None, QtGui.QApplication.UnicodeUTF8))
self.AddSongBookButton.setText(QtGui.QApplication.translate('EditSongDialog', 'Add Song Book', None, QtGui.QApplication.UnicodeUTF8))
self.TopicGroupBox.setTitle(QtGui.QApplication.translate('EditSongDialog', 'Topic', 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.pushButton.setText(QtGui.QApplication.translate('EditSongDialog', 'Remove', None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightgroupBox.setTitle(QtGui.QApplication.translate('EditSongDialog', 'Copyright Infomaton', None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightInsertItem.setText(QtGui.QApplication.translate('EditSongDialog', '©', None, QtGui.QApplication.UnicodeUTF8))
self.CCLILabel.setText(QtGui.QApplication.translate('EditSongDialog', 'CCLI Number:', None, QtGui.QApplication.UnicodeUTF8))
EditSongDialog.setWindowTitle(QtGui.QApplication.translate("EditSongDialog", "Song Editor", 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.LyricsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Lyrics:", None, QtGui.QApplication.UnicodeUTF8))
self.VerseOrderLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Verse Order:", None, QtGui.QApplication.UnicodeUTF8))
self.CommentsLabel.setText(QtGui.QApplication.translate("EditSongDialog", "Comments:", None, QtGui.QApplication.UnicodeUTF8))
self.ThemeGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Theme", None, QtGui.QApplication.UnicodeUTF8))
self.ThemeAddItem.setText(QtGui.QApplication.translate("EditSongDialog", "Add a Theme", 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.AuthorRemoveItem.setText(QtGui.QApplication.translate("EditSongDialog", "Remove", None, QtGui.QApplication.UnicodeUTF8))
self.AddAuthorsButton.setText(QtGui.QApplication.translate("EditSongDialog", "Manage Authors", None, QtGui.QApplication.UnicodeUTF8))
self.SongBookGroup.setTitle(QtGui.QApplication.translate("EditSongDialog", "Song Book", None, QtGui.QApplication.UnicodeUTF8))
self.AddSongBookButton.setText(QtGui.QApplication.translate("EditSongDialog", "Manage Song Books", None, QtGui.QApplication.UnicodeUTF8))
self.TopicGroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Topic", None, QtGui.QApplication.UnicodeUTF8))
self.AddTopicsToSongButton.setText(QtGui.QApplication.translate("EditSongDialog", "Add to Song", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton.setText(QtGui.QApplication.translate("EditSongDialog", "Remove", None, QtGui.QApplication.UnicodeUTF8))
self.AddTopicButton.setText(QtGui.QApplication.translate("EditSongDialog", "Manage Topics", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightgroupBox.setTitle(QtGui.QApplication.translate("EditSongDialog", "Copyright Infomaton", None, QtGui.QApplication.UnicodeUTF8))
self.CopyrightInsertItem.setText(QtGui.QApplication.translate("EditSongDialog", "©", None, QtGui.QApplication.UnicodeUTF8))
self.CCLILabel.setText(QtGui.QApplication.translate("EditSongDialog", "CCLI Number:", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -37,6 +37,11 @@ class EditSongForm(QDialog, Ui_EditSongDialog):
"""
QDialog.__init__(self, parent)
self.setupUi(self)
# Connecting signals and slots
QtCore.QObject.connect(self.AddAuthorsButton, QtCore.SIGNAL('clicked()'), self.onAddAuthorsButtonClicked)
QtCore.QObject.connect(self.AddTopicButton, QtCore.SIGNAL('clicked()'), self.onAddTopicButtonClicked)
QtCore.QObject.connect(self.CopyrightInsertItem, QtCore.SIGNAL('clicked()'), self.onCopyrightInsertItemTriggered)
# Create other objects and forms
self.songmanager = songmanager
self.authors_form = AuthorsForm(self.songmanager)
self.topics_form = TopicsForm(self.songmanager)
@ -57,8 +62,8 @@ class EditSongForm(QDialog, Ui_EditSongDialog):
for i in list:
self.AuthorsSelectionComboItem.addItem( i.display_name)
def load_song(self, songid):
self.song = self.songmanager.get_song(songid)
def loadSong(self, id):
self.song = self.songmanager.get_song(id)
self.TitleEditItem.setText(self.song.title)
self.LyricsTextEdit.setText(self.song.lyrics)
self.CopyrightEditItem.setText(self.song.copyright)
@ -70,30 +75,28 @@ class EditSongForm(QDialog, Ui_EditSongDialog):
self.AuthorsListView.verticalHeader().setVisible(False)
self.AuthorsListView.setRowCount(0)
for author in self.song.authors:
c = self.AuthorsListView.rowCount()
self.AuthorsListView.setRowCount(c+1)
row_count = self.AuthorsListView.rowCount()
self.AuthorsListView.setRowCount(row_count + 1)
author_id = QtGui.QTableWidgetItem(str(author.id))
self.AuthorsListView.setItem(c , 0, author_id)
self.AuthorsListView.setItem(row_count, 0, author_id)
author_name = QtGui.QTableWidgetItem(str(author.display_name))
self.AuthorsListView.setItem(c , 1, author_name)
self.AuthorsListView.setRowHeight(c, 20)
self.AuthorsListView.setItem(row_count, 1, author_name)
self.AuthorsListView.setRowHeight(row_count, 20)
self._validate_song()
@pyqtSignature("")
def on_AddAuthorsButton_clicked(self):
def onAddAuthorsButtonClicked(self):
"""
Slot documentation goes here.
"""
self.authors_form.load_form()
self.authors_form.show()
self.authors_form.exec_()
@pyqtSignature("")
def on_AddTopicButton_clicked(self):
def onAddTopicButtonClicked(self):
"""
Slot documentation goes here.
"""
self.topics_form.load_form()
self.topics_form.show()
self.topics_form.exec_()
@pyqtSignature("")
def on_AddSongBookButton_clicked(self):
@ -101,7 +104,7 @@ class EditSongForm(QDialog, Ui_EditSongDialog):
Slot documentation goes here.
"""
self.song_book_form.load_form()
self.song_book_form.show()
self.song_book_form.exec_()
def _validate_song(self):
"""
@ -137,6 +140,10 @@ class EditSongForm(QDialog, Ui_EditSongDialog):
#self._validate_song()
pass
def on_CopyrightEditItem_lostFocus(self):
#self._validate_song()
pass
def onCopyrightInsertItemTriggered(self):
text = self.CopyrightEditItem.displayText()
pos = self.CopyrightEditItem.cursorPosition()
text = text[:pos] + u'©' + text[pos:]
self.CopyrightEditItem.setText(text)
self.CopyrightEditItem.setFocus()
self.CopyrightEditItem.setCursorPosition(pos + 1)

View File

@ -35,19 +35,20 @@ class TopicsForm(QDialog, Ui_TopicsDialog):
QDialog.__init__(self, parent)
self.setupUi(self)
self.songmanager = songmanager
#self.connect()
def load_form(self):
A = 1
@pyqtSignature("")
def on_DeleteButton_clicked(self):
#@pyqtSignature("")
def onDeleteButtonClicked(self):
"""
Slot documentation goes here.
"""
print "db clicked"
@pyqtSignature("")
def on_AddUpdateButton_clicked(self):
#@pyqtSignature("")
def onAddUpdateButtonClicked(self):
"""
Slot documentation goes here.
"""

View File

@ -73,13 +73,13 @@ class SongManager():
"""
Searches the song title for keywords.
"""
return self.session.query(Song).filter(Song.search_title.like(u'%' + keywords + u'%'))
return self.session.query(Song).filter(Song.search_title.like(u'%' + keywords + u'%')).order_by(Song.search_title.asc()).all()
def search_song_lyrics(self, keywords):
"""
Searches the song lyrics for keywords.
"""
return self.session.query(Song).filter(Song.search_lyrics.like(u'%' + keywords + u'%'))
return self.session.query(Song).filter(Song.search_lyrics.like(u'%' + keywords + u'%')).order_by(Song.search_lyrics.asc()).all()
def get_song(self, id=None):
"""

View File

@ -235,9 +235,9 @@ class SongsPlugin(Plugin, PluginUtils):
self.edit_song_form.exec_()
def onSongEditClick(self):
cr = self.SongListView.currentRow()
id = int(self.SongListView.item(cr, 0).text())
self.edit_song_form.load_song(id)
current_row = self.SongListView.currentRow()
id = int(self.SongListView.item(current_row, 0).text())
self.edit_song_form.loadSong(id)
self.edit_song_form.exec_()
def onSongDeleteClick(self):

View File

@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>786</width>
<height>634</height>
<height>669</height>
</rect>
</property>
<property name="windowTitle" >
@ -77,6 +77,12 @@
</item>
<item>
<widget class="QTextEdit" name="LyricsTextEdit" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="lineWrapMode" >
<enum>QTextEdit::NoWrap</enum>
</property>
@ -103,7 +109,14 @@
</widget>
</item>
<item>
<widget class="QTextEdit" name="CommentsEdit" />
<widget class="QTextEdit" name="CommentsEdit" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ThemeGroupBox" >
@ -141,6 +154,18 @@
</item>
<item>
<widget class="QWidget" native="1" name="AdditionalWidget" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<layout class="QVBoxLayout" name="AdditionalLayout" >
<property name="spacing" >
<number>8</number>
@ -191,13 +216,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="AddAuthorsButton" >
<property name="text" >
<string>New Author</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="AuthorAddtoSongItem" >
<property name="maximumSize" >
@ -231,13 +249,13 @@
<number>0</number>
</property>
<item>
<spacer name="AuthorRemoveSpacer" >
<spacer name="AuthorsSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>263</width>
<width>40</width>
<height>20</height>
</size>
</property>
@ -250,6 +268,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="AddAuthorsButton" >
<property name="text" >
<string>Manage Authors</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -269,7 +294,14 @@
<number>8</number>
</property>
<item row="0" column="0" >
<widget class="QComboBox" name="SongbookCombo" />
<widget class="QComboBox" name="SongbookCombo" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="AddSongBookButton" >
@ -280,7 +312,7 @@
</sizepolicy>
</property>
<property name="text" >
<string>Add Song Book</string>
<string>Manage Song Books</string>
</property>
</widget>
</item>
@ -289,6 +321,12 @@
</item>
<item>
<widget class="QGroupBox" name="TopicGroupBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Topic</string>
</property>
@ -309,19 +347,25 @@
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="SongTopicCombo" />
</item>
<item>
<widget class="QPushButton" name="AddTopicsToSongButton" >
<property name="text" >
<string>Add to Song</string>
<widget class="QComboBox" name="SongTopicCombo" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="AddTopicButton" >
<widget class="QPushButton" name="AddTopicsToSongButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Add Topic</string>
<string>Add to Song</string>
</property>
</widget>
</item>
@ -345,13 +389,13 @@
<number>0</number>
</property>
<item>
<spacer name="TopicRemoveSpacer" >
<spacer name="TopicsSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>263</width>
<width>40</width>
<height>20</height>
</size>
</property>
@ -364,6 +408,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="AddTopicButton" >
<property name="text" >
<string>Manage Topics</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -458,16 +509,12 @@
<tabstop>CommentsEdit</tabstop>
<tabstop>ThemeSelectionComboItem</tabstop>
<tabstop>ThemeAddItem</tabstop>
<tabstop>AuthorsSelectionComboItem</tabstop>
<tabstop>AddAuthorsButton</tabstop>
<tabstop>AuthorAddtoSongItem</tabstop>
<tabstop>AuthorsListView</tabstop>
<tabstop>AuthorRemoveItem</tabstop>
<tabstop>SongbookCombo</tabstop>
<tabstop>AddSongBookButton</tabstop>
<tabstop>SongTopicCombo</tabstop>
<tabstop>AddTopicsToSongButton</tabstop>
<tabstop>AddTopicButton</tabstop>
<tabstop>ToticsListView</tabstop>
<tabstop>pushButton</tabstop>
<tabstop>CopyrightEditItem</tabstop>

View File

@ -1,41 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<ui version="4.0" >
<class>TopicsDialog</class>
<widget class="QDialog" name="TopicsDialog">
<property name="geometry">
<widget class="QDialog" name="TopicsDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<height>463</height>
<width>471</width>
<height>470</height>
</rect>
</property>
<property name="windowTitle">
<property name="windowTitle" >
<string>Topic Maintenance</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QGroupBox" name="TopicGroupBox">
<property name="title">
<string>Topic</string>
<layout class="QGridLayout" name="TopicsLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>8</number>
</property>
<item row="1" column="0" >
<widget class="QGroupBox" name="TopicGroupBox" >
<property name="title" >
<string>Topic Details</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="TopicNameLabel">
<property name="text">
<layout class="QGridLayout" name="DetailsLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>8</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="TopicNameLabel" >
<property name="text" >
<string>Topic Name:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="4">
<widget class="QLineEdit" name="TopicNameEdit"/>
<item row="0" column="1" colspan="5" >
<widget class="QLineEdit" name="TopicNameEdit" />
</item>
<item row="1" column="0" colspan="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<item row="1" column="0" colspan="2" >
<spacer name="ButtonsSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<property name="sizeHint" stdset="0" >
<size>
<width>198</width>
<height>20</height>
@ -43,44 +54,44 @@
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="DeleteButton">
<property name="toolTip">
<item row="1" column="4" >
<widget class="QPushButton" name="DeleteButton" >
<property name="toolTip" >
<string>Delete Author</string>
</property>
<property name="text">
<string/>
<property name="text" >
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<property name="icon" >
<iconset resource="../images/openlp-2.qrc" >
<normaloff>:/services/service_delete.png</normaloff>:/services/service_delete.png</iconset>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QPushButton" name="AddUpdateButton">
<property name="toolTip">
<item row="1" column="2" >
<widget class="QPushButton" name="AddUpdateButton" >
<property name="toolTip" >
<string>Add Update Author</string>
</property>
<property name="text">
<string/>
<property name="text" >
<string>Add/Update</string>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<property name="icon" >
<iconset resource="../images/openlp-2.qrc" >
<normaloff>:/system/system_settings.png</normaloff>:/system/system_settings.png</iconset>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="ClearButton">
<property name="toolTip">
<item row="1" column="5" >
<widget class="QPushButton" name="ClearButton" >
<property name="toolTip" >
<string>Clear Selection</string>
</property>
<property name="text">
<string/>
<property name="text" >
<string>Clear</string>
</property>
<property name="icon">
<iconset resource="../images/openlp-2.qrc">
<property name="icon" >
<iconset resource="../images/openlp-2.qrc" >
<normaloff>:/songs/song_edit.png</normaloff>:/songs/song_edit.png</iconset>
</property>
</widget>
@ -88,34 +99,27 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="MessageLabel">
<property name="text">
<string/>
<item row="0" column="0" >
<widget class="QTableWidget" name="TopicsListView" >
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QTableWidget" name="TopicsListView"/>
</item>
<item row="2" column="0">
<widget class="QDialogButtonBox" name="ButtonBox">
<property name="orientation">
<item row="2" column="0" >
<widget class="QDialogButtonBox" name="ButtonBox" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<property name="standardButtons" >
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
<zorder>TopicGroupBox</zorder>
<zorder>MessageLabel</zorder>
<zorder>TopicsListView</zorder>
<zorder>ButtonBox</zorder>
</widget>
<resources>
<include location="../images/openlp-2.qrc"/>
<include location="../images/openlp-2.qrc" />
</resources>
<connections>
<connection>
@ -124,11 +128,11 @@
<receiver>TopicsDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<hint type="sourcelabel" >
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<hint type="destinationlabel" >
<x>157</x>
<y>274</y>
</hint>
@ -140,11 +144,11 @@
<receiver>TopicsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<hint type="sourcelabel" >
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<hint type="destinationlabel" >
<x>286</x>
<y>274</y>
</hint>