diff options
author | fahim-oscad | 2016-05-26 17:05:24 +0530 |
---|---|---|
committer | fahim-oscad | 2016-05-26 17:05:24 +0530 |
commit | dab6b1084d39e676305f89a59ab6685edec5e9ee (patch) | |
tree | 8bac67d9ca91c1cf6aeceb8fd4dde9b723ba9370 /src/frontEnd | |
parent | 9f5571546670218964fa202ce9897d15c80e5e27 (diff) | |
parent | d065d4854293d2d896fbabf8fd06c31a3b7c1c24 (diff) | |
download | eSim-dab6b1084d39e676305f89a59ab6685edec5e9ee.tar.gz eSim-dab6b1084d39e676305f89a59ab6685edec5e9ee.tar.bz2 eSim-dab6b1084d39e676305f89a59ab6685edec5e9ee.zip |
Merge branch 'release' into developv1.1.1
Diffstat (limited to 'src/frontEnd')
-rwxr-xr-x | src/frontEnd/Application.py | 4 | ||||
-rw-r--r-- | src/frontEnd/DockArea.py | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 1008c7b5..2f9bca28 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -306,6 +306,7 @@ class Application(QtGui.QMainWindow): self.ngspiceNetlist = os.path.join(self.projDir,self.projName+".cir.out") self.modelicaNetlist = os.path.join(self.projDir,self.projName+".mo") + """ try: #Creating a command for Ngspice to Modelica converter self.cmd1 = "python ../ngspicetoModelica/NgspicetoModelica.py "+self.ngspiceNetlist @@ -335,6 +336,9 @@ class Application(QtGui.QMainWindow): self.msg.showMessage('Unable to convert NgSpice netlist to Modelica netlist :'+str(e)) self.msg.setWindowTitle("Ngspice to Modelica conversion error") self.obj_appconfig.print_error(str(e)) + """ + + self.obj_Mainview.obj_dockarea.modelicaEditor(self.projDir) else: self.msg = QtGui.QErrorMessage() diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index dcb48704..073072bf 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -7,6 +7,7 @@ from subcircuit.Subcircuit import Subcircuit from kicadtoNgspice.KicadtoNgspice import MainWindow from browser.Welcome import Welcome from browser.UserManual import UserManual +from ngspicetoModelica.ModelicaUI import OpenModelicaEditor import os dockList = ['Welcome'] @@ -273,6 +274,35 @@ class DockArea(QtGui.QMainWindow): count = count + 1 + def modelicaEditor(self, projDir): + """ + This function sets up the UI for ngspice to modelica conversion + """ + + global count + self.modelicaWidget = QtGui.QWidget() + self.modelicaLayout = QtGui.QVBoxLayout() + self.modelicaLayout.addWidget(OpenModelicaEditor(projDir)) + + self.modelicaWidget.setLayout(self.modelicaLayout) + dock['Modelica-'+str(count)] = QtGui.QDockWidget('Modelica-'+str(count)) + dock['Modelica-'+str(count)].setWidget(self.modelicaWidget) + self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Modelica-'+str(count)]) + self.tabifyDockWidget(dock['Welcome'],dock['Modelica-'+str(count)]) + + dock['Modelica-'+str(count)].setVisible(True) + dock['Modelica-'+str(count)].setFocus() + dock['Modelica-'+str(count)].raise_() + + #CSS + dock['Modelica-'+str(count)].setStyleSheet(" \ + .QWidget { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + ") + + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(dock['Modelica-'+str(count)]) + + count = count + 1 + def closeDock (self): for dockwidget in self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']]: dockwidget.close() |