forked from openlp/openlp
Added the start of a song maintenance dialog.
This commit is contained in:
parent
131abc4aa6
commit
cf5b415640
133
openlp/plugins/songs/forms/maintenanceform.py
Normal file
133
openlp/plugins/songs/forms/maintenanceform.py
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file '/home/raoul/Projects/openlp/songmaintenance/resources/forms/songmaintenance.ui'
|
||||||
|
#
|
||||||
|
# Created: Wed Jul 22 10:03:53 2009
|
||||||
|
# by: PyQt4 UI code generator 4.4.4
|
||||||
|
#
|
||||||
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
class Ui_SongMaintenanceDialog(object):
|
||||||
|
def setupUi(self, SongMaintenanceDialog):
|
||||||
|
SongMaintenanceDialog.setObjectName("SongMaintenanceDialog")
|
||||||
|
SongMaintenanceDialog.resize(486, 361)
|
||||||
|
self.verticalLayout = QtGui.QVBoxLayout(SongMaintenanceDialog)
|
||||||
|
self.verticalLayout.setSpacing(8)
|
||||||
|
self.verticalLayout.setMargin(8)
|
||||||
|
self.verticalLayout.setObjectName("verticalLayout")
|
||||||
|
self.ContentWidget = QtGui.QWidget(SongMaintenanceDialog)
|
||||||
|
self.ContentWidget.setObjectName("ContentWidget")
|
||||||
|
self.horizontalLayout = QtGui.QHBoxLayout(self.ContentWidget)
|
||||||
|
self.horizontalLayout.setSpacing(8)
|
||||||
|
self.horizontalLayout.setMargin(0)
|
||||||
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||||
|
self.TypeListWidget = QtGui.QListWidget(self.ContentWidget)
|
||||||
|
self.TypeListWidget.setMaximumSize(QtCore.QSize(150, 16777215))
|
||||||
|
self.TypeListWidget.setProperty("showDropIndicator", QtCore.QVariant(False))
|
||||||
|
self.TypeListWidget.setIconSize(QtCore.QSize(32, 32))
|
||||||
|
self.TypeListWidget.setFlow(QtGui.QListView.TopToBottom)
|
||||||
|
self.TypeListWidget.setSpacing(0)
|
||||||
|
self.TypeListWidget.setViewMode(QtGui.QListView.IconMode)
|
||||||
|
self.TypeListWidget.setUniformItemSizes(True)
|
||||||
|
self.TypeListWidget.setObjectName("TypeListWidget")
|
||||||
|
#self.TypeListWidget.setColumnWidth(0, self.TypeListWidget.viewport().size().width())
|
||||||
|
icon = QtGui.QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap(":/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)
|
||||||
|
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)
|
||||||
|
item = QtGui.QListWidgetItem(self.TypeListWidget)
|
||||||
|
item.setIcon(icon2)
|
||||||
|
self.horizontalLayout.addWidget(self.TypeListWidget)
|
||||||
|
self.TypeStackedWidget = QtGui.QStackedWidget(self.ContentWidget)
|
||||||
|
self.TypeStackedWidget.setObjectName("TypeStackedWidget")
|
||||||
|
self.AuthorsPage = QtGui.QWidget()
|
||||||
|
self.AuthorsPage.setObjectName("AuthorsPage")
|
||||||
|
self.verticalLayout_2 = QtGui.QVBoxLayout(self.AuthorsPage)
|
||||||
|
self.verticalLayout_2.setSpacing(8)
|
||||||
|
self.verticalLayout_2.setMargin(0)
|
||||||
|
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||||
|
self.AuthorsListWidget = QtGui.QListWidget(self.AuthorsPage)
|
||||||
|
self.AuthorsListWidget.setObjectName("AuthorsListWidget")
|
||||||
|
self.verticalLayout_2.addWidget(self.AuthorsListWidget)
|
||||||
|
self.AuthorWidget = QtGui.QWidget(self.AuthorsPage)
|
||||||
|
self.AuthorWidget.setObjectName("AuthorWidget")
|
||||||
|
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.AuthorWidget)
|
||||||
|
self.horizontalLayout_2.setSpacing(8)
|
||||||
|
self.horizontalLayout_2.setMargin(0)
|
||||||
|
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||||
|
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
|
self.horizontalLayout_2.addItem(spacerItem)
|
||||||
|
self.AuthorAddButton = QtGui.QPushButton(self.AuthorWidget)
|
||||||
|
icon3 = QtGui.QIcon()
|
||||||
|
icon3.addPixmap(QtGui.QPixmap(":/songs/song_author_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
self.AuthorAddButton.setIcon(icon3)
|
||||||
|
self.AuthorAddButton.setObjectName("AuthorAddButton")
|
||||||
|
self.horizontalLayout_2.addWidget(self.AuthorAddButton)
|
||||||
|
self.AuthorEditButton = QtGui.QPushButton(self.AuthorWidget)
|
||||||
|
icon4 = QtGui.QIcon()
|
||||||
|
icon4.addPixmap(QtGui.QPixmap(":/songs/song_edit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
self.AuthorEditButton.setIcon(icon4)
|
||||||
|
self.AuthorEditButton.setObjectName("AuthorEditButton")
|
||||||
|
self.horizontalLayout_2.addWidget(self.AuthorEditButton)
|
||||||
|
self.AuthorDeleteButton = QtGui.QPushButton(self.AuthorWidget)
|
||||||
|
icon5 = QtGui.QIcon()
|
||||||
|
icon5.addPixmap(QtGui.QPixmap(":/songs/song_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
self.AuthorDeleteButton.setIcon(icon5)
|
||||||
|
self.AuthorDeleteButton.setObjectName("AuthorDeleteButton")
|
||||||
|
self.horizontalLayout_2.addWidget(self.AuthorDeleteButton)
|
||||||
|
self.verticalLayout_2.addWidget(self.AuthorWidget)
|
||||||
|
self.TypeStackedWidget.addWidget(self.AuthorsPage)
|
||||||
|
self.TopicsPage = QtGui.QWidget()
|
||||||
|
self.TopicsPage.setObjectName("TopicsPage")
|
||||||
|
self.TypeStackedWidget.addWidget(self.TopicsPage)
|
||||||
|
self.BooksPage = QtGui.QWidget()
|
||||||
|
self.BooksPage.setObjectName("BooksPage")
|
||||||
|
self.listWidget = QtGui.QListWidget(self.BooksPage)
|
||||||
|
self.listWidget.setGeometry(QtCore.QRect(30, 20, 256, 192))
|
||||||
|
self.listWidget.setObjectName("listWidget")
|
||||||
|
self.TypeStackedWidget.addWidget(self.BooksPage)
|
||||||
|
self.horizontalLayout.addWidget(self.TypeStackedWidget)
|
||||||
|
self.verticalLayout.addWidget(self.ContentWidget)
|
||||||
|
self.MaintenanceButtonBox = QtGui.QDialogButtonBox(SongMaintenanceDialog)
|
||||||
|
self.MaintenanceButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||||
|
self.MaintenanceButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
|
||||||
|
self.MaintenanceButtonBox.setObjectName("MaintenanceButtonBox")
|
||||||
|
self.verticalLayout.addWidget(self.MaintenanceButtonBox)
|
||||||
|
|
||||||
|
self.retranslateUi(SongMaintenanceDialog)
|
||||||
|
self.TypeStackedWidget.setCurrentIndex(0)
|
||||||
|
QtCore.QObject.connect(self.MaintenanceButtonBox, QtCore.SIGNAL("rejected()"), SongMaintenanceDialog.accept)
|
||||||
|
QtCore.QObject.connect(self.TypeListWidget, QtCore.SIGNAL("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))
|
||||||
|
|
||||||
|
from openlp.core.resources import *
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtGui.QApplication(sys.argv)
|
||||||
|
SongMaintenanceDialog = QtGui.QDialog()
|
||||||
|
ui = Ui_SongMaintenanceDialog()
|
||||||
|
ui.setupUi(SongMaintenanceDialog)
|
||||||
|
SongMaintenanceDialog.show()
|
||||||
|
sys.exit(app.exec_())
|
||||||
|
|
251
resources/forms/songmaintenance.ui
Normal file
251
resources/forms/songmaintenance.ui
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>SongMaintenanceDialog</class>
|
||||||
|
<widget class="QDialog" name="SongMaintenanceDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>486</width>
|
||||||
|
<height>361</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Song Maintenance</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="ContentWidget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="TypeListWidget">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="showDropIndicator" stdset="0">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="flow">
|
||||||
|
<enum>QListView::TopToBottom</enum>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="viewMode">
|
||||||
|
<enum>QListView::IconMode</enum>
|
||||||
|
</property>
|
||||||
|
<property name="uniformItemSizes">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Authors</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images/openlp-2.qrc">
|
||||||
|
<normaloff>:/songs/author_maintenance.png</normaloff>:/songs/author_maintenance.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="flags">
|
||||||
|
<set>ItemIsSelectable|ItemIsEnabled</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Topics</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images/openlp-2.qrc">
|
||||||
|
<normaloff>:/songs/topic_maintenance.png</normaloff>:/songs/topic_maintenance.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="flags">
|
||||||
|
<set>ItemIsSelectable|ItemIsEnabled</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Books/Hymnals</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images/openlp-2.qrc">
|
||||||
|
<normaloff>:/songs/book_maintenance.png</normaloff>:/songs/book_maintenance.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="flags">
|
||||||
|
<set>ItemIsSelectable|ItemIsEnabled</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QStackedWidget" name="TypeStackedWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="AuthorsPage">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="AuthorsListWidget"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="AuthorWidget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="AuthorSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="AuthorAddButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images/openlp-2.qrc">
|
||||||
|
<normaloff>:/songs/song_author_edit.png</normaloff>:/songs/song_author_edit.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="AuthorEditButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Edit</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>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="AuthorDeleteButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images/openlp-2.qrc">
|
||||||
|
<normaloff>:/songs/song_delete.png</normaloff>:/songs/song_delete.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="TopicsPage"/>
|
||||||
|
<widget class="QWidget" name="BooksPage">
|
||||||
|
<widget class="QListWidget" name="listWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>256</width>
|
||||||
|
<height>192</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="MaintenanceButtonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Close</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../images/openlp-2.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>MaintenanceButtonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>SongMaintenanceDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>242</x>
|
||||||
|
<y>340</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>242</x>
|
||||||
|
<y>180</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>TypeListWidget</sender>
|
||||||
|
<signal>currentRowChanged(int)</signal>
|
||||||
|
<receiver>TypeStackedWidget</receiver>
|
||||||
|
<slot>setCurrentIndex(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>82</x>
|
||||||
|
<y>163</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>321</x>
|
||||||
|
<y>163</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
BIN
resources/images/author_maintenance.png
Normal file
BIN
resources/images/author_maintenance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/images/book_maintenance.png
Normal file
BIN
resources/images/book_maintenance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
@ -1,5 +1,8 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="songs" >
|
<qresource prefix="songs" >
|
||||||
|
<file>book_maintenance.png</file>
|
||||||
|
<file>author_maintenance.png</file>
|
||||||
|
<file>topic_maintenance.png</file>
|
||||||
<file>song_delete.png</file>
|
<file>song_delete.png</file>
|
||||||
<file>song_edit.png</file>
|
<file>song_edit.png</file>
|
||||||
<file>song_export.png</file>
|
<file>song_export.png</file>
|
||||||
|
BIN
resources/images/topic_maintenance.png
Normal file
BIN
resources/images/topic_maintenance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue
Block a user