Cleanup signals (Bug #599146)

This commit is contained in:
Jon Tibble 2010-07-01 16:46:51 +01:00
parent 254ac02561
commit d939a39895
4 changed files with 114 additions and 189 deletions

View File

@ -178,13 +178,11 @@ class Ui_AmendThemeDialog(object):
self.MainFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
self.FontMainSize)
self.FontMainSizeSpinBox = QtGui.QSpinBox(self.FontMainGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
defaultSizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontMainSizeSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainSizeSpinBox.setSizePolicy(sizePolicy)
self.FontMainSizeSpinBox.setSizePolicy(defaultSizePolicy)
self.FontMainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
self.FontMainSizeSpinBox.setProperty(u'value', QtCore.QVariant(16))
self.FontMainSizeSpinBox.setMaximum(999)
@ -230,8 +228,7 @@ class Ui_AmendThemeDialog(object):
self.FontMainLineSpacingSpinBox)
self.FontMainLinesPageLabel = QtGui.QLabel(self.FontMainGroupBox)
self.FontMainLinesPageLabel.setObjectName(u'FontMainLinesPageLabel')
self.MainFontLayout.setWidget(6, QtGui.QFormLayout.LabelRole,
self.FontMainLinesPageLabel)
self.MainFontLayout.addRow(self.FontMainLinesPageLabel)
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Expanding)
self.MainLeftLayout.addItem(spacerItem1)
@ -275,13 +272,9 @@ class Ui_AmendThemeDialog(object):
self.MainLocationLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
self.FontMainHeightLabel)
self.FontMainXSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontMainXSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainXSpinBox.setSizePolicy(sizePolicy)
self.FontMainXSpinBox.setSizePolicy(defaultSizePolicy)
self.FontMainXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainXSpinBox.setProperty(u'value', QtCore.QVariant(0))
self.FontMainXSpinBox.setMaximum(9999)
@ -289,39 +282,27 @@ class Ui_AmendThemeDialog(object):
self.MainLocationLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
self.FontMainXSpinBox)
self.FontMainYSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontMainYSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainYSpinBox.setSizePolicy(sizePolicy)
self.FontMainYSpinBox.setSizePolicy(defaultSizePolicy)
self.FontMainYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainYSpinBox.setMaximum(9999)
self.FontMainYSpinBox.setObjectName(u'FontMainYSpinBox')
self.MainLocationLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
self.FontMainYSpinBox)
self.FontMainWidthSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontMainWidthSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainWidthSpinBox.setSizePolicy(sizePolicy)
self.FontMainWidthSpinBox.setSizePolicy(defaultSizePolicy)
self.FontMainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainWidthSpinBox.setMaximum(9999)
self.FontMainWidthSpinBox.setObjectName(u'FontMainWidthSpinBox')
self.MainLocationLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
self.FontMainWidthSpinBox)
self.FontMainHeightSpinBox = QtGui.QSpinBox(self.MainLocationGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontMainHeightSpinBox.sizePolicy().hasHeightForWidth())
self.FontMainHeightSpinBox.setSizePolicy(sizePolicy)
self.FontMainHeightSpinBox.setSizePolicy(defaultSizePolicy)
self.FontMainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontMainHeightSpinBox.setMaximum(9999)
self.FontMainHeightSpinBox.setObjectName(u'FontMainHeightSpinBox')
@ -378,13 +359,9 @@ class Ui_AmendThemeDialog(object):
self.FooterFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
self.FontFooterSizeLabel)
self.FontFooterSizeSpinBox = QtGui.QSpinBox(self.FooterFontGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontFooterSizeSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterSizeSpinBox.setSizePolicy(sizePolicy)
self.FontFooterSizeSpinBox.setSizePolicy(defaultSizePolicy)
self.FontFooterSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
self.FontFooterSizeSpinBox.setProperty(u'value', QtCore.QVariant(10))
self.FontFooterSizeSpinBox.setMaximum(999)
@ -453,13 +430,9 @@ class Ui_AmendThemeDialog(object):
self.LocationFooterLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
self.FontFooterHeightLabel)
self.FontFooterXSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
defaultSizePolicy.setHeightForWidth(
self.FontFooterXSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterXSpinBox.setSizePolicy(sizePolicy)
self.FontFooterXSpinBox.setSizePolicy(defaultSizePolicy)
self.FontFooterXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontFooterXSpinBox.setProperty(u'value', QtCore.QVariant(0))
self.FontFooterXSpinBox.setMaximum(9999)
@ -467,13 +440,9 @@ class Ui_AmendThemeDialog(object):
self.LocationFooterLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
self.FontFooterXSpinBox)
self.FontFooterYSpinBox = QtGui.QSpinBox(self.LocationFooterGroupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
self.FontFooterYSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterYSpinBox.setSizePolicy(sizePolicy)
defaultSizePolicy.setHeightForWidth(
self.FontFooterXSpinBox.sizePolicy().hasHeightForWidth())
self.FontFooterYSpinBox.setSizePolicy(defaultSizePolicy)
self.FontFooterYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
self.FontFooterYSpinBox.setProperty(u'value', QtCore.QVariant(0))
self.FontFooterYSpinBox.setMaximum(9999)
@ -901,4 +870,3 @@ class Ui_AmendThemeDialog(object):
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
translate('AmendThemeForm', '&Other Options'))
self.PreviewGroupBox.setTitle(translate('AmendThemeForm', 'Preview'))

