Salome HOME
[EDF30399] : Expose replay-dir parameter to define directory holding scenarii in...
[modules/yacs.git] / src / pyqt / gui / Item.py
index 692347ea8cddbca484e40f5c1feb506945a94863..433e5cc71f34e8b197af047c8dd62e48dc6629d9 100644 (file)
@@ -1,25 +1,26 @@
-#  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
+# Copyright (C) 2006-2024  CEA, EDF
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
 #
-#  This library 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
-#  Lesser General Public License for more details.
+# This library 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
+# Lesser General Public License for more details.
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 #
-#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 import sys
 from qt import *
-import CONNECTOR
-import adapt
+from . import CONNECTOR
+from . import adapt
 
 class Item:
   def __init__(self,label=""):
@@ -61,7 +62,7 @@ class Item:
 ADAPT=adapt.adapt
 items={}
 def adapt(obj):
-  if items.has_key(obj.ptr()):
+  if obj.ptr() in items:
     return items[obj.ptr()]
   else:
     item= ADAPT(obj,Item)