From 89a028f4a8e6ae84d30644d06ad81ae849e8a238 Mon Sep 17 00:00:00 2001 From: Sebastian Hoogen Date: Thu, 9 Jan 2014 00:11:05 +0100 Subject: [PATCH] Port OpenSCAD WB to PySide --- src/Mod/OpenSCAD/OpenSCADCommands.py | 3 +-- src/Mod/OpenSCAD/importCSG.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Mod/OpenSCAD/OpenSCADCommands.py b/src/Mod/OpenSCAD/OpenSCADCommands.py index b52a9dffc..dac7479fb 100644 --- a/src/Mod/OpenSCAD/OpenSCADCommands.py +++ b/src/Mod/OpenSCAD/OpenSCADCommands.py @@ -29,8 +29,7 @@ This Script includes the GUI Commands of the OpenSCAD module ''' import FreeCAD,FreeCADGui -from PyQt4 import QtGui, QtCore - +from PySide import QtCore, QtGui def translate(context,text): "convenience function for Qt translator" return QtGui.QApplication.translate(context, text, None, \ diff --git a/src/Mod/OpenSCAD/importCSG.py b/src/Mod/OpenSCAD/importCSG.py index ba9769777..843b41583 100644 --- a/src/Mod/OpenSCAD/importCSG.py +++ b/src/Mod/OpenSCAD/importCSG.py @@ -61,7 +61,7 @@ from tokrules import tokens def translate(context,text): "convenience function for Qt translator" - from PyQt4 import QtGui + from PySide import QtGui return QtGui.QApplication.translate(context, text, None, \ QtGui.QApplication.UnicodeUTF8) @@ -381,7 +381,7 @@ def p_not_supported(p): ''' if gui and not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/OpenSCAD").\ GetBool('usePlaceholderForUnsupported'): - from PyQt4 import QtGui + from PySide import QtGui QtGui.QMessageBox.critical(None, unicode(translate('OpenSCAD',"Unsupported Function"))+" : "+p[1],unicode(translate('OpenSCAD',"Press OK"))) else: p[0] = [placeholder(p[1],p[6],p[3])] @@ -981,6 +981,6 @@ def p_projection_action(p) : 'projection_action : projection LPAREN keywordargument_list RPAREN OBRACE block_list EBRACE' if printverbose: print 'Projection' if gui: - from PyQt4 import QtGui + from PySide import QtGui QtGui.QMessageBox.critical(None, unicode(translate('OpenSCAD',"Projection Not yet Coded waiting for Peter Li")),unicode(translate('OpenSCAD'," Press OK")))