View File

@ -43,8 +43,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
self.path = None
self.theme = ThemeXML()
self.setupUi(self)
#define signals
#Buttons
# Define signals
# Buttons
QtCore.QObject.connect(self.Color1PushButton,
QtCore.SIGNAL(u'pressed()'), self.onColor1PushButtonClicked)
QtCore.QObject.connect(self.Color2PushButton,
@ -60,7 +60,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
QtCore.SIGNAL(u'pressed()'), self.onShadowColorPushButtonClicked)
QtCore.QObject.connect(self.ImageToolButton,
QtCore.SIGNAL(u'pressed()'), self.onImageToolButtonClicked)
#Combo boxes
# Combo boxes
QtCore.QObject.connect(self.BackgroundComboBox,
QtCore.SIGNAL(u'activated(int)'), self.onBackgroundComboBoxSelected)
QtCore.QObject.connect(self.BackgroundTypeComboBox,
@ -82,57 +82,58 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
QtCore.SIGNAL(u'activated(int)'), self.onHorizontalComboBoxSelected)
QtCore.QObject.connect(self.VerticalComboBox,
QtCore.SIGNAL(u'activated(int)'), self.onVerticalComboBoxSelected)
#Spin boxes
# Spin boxes
QtCore.QObject.connect(self.FontMainSizeSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontMainSizeSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterSizeSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontFooterSizeSpinBoxChanged)
QtCore.QObject.connect(self.FontMainXSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainXSpinBoxChanged)
QtCore.QObject.connect(self.FontMainYSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'), self.onFontMainYSpinBoxChanged)
QtCore.QObject.connect(self.FontMainWidthSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontMainWidthSpinBoxChanged)
QtCore.QObject.connect(self.FontMainHeightSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontMainHeightSpinBoxChanged)
QtCore.QObject.connect(self.FontMainLineAdjustmentSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontMainLineAdjustmentSpinBoxChanged)
QtCore.QObject.connect(self.FontMainLineSpacingSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontMainLineSpacingSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterXSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontFooterXSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterYSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontFooterYSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterWidthSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontFooterWidthSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterHeightSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onFontFooterHeightSpinBoxChanged)
QtCore.QObject.connect(self.ShadowSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onShadowSpinBoxChanged)
QtCore.QObject.connect(self.ShadowCheckBox,
QtCore.SIGNAL(u'valueChanged(int)'), self.onShadowCheckBoxChanged)
QtCore.QObject.connect(self.OutlineSpinBox,
QtCore.SIGNAL(u'valueChanged(int)'),
self.onOutlineSpinBoxChanged)
# Checkboxes
QtCore.QObject.connect(self.FontMainDefaultCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onFontMainDefaultCheckBoxChanged)
QtCore.QObject.connect(self.FontMainXSpinBox,
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainXSpinBoxChanged)
QtCore.QObject.connect(self.FontMainYSpinBox,
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainYSpinBoxChanged)
QtCore.QObject.connect(self.FontMainWidthSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontMainWidthSpinBoxChanged)
QtCore.QObject.connect(self.FontMainHeightSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontMainHeightSpinBoxChanged)
QtCore.QObject.connect(self.FontMainLineAdjustmentSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontMainLineAdjustmentSpinBoxChanged)
QtCore.QObject.connect(self.FontMainLineSpacingSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontMainLineSpacingSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterDefaultCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onFontFooterDefaultCheckBoxChanged)
QtCore.QObject.connect(self.FontFooterXSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontFooterXSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterYSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontFooterYSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterWidthSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontFooterWidthSpinBoxChanged)
QtCore.QObject.connect(self.FontFooterHeightSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onFontFooterHeightSpinBoxChanged)
QtCore.QObject.connect(self.OutlineCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), self.onOutlineCheckBoxChanged)
QtCore.QObject.connect(self.ShadowSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onShadowSpinBoxChanged)
QtCore.QObject.connect(self.ShadowCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), self.onShadowCheckBoxChanged)
QtCore.QObject.connect(self.OutlineSpinBox,
QtCore.SIGNAL(u'editingFinished()'),
self.onOutlineSpinBoxChanged)
QtCore.QObject.connect(self.SlideTransitionCheckedBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onSlideTransitionCheckedBoxChanged)

