Salome HOME
updated copyright message
[modules/gui.git] / src / GUI_PY / genericdialog.py
index ce5d2d4e55ae381c7bc7db86588b4d4239bfd034..3765757446708a4f930479464d2f09c750625c9b 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2023  CEA, EDF, OPEN CASCADE
 #
 # 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.
+# 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
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-__author__="gboulant"
-__date__ ="$31 mars 2010 17:09:53$"
+from qtsalome import QDialog, QMessageBox
+from salome.gui.genericdialog_ui import Ui_GenericDialog
 
-from PyQt4.QtGui import QDialog, QMessageBox
-
-from genericdialog_ui import Ui_GenericDialog
 
 class GenericDialog(QDialog):
     """
@@ -113,17 +110,16 @@ class GenericDialog(QDialog):
 #
 def TEST_GenericDialog():
     import sys
-    from PyQt4.QtGui import QApplication
-    from PyQt4.QtCore import QObject, SIGNAL, SLOT
+    from qtsalome import QApplication
     app = QApplication(sys.argv)
-    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+    app.lastWindowClosed.connect(app.quit)
 
     dlg=GenericDialog()
     dlg.displayAndWait()
     if dlg.wasOk():
-        print "OK has been pressed"
+        print("OK has been pressed")
     else:
-        print "Cancel has been pressed"
+        print("Cancel has been pressed")
         
 if __name__ == "__main__":
     TEST_GenericDialog()