forked from openlp/openlp
Add General Tab and Create Virtual plugin settings
bzr-revno: 348
This commit is contained in:
parent
c326d35bdb
commit
fce0085b90
@ -22,9 +22,10 @@ from slidecontroller import SlideController
|
||||
from splashscreen import SplashScreen
|
||||
from about import AboutForm
|
||||
from alertform import AlertForm
|
||||
from generalform import GeneralForm
|
||||
from settings import SettingsDialog
|
||||
from servicemanager import ServiceManager
|
||||
from mainwindow import MainWindow
|
||||
|
||||
__all__ = ['SplashScreen', 'AboutForm', 'AlertForm', 'SettingsDialog',
|
||||
'MainWindow', 'SlideController', 'ServiceManager']
|
||||
'MainWindow', 'SlideController', 'ServiceManager,GeneralForm']
|
||||
|
@ -21,6 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import SettingsTab
|
||||
|
||||
class AlertForm(object):
|
||||
|
||||
@ -92,7 +93,83 @@ class AlertForm(object):
|
||||
self.AlertForm.show()
|
||||
|
||||
def get_settings_tab_item(self):
|
||||
pass
|
||||
|
||||
self.SettingsTabItem= SettingsTab()
|
||||
|
||||
self.Alerts = QtGui.QWidget()
|
||||
self.Alerts.setObjectName("Alerts")
|
||||
self.formLayout_2 = QtGui.QFormLayout(self.Alerts)
|
||||
self.formLayout_2.setObjectName("formLayout_2")
|
||||
self.AlertGroupBox = QtGui.QGroupBox(self.Alerts)
|
||||
self.AlertGroupBox.setObjectName("AlertGroupBox")
|
||||
self.gridLayout = QtGui.QGridLayout(self.AlertGroupBox)
|
||||
self.gridLayout.setMargin(8)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.FontLabel = QtGui.QLabel(self.AlertGroupBox)
|
||||
self.FontLabel.setObjectName("FontLabel")
|
||||
self.gridLayout.addWidget(self.FontLabel, 0, 0, 1, 1)
|
||||
self.FontComboBox = QtGui.QFontComboBox(self.AlertGroupBox)
|
||||
self.FontComboBox.setObjectName("FontComboBox")
|
||||
self.gridLayout.addWidget(self.FontComboBox, 1, 0, 1, 1)
|
||||
self.ColorWidget = QtGui.QWidget(self.AlertGroupBox)
|
||||
self.ColorWidget.setObjectName("ColorWidget")
|
||||
self.ColorLayout = QtGui.QHBoxLayout(self.ColorWidget)
|
||||
self.ColorLayout.setSpacing(8)
|
||||
self.ColorLayout.setMargin(0)
|
||||
self.ColorLayout.setObjectName("ColorLayout")
|
||||
self.FontColorLabel = QtGui.QLabel(self.ColorWidget)
|
||||
self.FontColorLabel.setObjectName("FontColorLabel")
|
||||
self.ColorLayout.addWidget(self.FontColorLabel)
|
||||
self.FontColorPanel = QtGui.QGraphicsView(self.ColorWidget)
|
||||
self.FontColorPanel.setMinimumSize(QtCore.QSize(24, 24))
|
||||
self.FontColorPanel.setMaximumSize(QtCore.QSize(24, 24))
|
||||
self.FontColorPanel.setObjectName("FontColorPanel")
|
||||
self.ColorLayout.addWidget(self.FontColorPanel)
|
||||
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.ColorLayout.addItem(spacerItem1)
|
||||
self.BackgroundColorLabel = QtGui.QLabel(self.ColorWidget)
|
||||
self.BackgroundColorLabel.setObjectName("BackgroundColorLabel")
|
||||
self.ColorLayout.addWidget(self.BackgroundColorLabel)
|
||||
self.BackgroundColorPanel = QtGui.QGraphicsView(self.ColorWidget)
|
||||
self.BackgroundColorPanel.setMinimumSize(QtCore.QSize(24, 24))
|
||||
self.BackgroundColorPanel.setMaximumSize(QtCore.QSize(24, 24))
|
||||
self.BackgroundColorPanel.setObjectName("BackgroundColorPanel")
|
||||
self.ColorLayout.addWidget(self.BackgroundColorPanel)
|
||||
self.gridLayout.addWidget(self.ColorWidget, 2, 0, 1, 1)
|
||||
self.FontPreview = QtGui.QGraphicsView(self.AlertGroupBox)
|
||||
self.FontPreview.setMaximumSize(QtCore.QSize(16777215, 64))
|
||||
self.FontPreview.setObjectName("FontPreview")
|
||||
self.gridLayout.addWidget(self.FontPreview, 3, 0, 1, 1)
|
||||
self.LengthWidget = QtGui.QWidget(self.AlertGroupBox)
|
||||
self.LengthWidget.setObjectName("LengthWidget")
|
||||
self.LengthLayout = QtGui.QHBoxLayout(self.LengthWidget)
|
||||
self.LengthLayout.setSpacing(8)
|
||||
self.LengthLayout.setMargin(0)
|
||||
self.LengthLayout.setObjectName("LengthLayout")
|
||||
self.LengthLabel = QtGui.QLabel(self.LengthWidget)
|
||||
self.LengthLabel.setObjectName("LengthLabel")
|
||||
self.LengthLayout.addWidget(self.LengthLabel)
|
||||
self.LengthSpinBox = QtGui.QSpinBox(self.LengthWidget)
|
||||
self.LengthSpinBox.setProperty("value", QtCore.QVariant(5))
|
||||
self.LengthSpinBox.setMaximum(180)
|
||||
self.LengthSpinBox.setObjectName("LengthSpinBox")
|
||||
self.LengthLayout.addWidget(self.LengthSpinBox)
|
||||
spacerItem2 = QtGui.QSpacerItem(147, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.LengthLayout.addItem(spacerItem2)
|
||||
self.gridLayout.addWidget(self.LengthWidget, 4, 0, 1, 1)
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.AlertGroupBox)
|
||||
|
||||
self.AlertGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Alerts", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.FontLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Font Name:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.FontColorLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Font Color:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.BackgroundColorLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Background Color:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.LengthLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Display length:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.LengthSpinBox.setSuffix(QtGui.QApplication.translate("SettingsDialog", "s", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.SettingsTabItem.setTabText(QtGui.QApplication.translate("SettingsDialog", "Alerts", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.SettingsTabItem.add_items(self.Alerts)
|
||||
|
||||
return self.SettingsTabItem
|
||||
|
||||
|
||||
def load_settings(self):
|
||||
pass
|
||||
|
143
openlp/core/ui/generalform.py
Normal file
143
openlp/core/ui/generalform.py
Normal file
@ -0,0 +1,143 @@
|
||||
# -*- 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
|
||||
"""
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.lib import SettingsTab
|
||||
|
||||
class GeneralForm(object):
|
||||
"""
|
||||
This is not a standard form
|
||||
It is a holder for General settings used by the rendering components
|
||||
It provides the Settings Tab to control the Output Configuration
|
||||
"""
|
||||
def __init__(self):
|
||||
pass
|
||||
def get_settings_tab_item(self):
|
||||
|
||||
self.SettingsTabItem= SettingsTab()
|
||||
|
||||
self.DisplayTab = QtGui.QWidget()
|
||||
self.DisplayTab.setObjectName("DisplayTab")
|
||||
self.DisplayTabLayout = QtGui.QHBoxLayout(self.DisplayTab)
|
||||
self.DisplayTabLayout.setSpacing(8)
|
||||
self.DisplayTabLayout.setMargin(8)
|
||||
self.DisplayTabLayout.setObjectName("DisplayTabLayout")
|
||||
self.LeftColumn = QtGui.QWidget(self.DisplayTab)
|
||||
self.LeftColumn.setObjectName("LeftColumn")
|
||||
self.LeftColumnLayout = QtGui.QVBoxLayout(self.LeftColumn)
|
||||
self.LeftColumnLayout.setSpacing(8)
|
||||
self.LeftColumnLayout.setMargin(0)
|
||||
self.LeftColumnLayout.setObjectName("LeftColumnLayout")
|
||||
self.MonitorGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.MonitorGroupBox.setObjectName("MonitorGroupBox")
|
||||
self.MonitorLayout = QtGui.QVBoxLayout(self.MonitorGroupBox)
|
||||
self.MonitorLayout.setSpacing(8)
|
||||
self.MonitorLayout.setMargin(8)
|
||||
self.MonitorLayout.setObjectName("MonitorLayout")
|
||||
self.MonitorLabel = QtGui.QLabel(self.MonitorGroupBox)
|
||||
self.MonitorLabel.setObjectName("MonitorLabel")
|
||||
self.MonitorLayout.addWidget(self.MonitorLabel)
|
||||
self.MonitorComboBox = QtGui.QComboBox(self.MonitorGroupBox)
|
||||
self.MonitorComboBox.setObjectName("MonitorComboBox")
|
||||
self.MonitorComboBox.addItem(QtCore.QString())
|
||||
self.MonitorComboBox.addItem(QtCore.QString())
|
||||
self.MonitorLayout.addWidget(self.MonitorComboBox)
|
||||
self.LeftColumnLayout.addWidget(self.MonitorGroupBox)
|
||||
self.FontSizeGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.FontSizeGroupBox.setObjectName("FontSizeGroupBox")
|
||||
self.FontSizeLayout = QtGui.QVBoxLayout(self.FontSizeGroupBox)
|
||||
self.FontSizeLayout.setSpacing(8)
|
||||
self.FontSizeLayout.setMargin(8)
|
||||
self.FontSizeLayout.setObjectName("FontSizeLayout")
|
||||
self.AutoResizeRadioButton = QtGui.QRadioButton(self.FontSizeGroupBox)
|
||||
self.AutoResizeRadioButton.setChecked(True)
|
||||
self.AutoResizeRadioButton.setObjectName("AutoResizeRadioButton")
|
||||
self.FontSizeLayout.addWidget(self.AutoResizeRadioButton)
|
||||
self.WrapLinesRadioButton = QtGui.QRadioButton(self.FontSizeGroupBox)
|
||||
self.WrapLinesRadioButton.setObjectName("WrapLinesRadioButton")
|
||||
self.FontSizeLayout.addWidget(self.WrapLinesRadioButton)
|
||||
self.LeftColumnLayout.addWidget(self.FontSizeGroupBox)
|
||||
self.SongDisplayGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.SongDisplayGroupBox.setObjectName("SongDisplayGroupBox")
|
||||
self.SongDisplayLayout = QtGui.QVBoxLayout(self.SongDisplayGroupBox)
|
||||
self.SongDisplayLayout.setSpacing(8)
|
||||
self.SongDisplayLayout.setMargin(8)
|
||||
self.SongDisplayLayout.setObjectName("SongDisplayLayout")
|
||||
self.EnableCreditsCheckBox = QtGui.QCheckBox(self.SongDisplayGroupBox)
|
||||
self.EnableCreditsCheckBox.setChecked(True)
|
||||
self.EnableCreditsCheckBox.setObjectName("EnableCreditsCheckBox")
|
||||
self.SongDisplayLayout.addWidget(self.EnableCreditsCheckBox)
|
||||
self.LeftColumnLayout.addWidget(self.SongDisplayGroupBox)
|
||||
self.BlankScreenGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.BlankScreenGroupBox.setObjectName("BlankScreenGroupBox")
|
||||
self.BlankScreenLayout = QtGui.QVBoxLayout(self.BlankScreenGroupBox)
|
||||
self.BlankScreenLayout.setSpacing(8)
|
||||
self.BlankScreenLayout.setMargin(8)
|
||||
self.BlankScreenLayout.setObjectName("BlankScreenLayout")
|
||||
self.WarningCheckBox = QtGui.QCheckBox(self.BlankScreenGroupBox)
|
||||
self.WarningCheckBox.setObjectName("WarningCheckBox")
|
||||
self.BlankScreenLayout.addWidget(self.WarningCheckBox)
|
||||
self.LeftColumnLayout.addWidget(self.BlankScreenGroupBox)
|
||||
self.AutoOpenGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.AutoOpenGroupBox.setObjectName("AutoOpenGroupBox")
|
||||
self.AutoOpenLayout = QtGui.QVBoxLayout(self.AutoOpenGroupBox)
|
||||
self.AutoOpenLayout.setObjectName("AutoOpenLayout")
|
||||
self.AutoOpenCheckBox = QtGui.QCheckBox(self.AutoOpenGroupBox)
|
||||
self.AutoOpenCheckBox.setObjectName("AutoOpenCheckBox")
|
||||
self.AutoOpenLayout.addWidget(self.AutoOpenCheckBox)
|
||||
self.LeftColumnLayout.addWidget(self.AutoOpenGroupBox)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.LeftColumnLayout.addItem(spacerItem)
|
||||
self.DisplayTabLayout.addWidget(self.LeftColumn)
|
||||
self.RightColumn = QtGui.QWidget(self.DisplayTab)
|
||||
self.RightColumn.setObjectName("RightColumn")
|
||||
self.RightColumnLayout = QtGui.QVBoxLayout(self.RightColumn)
|
||||
self.RightColumnLayout.setSpacing(8)
|
||||
self.RightColumnLayout.setMargin(0)
|
||||
self.RightColumnLayout.setObjectName("RightColumnLayout")
|
||||
self.DisplayTabLayout.addWidget(self.RightColumn)
|
||||
|
||||
self.MonitorGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Monitors", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Select monitor for output display:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorComboBox.setItemText(0, QtGui.QApplication.translate("SettingsDialog", "Monitor 1 on X11 Windowing System", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorComboBox.setItemText(1, QtGui.QApplication.translate("SettingsDialog", "Monitor 2 on X11 Windowing System", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.FontSizeGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Font Size", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AutoResizeRadioButton.setText(QtGui.QApplication.translate("SettingsDialog", "Automatically resize font to fit text to slide", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.WrapLinesRadioButton.setText(QtGui.QApplication.translate("SettingsDialog", "Wrap long lines to keep desired font", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.SongDisplayGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Song Display", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.EnableCreditsCheckBox.setText(QtGui.QApplication.translate("SettingsDialog", "Enable displaying of song credits", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.BlankScreenGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Blank Screen", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.WarningCheckBox.setText(QtGui.QApplication.translate("SettingsDialog", "Show warning on startup", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AutoOpenGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Auto Open Last Service", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AutoOpenCheckBox.setText(QtGui.QApplication.translate("SettingsDialog", "Automatically open the last service at startup", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
self.SettingsTabItem.setTabText(QtGui.QApplication.translate("SettingsDialog", "General", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
self.SettingsTabItem.add_items(self.DisplayTab)
|
||||
return self.SettingsTabItem
|
||||
|
||||
|
||||
def load_settings(self):
|
||||
pass
|
||||
|
||||
def save_settings(self):
|
||||
pass
|
@ -26,7 +26,7 @@ from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.resources import *
|
||||
|
||||
from openlp.core.ui import SlideController, ServiceManager
|
||||
from openlp.core.ui import AboutForm, AlertForm, SettingsDialog, SlideController
|
||||
from openlp.core.ui import AboutForm, AlertForm, SettingsDialog, SlideController, GeneralForm
|
||||
from openlp.core.lib import Plugin, MediaManagerItem, SettingsTab
|
||||
|
||||
from openlp.core import PluginManager
|
||||
@ -41,6 +41,7 @@ class MainWindow(object):
|
||||
self.about_form = AboutForm()
|
||||
self.alert_form = AlertForm()
|
||||
self.settings_form = SettingsDialog()
|
||||
self.general_form = GeneralForm()
|
||||
pluginpath = os.path.split(os.path.abspath(__file__))[0]
|
||||
pluginpath = os.path.abspath(os.path.join(pluginpath, '..', '..','plugins'))
|
||||
self.plugin_manager = PluginManager(pluginpath)
|
||||
@ -48,6 +49,9 @@ class MainWindow(object):
|
||||
|
||||
self.plugin_manager.find_plugins(pluginpath, self.PreviewController, self.LiveController)
|
||||
log.info("hook Settings")
|
||||
#Add Core Componets who provide Settings tabs
|
||||
self.settings_form.add_virtual_plugin(self.general_form)
|
||||
self.settings_form.add_virtual_plugin(self.alert_form)
|
||||
#Call hook method to see which plugins have setting tabs.
|
||||
self.settings_form.receive_plugins(self.plugin_manager.hook_settings_tabs())
|
||||
self.settings_form.generateUi()
|
||||
|
@ -23,6 +23,7 @@ from PyQt4.QtGui import QDialog
|
||||
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.resources import *
|
||||
from openlp.core.ui import AlertForm
|
||||
|
||||
class SettingsDialog(QDialog):
|
||||
|
||||
@ -31,7 +32,7 @@ class SettingsDialog(QDialog):
|
||||
self.first_time = True
|
||||
self.plugin_list = []
|
||||
|
||||
def add_virtual_plugins(self, plugin):
|
||||
def add_virtual_plugin(self, plugin):
|
||||
"""
|
||||
Method to allow Core to register screens to behave like plugins
|
||||
"""
|
||||
@ -71,153 +72,7 @@ class SettingsDialog(QDialog):
|
||||
self.SettingsTabWidget.setGeometry(QtCore.QRect(0, 0, 669, 500))
|
||||
self.SettingsTabWidget.setObjectName("SettingsTabWidget")
|
||||
|
||||
self.DisplayTab = QtGui.QWidget()
|
||||
self.DisplayTab.setObjectName("DisplayTab")
|
||||
self.DisplayTabLayout = QtGui.QHBoxLayout(self.DisplayTab)
|
||||
self.DisplayTabLayout.setSpacing(8)
|
||||
self.DisplayTabLayout.setMargin(8)
|
||||
self.DisplayTabLayout.setObjectName("DisplayTabLayout")
|
||||
self.LeftColumn = QtGui.QWidget(self.DisplayTab)
|
||||
self.LeftColumn.setObjectName("LeftColumn")
|
||||
self.LeftColumnLayout = QtGui.QVBoxLayout(self.LeftColumn)
|
||||
self.LeftColumnLayout.setSpacing(8)
|
||||
self.LeftColumnLayout.setMargin(0)
|
||||
self.LeftColumnLayout.setObjectName("LeftColumnLayout")
|
||||
self.MonitorGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.MonitorGroupBox.setObjectName("MonitorGroupBox")
|
||||
self.MonitorLayout = QtGui.QVBoxLayout(self.MonitorGroupBox)
|
||||
self.MonitorLayout.setSpacing(8)
|
||||
self.MonitorLayout.setMargin(8)
|
||||
self.MonitorLayout.setObjectName("MonitorLayout")
|
||||
self.MonitorLabel = QtGui.QLabel(self.MonitorGroupBox)
|
||||
self.MonitorLabel.setObjectName("MonitorLabel")
|
||||
self.MonitorLayout.addWidget(self.MonitorLabel)
|
||||
self.MonitorComboBox = QtGui.QComboBox(self.MonitorGroupBox)
|
||||
self.MonitorComboBox.setObjectName("MonitorComboBox")
|
||||
self.MonitorComboBox.addItem(QtCore.QString())
|
||||
self.MonitorComboBox.addItem(QtCore.QString())
|
||||
self.MonitorLayout.addWidget(self.MonitorComboBox)
|
||||
self.LeftColumnLayout.addWidget(self.MonitorGroupBox)
|
||||
self.FontSizeGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.FontSizeGroupBox.setObjectName("FontSizeGroupBox")
|
||||
self.FontSizeLayout = QtGui.QVBoxLayout(self.FontSizeGroupBox)
|
||||
self.FontSizeLayout.setSpacing(8)
|
||||
self.FontSizeLayout.setMargin(8)
|
||||
self.FontSizeLayout.setObjectName("FontSizeLayout")
|
||||
self.AutoResizeRadioButton = QtGui.QRadioButton(self.FontSizeGroupBox)
|
||||
self.AutoResizeRadioButton.setChecked(True)
|
||||
self.AutoResizeRadioButton.setObjectName("AutoResizeRadioButton")
|
||||
self.FontSizeLayout.addWidget(self.AutoResizeRadioButton)
|
||||
self.WrapLinesRadioButton = QtGui.QRadioButton(self.FontSizeGroupBox)
|
||||
self.WrapLinesRadioButton.setObjectName("WrapLinesRadioButton")
|
||||
self.FontSizeLayout.addWidget(self.WrapLinesRadioButton)
|
||||
self.LeftColumnLayout.addWidget(self.FontSizeGroupBox)
|
||||
self.SongDisplayGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.SongDisplayGroupBox.setObjectName("SongDisplayGroupBox")
|
||||
self.SongDisplayLayout = QtGui.QVBoxLayout(self.SongDisplayGroupBox)
|
||||
self.SongDisplayLayout.setSpacing(8)
|
||||
self.SongDisplayLayout.setMargin(8)
|
||||
self.SongDisplayLayout.setObjectName("SongDisplayLayout")
|
||||
self.EnableCreditsCheckBox = QtGui.QCheckBox(self.SongDisplayGroupBox)
|
||||
self.EnableCreditsCheckBox.setChecked(True)
|
||||
self.EnableCreditsCheckBox.setObjectName("EnableCreditsCheckBox")
|
||||
self.SongDisplayLayout.addWidget(self.EnableCreditsCheckBox)
|
||||
self.LeftColumnLayout.addWidget(self.SongDisplayGroupBox)
|
||||
self.BlankScreenGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.BlankScreenGroupBox.setObjectName("BlankScreenGroupBox")
|
||||
self.BlankScreenLayout = QtGui.QVBoxLayout(self.BlankScreenGroupBox)
|
||||
self.BlankScreenLayout.setSpacing(8)
|
||||
self.BlankScreenLayout.setMargin(8)
|
||||
self.BlankScreenLayout.setObjectName("BlankScreenLayout")
|
||||
self.WarningCheckBox = QtGui.QCheckBox(self.BlankScreenGroupBox)
|
||||
self.WarningCheckBox.setObjectName("WarningCheckBox")
|
||||
self.BlankScreenLayout.addWidget(self.WarningCheckBox)
|
||||
self.LeftColumnLayout.addWidget(self.BlankScreenGroupBox)
|
||||
self.AutoOpenGroupBox = QtGui.QGroupBox(self.LeftColumn)
|
||||
self.AutoOpenGroupBox.setObjectName("AutoOpenGroupBox")
|
||||
self.AutoOpenLayout = QtGui.QVBoxLayout(self.AutoOpenGroupBox)
|
||||
self.AutoOpenLayout.setObjectName("AutoOpenLayout")
|
||||
self.AutoOpenCheckBox = QtGui.QCheckBox(self.AutoOpenGroupBox)
|
||||
self.AutoOpenCheckBox.setObjectName("AutoOpenCheckBox")
|
||||
self.AutoOpenLayout.addWidget(self.AutoOpenCheckBox)
|
||||
self.LeftColumnLayout.addWidget(self.AutoOpenGroupBox)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.LeftColumnLayout.addItem(spacerItem)
|
||||
self.DisplayTabLayout.addWidget(self.LeftColumn)
|
||||
self.RightColumn = QtGui.QWidget(self.DisplayTab)
|
||||
self.RightColumn.setObjectName("RightColumn")
|
||||
self.RightColumnLayout = QtGui.QVBoxLayout(self.RightColumn)
|
||||
self.RightColumnLayout.setSpacing(8)
|
||||
self.RightColumnLayout.setMargin(0)
|
||||
self.RightColumnLayout.setObjectName("RightColumnLayout")
|
||||
self.DisplayTabLayout.addWidget(self.RightColumn)
|
||||
self.SettingsTabWidget.addTab(self.DisplayTab, "")
|
||||
|
||||
|
||||
self.Alerts = QtGui.QWidget()
|
||||
self.Alerts.setObjectName("Alerts")
|
||||
self.formLayout_2 = QtGui.QFormLayout(self.Alerts)
|
||||
self.formLayout_2.setObjectName("formLayout_2")
|
||||
self.AlertGroupBox = QtGui.QGroupBox(self.Alerts)
|
||||
self.AlertGroupBox.setObjectName("AlertGroupBox")
|
||||
self.gridLayout = QtGui.QGridLayout(self.AlertGroupBox)
|
||||
self.gridLayout.setMargin(8)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.FontLabel = QtGui.QLabel(self.AlertGroupBox)
|
||||
self.FontLabel.setObjectName("FontLabel")
|
||||
self.gridLayout.addWidget(self.FontLabel, 0, 0, 1, 1)
|
||||
self.FontComboBox = QtGui.QFontComboBox(self.AlertGroupBox)
|
||||
self.FontComboBox.setObjectName("FontComboBox")
|
||||
self.gridLayout.addWidget(self.FontComboBox, 1, 0, 1, 1)
|
||||
self.ColorWidget = QtGui.QWidget(self.AlertGroupBox)
|
||||
self.ColorWidget.setObjectName("ColorWidget")
|
||||
self.ColorLayout = QtGui.QHBoxLayout(self.ColorWidget)
|
||||
self.ColorLayout.setSpacing(8)
|
||||
self.ColorLayout.setMargin(0)
|
||||
self.ColorLayout.setObjectName("ColorLayout")
|
||||
self.FontColorLabel = QtGui.QLabel(self.ColorWidget)
|
||||
self.FontColorLabel.setObjectName("FontColorLabel")
|
||||
self.ColorLayout.addWidget(self.FontColorLabel)
|
||||
self.FontColorPanel = QtGui.QGraphicsView(self.ColorWidget)
|
||||
self.FontColorPanel.setMinimumSize(QtCore.QSize(24, 24))
|
||||
self.FontColorPanel.setMaximumSize(QtCore.QSize(24, 24))
|
||||
self.FontColorPanel.setObjectName("FontColorPanel")
|
||||
self.ColorLayout.addWidget(self.FontColorPanel)
|
||||
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.ColorLayout.addItem(spacerItem1)
|
||||
self.BackgroundColorLabel = QtGui.QLabel(self.ColorWidget)
|
||||
self.BackgroundColorLabel.setObjectName("BackgroundColorLabel")
|
||||
self.ColorLayout.addWidget(self.BackgroundColorLabel)
|
||||
self.BackgroundColorPanel = QtGui.QGraphicsView(self.ColorWidget)
|
||||
self.BackgroundColorPanel.setMinimumSize(QtCore.QSize(24, 24))
|
||||
self.BackgroundColorPanel.setMaximumSize(QtCore.QSize(24, 24))
|
||||
self.BackgroundColorPanel.setObjectName("BackgroundColorPanel")
|
||||
self.ColorLayout.addWidget(self.BackgroundColorPanel)
|
||||
self.gridLayout.addWidget(self.ColorWidget, 2, 0, 1, 1)
|
||||
self.FontPreview = QtGui.QGraphicsView(self.AlertGroupBox)
|
||||
self.FontPreview.setMaximumSize(QtCore.QSize(16777215, 64))
|
||||
self.FontPreview.setObjectName("FontPreview")
|
||||
self.gridLayout.addWidget(self.FontPreview, 3, 0, 1, 1)
|
||||
self.LengthWidget = QtGui.QWidget(self.AlertGroupBox)
|
||||
self.LengthWidget.setObjectName("LengthWidget")
|
||||
self.LengthLayout = QtGui.QHBoxLayout(self.LengthWidget)
|
||||
self.LengthLayout.setSpacing(8)
|
||||
self.LengthLayout.setMargin(0)
|
||||
self.LengthLayout.setObjectName("LengthLayout")
|
||||
self.LengthLabel = QtGui.QLabel(self.LengthWidget)
|
||||
self.LengthLabel.setObjectName("LengthLabel")
|
||||
self.LengthLayout.addWidget(self.LengthLabel)
|
||||
self.LengthSpinBox = QtGui.QSpinBox(self.LengthWidget)
|
||||
self.LengthSpinBox.setProperty("value", QtCore.QVariant(5))
|
||||
self.LengthSpinBox.setMaximum(180)
|
||||
self.LengthSpinBox.setObjectName("LengthSpinBox")
|
||||
self.LengthLayout.addWidget(self.LengthSpinBox)
|
||||
spacerItem2 = QtGui.QSpacerItem(147, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.LengthLayout.addItem(spacerItem2)
|
||||
self.gridLayout.addWidget(self.LengthWidget, 4, 0, 1, 1)
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.AlertGroupBox)
|
||||
self.SettingsTabWidget.addTab(self.Alerts, "")
|
||||
|
||||
|
||||
self.ThemesTab = QtGui.QWidget()
|
||||
self.ThemesTab.setObjectName("ThemesTab")
|
||||
self.ThemesTabLayout = QtGui.QHBoxLayout(self.ThemesTab)
|
||||
@ -445,6 +300,7 @@ class SettingsDialog(QDialog):
|
||||
#### Core Code below here
|
||||
|
||||
for plugin in self.plugin_list:
|
||||
print plugin
|
||||
settings_tab_item = plugin.get_settings_tab_item()
|
||||
if settings_tab_item is not None:
|
||||
self.SettingsTabWidget.addTab(settings_tab_item, settings_tab_item.tabText)
|
||||
@ -466,28 +322,8 @@ class SettingsDialog(QDialog):
|
||||
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
||||
|
||||
def retranslateUi(self, SettingsDialog):
|
||||
SettingsDialog.setWindowTitle(QtGui.QApplication.translate("SettingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Monitors", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Select monitor for output display:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorComboBox.setItemText(0, QtGui.QApplication.translate("SettingsDialog", "Monitor 1 on X11 Windowing System", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.MonitorComboBox.setItemText(1, QtGui.QApplication.translate("SettingsDialog", "Monitor 2 on X11 Windowing System", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.FontSizeGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Font Size", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AutoResizeRadioButton.setText(QtGui.QApplication.translate("SettingsDialog", "Automatically resize font to fit text to slide", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.WrapLinesRadioButton.setText(QtGui.QApplication.translate("SettingsDialog", "Wrap long lines to keep desired font", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.SongDisplayGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Song Display", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.EnableCreditsCheckBox.setText(QtGui.QApplication.translate("SettingsDialog", "Enable displaying of song credits", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.BlankScreenGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Blank Screen", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.WarningCheckBox.setText(QtGui.QApplication.translate("SettingsDialog", "Show warning on startup", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AutoOpenGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Auto Open Last Service", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AutoOpenCheckBox.setText(QtGui.QApplication.translate("SettingsDialog", "Automatically open the last service at startup", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.SettingsTabWidget.setTabText(self.SettingsTabWidget.indexOf(self.DisplayTab), QtGui.QApplication.translate("SettingsDialog", "Song Themes", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.AlertGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Alerts", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.FontLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Font Name:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.FontColorLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Font Color:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.BackgroundColorLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Background Color:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.LengthLabel.setText(QtGui.QApplication.translate("SettingsDialog", "Display length:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.LengthSpinBox.setSuffix(QtGui.QApplication.translate("SettingsDialog", "s", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.SettingsTabWidget.setTabText(self.SettingsTabWidget.indexOf(self.Alerts), QtGui.QApplication.translate("SettingsDialog", "Alerts", None, QtGui.QApplication.UnicodeUTF8))
|
||||
SettingsDialog.setWindowTitle(QtGui.QApplication.translate("SettingsDialog", "Settings", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
||||
self.GlobalGroupBox.setTitle(QtGui.QApplication.translate("SettingsDialog", "Global theme", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.DefaultComboBox.setItemText(0, QtGui.QApplication.translate("SettingsDialog", "African Sunset", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.DefaultComboBox.setItemText(1, QtGui.QApplication.translate("SettingsDialog", "Snowy Mountains", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
Loading…
Reference in New Issue
Block a user