Last few touches to the song maintenance.

This commit is contained in:
Raoul Snyman 2009-07-25 00:13:40 +02:00
parent d4d6a88c6f
commit 6cb9222aba
9 changed files with 193 additions and 158 deletions

View File

@ -22,44 +22,57 @@ from openlp.core.lib import translate
class Ui_AuthorsDialog(object):
def setupUi(self, AuthorsDialog):
AuthorsDialog.setObjectName("AuthorsDialog")
AuthorsDialog.setObjectName(u'AuthorsDialog')
AuthorsDialog.resize(393, 147)
self.AuthorsLayout = QtGui.QFormLayout(AuthorsDialog)
self.AuthorsLayout.setMargin(8)
self.AuthorsLayout.setSpacing(8)
self.AuthorsLayout.setObjectName("AuthorsLayout")
self.AuthorsLayout.setObjectName(u'AuthorsLayout')
self.FirstNameLabel = QtGui.QLabel(AuthorsDialog)
self.FirstNameLabel.setObjectName("FirstNameLabel")
self.AuthorsLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.FirstNameLabel)
self.FirstNameLabel.setObjectName(u'FirstNameLabel')
self.AuthorsLayout.setWidget(0,
QtGui.QFormLayout.LabelRole, self.FirstNameLabel)
self.FirstNameEdit = QtGui.QLineEdit(AuthorsDialog)
self.FirstNameEdit.setObjectName("FirstNameEdit")
self.AuthorsLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.FirstNameEdit)
self.FirstNameEdit.setObjectName(u'FirstNameEdit')
self.AuthorsLayout.setWidget(0,
QtGui.QFormLayout.FieldRole, self.FirstNameEdit)
self.LastNameLabel = QtGui.QLabel(AuthorsDialog)
self.LastNameLabel.setObjectName("LastNameLabel")
self.AuthorsLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.LastNameLabel)
self.LastNameLabel.setObjectName(u'LastNameLabel')
self.AuthorsLayout.setWidget(1,
QtGui.QFormLayout.LabelRole, self.LastNameLabel)
self.LastNameEdit = QtGui.QLineEdit(AuthorsDialog)
self.LastNameEdit.setObjectName("LastNameEdit")
self.AuthorsLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.LastNameEdit)
self.LastNameEdit.setObjectName(u'LastNameEdit')
self.AuthorsLayout.setWidget(1,
QtGui.QFormLayout.FieldRole, self.LastNameEdit)
self.DisplayLabel = QtGui.QLabel(AuthorsDialog)
self.DisplayLabel.setObjectName("DisplayLabel")
self.AuthorsLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.DisplayLabel)
self.DisplayLabel.setObjectName(u'DisplayLabel')
self.AuthorsLayout.setWidget(2,
QtGui.QFormLayout.LabelRole, self.DisplayLabel)
self.DisplayEdit = QtGui.QLineEdit(AuthorsDialog)
self.DisplayEdit.setObjectName("DisplayEdit")
self.AuthorsLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.DisplayEdit)
self.DisplayEdit.setObjectName(u'DisplayEdit')
self.AuthorsLayout.setWidget(2,
QtGui.QFormLayout.FieldRole, self.DisplayEdit)
self.AuthorButtonBox = QtGui.QDialogButtonBox(AuthorsDialog)
self.AuthorButtonBox.setOrientation(QtCore.Qt.Horizontal)
self.AuthorButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
self.AuthorButtonBox.setObjectName("AuthorButtonBox")
self.AuthorsLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.AuthorButtonBox)
self.AuthorButtonBox.setStandardButtons(
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Save)
self.AuthorButtonBox.setObjectName(u'AuthorButtonBox')
self.AuthorsLayout.setWidget(3,
QtGui.QFormLayout.FieldRole, self.AuthorButtonBox)
self.retranslateUi(AuthorsDialog)
QtCore.QObject.connect(self.AuthorButtonBox, QtCore.SIGNAL("accepted()"), AuthorsDialog.accept)
QtCore.QObject.connect(self.AuthorButtonBox, QtCore.SIGNAL("rejected()"), AuthorsDialog.reject)
QtCore.QObject.connect(self.AuthorButtonBox,
QtCore.SIGNAL(u'accepted()'), AuthorsDialog.accept)
QtCore.QObject.connect(self.AuthorButtonBox,
QtCore.SIGNAL(u'rejected()'), AuthorsDialog.reject)
QtCore.QMetaObject.connectSlotsByName(AuthorsDialog)
def retranslateUi(self, AuthorsDialog):
AuthorsDialog.setWindowTitle(QtGui.QApplication.translate("AuthorsDialog", "Author Maintenance", None, QtGui.QApplication.UnicodeUTF8))
self.DisplayLabel.setText(QtGui.QApplication.translate("AuthorsDialog", "Display Name:", None, QtGui.QApplication.UnicodeUTF8))
self.FirstNameLabel.setText(QtGui.QApplication.translate("AuthorsDialog", "First Name:", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorButtonBox.setToolTip(QtGui.QApplication.translate("AuthorsDialog", "Exit Screen", None, QtGui.QApplication.UnicodeUTF8))
self.LastNameLabel.setText(QtGui.QApplication.translate("AuthorsDialog", "Last Name:", None, QtGui.QApplication.UnicodeUTF8))
AuthorsDialog.setWindowTitle(
translate(u'AuthorsDialog', u'Author Maintenance'))
self.DisplayLabel.setText(
translate(u'AuthorsDialog', u'Display name:'))
self.FirstNameLabel.setText(
translate(u'AuthorsDialog', u'First name:'))
self.LastNameLabel.setText(
translate(u'AuthorsDialog', u'Last name:'))

View File

@ -22,37 +22,47 @@ from openlp.core.lib import translate
class Ui_SongBookDialog(object):
def setupUi(self, SongBookDialog):
SongBookDialog.setObjectName("SongBookDialog")
SongBookDialog.setObjectName(u'SongBookDialog')
SongBookDialog.resize(367, 120)
self.SongBookLayout = QtGui.QFormLayout(SongBookDialog)
self.SongBookLayout.setMargin(8)
self.SongBookLayout.setSpacing(8)
self.SongBookLayout.setObjectName("SongBookLayout")
self.SongBookLayout.setObjectName(u'SongBookLayout')
self.NameLabel = QtGui.QLabel(SongBookDialog)
self.NameLabel.setObjectName("NameLabel")
self.SongBookLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.NameLabel)
self.NameLabel.setObjectName(u'NameLabel')
self.SongBookLayout.setWidget(0,
QtGui.QFormLayout.LabelRole, self.NameLabel)
self.NameEdit = QtGui.QLineEdit(SongBookDialog)
self.NameEdit.setObjectName("NameEdit")
self.SongBookLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.NameEdit)
self.NameEdit.setObjectName(u'NameEdit')
self.SongBookLayout.setWidget(0,
QtGui.QFormLayout.FieldRole, self.NameEdit)
self.PublisherLabel = QtGui.QLabel(SongBookDialog)
self.PublisherLabel.setObjectName("PublisherLabel")
self.SongBookLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.PublisherLabel)
self.PublisherLabel.setObjectName(u'PublisherLabel')
self.SongBookLayout.setWidget(1,
QtGui.QFormLayout.LabelRole, self.PublisherLabel)
self.PublisherEdit = QtGui.QLineEdit(SongBookDialog)
self.PublisherEdit.setObjectName("PublisherEdit")
self.SongBookLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.PublisherEdit)
self.PublisherEdit.setObjectName(u'PublisherEdit')
self.SongBookLayout.setWidget(1,
QtGui.QFormLayout.FieldRole, self.PublisherEdit)
self.ButtonBox = QtGui.QDialogButtonBox(SongBookDialog)
self.ButtonBox.setOrientation(QtCore.Qt.Horizontal)
self.ButtonBox.setStandardButtons(
QtGui.QDialogButtonBox.Save | QtGui.QDialogButtonBox.Cancel)
self.ButtonBox.setObjectName("ButtonBox")
self.SongBookLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.ButtonBox)
self.ButtonBox.setObjectName(u'ButtonBox')
self.SongBookLayout.setWidget(2,
QtGui.QFormLayout.FieldRole, self.ButtonBox)
self.retranslateUi(SongBookDialog)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("accepted()"), SongBookDialog.accept)
QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL("rejected()"), SongBookDialog.reject)
QtCore.QObject.connect(self.ButtonBox,
QtCore.SIGNAL(u'accepted()'), SongBookDialog.accept)
QtCore.QObject.connect(self.ButtonBox,
QtCore.SIGNAL(u'rejected()'), SongBookDialog.reject)
QtCore.QMetaObject.connectSlotsByName(SongBookDialog)
def retranslateUi(self, SongBookDialog):
SongBookDialog.setWindowTitle(QtGui.QApplication.translate("SongBookDialog", "Edit Book", None, QtGui.QApplication.UnicodeUTF8))
self.NameLabel.setText(QtGui.QApplication.translate("SongBookDialog", "Name:", None, QtGui.QApplication.UnicodeUTF8))
self.PublisherLabel.setText(QtGui.QApplication.translate("SongBookDialog", "Publisher:", None, QtGui.QApplication.UnicodeUTF8))
SongBookDialog.setWindowTitle(
translate(u'SongBookDialog', u'Edit Book'))
self.NameLabel.setText(
translate(u'SongBookDialog', u'Name:'))
self.PublisherLabel.setText(
translate(u'SongBookDialog', u'Publisher:'))

