diff options
Diffstat (limited to 'src/ngspicetoModelica/ModelicaUI.py')
-rw-r--r-- | src/ngspicetoModelica/ModelicaUI.py | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/src/ngspicetoModelica/ModelicaUI.py b/src/ngspicetoModelica/ModelicaUI.py index 8606ce36..daef6e76 100644 --- a/src/ngspicetoModelica/ModelicaUI.py +++ b/src/ngspicetoModelica/ModelicaUI.py @@ -1,5 +1,4 @@ import os -import sys from subprocess import Popen, PIPE, STDOUT from PyQt4 import QtGui, QtCore from configuration.Appconfig import Appconfig @@ -40,7 +39,7 @@ class OpenModelicaEditor(QtGui.QWidget): self.loadOMbtn.clicked.connect(self.callOMEdit) self.grid.addWidget(self.loadOMbtn, 3, 1) - #self.setGeometry(300, 300, 350, 300) + # self.setGeometry(300, 300, 350, 300) self.setLayout(self.grid) self.show() @@ -55,7 +54,7 @@ class OpenModelicaEditor(QtGui.QWidget): try: self.cmd1 = "python ../ngspicetoModelica/NgspicetoModelica.py " + \ self.ngspiceNetlist + ' ' + self.map_json - #self.obj_workThread1 = Worker.WorkerThread(self.cmd1) + # self.obj_workThread1 = Worker.WorkerThread(self.cmd1) # self.obj_workThread1.start() convert_process = Popen( self.cmd1, @@ -68,15 +67,19 @@ class OpenModelicaEditor(QtGui.QWidget): if not error_code: self.msg = QtGui.QMessageBox() self.msg.setText( - "Ngspice netlist successfully converted to OpenModelica netlist") + "Ngspice netlist successfully converted to OpenModelica" + + "netlist") self.obj_appconfig.print_info( - "Ngspice netlist successfully converted to OpenModelica netlist") + "Ngspice netlist successfully converted to OpenModelica" + + "netlist" + ) self.msg.exec_() else: self.err_msg = QtGui.QErrorMessage() self.err_msg.showMessage( - 'Unable to convert NgSpice netlist to Modelica netlist. Check the netlist :' + + 'Unable to convert NgSpice netlist to Modelica netlist.' + + 'Check the netlist :' + error_code) self.err_msg.setWindowTitle( "Ngspice to Modelica conversion error") @@ -85,7 +88,8 @@ class OpenModelicaEditor(QtGui.QWidget): except Exception as e: self.msg = QtGui.QErrorMessage() self.msg.showMessage( - 'Unable to convert NgSpice netlist to Modelica netlist. Check the netlist :' + + 'Unable to convert NgSpice netlist to Modelica netlist.' + + 'Check the netlist :' + str(e)) self.msg.setWindowTitle("Ngspice to Modelica conversion error") @@ -101,9 +105,16 @@ class OpenModelicaEditor(QtGui.QWidget): else: self.msg = QtGui.QMessageBox() self.msgContent = "There was an error while opening OMEdit.<br/>\ - Please make sure OpenModelica is installed in your system. <br/>\ - To install it on Linux : Go to <a href=https://www.openmodelica.org/download/download-linux>OpenModelica Linux</a> and install nigthly build release.<br/>\ - To install it on Windows : Go to <a href=https://www.openmodelica.org/download/download-windows>OpenModelica Windows</a> and install latest version.<br/>" + Please make sure OpenModelica is installed in your \ + system. <br/>\ + To install it on Linux : Go to <a href= \ + https://www.openmodelica.org/download/download-linux> \ + OpenModelica Linux</a> \ + and install nigthly build release.<br/> \ + To install it on Windows : Go to <a href= \ + https://www.openmodelica.org/download/download-windows>\ + OpenModelica Windows</a> and install latest version. \ + <br/>" self.msg.setTextFormat(QtCore.Qt.RichText) self.msg.setText(self.msgContent) self.msg.setWindowTitle("Missing OpenModelica") |