forked from openlp/openlp
Some modifications to the Configure dialog:
- Moved single display option to General tab - Removed Display tab - Renamed variables to be Qt compliant
This commit is contained in:
parent
38afbbdd5b
commit
dc4f60516f
@ -154,10 +154,16 @@ class GeneralTab(SettingsTab):
|
|||||||
self.displayGroupBox = QtGui.QGroupBox(self)
|
self.displayGroupBox = QtGui.QGroupBox(self)
|
||||||
self.displayGroupBox.setObjectName(u'displayGroupBox')
|
self.displayGroupBox.setObjectName(u'displayGroupBox')
|
||||||
self.displayLayout = QtGui.QVBoxLayout(self.displayGroupBox)
|
self.displayLayout = QtGui.QVBoxLayout(self.displayGroupBox)
|
||||||
|
self.displayLayout.setSpacing(8)
|
||||||
|
self.displayLayout.setMargin(8)
|
||||||
self.displayLayout.setObjectName(u'displayLayout')
|
self.displayLayout.setObjectName(u'displayLayout')
|
||||||
self.currentLayout = QtGui.QHBoxLayout()
|
self.currentLayout = QtGui.QHBoxLayout()
|
||||||
|
self.currentLayout.setSpacing(8)
|
||||||
|
self.currentLayout.setMargin(0)
|
||||||
self.currentLayout.setObjectName(u'currentLayout')
|
self.currentLayout.setObjectName(u'currentLayout')
|
||||||
self.currentXLayout = QtGui.QVBoxLayout()
|
self.currentXLayout = QtGui.QVBoxLayout()
|
||||||
|
self.currentXLayout.setSpacing(0)
|
||||||
|
self.currentXLayout.setMargin(0)
|
||||||
self.currentXLayout.setObjectName(u'currentXLayout')
|
self.currentXLayout.setObjectName(u'currentXLayout')
|
||||||
self.currentXLabel = QtGui.QLabel(self.displayGroupBox)
|
self.currentXLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.currentXLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.currentXLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
@ -169,6 +175,8 @@ class GeneralTab(SettingsTab):
|
|||||||
self.currentXLayout.addWidget(self.currentXValueLabel)
|
self.currentXLayout.addWidget(self.currentXValueLabel)
|
||||||
self.currentLayout.addLayout(self.currentXLayout)
|
self.currentLayout.addLayout(self.currentXLayout)
|
||||||
self.currentYLayout = QtGui.QVBoxLayout()
|
self.currentYLayout = QtGui.QVBoxLayout()
|
||||||
|
self.currentYLayout.setSpacing(0)
|
||||||
|
self.currentYLayout.setMargin(0)
|
||||||
self.currentYLayout.setObjectName(u'currentYLayout')
|
self.currentYLayout.setObjectName(u'currentYLayout')
|
||||||
self.currentYLabel = QtGui.QLabel(self.displayGroupBox)
|
self.currentYLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.currentYLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.currentYLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
@ -180,6 +188,8 @@ class GeneralTab(SettingsTab):
|
|||||||
self.currentYLayout.addWidget(self.currentYValueLabel)
|
self.currentYLayout.addWidget(self.currentYValueLabel)
|
||||||
self.currentLayout.addLayout(self.currentYLayout)
|
self.currentLayout.addLayout(self.currentYLayout)
|
||||||
self.currentHeightLayout = QtGui.QVBoxLayout()
|
self.currentHeightLayout = QtGui.QVBoxLayout()
|
||||||
|
self.currentHeightLayout.setSpacing(0)
|
||||||
|
self.currentHeightLayout.setMargin(0)
|
||||||
self.currentHeightLayout.setObjectName(u'currentHeightLayout')
|
self.currentHeightLayout.setObjectName(u'currentHeightLayout')
|
||||||
self.currentHeightLabel = QtGui.QLabel(self.displayGroupBox)
|
self.currentHeightLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.currentHeightLabel.setMaximumSize(QtCore.QSize(100, 16777215))
|
self.currentHeightLabel.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||||
@ -192,6 +202,8 @@ class GeneralTab(SettingsTab):
|
|||||||
self.currentHeightLayout.addWidget(self.currentHeightValueLabel)
|
self.currentHeightLayout.addWidget(self.currentHeightValueLabel)
|
||||||
self.currentLayout.addLayout(self.currentHeightLayout)
|
self.currentLayout.addLayout(self.currentHeightLayout)
|
||||||
self.currentWidthLayout = QtGui.QVBoxLayout()
|
self.currentWidthLayout = QtGui.QVBoxLayout()
|
||||||
|
self.currentWidthLayout.setSpacing(0)
|
||||||
|
self.currentWidthLayout.setMargin(0)
|
||||||
self.currentWidthLayout.setObjectName(u'currentWidthLayout')
|
self.currentWidthLayout.setObjectName(u'currentWidthLayout')
|
||||||
self.currentWidthLabel = QtGui.QLabel(self.displayGroupBox)
|
self.currentWidthLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.currentWidthLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.currentWidthLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
@ -209,53 +221,63 @@ class GeneralTab(SettingsTab):
|
|||||||
self.GeneralRightLayout.addWidget(self.displayGroupBox)
|
self.GeneralRightLayout.addWidget(self.displayGroupBox)
|
||||||
# Custom position
|
# Custom position
|
||||||
self.customLayout = QtGui.QHBoxLayout()
|
self.customLayout = QtGui.QHBoxLayout()
|
||||||
|
self.customLayout.setSpacing(8)
|
||||||
|
self.customLayout.setMargin(0)
|
||||||
self.customLayout.setObjectName(u'customLayout')
|
self.customLayout.setObjectName(u'customLayout')
|
||||||
self.customXLayout = QtGui.QVBoxLayout()
|
self.customXLayout = QtGui.QVBoxLayout()
|
||||||
|
self.customXLayout.setSpacing(0)
|
||||||
|
self.customXLayout.setMargin(0)
|
||||||
self.customXLayout.setObjectName(u'customXLayout')
|
self.customXLayout.setObjectName(u'customXLayout')
|
||||||
self.customXLabel = QtGui.QLabel(self.displayGroupBox)
|
self.customXLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.customXLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.customXLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.customXLabel.setObjectName(u'customXLabel')
|
self.customXLabel.setObjectName(u'customXLabel')
|
||||||
self.customXLayout.addWidget(self.customXLabel)
|
self.customXLayout.addWidget(self.customXLabel)
|
||||||
self.customXValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
self.customXValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
||||||
self.customXValueEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
#self.customXValueEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||||
self.customXValueEdit.setMaxLength(4)
|
#self.customXValueEdit.setMaxLength(4)
|
||||||
self.customXValueEdit.setObjectName(u'customXValueEdit')
|
self.customXValueEdit.setObjectName(u'customXValueEdit')
|
||||||
self.customXLayout.addWidget(self.customXValueEdit)
|
self.customXLayout.addWidget(self.customXValueEdit)
|
||||||
self.customLayout.addLayout(self.customXLayout)
|
self.customLayout.addLayout(self.customXLayout)
|
||||||
self.customYLayout = QtGui.QVBoxLayout()
|
self.customYLayout = QtGui.QVBoxLayout()
|
||||||
|
self.customYLayout.setSpacing(0)
|
||||||
|
self.customYLayout.setMargin(0)
|
||||||
self.customYLayout.setObjectName(u'customYLayout')
|
self.customYLayout.setObjectName(u'customYLayout')
|
||||||
self.customYLabel = QtGui.QLabel(self.displayGroupBox)
|
self.customYLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.customYLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.customYLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.customYLabel.setObjectName(u'customYLabel')
|
self.customYLabel.setObjectName(u'customYLabel')
|
||||||
self.customYLayout.addWidget(self.customYLabel)
|
self.customYLayout.addWidget(self.customYLabel)
|
||||||
self.customYValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
self.customYValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
||||||
self.customYValueEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
#self.customYValueEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||||
self.customYValueEdit.setMaxLength(4)
|
#self.customYValueEdit.setMaxLength(4)
|
||||||
self.customYValueEdit.setObjectName(u'customYValueEdit')
|
self.customYValueEdit.setObjectName(u'customYValueEdit')
|
||||||
self.customYLayout.addWidget(self.customYValueEdit)
|
self.customYLayout.addWidget(self.customYValueEdit)
|
||||||
self.customLayout.addLayout(self.customYLayout)
|
self.customLayout.addLayout(self.customYLayout)
|
||||||
self.customHeightLayout = QtGui.QVBoxLayout()
|
self.customHeightLayout = QtGui.QVBoxLayout()
|
||||||
|
self.customHeightLayout.setSpacing(0)
|
||||||
|
self.customHeightLayout.setMargin(0)
|
||||||
self.customHeightLayout.setObjectName(u'customHeightLayout')
|
self.customHeightLayout.setObjectName(u'customHeightLayout')
|
||||||
self.customHeightLabel = QtGui.QLabel(self.displayGroupBox)
|
self.customHeightLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.customHeightLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.customHeightLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.customHeightLabel.setObjectName(u'customHeightLabel')
|
self.customHeightLabel.setObjectName(u'customHeightLabel')
|
||||||
self.customHeightLayout.addWidget(self.customHeightLabel)
|
self.customHeightLayout.addWidget(self.customHeightLabel)
|
||||||
self.customHeightValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
self.customHeightValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
||||||
self.customHeightValueEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
#self.customHeightValueEdit.setMaximumSize(QtCore.QSize(50, 16777215))
|
||||||
self.customHeightValueEdit.setMaxLength(4)
|
#self.customHeightValueEdit.setMaxLength(4)
|
||||||
self.customHeightValueEdit.setObjectName(u'customHeightValueEdit')
|
self.customHeightValueEdit.setObjectName(u'customHeightValueEdit')
|
||||||
self.customHeightLayout.addWidget(self.customHeightValueEdit)
|
self.customHeightLayout.addWidget(self.customHeightValueEdit)
|
||||||
self.customLayout.addLayout(self.customHeightLayout)
|
self.customLayout.addLayout(self.customHeightLayout)
|
||||||
self.customWidthLayout = QtGui.QVBoxLayout()
|
self.customWidthLayout = QtGui.QVBoxLayout()
|
||||||
|
self.customWidthLayout.setSpacing(0)
|
||||||
|
self.customWidthLayout.setMargin(0)
|
||||||
self.customWidthLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
|
self.customWidthLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
|
||||||
self.customWidthLayout.setObjectName(u'customWidthLayout')
|
self.customWidthLayout.setObjectName(u'customWidthLayout')
|
||||||
self.customWidthLabel = QtGui.QLabel(self.displayGroupBox)
|
self.customWidthLabel = QtGui.QLabel(self.displayGroupBox)
|
||||||
self.customWidthLabel.setMaximumSize(QtCore.QSize(100, 16777215))
|
#self.customWidthLabel.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||||
self.customWidthLabel.setAlignment(QtCore.Qt.AlignCenter)
|
self.customWidthLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.customWidthLabel.setObjectName(u'customWidthLabel')
|
self.customWidthLabel.setObjectName(u'customWidthLabel')
|
||||||
self.customWidthLayout.addWidget(self.customWidthLabel)
|
self.customWidthLayout.addWidget(self.customWidthLabel)
|
||||||
self.customWidthValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
self.customWidthValueEdit = QtGui.QLineEdit(self.displayGroupBox)
|
||||||
self.customWidthValueEdit.setMaximumSize(QtCore.QSize(60, 16777215))
|
#self.customWidthValueEdit.setMaximumSize(QtCore.QSize(60, 16777215))
|
||||||
self.customWidthValueEdit.setObjectName(u'customWidthValueEdit')
|
self.customWidthValueEdit.setObjectName(u'customWidthValueEdit')
|
||||||
self.customWidthLayout.addWidget(self.customWidthValueEdit)
|
self.customWidthLayout.addWidget(self.customWidthValueEdit)
|
||||||
self.customLayout.addLayout(self.customWidthLayout)
|
self.customLayout.addLayout(self.customWidthLayout)
|
||||||
@ -434,11 +456,9 @@ class GeneralTab(SettingsTab):
|
|||||||
int(self.customHeightValueEdit.text()))
|
int(self.customHeightValueEdit.text()))
|
||||||
if self.overrideCheckBox.isChecked():
|
if self.overrideCheckBox.isChecked():
|
||||||
self.screens.set_override_display()
|
self.screens.set_override_display()
|
||||||
|
Receiver.send_message(u'config_screen_changed')
|
||||||
else:
|
else:
|
||||||
self.screens.reset_current_display()
|
self.screens.reset_current_display()
|
||||||
#only trigger event if data has changed in this edit session
|
|
||||||
if self.override_changed:
|
|
||||||
Receiver.send_message(u'config_screen_changed')
|
|
||||||
|
|
||||||
def onOverrideCheckBoxToggled(self, checked):
|
def onOverrideCheckBoxToggled(self, checked):
|
||||||
self.customXValueEdit.setEnabled(checked)
|
self.customXValueEdit.setEnabled(checked)
|
||||||
|
@ -24,40 +24,44 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import translate
|
|
||||||
|
from openlp.core.lib import translate, build_icon
|
||||||
|
|
||||||
class Ui_SettingsDialog(object):
|
class Ui_SettingsDialog(object):
|
||||||
def setupUi(self, SettingsDialog):
|
def setupUi(self, SettingsDialog):
|
||||||
SettingsDialog.setObjectName(u'SettingsDialog')
|
SettingsDialog.setObjectName(u'SettingsDialog')
|
||||||
SettingsDialog.resize(724, 502)
|
SettingsDialog.resize(724, 502)
|
||||||
self.SettingsLayout = QtGui.QVBoxLayout(SettingsDialog)
|
SettingsDialog.setWindowIcon(
|
||||||
self.SettingsLayout.setSpacing(8)
|
build_icon(u':/system/system_settings.png'))
|
||||||
self.SettingsLayout.setMargin(8)
|
self.settingsLayout = QtGui.QVBoxLayout(SettingsDialog)
|
||||||
self.SettingsLayout.setObjectName(u'SettingsLayout')
|
self.settingsLayout.setSpacing(8)
|
||||||
self.SettingsTabWidget = QtGui.QTabWidget(SettingsDialog)
|
self.settingsLayout.setMargin(8)
|
||||||
self.SettingsTabWidget.setObjectName(u'SettingsTabWidget')
|
self.settingsLayout.setObjectName(u'settingsLayout')
|
||||||
self.SettingsLayout.addWidget(self.SettingsTabWidget)
|
self.settingsTabWidget = QtGui.QTabWidget(SettingsDialog)
|
||||||
self.ButtonsBox = QtGui.QDialogButtonBox(SettingsDialog)
|
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
||||||
|
self.settingsLayout.addWidget(self.settingsTabWidget)
|
||||||
|
self.buttonBox = QtGui.QDialogButtonBox(SettingsDialog)
|
||||||
sizePolicy = QtGui.QSizePolicy(
|
sizePolicy = QtGui.QSizePolicy(
|
||||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(
|
sizePolicy.setHeightForWidth(
|
||||||
self.ButtonsBox.sizePolicy().hasHeightForWidth())
|
self.buttonBox.sizePolicy().hasHeightForWidth())
|
||||||
self.ButtonsBox.setSizePolicy(sizePolicy)
|
self.buttonBox.setSizePolicy(sizePolicy)
|
||||||
self.ButtonsBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
self.buttonBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
||||||
self.ButtonsBox.setOrientation(QtCore.Qt.Horizontal)
|
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||||
self.ButtonsBox.setStandardButtons(
|
self.buttonBox.setStandardButtons(
|
||||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
|
||||||
self.ButtonsBox.setObjectName(u'ButtonsBox')
|
self.buttonBox.setObjectName(u'buttonBox')
|
||||||
self.SettingsLayout.addWidget(self.ButtonsBox)
|
self.settingsLayout.addWidget(self.buttonBox)
|
||||||
self.retranslateUi(SettingsDialog)
|
self.retranslateUi(SettingsDialog)
|
||||||
self.SettingsTabWidget.setCurrentIndex(0)
|
self.settingsTabWidget.setCurrentIndex(0)
|
||||||
QtCore.QObject.connect(self.ButtonsBox,
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
QtCore.SIGNAL(u'accepted()'), SettingsDialog.accept)
|
QtCore.SIGNAL(u'accepted()'), SettingsDialog.accept)
|
||||||
QtCore.QObject.connect(self.ButtonsBox,
|
QtCore.QObject.connect(self.buttonBox,
|
||||||
QtCore.SIGNAL(u'rejected()'), SettingsDialog.reject)
|
QtCore.SIGNAL(u'rejected()'), SettingsDialog.reject)
|
||||||
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
|
||||||
|
|
||||||
def retranslateUi(self, SettingsDialog):
|
def retranslateUi(self, SettingsDialog):
|
||||||
SettingsDialog.setWindowTitle(translate('SettingsForm', 'Settings'))
|
SettingsDialog.setWindowTitle(translate('SettingsForm',
|
||||||
|
'Configure OpenLP'))
|
||||||
|
@ -29,7 +29,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab, DisplayTab
|
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab #, DisplayTab
|
||||||
from settingsdialog import Ui_SettingsDialog
|
from settingsdialog import Ui_SettingsDialog
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -45,14 +45,14 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
# General tab
|
# General tab
|
||||||
self.GeneralTab = GeneralTab(screens)
|
self.generalTab = GeneralTab(screens)
|
||||||
self.addTab(u'General', self.GeneralTab)
|
self.addTab(u'General', self.generalTab)
|
||||||
# Themes tab
|
# Themes tab
|
||||||
self.ThemesTab = ThemesTab(mainWindow)
|
self.themesTab = ThemesTab(mainWindow)
|
||||||
self.addTab(u'Themes', self.ThemesTab)
|
self.addTab(u'Themes', self.themesTab)
|
||||||
# Display tab
|
# Display tab
|
||||||
self.DisplayTab = DisplayTab(screens)
|
#self.DisplayTab = DisplayTab(screens)
|
||||||
self.addTab(u'Display', self.DisplayTab)
|
#self.addTab(u'Display', self.DisplayTab)
|
||||||
# Advanced tab
|
# Advanced tab
|
||||||
self.advancedTab = AdvancedTab()
|
self.advancedTab = AdvancedTab()
|
||||||
self.addTab(u'Advanced', self.advancedTab)
|
self.addTab(u'Advanced', self.advancedTab)
|
||||||
@ -62,7 +62,7 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
Add a tab to the form
|
Add a tab to the form
|
||||||
"""
|
"""
|
||||||
log.info(u'Adding %s tab' % tab.tabTitle)
|
log.info(u'Adding %s tab' % tab.tabTitle)
|
||||||
self.SettingsTabWidget.addTab(tab, tab.tabTitleVisible)
|
self.settingsTabWidget.addTab(tab, tab.tabTitleVisible)
|
||||||
|
|
||||||
def insertTab(self, tab, location):
|
def insertTab(self, tab, location):
|
||||||
"""
|
"""
|
||||||
@ -70,7 +70,7 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
log.debug(u'Inserting %s tab' % tab.tabTitle)
|
||||||
# 14 : There are 3 tables currently and locations starts at -10
|
# 14 : There are 3 tables currently and locations starts at -10
|
||||||
self.SettingsTabWidget.insertTab(
|
self.settingsTabWidget.insertTab(
|
||||||
location + 14, tab, tab.tabTitleVisible)
|
location + 14, tab, tab.tabTitleVisible)
|
||||||
|
|
||||||
def removeTab(self, name):
|
def removeTab(self, name):
|
||||||
@ -78,22 +78,22 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
Remove a tab from the form
|
Remove a tab from the form
|
||||||
"""
|
"""
|
||||||
log.debug(u'remove %s tab' % name)
|
log.debug(u'remove %s tab' % name)
|
||||||
for tab_index in range(0, self.SettingsTabWidget.count()):
|
for tab_index in range(0, self.settingsTabWidget.count()):
|
||||||
if self.SettingsTabWidget.widget(tab_index):
|
if self.settingsTabWidget.widget(tab_index):
|
||||||
if self.SettingsTabWidget.widget(tab_index).tabTitle == name:
|
if self.settingsTabWidget.widget(tab_index).tabTitle == name:
|
||||||
self.SettingsTabWidget.removeTab(tab_index)
|
self.settingsTabWidget.removeTab(tab_index)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
"""
|
"""
|
||||||
Process the form saving the settings
|
Process the form saving the settings
|
||||||
"""
|
"""
|
||||||
for tab_index in range(0, self.SettingsTabWidget.count()):
|
for tab_index in range(0, self.settingsTabWidget.count()):
|
||||||
self.SettingsTabWidget.widget(tab_index).save()
|
self.settingsTabWidget.widget(tab_index).save()
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self):
|
||||||
"""
|
"""
|
||||||
Run any post-setup code for the tabs on the form
|
Run any post-setup code for the tabs on the form
|
||||||
"""
|
"""
|
||||||
for tab_index in range(0, self.SettingsTabWidget.count()):
|
for tab_index in range(0, self.settingsTabWidget.count()):
|
||||||
self.SettingsTabWidget.widget(tab_index).postSetUp()
|
self.settingsTabWidget.widget(tab_index).postSetUp()
|
||||||
|
Loading…
Reference in New Issue
Block a user