diff --git a/openlp/core/ui/amendthemedialog.py b/openlp/core/ui/amendthemedialog.py new file mode 100644 index 000000000..c43180995 --- /dev/null +++ b/openlp/core/ui/amendthemedialog.py @@ -0,0 +1,392 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'amendthemedialog.ui' +# +# Created: Fri Apr 10 20:38:33 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_AmendThemeDialog(object): + def setupUi(self, AmendThemeDialog): + AmendThemeDialog.setObjectName("AmendThemeDialog") + AmendThemeDialog.resize(752, 533) + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap(":/icon/openlp.org-icon-32.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + AmendThemeDialog.setWindowIcon(icon) + self.ThemeButtonBox = QtGui.QDialogButtonBox(AmendThemeDialog) + self.ThemeButtonBox.setGeometry(QtCore.QRect(580, 500, 156, 26)) + self.ThemeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) + self.ThemeButtonBox.setObjectName("ThemeButtonBox") + self.layoutWidget = QtGui.QWidget(AmendThemeDialog) + self.layoutWidget.setGeometry(QtCore.QRect(50, 20, 441, 41)) + self.layoutWidget.setObjectName("layoutWidget") + self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget) + self.horizontalLayout.setObjectName("horizontalLayout") + self.ThemeNameLabel = QtGui.QLabel(self.layoutWidget) + self.ThemeNameLabel.setObjectName("ThemeNameLabel") + self.horizontalLayout.addWidget(self.ThemeNameLabel) + self.ThemeNameEdit = QtGui.QLineEdit(self.layoutWidget) + self.ThemeNameEdit.setObjectName("ThemeNameEdit") + self.horizontalLayout.addWidget(self.ThemeNameEdit) + self.widget = QtGui.QWidget(AmendThemeDialog) + self.widget.setGeometry(QtCore.QRect(31, 71, 721, 411)) + self.widget.setObjectName("widget") + self.horizontalLayout_2 = QtGui.QHBoxLayout(self.widget) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.LeftSide = QtGui.QWidget(self.widget) + self.LeftSide.setObjectName("LeftSide") + self.tabWidget = QtGui.QTabWidget(self.LeftSide) + self.tabWidget.setGeometry(QtCore.QRect(0, 0, 341, 401)) + self.tabWidget.setObjectName("tabWidget") + self.BackgroundTab = QtGui.QWidget() + self.BackgroundTab.setObjectName("BackgroundTab") + self.layoutWidget1 = QtGui.QWidget(self.BackgroundTab) + self.layoutWidget1.setGeometry(QtCore.QRect(10, 10, 321, 351)) + self.layoutWidget1.setObjectName("layoutWidget1") + self.gridLayout = QtGui.QGridLayout(self.layoutWidget1) + self.gridLayout.setObjectName("gridLayout") + self.BackgroundLabel = QtGui.QLabel(self.layoutWidget1) + self.BackgroundLabel.setObjectName("BackgroundLabel") + self.gridLayout.addWidget(self.BackgroundLabel, 0, 0, 1, 2) + self.BackgroundComboBox = QtGui.QComboBox(self.layoutWidget1) + self.BackgroundComboBox.setObjectName("BackgroundComboBox") + self.BackgroundComboBox.addItem(QtCore.QString()) + self.BackgroundComboBox.addItem(QtCore.QString()) + self.gridLayout.addWidget(self.BackgroundComboBox, 0, 2, 1, 2) + self.BackgroundTypeLabel = QtGui.QLabel(self.layoutWidget1) + self.BackgroundTypeLabel.setObjectName("BackgroundTypeLabel") + self.gridLayout.addWidget(self.BackgroundTypeLabel, 1, 0, 1, 2) + self.BackgroundTypeComboBox = QtGui.QComboBox(self.layoutWidget1) + self.BackgroundTypeComboBox.setObjectName("BackgroundTypeComboBox") + self.BackgroundTypeComboBox.addItem(QtCore.QString()) + self.BackgroundTypeComboBox.addItem(QtCore.QString()) + self.BackgroundTypeComboBox.addItem(QtCore.QString()) + self.gridLayout.addWidget(self.BackgroundTypeComboBox, 1, 2, 1, 2) + self.Color1Label = QtGui.QLabel(self.layoutWidget1) + self.Color1Label.setObjectName("Color1Label") + self.gridLayout.addWidget(self.Color1Label, 2, 0, 1, 1) + self.Color1PushButton = QtGui.QPushButton(self.layoutWidget1) + self.Color1PushButton.setObjectName("Color1PushButton") + self.gridLayout.addWidget(self.Color1PushButton, 2, 2, 1, 2) + self.Color2Label = QtGui.QLabel(self.layoutWidget1) + self.Color2Label.setObjectName("Color2Label") + self.gridLayout.addWidget(self.Color2Label, 3, 0, 1, 1) + self.Color2PushButton = QtGui.QPushButton(self.layoutWidget1) + self.Color2PushButton.setObjectName("Color2PushButton") + self.gridLayout.addWidget(self.Color2PushButton, 3, 2, 1, 2) + self.ImageLabel = QtGui.QLabel(self.layoutWidget1) + self.ImageLabel.setObjectName("ImageLabel") + self.gridLayout.addWidget(self.ImageLabel, 4, 0, 1, 1) + self.ImageLineEdit = QtGui.QLineEdit(self.layoutWidget1) + self.ImageLineEdit.setObjectName("ImageLineEdit") + self.gridLayout.addWidget(self.ImageLineEdit, 4, 1, 1, 2) + self.ImagePushButton = QtGui.QPushButton(self.layoutWidget1) + icon1 = QtGui.QIcon() + icon1.addPixmap(QtGui.QPixmap(":/services/service_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.ImagePushButton.setIcon(icon1) + self.ImagePushButton.setObjectName("ImagePushButton") + self.gridLayout.addWidget(self.ImagePushButton, 4, 3, 1, 1) + self.GradientLabel = QtGui.QLabel(self.layoutWidget1) + self.GradientLabel.setObjectName("GradientLabel") + self.gridLayout.addWidget(self.GradientLabel, 5, 0, 1, 1) + self.GradientComboBox = QtGui.QComboBox(self.layoutWidget1) + self.GradientComboBox.setObjectName("GradientComboBox") + self.GradientComboBox.addItem(QtCore.QString()) + self.GradientComboBox.addItem(QtCore.QString()) + self.GradientComboBox.addItem(QtCore.QString()) + self.gridLayout.addWidget(self.GradientComboBox, 5, 2, 1, 2) + self.tabWidget.addTab(self.BackgroundTab, "") + self.FontMainTab = QtGui.QWidget() + self.FontMainTab.setObjectName("FontMainTab") + self.MainFontGroupBox = QtGui.QGroupBox(self.FontMainTab) + self.MainFontGroupBox.setGeometry(QtCore.QRect(20, 10, 307, 119)) + self.MainFontGroupBox.setObjectName("MainFontGroupBox") + self.gridLayout_2 = QtGui.QGridLayout(self.MainFontGroupBox) + self.gridLayout_2.setObjectName("gridLayout_2") + self.MainFontlabel = QtGui.QLabel(self.MainFontGroupBox) + self.MainFontlabel.setObjectName("MainFontlabel") + self.gridLayout_2.addWidget(self.MainFontlabel, 0, 0, 1, 1) + self.MainFontComboBox = QtGui.QFontComboBox(self.MainFontGroupBox) + self.MainFontComboBox.setObjectName("MainFontComboBox") + self.gridLayout_2.addWidget(self.MainFontComboBox, 0, 1, 1, 2) + self.MainFontColorLabel = QtGui.QLabel(self.MainFontGroupBox) + self.MainFontColorLabel.setObjectName("MainFontColorLabel") + self.gridLayout_2.addWidget(self.MainFontColorLabel, 1, 0, 1, 1) + self.MainFontColorPushButton = QtGui.QPushButton(self.MainFontGroupBox) + self.MainFontColorPushButton.setObjectName("MainFontColorPushButton") + self.gridLayout_2.addWidget(self.MainFontColorPushButton, 1, 2, 1, 1) + self.MainFontSize = QtGui.QLabel(self.MainFontGroupBox) + self.MainFontSize.setObjectName("MainFontSize") + self.gridLayout_2.addWidget(self.MainFontSize, 2, 0, 1, 1) + self.MainFontSizeLineEdit = QtGui.QLineEdit(self.MainFontGroupBox) + self.MainFontSizeLineEdit.setObjectName("MainFontSizeLineEdit") + self.gridLayout_2.addWidget(self.MainFontSizeLineEdit, 2, 1, 1, 1) + self.MainFontlSlider = QtGui.QSlider(self.MainFontGroupBox) + self.MainFontlSlider.setProperty("value", QtCore.QVariant(15)) + self.MainFontlSlider.setMaximum(40) + self.MainFontlSlider.setOrientation(QtCore.Qt.Horizontal) + self.MainFontlSlider.setTickPosition(QtGui.QSlider.TicksBelow) + self.MainFontlSlider.setTickInterval(5) + self.MainFontlSlider.setObjectName("MainFontlSlider") + self.gridLayout_2.addWidget(self.MainFontlSlider, 2, 2, 1, 1) + self.FooterFontGroupBox = QtGui.QGroupBox(self.FontMainTab) + self.FooterFontGroupBox.setGeometry(QtCore.QRect(20, 160, 301, 190)) + self.FooterFontGroupBox.setObjectName("FooterFontGroupBox") + self.verticalLayout = QtGui.QVBoxLayout(self.FooterFontGroupBox) + self.verticalLayout.setObjectName("verticalLayout") + self.FontMainUseDefault = QtGui.QCheckBox(self.FooterFontGroupBox) + self.FontMainUseDefault.setTristate(False) + self.FontMainUseDefault.setObjectName("FontMainUseDefault") + self.verticalLayout.addWidget(self.FontMainUseDefault) + self.horizontalLayout_3 = QtGui.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.FontMainXLabel = QtGui.QLabel(self.FooterFontGroupBox) + self.FontMainXLabel.setObjectName("FontMainXLabel") + self.horizontalLayout_3.addWidget(self.FontMainXLabel) + self.FontMainXEdit = QtGui.QLineEdit(self.FooterFontGroupBox) + self.FontMainXEdit.setObjectName("FontMainXEdit") + self.horizontalLayout_3.addWidget(self.FontMainXEdit) + self.verticalLayout.addLayout(self.horizontalLayout_3) + self.horizontalLayout_4 = QtGui.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.FontMainYLabel = QtGui.QLabel(self.FooterFontGroupBox) + self.FontMainYLabel.setObjectName("FontMainYLabel") + self.horizontalLayout_4.addWidget(self.FontMainYLabel) + self.FontMainYEdit = QtGui.QLineEdit(self.FooterFontGroupBox) + self.FontMainYEdit.setObjectName("FontMainYEdit") + self.horizontalLayout_4.addWidget(self.FontMainYEdit) + self.verticalLayout.addLayout(self.horizontalLayout_4) + self.horizontalLayout_5 = QtGui.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.FontMainWidthLabel = QtGui.QLabel(self.FooterFontGroupBox) + self.FontMainWidthLabel.setObjectName("FontMainWidthLabel") + self.horizontalLayout_5.addWidget(self.FontMainWidthLabel) + self.FontMainWidthEdit = QtGui.QLineEdit(self.FooterFontGroupBox) + self.FontMainWidthEdit.setObjectName("FontMainWidthEdit") + self.horizontalLayout_5.addWidget(self.FontMainWidthEdit) + self.verticalLayout.addLayout(self.horizontalLayout_5) + self.horizontalLayout_6 = QtGui.QHBoxLayout() + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.FontMainHeightLabel = QtGui.QLabel(self.FooterFontGroupBox) + self.FontMainHeightLabel.setObjectName("FontMainHeightLabel") + self.horizontalLayout_6.addWidget(self.FontMainHeightLabel) + self.FontMainHeightEdit = QtGui.QLineEdit(self.FooterFontGroupBox) + self.FontMainHeightEdit.setObjectName("FontMainHeightEdit") + self.horizontalLayout_6.addWidget(self.FontMainHeightEdit) + self.verticalLayout.addLayout(self.horizontalLayout_6) + self.tabWidget.addTab(self.FontMainTab, "") + self.FontFooterTab = QtGui.QWidget() + self.FontFooterTab.setObjectName("FontFooterTab") + self.FooterFontGroupBox_2 = QtGui.QGroupBox(self.FontFooterTab) + self.FooterFontGroupBox_2.setGeometry(QtCore.QRect(20, 160, 301, 190)) + self.FooterFontGroupBox_2.setObjectName("FooterFontGroupBox_2") + self.verticalLayout_2 = QtGui.QVBoxLayout(self.FooterFontGroupBox_2) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.FontMainUseDefault_2 = QtGui.QCheckBox(self.FooterFontGroupBox_2) + self.FontMainUseDefault_2.setTristate(False) + self.FontMainUseDefault_2.setObjectName("FontMainUseDefault_2") + self.verticalLayout_2.addWidget(self.FontMainUseDefault_2) + self.horizontalLayout_7 = QtGui.QHBoxLayout() + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.FontFooterXLabel = QtGui.QLabel(self.FooterFontGroupBox_2) + self.FontFooterXLabel.setObjectName("FontFooterXLabel") + self.horizontalLayout_7.addWidget(self.FontFooterXLabel) + self.FontFooterXEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) + self.FontFooterXEdit.setObjectName("FontFooterXEdit") + self.horizontalLayout_7.addWidget(self.FontFooterXEdit) + self.verticalLayout_2.addLayout(self.horizontalLayout_7) + self.horizontalLayout_8 = QtGui.QHBoxLayout() + self.horizontalLayout_8.setObjectName("horizontalLayout_8") + self.FontFooterYLabel = QtGui.QLabel(self.FooterFontGroupBox_2) + self.FontFooterYLabel.setObjectName("FontFooterYLabel") + self.horizontalLayout_8.addWidget(self.FontFooterYLabel) + self.FontFooterYEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) + self.FontFooterYEdit.setObjectName("FontFooterYEdit") + self.horizontalLayout_8.addWidget(self.FontFooterYEdit) + self.verticalLayout_2.addLayout(self.horizontalLayout_8) + self.horizontalLayout_9 = QtGui.QHBoxLayout() + self.horizontalLayout_9.setObjectName("horizontalLayout_9") + self.FontFooterWidthLabel = QtGui.QLabel(self.FooterFontGroupBox_2) + self.FontFooterWidthLabel.setObjectName("FontFooterWidthLabel") + self.horizontalLayout_9.addWidget(self.FontFooterWidthLabel) + self.FontFooterWidthEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) + self.FontFooterWidthEdit.setObjectName("FontFooterWidthEdit") + self.horizontalLayout_9.addWidget(self.FontFooterWidthEdit) + self.verticalLayout_2.addLayout(self.horizontalLayout_9) + self.horizontalLayout_10 = QtGui.QHBoxLayout() + self.horizontalLayout_10.setObjectName("horizontalLayout_10") + self.FontFooterHeightLabel = QtGui.QLabel(self.FooterFontGroupBox_2) + self.FontFooterHeightLabel.setObjectName("FontFooterHeightLabel") + self.horizontalLayout_10.addWidget(self.FontFooterHeightLabel) + self.FontFooterHeightEdit = QtGui.QLineEdit(self.FooterFontGroupBox_2) + self.FontFooterHeightEdit.setObjectName("FontFooterHeightEdit") + self.horizontalLayout_10.addWidget(self.FontFooterHeightEdit) + self.verticalLayout_2.addLayout(self.horizontalLayout_10) + self.FooterFontGroupBox_3 = QtGui.QGroupBox(self.FontFooterTab) + self.FooterFontGroupBox_3.setGeometry(QtCore.QRect(20, 10, 307, 119)) + self.FooterFontGroupBox_3.setObjectName("FooterFontGroupBox_3") + self.gridLayout_3 = QtGui.QGridLayout(self.FooterFontGroupBox_3) + self.gridLayout_3.setObjectName("gridLayout_3") + self.FontFooterlabel = QtGui.QLabel(self.FooterFontGroupBox_3) + self.FontFooterlabel.setObjectName("FontFooterlabel") + self.gridLayout_3.addWidget(self.FontFooterlabel, 0, 0, 1, 1) + self.FontFooterComboBox = QtGui.QFontComboBox(self.FooterFontGroupBox_3) + self.FontFooterComboBox.setObjectName("FontFooterComboBox") + self.gridLayout_3.addWidget(self.FontFooterComboBox, 0, 1, 1, 2) + self.FontFooterColorLabel = QtGui.QLabel(self.FooterFontGroupBox_3) + self.FontFooterColorLabel.setObjectName("FontFooterColorLabel") + self.gridLayout_3.addWidget(self.FontFooterColorLabel, 1, 0, 1, 1) + self.FontFooterColorPushButton = QtGui.QPushButton(self.FooterFontGroupBox_3) + self.FontFooterColorPushButton.setObjectName("FontFooterColorPushButton") + self.gridLayout_3.addWidget(self.FontFooterColorPushButton, 1, 2, 1, 1) + self.FontFooterSizeLabel = QtGui.QLabel(self.FooterFontGroupBox_3) + self.FontFooterSizeLabel.setObjectName("FontFooterSizeLabel") + self.gridLayout_3.addWidget(self.FontFooterSizeLabel, 2, 0, 1, 1) + self.FontFooterSizeLineEdit = QtGui.QLineEdit(self.FooterFontGroupBox_3) + self.FontFooterSizeLineEdit.setObjectName("FontFooterSizeLineEdit") + self.gridLayout_3.addWidget(self.FontFooterSizeLineEdit, 2, 1, 1, 1) + self.FontFooterSlider = QtGui.QSlider(self.FooterFontGroupBox_3) + self.FontFooterSlider.setProperty("value", QtCore.QVariant(15)) + self.FontFooterSlider.setMaximum(40) + self.FontFooterSlider.setOrientation(QtCore.Qt.Horizontal) + self.FontFooterSlider.setTickPosition(QtGui.QSlider.TicksBelow) + self.FontFooterSlider.setTickInterval(5) + self.FontFooterSlider.setObjectName("FontFooterSlider") + self.gridLayout_3.addWidget(self.FontFooterSlider, 2, 2, 1, 1) + self.tabWidget.addTab(self.FontFooterTab, "") + self.OptionsTab = QtGui.QWidget() + self.OptionsTab.setObjectName("OptionsTab") + self.ShadowGroupBox = QtGui.QGroupBox(self.OptionsTab) + self.ShadowGroupBox.setGeometry(QtCore.QRect(20, 10, 301, 80)) + self.ShadowGroupBox.setObjectName("ShadowGroupBox") + self.layoutWidget2 = QtGui.QWidget(self.ShadowGroupBox) + self.layoutWidget2.setGeometry(QtCore.QRect(10, 20, 281, 58)) + self.layoutWidget2.setObjectName("layoutWidget2") + self.formLayout = QtGui.QFormLayout(self.layoutWidget2) + self.formLayout.setObjectName("formLayout") + self.ShadowCheckBox = QtGui.QCheckBox(self.layoutWidget2) + self.ShadowCheckBox.setObjectName("ShadowCheckBox") + self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.ShadowCheckBox) + self.ShadowColorLabel = QtGui.QLabel(self.layoutWidget2) + self.ShadowColorLabel.setObjectName("ShadowColorLabel") + self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.ShadowColorLabel) + self.ShadowColorPushButton = QtGui.QPushButton(self.layoutWidget2) + self.ShadowColorPushButton.setObjectName("ShadowColorPushButton") + self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.ShadowColorPushButton) + self.AlignmentGroupBox = QtGui.QGroupBox(self.OptionsTab) + self.AlignmentGroupBox.setGeometry(QtCore.QRect(10, 200, 321, 161)) + self.AlignmentGroupBox.setObjectName("AlignmentGroupBox") + self.gridLayout_4 = QtGui.QGridLayout(self.AlignmentGroupBox) + self.gridLayout_4.setObjectName("gridLayout_4") + self.HorizontalLabel = QtGui.QLabel(self.AlignmentGroupBox) + self.HorizontalLabel.setObjectName("HorizontalLabel") + self.gridLayout_4.addWidget(self.HorizontalLabel, 0, 0, 1, 1) + self.HorizontalComboBox = QtGui.QComboBox(self.AlignmentGroupBox) + self.HorizontalComboBox.setObjectName("HorizontalComboBox") + self.HorizontalComboBox.addItem(QtCore.QString()) + self.HorizontalComboBox.addItem(QtCore.QString()) + self.HorizontalComboBox.addItem(QtCore.QString()) + self.gridLayout_4.addWidget(self.HorizontalComboBox, 0, 1, 1, 1) + self.VerticalLabel = QtGui.QLabel(self.AlignmentGroupBox) + self.VerticalLabel.setObjectName("VerticalLabel") + self.gridLayout_4.addWidget(self.VerticalLabel, 1, 0, 1, 1) + self.VerticalComboBox = QtGui.QComboBox(self.AlignmentGroupBox) + self.VerticalComboBox.setObjectName("VerticalComboBox") + self.VerticalComboBox.addItem(QtCore.QString()) + self.VerticalComboBox.addItem(QtCore.QString()) + self.VerticalComboBox.addItem(QtCore.QString()) + self.gridLayout_4.addWidget(self.VerticalComboBox, 1, 1, 1, 1) + self.OutlineGroupBox = QtGui.QGroupBox(self.OptionsTab) + self.OutlineGroupBox.setGeometry(QtCore.QRect(20, 110, 301, 80)) + self.OutlineGroupBox.setObjectName("OutlineGroupBox") + self.layoutWidget_3 = QtGui.QWidget(self.OutlineGroupBox) + self.layoutWidget_3.setGeometry(QtCore.QRect(10, 20, 281, 58)) + self.layoutWidget_3.setObjectName("layoutWidget_3") + self.OutlineformLayout = QtGui.QFormLayout(self.layoutWidget_3) + self.OutlineformLayout.setObjectName("OutlineformLayout") + self.OutlineCheckBox = QtGui.QCheckBox(self.layoutWidget_3) + self.OutlineCheckBox.setObjectName("OutlineCheckBox") + self.OutlineformLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.OutlineCheckBox) + self.OutlineColorLabel = QtGui.QLabel(self.layoutWidget_3) + self.OutlineColorLabel.setObjectName("OutlineColorLabel") + self.OutlineformLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.OutlineColorLabel) + self.OutlineColorPushButton = QtGui.QPushButton(self.layoutWidget_3) + self.OutlineColorPushButton.setObjectName("OutlineColorPushButton") + self.OutlineformLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.OutlineColorPushButton) + self.tabWidget.addTab(self.OptionsTab, "") + self.horizontalLayout_2.addWidget(self.LeftSide) + self.RightSide = QtGui.QWidget(self.widget) + self.RightSide.setObjectName("RightSide") + self.ThemePreview = QtGui.QLabel(self.RightSide) + self.ThemePreview.setGeometry(QtCore.QRect(20, 60, 311, 271)) + self.ThemePreview.setFrameShape(QtGui.QFrame.Box) + self.ThemePreview.setFrameShadow(QtGui.QFrame.Raised) + self.ThemePreview.setLineWidth(2) + self.ThemePreview.setScaledContents(True) + self.ThemePreview.setObjectName("ThemePreview") + self.horizontalLayout_2.addWidget(self.RightSide) + + self.retranslateUi(AmendThemeDialog) + self.tabWidget.setCurrentIndex(0) + QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog) + + def retranslateUi(self, AmendThemeDialog): + AmendThemeDialog.setWindowTitle(QtGui.QApplication.translate("AmendThemeDialog", "Theme Maintance", None, QtGui.QApplication.UnicodeUTF8)) + self.ThemeNameLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Theme Name", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background:", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Opaque", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Transparent", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundTypeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Background Type:", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundTypeComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Solid Color", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundTypeComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Gradient", None, QtGui.QApplication.UnicodeUTF8)) + self.BackgroundTypeComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Image", None, QtGui.QApplication.UnicodeUTF8)) + self.Color1Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "", None, QtGui.QApplication.UnicodeUTF8)) + self.Color2Label.setText(QtGui.QApplication.translate("AmendThemeDialog", "", None, QtGui.QApplication.UnicodeUTF8)) + self.ImageLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Image:", None, QtGui.QApplication.UnicodeUTF8)) + self.GradientLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Gradient :", None, QtGui.QApplication.UnicodeUTF8)) + self.GradientComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Horizontal", None, QtGui.QApplication.UnicodeUTF8)) + self.GradientComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Vertical", None, QtGui.QApplication.UnicodeUTF8)) + self.GradientComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Circular", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.BackgroundTab), QtGui.QApplication.translate("AmendThemeDialog", "Background", None, QtGui.QApplication.UnicodeUTF8)) + self.MainFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Main Font", None, QtGui.QApplication.UnicodeUTF8)) + self.MainFontlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8)) + self.MainFontColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color", None, QtGui.QApplication.UnicodeUTF8)) + self.MainFontSize.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8)) + self.FooterFontGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8)) + self.FontMainUseDefault.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use default location", None, QtGui.QApplication.UnicodeUTF8)) + self.FontMainXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8)) + self.FontMainYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8)) + self.FontMainWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width", None, QtGui.QApplication.UnicodeUTF8)) + self.FontMainHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.FontMainTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Main", None, QtGui.QApplication.UnicodeUTF8)) + self.FooterFontGroupBox_2.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Display Location", None, QtGui.QApplication.UnicodeUTF8)) + self.FontMainUseDefault_2.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use default location", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterXLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "X Position:", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterYLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Y Position:", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterWidthLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Width", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterHeightLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Height", None, QtGui.QApplication.UnicodeUTF8)) + self.FooterFontGroupBox_3.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Footer Font", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterlabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font:", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Font Color", None, QtGui.QApplication.UnicodeUTF8)) + self.FontFooterSizeLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Size:", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.FontFooterTab), QtGui.QApplication.translate("AmendThemeDialog", "Font Footer", None, QtGui.QApplication.UnicodeUTF8)) + self.ShadowGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Shadow", None, QtGui.QApplication.UnicodeUTF8)) + self.ShadowCheckBox.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Shadow", None, QtGui.QApplication.UnicodeUTF8)) + self.ShadowColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Shadow Color:", None, QtGui.QApplication.UnicodeUTF8)) + self.AlignmentGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8)) + self.HorizontalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Horizontal Align:", None, QtGui.QApplication.UnicodeUTF8)) + self.HorizontalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Left", None, QtGui.QApplication.UnicodeUTF8)) + self.HorizontalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Right", None, QtGui.QApplication.UnicodeUTF8)) + self.HorizontalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Center", None, QtGui.QApplication.UnicodeUTF8)) + self.VerticalLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Vertical Align:", None, QtGui.QApplication.UnicodeUTF8)) + self.VerticalComboBox.setItemText(0, QtGui.QApplication.translate("AmendThemeDialog", "Top", None, QtGui.QApplication.UnicodeUTF8)) + self.VerticalComboBox.setItemText(1, QtGui.QApplication.translate("AmendThemeDialog", "Middle", None, QtGui.QApplication.UnicodeUTF8)) + self.VerticalComboBox.setItemText(2, QtGui.QApplication.translate("AmendThemeDialog", "Bottom", None, QtGui.QApplication.UnicodeUTF8)) + self.OutlineGroupBox.setTitle(QtGui.QApplication.translate("AmendThemeDialog", "Outline", None, QtGui.QApplication.UnicodeUTF8)) + self.OutlineCheckBox.setText(QtGui.QApplication.translate("AmendThemeDialog", "Use Outline", None, QtGui.QApplication.UnicodeUTF8)) + self.OutlineColorLabel.setText(QtGui.QApplication.translate("AmendThemeDialog", "Outline Color:", None, QtGui.QApplication.UnicodeUTF8)) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.OptionsTab), QtGui.QApplication.translate("AmendThemeDialog", "Alignment", None, QtGui.QApplication.UnicodeUTF8)) + diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py new file mode 100644 index 000000000..098ecfaf1 --- /dev/null +++ b/openlp/core/ui/amendthemeform.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 +""" +OpenLP - Open Source Lyrics Projection +Copyright (c) 2008 Raoul Snyman +Portions copyright (c) 2008 Martin Thompson, Tim Bentley, + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, MA 02111-1307 USA +""" +import logging + +from PyQt4 import QtCore, QtGui +from PyQt4.QtGui import QColor, QFont +from openlp.core.lib import ThemeXML +from openlp.core import Renderer + +from amendthemedialog import Ui_AmendThemeDialog + +log = logging.getLogger(u'AmendThemeForm') + +class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog): + + def __init__(self, parent=None): + QtGui.QDialog.__init__(self, parent) + self.setupUi(self) + + def loadTheme(self, theme): + if theme == None: + theme = self.baseTheme() + else: + pass + self.generateImage(theme) + + def baseTheme(self): + log.debug(u'base Theme') + newtheme = ThemeXML() + newtheme.new_document(u'New Theme') + newtheme.add_background_solid(str(u'#000000')) + newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(30), u'False') + newtheme.add_font(str(QFont().family()), str(u'#FFFFFF'), str(12), u'False', u'footer') + newtheme.add_display(str(False), str(u'#FFFFFF'), str(False), str(u'#FFFFFF'), + str(0), str(0), str(0)) + return newtheme.extract_xml() + + def generateImage(self, theme_xml): + log.debug(u'generateImage %s ', theme_xml) + theme = ThemeXML() + theme.parse(theme_xml) + #print theme + size=QtCore.QSize(800,600) + frame=TstFrame(size) + frame=frame + paintdest=frame.GetPixmap() + r=Renderer() + r.set_paint_dest(paintdest) + + r.set_theme(theme) # set default theme + r._render_background() + r.set_text_rectangle(QtCore.QRect(0,0, size.width()-1, size.height()-1), QtCore.QRect(10,560, size.width()-1, size.height()-1)) + + lines=[] + lines.append(u'Amazing Grace!') + lines.append(u'How sweet the sound') + lines.append(u'To save a wretch like me;') + lines.append(u'I once was lost but now am found,') + lines.append(u'Was blind, but now I see.') + lines1=[] + lines1.append(u'Amazing Grace (John Newton)' ) + lines1.append(u'CCLI xxx (c)Openlp.org') + + answer=r._render_lines(lines, lines1) + + self.ThemePreview.setPixmap(frame.GetPixmap()) + +class TstFrame: + def __init__(self, size): + """Create the DemoPanel.""" + self.width=size.width(); + self.height=size.height(); + # create something to be painted into + self._Buffer = QtGui.QPixmap(self.width, self.height) + def GetPixmap(self): + return self._Buffer diff --git a/resources/forms/amendthemedialog.ui b/resources/forms/amendthemedialog.ui new file mode 100644 index 000000000..d818a1bb0 --- /dev/null +++ b/resources/forms/amendthemedialog.ui @@ -0,0 +1,729 @@ + + + AmendThemeDialog + + + + 0 + 0 + 752 + 533 + + + + Theme Maintance + + + + :/icon/openlp.org-icon-32.bmp:/icon/openlp.org-icon-32.bmp + + + + + 580 + 500 + 156 + 26 + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 50 + 20 + 441 + 41 + + + + + + + Theme Name + + + + + + + + + + + + 31 + 71 + 721 + 411 + + + + + + + + + 0 + 0 + 341 + 401 + + + + 0 + + + + Background + + + + + 10 + 10 + 321 + 351 + + + + + + + Background: + + + + + + + + Opaque + + + + + Transparent + + + + + + + + Background Type: + + + + + + + + Solid Color + + + + + Gradient + + + + + Image + + + + + + + + <Color1> + + + + + + + + + + + + + + <Color2> + + + + + + + + + + + + + + Image: + + + + + + + + + + + + + + :/services/service_open.png:/services/service_open.png + + + + + + + Gradient : + + + + + + + + Horizontal + + + + + Vertical + + + + + Circular + + + + + + + + + + Font Main + + + + + 20 + 10 + 307 + 119 + + + + Main Font + + + + + + Font: + + + + + + + + + + Font Color + + + + + + + + + + + + + + Size: + + + + + + + + + + 15 + + + 40 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 5 + + + + + + + + + 20 + 160 + 301 + 190 + + + + Display Location + + + + + + Use default location + + + false + + + + + + + + + X Position: + + + + + + + + + + + + + + Y Position: + + + + + + + + + + + + + + Width + + + + + + + + + + + + + + Height + + + + + + + + + + + + + + Font Footer + + + + + 20 + 160 + 301 + 190 + + + + Display Location + + + + + + Use default location + + + false + + + + + + + + + X Position: + + + + + + + + + + + + + + Y Position: + + + + + + + + + + + + + + Width + + + + + + + + + + + + + + Height + + + + + + + + + + + + + + 20 + 10 + 307 + 119 + + + + Footer Font + + + + + + Font: + + + + + + + + + + Font Color + + + + + + + + + + + + + + Size: + + + + + + + + + + 15 + + + 40 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 5 + + + + + + + + + Alignment + + + + + 20 + 10 + 301 + 80 + + + + Shadow + + + + + 10 + 20 + 281 + 58 + + + + + + + Use Shadow + + + + + + + Shadow Color: + + + + + + + + + + + + + + + + + 10 + 200 + 321 + 161 + + + + Alignment + + + + + + Horizontal Align: + + + + + + + + Left + + + + + Right + + + + + Center + + + + + + + + Vertical Align: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + + 20 + 110 + 301 + 80 + + + + Outline + + + + + 10 + 20 + 281 + 58 + + + + + + + Use Outline + + + + + + + Outline Color: + + + + + + + + + + + + + + + + + + + + + + + 20 + 60 + 311 + 271 + + + + QFrame::Box + + + QFrame::Raised + + + 2 + + + + + + true + + + + + + + + + + + +