View File

@ -22,173 +22,189 @@ from openlp.core.lib import translate
class Ui_SongMaintenanceDialog(object):
def setupUi(self, SongMaintenanceDialog):
SongMaintenanceDialog.setObjectName("SongMaintenanceDialog")
SongMaintenanceDialog.setObjectName(u'SongMaintenanceDialog')
SongMaintenanceDialog.setWindowModality(QtCore.Qt.ApplicationModal)
SongMaintenanceDialog.resize(486, 361)
self.DialogLayout = QtGui.QVBoxLayout(SongMaintenanceDialog)
self.DialogLayout.setSpacing(8)
self.DialogLayout.setMargin(8)
self.DialogLayout.setObjectName("DialogLayout")
self.DialogLayout.setObjectName(u'DialogLayout')
self.ContentWidget = QtGui.QWidget(SongMaintenanceDialog)
self.ContentWidget.setObjectName("ContentWidget")
self.ContentWidget.setObjectName(u'ContentWidget')
self.ContentLayout = QtGui.QHBoxLayout(self.ContentWidget)
self.ContentLayout.setSpacing(8)
self.ContentLayout.setMargin(0)
self.ContentLayout.setObjectName("ContentLayout")
self.ContentLayout.setObjectName(u'ContentLayout')
self.TypeListWidget = QtGui.QListWidget(self.ContentWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
sizePolicy = QtGui.QSizePolicy(
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.TypeListWidget.sizePolicy().hasHeightForWidth())
sizePolicy.setHeightForWidth(
self.TypeListWidget.sizePolicy().hasHeightForWidth())
self.TypeListWidget.setSizePolicy(sizePolicy)
self.TypeListWidget.setProperty("showDropIndicator", QtCore.QVariant(False))
self.TypeListWidget.setSpacing(0)
self.TypeListWidget.setViewMode(QtGui.QListView.IconMode)
self.TypeListWidget.setIconSize(QtCore.QSize(128, 100));
self.TypeListWidget.setIconSize(QtCore.QSize(112, 100));
self.TypeListWidget.setMovement(QtGui.QListView.Static);
self.TypeListWidget.setMaximumWidth(128);
self.TypeListWidget.setMaximumWidth(118);
self.TypeListWidget.setSpacing(3);
self.TypeListWidget.setSortingEnabled(False)
self.TypeListWidget.setUniformItemSizes(True)
self.TypeListWidget.setObjectName("TypeListWidget")
self.TypeListWidget.setObjectName(u'TypeListWidget')
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/songs/author_maintenance.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(u':/songs/author_maintenance.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
item = QtGui.QListWidgetItem(self.TypeListWidget)
item.setIcon(icon)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/songs/topic_maintenance.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon1.addPixmap(QtGui.QPixmap(u':/songs/topic_maintenance.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
item = QtGui.QListWidgetItem(self.TypeListWidget)
item.setIcon(icon1)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/songs/book_maintenance.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon2.addPixmap(QtGui.QPixmap(u':/songs/book_maintenance.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
item = QtGui.QListWidgetItem(self.TypeListWidget)
item.setIcon(icon2)
self.ContentLayout.addWidget(self.TypeListWidget)
self.TypeStackedWidget = QtGui.QStackedWidget(self.ContentWidget)
self.TypeStackedWidget.setObjectName("TypeStackedWidget")
self.TypeStackedWidget.setObjectName(u'TypeStackedWidget')
self.AuthorsPage = QtGui.QWidget()
self.AuthorsPage.setObjectName("AuthorsPage")
self.AuthorsPage.setObjectName(u'AuthorsPage')
self.AuthorsLayout = QtGui.QVBoxLayout(self.AuthorsPage)
self.AuthorsLayout.setSpacing(4)
self.AuthorsLayout.setMargin(0)
self.AuthorsLayout.setObjectName("AuthorsLayout")
self.AuthorsLayout.setObjectName(u'AuthorsLayout')
self.AuthorsListWidget = QtGui.QListWidget(self.AuthorsPage)
self.AuthorsListWidget.setObjectName("AuthorsListWidget")
self.AuthorsListWidget.setObjectName(u'AuthorsListWidget')
self.AuthorsLayout.addWidget(self.AuthorsListWidget)
self.AuthorButtonWidget = QtGui.QWidget(self.AuthorsPage)
self.AuthorButtonWidget.setObjectName("AuthorButtonWidget")
self.AuthorButtonWidget.setObjectName(u'AuthorButtonWidget')
self.AuthorButtonsLayout = QtGui.QHBoxLayout(self.AuthorButtonWidget)
self.AuthorButtonsLayout.setSpacing(8)
self.AuthorButtonsLayout.setMargin(0)
self.AuthorButtonsLayout.setObjectName("AuthorButtonsLayout")
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.AuthorButtonsLayout.setObjectName(u'AuthorButtonsLayout')
spacerItem = QtGui.QSpacerItem(40, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.AuthorButtonsLayout.addItem(spacerItem)
self.AuthorAddButton = QtGui.QPushButton(self.AuthorButtonWidget)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/songs/author_add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon3.addPixmap(QtGui.QPixmap(u':/songs/author_add.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.AuthorAddButton.setIcon(icon3)
self.AuthorAddButton.setObjectName("AuthorAddButton")
self.AuthorAddButton.setObjectName(u'AuthorAddButton')
self.AuthorButtonsLayout.addWidget(self.AuthorAddButton)
self.AuthorEditButton = QtGui.QPushButton(self.AuthorButtonWidget)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/songs/author_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon4.addPixmap(QtGui.QPixmap(u':/songs/author_edit.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.AuthorEditButton.setIcon(icon4)
self.AuthorEditButton.setObjectName("AuthorEditButton")
self.AuthorEditButton.setObjectName(u'AuthorEditButton')
self.AuthorButtonsLayout.addWidget(self.AuthorEditButton)
self.AuthorDeleteButton = QtGui.QPushButton(self.AuthorButtonWidget)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/songs/author_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon5.addPixmap(QtGui.QPixmap(u':/songs/author_delete.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.AuthorDeleteButton.setIcon(icon5)
self.AuthorDeleteButton.setObjectName("AuthorDeleteButton")
self.AuthorDeleteButton.setObjectName(u'AuthorDeleteButton')
self.AuthorButtonsLayout.addWidget(self.AuthorDeleteButton)
self.AuthorsLayout.addWidget(self.AuthorButtonWidget)
self.AuthorsLine = QtGui.QFrame(self.AuthorsPage)
self.AuthorsLine.setFrameShape(QtGui.QFrame.HLine)
self.AuthorsLine.setFrameShadow(QtGui.QFrame.Sunken)
self.AuthorsLine.setObjectName("AuthorsLine")
self.AuthorsLine.setObjectName(u'AuthorsLine')
self.AuthorsLayout.addWidget(self.AuthorsLine)
self.TypeStackedWidget.addWidget(self.AuthorsPage)
self.TopicsPage = QtGui.QWidget()
self.TopicsPage.setObjectName("TopicsPage")
self.TopicsPage.setObjectName(u'TopicsPage')
self.TopicLayout = QtGui.QVBoxLayout(self.TopicsPage)
self.TopicLayout.setSpacing(4)
self.TopicLayout.setMargin(0)
self.TopicLayout.setObjectName("TopicLayout")
self.TopicLayout.setObjectName(u'TopicLayout')
self.TopicsListWidget = QtGui.QListWidget(self.TopicsPage)
self.TopicsListWidget.setObjectName("TopicsListWidget")
self.TopicsListWidget.setObjectName(u'TopicsListWidget')
self.TopicLayout.addWidget(self.TopicsListWidget)
self.TopicButtonWidget = QtGui.QWidget(self.TopicsPage)
self.TopicButtonWidget.setObjectName("TopicButtonWidget")
self.TopicButtonWidget.setObjectName(u'TopicButtonWidget')
self.TopicButtonLayout = QtGui.QHBoxLayout(self.TopicButtonWidget)
self.TopicButtonLayout.setSpacing(8)
self.TopicButtonLayout.setMargin(0)
self.TopicButtonLayout.setObjectName("TopicButtonLayout")
spacerItem1 = QtGui.QSpacerItem(54, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicButtonLayout.addItem(spacerItem1)
self.TopicButtonLayout.setObjectName(u'TopicButtonLayout')
TopicSpacerItem = QtGui.QSpacerItem(54, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicButtonLayout.addItem(TopicSpacerItem)
self.TopicAddButton = QtGui.QPushButton(self.TopicButtonWidget)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/songs/topic_add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon6.addPixmap(QtGui.QPixmap(u':/songs/topic_add.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.TopicAddButton.setIcon(icon6)
self.TopicAddButton.setObjectName("TopicAddButton")
self.TopicAddButton.setObjectName(u'TopicAddButton')
self.TopicButtonLayout.addWidget(self.TopicAddButton)
self.TopicEditButton = QtGui.QPushButton(self.TopicButtonWidget)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/songs/topic_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon7.addPixmap(QtGui.QPixmap(u':/songs/topic_edit.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.TopicEditButton.setIcon(icon7)
self.TopicEditButton.setObjectName("TopicEditButton")
self.TopicEditButton.setObjectName(u'TopicEditButton')
self.TopicButtonLayout.addWidget(self.TopicEditButton)
self.TopicDeleteButton = QtGui.QPushButton(self.TopicButtonWidget)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/songs/topic_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon8.addPixmap(QtGui.QPixmap(u':/songs/topic_delete.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.TopicDeleteButton.setIcon(icon8)
self.TopicDeleteButton.setObjectName("TopicDeleteButton")
self.TopicDeleteButton.setObjectName(u'TopicDeleteButton')
self.TopicButtonLayout.addWidget(self.TopicDeleteButton)
self.TopicLayout.addWidget(self.TopicButtonWidget)
self.TopicsLine = QtGui.QFrame(self.TopicsPage)
self.TopicsLine.setFrameShape(QtGui.QFrame.HLine)
self.TopicsLine.setFrameShadow(QtGui.QFrame.Sunken)
self.TopicsLine.setObjectName("TopicsLine")
self.TopicsLine.setObjectName(u'TopicsLine')
self.TopicLayout.addWidget(self.TopicsLine)
self.TypeStackedWidget.addWidget(self.TopicsPage)
self.BooksPage = QtGui.QWidget()
self.BooksPage.setObjectName("BooksPage")
self.BooksPage.setObjectName(u'BooksPage')
self.BookLayout = QtGui.QVBoxLayout(self.BooksPage)
self.BookLayout.setSpacing(4)
self.BookLayout.setMargin(0)
self.BookLayout.setObjectName("BookLayout")
self.BookLayout.setObjectName(u'BookLayout')
self.BooksListWidget = QtGui.QListWidget(self.BooksPage)
self.BooksListWidget.setObjectName("BooksListWidget")
self.BooksListWidget.setObjectName(u'BooksListWidget')
self.BookLayout.addWidget(self.BooksListWidget)
self.BookButtonWidget = QtGui.QWidget(self.BooksPage)
self.BookButtonWidget.setObjectName("BookButtonWidget")
self.BookButtonWidget.setObjectName(u'BookButtonWidget')
self.BookButtonLayout = QtGui.QHBoxLayout(self.BookButtonWidget)
self.BookButtonLayout.setSpacing(8)
self.BookButtonLayout.setMargin(0)
self.BookButtonLayout.setObjectName("BookButtonLayout")
spacerItem2 = QtGui.QSpacerItem(54, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.BookButtonLayout.setObjectName(u'BookButtonLayout')
spacerItem2 = QtGui.QSpacerItem(54, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.BookButtonLayout.addItem(spacerItem2)
self.BookAddButton = QtGui.QPushButton(self.BookButtonWidget)
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/songs/book_add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon9.addPixmap(QtGui.QPixmap(u':/songs/book_add.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.BookAddButton.setIcon(icon9)
self.BookAddButton.setObjectName("BookAddButton")
self.BookAddButton.setObjectName(u'BookAddButton')
self.BookButtonLayout.addWidget(self.BookAddButton)
self.BookEditButton = QtGui.QPushButton(self.BookButtonWidget)
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/songs/book_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon10.addPixmap(QtGui.QPixmap(u':/songs/book_edit.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.BookEditButton.setIcon(icon10)
self.BookEditButton.setObjectName("BookEditButton")
self.BookEditButton.setObjectName(u'BookEditButton')
self.BookButtonLayout.addWidget(self.BookEditButton)
self.BookDeleteButton = QtGui.QPushButton(self.BookButtonWidget)
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/songs/book_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon11.addPixmap(QtGui.QPixmap(u':/songs/book_delete.png'),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.BookDeleteButton.setIcon(icon11)
self.BookDeleteButton.setObjectName("BookDeleteButton")
self.BookDeleteButton.setObjectName(u'BookDeleteButton')
self.BookButtonLayout.addWidget(self.BookDeleteButton)
self.BookLayout.addWidget(self.BookButtonWidget)
self.BooksLine = QtGui.QFrame(self.BooksPage)
self.BooksLine.setFrameShape(QtGui.QFrame.HLine)
self.BooksLine.setFrameShadow(QtGui.QFrame.Sunken)
self.BooksLine.setObjectName("BooksLine")
self.BooksLine.setObjectName(u'BooksLine')
self.BookLayout.addWidget(self.BooksLine)
self.TypeStackedWidget.addWidget(self.BooksPage)
self.ContentLayout.addWidget(self.TypeStackedWidget)
@ -196,30 +212,43 @@ class Ui_SongMaintenanceDialog(object):
self.MaintenanceButtonBox = QtGui.QDialogButtonBox(SongMaintenanceDialog)
self.MaintenanceButtonBox.setOrientation(QtCore.Qt.Horizontal)
self.MaintenanceButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
self.MaintenanceButtonBox.setObjectName("MaintenanceButtonBox")
self.MaintenanceButtonBox.setObjectName(u'MaintenanceButtonBox')
self.DialogLayout.addWidget(self.MaintenanceButtonBox)
self.retranslateUi(SongMaintenanceDialog)
self.TypeStackedWidget.setCurrentIndex(2)
QtCore.QObject.connect(self.MaintenanceButtonBox, QtCore.SIGNAL("rejected()"), SongMaintenanceDialog.accept)
QtCore.QObject.connect(self.TypeListWidget, QtCore.SIGNAL("currentRowChanged(int)"), self.TypeStackedWidget.setCurrentIndex)
self.TypeStackedWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.MaintenanceButtonBox,
QtCore.SIGNAL(u'rejected()'), SongMaintenanceDialog.accept)
QtCore.QObject.connect(self.TypeListWidget,
QtCore.SIGNAL(u'currentRowChanged(int)'),
self.TypeStackedWidget.setCurrentIndex)
QtCore.QMetaObject.connectSlotsByName(SongMaintenanceDialog)
def retranslateUi(self, SongMaintenanceDialog):
SongMaintenanceDialog.setWindowTitle(QtGui.QApplication.translate("SongMaintenanceDialog", "Song Maintenance", None, QtGui.QApplication.UnicodeUTF8))
__sortingEnabled = self.TypeListWidget.isSortingEnabled()
self.TypeListWidget.setSortingEnabled(False)
self.TypeListWidget.item(0).setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Authors", None, QtGui.QApplication.UnicodeUTF8))
self.TypeListWidget.item(1).setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Topics", None, QtGui.QApplication.UnicodeUTF8))
self.TypeListWidget.item(2).setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Books/Hymnals", None, QtGui.QApplication.UnicodeUTF8))
self.TypeListWidget.setSortingEnabled(__sortingEnabled)
self.AuthorAddButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorEditButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Edit", None, QtGui.QApplication.UnicodeUTF8))
self.AuthorDeleteButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8))
self.TopicAddButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
self.TopicEditButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Edit", None, QtGui.QApplication.UnicodeUTF8))
self.TopicDeleteButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8))
self.BookAddButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Add", None, QtGui.QApplication.UnicodeUTF8))
self.BookEditButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Edit", None, QtGui.QApplication.UnicodeUTF8))
self.BookDeleteButton.setText(QtGui.QApplication.translate("SongMaintenanceDialog", "Delete", None, QtGui.QApplication.UnicodeUTF8))
SongMaintenanceDialog.setWindowTitle(
translate(u'SongMaintenanceDialog', u'Song Maintenance'))
self.TypeListWidget.item(0).setText(
translate(u'SongMaintenanceDialog', u'Authors'))
self.TypeListWidget.item(1).setText(
translate(u'SongMaintenanceDialog', u'Topics'))
self.TypeListWidget.item(2).setText(
translate(u'SongMaintenanceDialog', u'Books/Hymnals'))
self.AuthorAddButton.setText(
translate(u'SongMaintenanceDialog', u'Add'))
self.AuthorEditButton.setText(
translate(u'SongMaintenanceDialog', u'Edit'))
self.AuthorDeleteButton.setText(
translate(u'SongMaintenanceDialog', u'Delete'))
self.TopicAddButton.setText(
translate(u'SongMaintenanceDialog', u'Add'))
self.TopicEditButton.setText(
translate(u'SongMaintenanceDialog', u'Edit'))
self.TopicDeleteButton.setText(
translate(u'SongMaintenanceDialog', u'Delete'))
self.BookAddButton.setText(
translate(u'SongMaintenanceDialog', u'Add'))
self.BookEditButton.setText(
translate(u'SongMaintenanceDialog', u'Edit'))
self.BookDeleteButton.setText(
translate(u'SongMaintenanceDialog', u'Delete'))

View File

@ -59,14 +59,15 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
QtCore.SIGNAL(u'pressed()'), self.onBookDeleteButtonClick)
def exec_(self):
self.TypeListWidget.setCurrentRow(0)
self.resetAuthors()
self.resetTopics()
self.resetBooks()
self.TypeListWidget.setFocus()
return QtGui.QDialog.exec_(self)
def _getCurrentItemId(self, ListWidget):
item = ListWidget.currentItem()
print item
if item is not None:
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
return item_id

View File

@ -22,32 +22,40 @@ from openlp.core.lib import translate
class Ui_TopicsDialog(object):
def setupUi(self, TopicsDialog):
TopicsDialog.setObjectName("TopicsDialog")
TopicsDialog.setObjectName(u'TopicsDialog')
TopicsDialog.resize(365, 77)
self.TopicLayout = QtGui.QFormLayout(TopicsDialog)
self.TopicLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.TopicLayout.setFieldGrowthPolicy(
QtGui.QFormLayout.ExpandingFieldsGrow)
self.TopicLayout.setMargin(8)
self.TopicLayout.setSpacing(8)
self.TopicLayout.setObjectName("TopicLayout")
self.TopicLayout.setObjectName(u'TopicLayout')
self.NameLabel = QtGui.QLabel(TopicsDialog)
self.NameLabel.setObjectName("NameLabel")
self.TopicLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.NameLabel)
self.NameLabel.setObjectName(u'NameLabel')
self.TopicLayout.setWidget(0,
QtGui.QFormLayout.LabelRole, self.NameLabel)
self.NameEdit = QtGui.QLineEdit(TopicsDialog)
self.NameEdit.setObjectName("NameEdit")
self.TopicLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.NameEdit)
self.NameEdit.setObjectName(u'NameEdit')
self.TopicLayout.setWidget(0,
QtGui.QFormLayout.FieldRole, self.NameEdit)
self.TopicButtonBox = QtGui.QDialogButtonBox(TopicsDialog)
self.TopicButtonBox.setOrientation(QtCore.Qt.Horizontal)
self.TopicButtonBox.setStandardButtons(
QtGui.QDialogButtonBox.Save | QtGui.QDialogButtonBox.Cancel)
self.TopicButtonBox.setObjectName("TopicButtonBox")
self.TopicLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.TopicButtonBox)
self.TopicButtonBox.setObjectName(u'TopicButtonBox')
self.TopicLayout.setWidget(1,
QtGui.QFormLayout.FieldRole, self.TopicButtonBox)
self.retranslateUi(TopicsDialog)
QtCore.QObject.connect(self.TopicButtonBox, QtCore.SIGNAL("accepted()"), TopicsDialog.accept)
QtCore.QObject.connect(self.TopicButtonBox, QtCore.SIGNAL("rejected()"), TopicsDialog.reject)
QtCore.QObject.connect(self.TopicButtonBox,
QtCore.SIGNAL(u'accepted()'), TopicsDialog.accept)
QtCore.QObject.connect(self.TopicButtonBox,
QtCore.SIGNAL(u'rejected()'), TopicsDialog.reject)
QtCore.QMetaObject.connectSlotsByName(TopicsDialog)
def retranslateUi(self, TopicsDialog):
TopicsDialog.setWindowTitle(QtGui.QApplication.translate("TopicsDialog", "Topic Maintenance", None, QtGui.QApplication.UnicodeUTF8))
self.NameLabel.setText(QtGui.QApplication.translate("TopicsDialog", "Topic Name:", None, QtGui.QApplication.UnicodeUTF8))
TopicsDialog.setWindowTitle(
translate(u'TopicsDialog', u'Topic Maintenance'))
self.NameLabel.setText(
translate(u'TopicsDialog', u'Topic name:'))

View File

@ -60,9 +60,6 @@ class SongMediaItem(MediaManagerItem):
self.ConfigSection = u'song'
MediaManagerItem.__init__(self, parent, icon, title)
self.edit_song_form = EditSongForm(self.parent.songmanager, self.parent.event_manager)
#self.authors_form = AuthorsForm(self.parent.songmanager)
#self.topics_form = TopicsForm(self.parent.songmanager)
#self.song_book_form = SongBookForm(self.parent.songmanager)
self.song_maintenance_form = SongMaintenanceForm(self.parent.songmanager, self)
def setupUi(self):
@ -96,22 +93,10 @@ class SongMediaItem(MediaManagerItem):
translate(u'SongMediaItem', u'Add the selected song(s) to the service'),
':/system/system_add.png', self.onSongAddClick, 'SongAddItem')
self.addToolbarSeparator()
## Author Edit Button ##
#self.addToolbarButton(translate(u'SongMediaItem', u'Edit Authors'),
# translate(u'SongMediaItem', u'Maintain the list of Song Authors'),
# ':/songs/song_author_edit.png', self.onEditAuthorClick, 'SongAuthorEditItem')
## Author Edit Button ##
#self.addToolbarButton(translate(u'SongMediaItem', u'Edit Books'),
# translate(u'SongMediaItem', u'Maintain the list of Song Books'),
# ':/songs/song_book_edit.png', self.onEditBookClick, 'SongAuthorEditItem')
# ## Author Edit Button ##
#self.addToolbarButton(translate(u'SongMediaItem', u'Edit Topics'),
# translate(u'SongMediaItem', u'Maintain the list of Song Topics'),
# ':/songs/song_topic_edit.png', self.onEditTopicClick, 'SongAuthorEditItem')
## Song Maintenance Button ##
self.addToolbarButton(translate(u'SongMediaItem', u'Song Maintenance'),
translate(u'SongMediaItem', u'Maintain the lists of authors, topics and books'),
':/songs/song_author_edit.png', self.onSongMaintenanceClick, 'SongMaintenanceItem')
':/songs/song_maintenance.png', self.onSongMaintenanceClick, 'SongMaintenanceItem')
## Add the songlist widget ##
# Create the tab widget
self.SongWidget = QtGui.QWidget(self)

View File

@ -85,18 +85,6 @@
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<row>
<property name="text">
<string>New Row</string>

View File

@ -4,6 +4,7 @@
<file>author_add.png</file>
<file>author_delete.png</file>
<file>book_add.png</file>
<file>song_maintenance.png</file>
<file>topic_add.png</file>
<file>book_delete.png</file>
<file>book_edit.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B