# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
+from qtsalome import *
from omniORB import CORBA
from SALOME_NamingServicePy import *
# connect selection
selection = __study_data_map__[ studyId ][ "selection" ]
selection.ClearIObjects()
- QObject.connect( selection, SIGNAL( "currentSelectionChanged()" ), selectionChanged )
+ Connect( selection, "currentSelectionChanged()", selectionChanged )
global myRunDlg
if myRunDlg:
myRunDlg.close()
studyId = myStudy._get_StudyId()
selection = __study_data_map__[ studyId ][ "selection" ]
selection.ClearIObjects()
- QObject.disconnect( selection, SIGNAL( "currentSelectionChanged()" ), selectionChanged )
+ Disconnect( selection, "currentSelectionChanged()", selectionChanged )
global myRunDlg
if myRunDlg:
myRunDlg.close()
selection = __study_data_map__[ myStudy._get_StudyId() ][ "selection" ]
if not self.allCheck.isChecked():
- QObject.connect( selection, SIGNAL( "currentSelectionChanged()" ), self.selectionChanged )
+ Connect( selection, "currentSelectionChanged()", self, "selectionChanged()" )
else:
- QObject.disconnect( selection, SIGNAL( "currentSelectionChanged()" ), self.selectionChanged )
+ Disconnect( selection, "currentSelectionChanged()", self, "selectionChanged()" )
pass
def selectionChanged(self):
Import XML file action slot
"""
print "--> onImportXml() is started"
- filters = QStringList()
+ filters = []
filters.append( tr( "XML_FILES" ) )
fileName = sgPyQt.getFileName( sgPyQt.getDesktop(),
"",
filters,
tr( "IMPORT_XML" ),
True )
- if not fileName.isEmpty():
+ fileName = unicode(fileName)
+
+ if len(fileName) > 0 :
if not _getEngine().importXmlFile( str( fileName ) ):
warning( "IMPORT_ERROR" )
else:
Export XML file action slot
"""
print "--> onExportXml() is started"
- filters = QStringList()
+ filters = []
filters.append( tr( "XML_FILES" ) )
fileName = sgPyQt.getFileName( sgPyQt.getDesktop(),
"",
filters,
tr( "EXPORT_XML" ),
False )
- if not fileName.isEmpty():
+ fileName = unicode(fileName)
+
+ if len(fileName) > 0 :
if not _getEngine().exportXmlFile( str( fileName ) ):
warning( "EXPORT_ERROR" )
print "--> onExportXml() is finished"