Salome HOME
Copyright update 2022
[modules/gui.git] / tools / CurvePlot / src / python / views / CurveBrowserView.py
index ad2facd56faf3f6c397764d8525cbe59200db96f..9940aa6aac7ff3e7c9a588eb7afe7cf982655e05 100644 (file)
@@ -1,10 +1,29 @@
-from pyqtside import QtGui
-from pyqtside.QtGui import QMenu
+# Copyright (C) 2016-2022  CEA/DEN, EDF R&D
+#
+# 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.
+#
+# 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
+#
+
+from pyqtside import QtWidgets
+from pyqtside.QtWidgets import QMenu
 from pyqtside.QtCore import Qt
 
-from View import View
-from CurveTreeDockWidget import CurveTreeDockWidget
-from utils import Logger
+from .View import View
+from .CurveTreeDockWidget import CurveTreeDockWidget
+from .utils import Logger
 
 class CurveBrowserView( View, CurveTreeDockWidget) :
 
@@ -35,11 +54,11 @@ class CurveBrowserView( View, CurveTreeDockWidget) :
         plotSets = self._model._plotSets
             
         # The second (hidden) column in the tree bares the ID of the object and its nature (plotset or curve)
-        for p in plotSets.values():
-          item = QtGui.QTreeWidgetItem([unicode(p.getTitle()), unicode(p.getID()) + '_set'])
+        for p in list(plotSets.values()):
+          item = QtWidgets.QTreeWidgetItem([str(p.getTitle()), str(p.getID()) + '_set'])
           treeWidget.addTopLevelItem(item)
-          for c in p._curves.values():
-            chld = QtGui.QTreeWidgetItem([unicode(c.getTitle()), unicode(c.getID()) + '_crv'])
+          for c in list(p._curves.values()):
+            chld = QtWidgets.QTreeWidgetItem([str(c.getTitle()), str(c.getID()) + '_crv'])
             item.addChild(chld)
           
         treeWidget.expandAll()