This commit is contained in:
Andreas Preikschat 2010-12-23 10:44:57 +01:00
parent 76241edc9f
commit 085e746b4c
1 changed files with 22 additions and 1 deletions

View File

@ -312,6 +312,18 @@ class GeneralTab(SettingsTab):
# Signals and slots
QtCore.QObject.connect(self.overrideCheckBox,
QtCore.SIGNAL(u'toggled(bool)'), self.onOverrideCheckBoxToggled)
QtCore.QObject.connect(self.customHeightValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
QtCore.QObject.connect(self.customWidthValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
QtCore.QObject.connect(self.customYValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
QtCore.QObject.connect(self.customXValueEdit,
QtCore.SIGNAL(u'textEdited(const QString&)'),
self.onDisplayPositionChanged)
def retranslateUi(self):
"""
@ -503,10 +515,19 @@ class GeneralTab(SettingsTab):
def onOverrideCheckBoxToggled(self, checked):
"""
Toggle screen state depending on check box state
Toggle screen state depending on check box state.
``checked``
The state of the check box (boolean).
"""
self.customXValueEdit.setEnabled(checked)
self.customYValueEdit.setEnabled(checked)
self.customHeightValueEdit.setEnabled(checked)
self.customWidthValueEdit.setEnabled(checked)
self.overrideChanged = True
def onDisplayPositionChanged(self):
"""
Called when the width, height, x position or y position has changed.
"""
self.overrideChanged = True