View File

@ -242,4 +242,3 @@ class DisplayTab(SettingsTab):
if self.amend_display_start != self.amend_display:
self.amend_display_start = self.amend_display
Receiver.send_message(u'config_screen_changed')

View File

@ -32,13 +32,16 @@ class GeneralTab(SettingsTab):
GeneralTab is the general settings tab in the settings dialog.
"""
def __init__(self, screens):
"""
Initialise the general settings tab
"""
self.screens = screens
self.MonitorNumber = 0
SettingsTab.__init__(self, u'General')
def preLoad(self):
"""
Set up the display screen and set correct screen
values.
Set up the display screen and set correct screen values.
If not set before default to last screen.
"""
settings = QtCore.QSettings()
@ -47,12 +50,14 @@ class GeneralTab(SettingsTab):
QtCore.QVariant(self.screens.display_count - 1)).toInt()[0]
self.screens.set_current_display(self.MonitorNumber)
self.screens.monitor_number = self.MonitorNumber
self.DisplayOnMonitor = settings.value(
self.screens.display = settings.value(
u'display on monitor', QtCore.QVariant(True)).toBool()
self.screens.display = self.DisplayOnMonitor
settings.endGroup()
def setupUi(self):
"""
Create the user interface for the general settings tab
"""
self.setObjectName(u'GeneralTab')
self.tabTitleVisible = translate('GeneralTab', 'General')
self.GeneralLayout = QtGui.QHBoxLayout(self)
@ -152,31 +157,11 @@ class GeneralTab(SettingsTab):
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.GeneralRightLayout.addItem(self.GeneralRightSpacer)
self.GeneralLayout.addWidget(self.GeneralRightWidget)
QtCore.QObject.connect(self.MonitorComboBox,
QtCore.SIGNAL(u'activated(int)'), self.onMonitorComboBoxChanged)
QtCore.QObject.connect(self.DisplayOnMonitorCheck,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onDisplayOnMonitorCheckChanged)
QtCore.QObject.connect(self.WarningCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), self.onWarningCheckBoxChanged)
QtCore.QObject.connect(self.AutoOpenCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), self.onAutoOpenCheckBoxChanged)
QtCore.QObject.connect(self.ShowSplashCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onShowSplashCheckBoxChanged)
QtCore.QObject.connect(self.SaveCheckServiceCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onSaveCheckServiceCheckBox)
QtCore.QObject.connect(self.AutoPreviewCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), self.onAutoPreviewCheckBox)
QtCore.QObject.connect(self.NumberEdit,
QtCore.SIGNAL(u'editingFinished()'), self.onNumberEditLostFocus)
QtCore.QObject.connect(self.UsernameEdit,
QtCore.SIGNAL(u'editingFinished()'), self.onUsernameEditLostFocus)
QtCore.QObject.connect(self.PasswordEdit,
QtCore.SIGNAL(u'editingFinished()'), self.onPasswordEditLostFocus)
def retranslateUi(self):
"""
Translate the general settings tab to the currently selected language
"""
self.MonitorGroupBox.setTitle(translate('GeneralTab', 'Monitors'))
self.MonitorLabel.setText(
translate('GeneralTab', 'Select monitor for output display:'))
@ -204,37 +189,10 @@ class GeneralTab(SettingsTab):
self.PasswordLabel.setText(
translate('GeneralTab', 'SongSelect Password:'))
def onMonitorComboBoxChanged(self):
self.MonitorNumber = self.MonitorComboBox.currentIndex()
def onDisplayOnMonitorCheckChanged(self, value):
self.DisplayOnMonitor = (value == QtCore.Qt.Checked)
def onAutoOpenCheckBoxChanged(self, value):
self.AutoOpen = (value == QtCore.Qt.Checked)
def onShowSplashCheckBoxChanged(self, value):
self.ShowSplash = (value == QtCore.Qt.Checked)
def onWarningCheckBoxChanged(self, value):
self.Warning = (value == QtCore.Qt.Checked)
def onSaveCheckServiceCheckBox(self, value):
self.PromptSaveService = (value == QtCore.Qt.Checked)
def onAutoPreviewCheckBox(self, value):
self.AutoPreview = (value == QtCore.Qt.Checked)
def onNumberEditLostFocus(self):
self.CCLINumber = self.NumberEdit.displayText()
def onUsernameEditLostFocus(self):
self.Username = self.UsernameEdit.displayText()
def onPasswordEditLostFocus(self):
self.Password = self.PasswordEdit.displayText()
def load(self):
"""
Load the settings to populate the form
"""
settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection)
for screen in self.screens.screen_list:
@ -244,55 +202,54 @@ class GeneralTab(SettingsTab):
screen_name = u'%s (%s)' % (screen_name,
translate('GeneralTab', 'primary'))
self.MonitorComboBox.addItem(screen_name)
# Get the configs
self.Warning = settings.value(
u'blank warning', QtCore.QVariant(False)).toBool()
self.AutoOpen = settings.value(
u'auto open', QtCore.QVariant(False)).toBool()
self.ShowSplash = settings.value(
u'show splash', QtCore.QVariant(True)).toBool()
self.PromptSaveService = settings.value(
u'save prompt', QtCore.QVariant(False)).toBool()
self.AutoPreview = settings.value(
u'auto preview', QtCore.QVariant(False)).toBool()
self.CCLINumber = unicode(settings.value(
u'ccli number', QtCore.QVariant(u'')).toString())
self.Username = unicode(settings.value(
u'songselect username', QtCore.QVariant(u'')).toString())
self.Password = unicode(settings.value(
u'songselect password', QtCore.QVariant(u'')).toString())
settings.endGroup()
self.SaveCheckServiceCheckBox.setChecked(self.PromptSaveService)
# Set a few things up
self.NumberEdit.setText(unicode(settings.value(
u'ccli number', QtCore.QVariant(u'')).toString()))
self.UsernameEdit.setText(unicode(settings.value(
u'songselect username', QtCore.QVariant(u'')).toString()))
self.PasswordEdit.setText(unicode(settings.value(
u'songselect password', QtCore.QVariant(u'')).toString()))
self.SaveCheckServiceCheckBox.setChecked(settings.value(u'save prompt',
QtCore.QVariant(False)).toBool())
self.MonitorComboBox.setCurrentIndex(self.MonitorNumber)
self.DisplayOnMonitorCheck.setChecked(self.DisplayOnMonitor)
self.WarningCheckBox.setChecked(self.Warning)
self.AutoOpenCheckBox.setChecked(self.AutoOpen)
self.ShowSplashCheckBox.setChecked(self.ShowSplash)
self.AutoPreviewCheckBox.setChecked(self.AutoPreview)
self.NumberEdit.setText(self.CCLINumber)
self.UsernameEdit.setText(self.Username)
self.PasswordEdit.setText(self.Password)
self.DisplayOnMonitorCheck.setChecked(self.screens.display)
self.WarningCheckBox.setChecked(settings.value(u'blank warning',
QtCore.QVariant(False)).toBool())
self.AutoOpenCheckBox.setChecked(settings.value(u'auto open',
QtCore.QVariant(False)).toBool())
self.ShowSplashCheckBox.setChecked(settings.value(u'show splash',
QtCore.QVariant(True)).toBool())
self.AutoPreviewCheckBox.setChecked(settings.value(u'auto preview',
QtCore.QVariant(False)).toBool())
settings.endGroup()
def save(self):
"""
Save the settings from the form
"""
self.MonitorNumber = self.MonitorComboBox.currentIndex()
settings = QtCore.QSettings()
settings.beginGroup(self.settingsSection)
settings.setValue(u'monitor', QtCore.QVariant(self.MonitorNumber))
settings.setValue(u'display on monitor',
QtCore.QVariant(self.DisplayOnMonitor))
settings.setValue(u'blank warning', QtCore.QVariant(self.Warning))
settings.setValue(u'auto open', QtCore.QVariant(self.AutoOpen))
settings.setValue(u'show splash', QtCore.QVariant(self.ShowSplash))
QtCore.QVariant(self.DisplayOnMonitorCheck.isChecked()))
settings.setValue(u'blank warning',
QtCore.QVariant(self.WarningCheckBox.isChecked()))
settings.setValue(u'auto open',
QtCore.QVariant(self.AutoOpenCheckBox.isChecked()))
settings.setValue(u'show splash',
QtCore.QVariant(self.ShowSplashCheckBox.isChecked()))
settings.setValue(u'save prompt',
QtCore.QVariant(self.PromptSaveService))
settings.setValue(u'auto preview', QtCore.QVariant(self.AutoPreview))
settings.setValue(u'ccli number', QtCore.QVariant(self.CCLINumber))
QtCore.QVariant(self.SaveCheckServiceCheckBox.isChecked()))
settings.setValue(u'auto preview',
QtCore.QVariant(self.AutoPreviewCheckBox.isChecked()))
settings.setValue(u'ccli number',
QtCore.QVariant(self.NumberEdit.displayText()))
settings.setValue(u'songselect username',
QtCore.QVariant(self.Username))
QtCore.QVariant(self.UsernameEdit.displayText()))
settings.setValue(u'songselect password',
QtCore.QVariant(self.Password))
QtCore.QVariant(self.PasswordEdit.displayText()))
settings.endGroup()
self.screens.display = self.DisplayOnMonitor
self.screens.display = self.DisplayOnMonitorCheck.isChecked()
#Monitor Number has changed.
if self.screens.monitor_number != self.MonitorNumber:
self.screens.monitor_number = self.MonitorNumber