From: rnv Date: Wed, 27 Jan 2016 15:43:04 +0000 (+0300) Subject: PyQt4/PyQt5 support: use new PyQt signals/slots approach, which has been introduced... X-Git-Tag: V8_0_0rc1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV8_0_0_BR;p=samples%2Fatomgen.git PyQt4/PyQt5 support: use new PyQt signals/slots approach, which has been introduced since PyQt-4.5 version and supported in the PyQt5. --- diff --git a/src/ATOMGENGUI/ATOMGENGUI.py b/src/ATOMGENGUI/ATOMGENGUI.py index c53953b..c464523 100644 --- a/src/ATOMGENGUI/ATOMGENGUI.py +++ b/src/ATOMGENGUI/ATOMGENGUI.py @@ -197,7 +197,7 @@ def activate(): # connect selection selection = __study_data_map__[ studyId ][ "selection" ] selection.ClearIObjects() - Connect( selection, "currentSelectionChanged()", selectionChanged ) + selection.currentSelectionChanged.connect( selectionChanged ) global myRunDlg if myRunDlg: myRunDlg.close() @@ -214,7 +214,7 @@ def deactivate(): studyId = myStudy._get_StudyId() selection = __study_data_map__[ studyId ][ "selection" ] selection.ClearIObjects() - Disconnect( selection, "currentSelectionChanged()", selectionChanged ) + selection.currentSelectionChanged.disconnect( selectionChanged ) global myRunDlg if myRunDlg: myRunDlg.close() @@ -304,9 +304,9 @@ class RunDlg(QDialog, Ui_RunDlg): selection = __study_data_map__[ myStudy._get_StudyId() ][ "selection" ] if not self.allCheck.isChecked(): - Connect( selection, "currentSelectionChanged()", self, "selectionChanged()" ) + selection.currentSelectionChanged.connect(self.selectionChanged) else: - Disconnect( selection, "currentSelectionChanged()", self, "selectionChanged()" ) + selection.currentSelectionChanged.connect(self.selectionChanged) pass def selectionChanged(self):