diff options
author | athulappadan | 2016-05-25 14:17:33 +0530 |
---|---|---|
committer | athulappadan | 2016-05-25 14:17:33 +0530 |
commit | bb8a6a6974d2f425d51df1a3042706011ff351ad (patch) | |
tree | 7663ebfb421c40072f24e519e0eee181a08e8487 /src/frontEnd/DockArea.py | |
parent | 916c3c35b41e297e600903d54ecf1c802ac0b390 (diff) | |
download | eSim-bb8a6a6974d2f425d51df1a3042706011ff351ad.tar.gz eSim-bb8a6a6974d2f425d51df1a3042706011ff351ad.tar.bz2 eSim-bb8a6a6974d2f425d51df1a3042706011ff351ad.zip |
DockWidget added in UI for ngspice to modelica conversion
Diffstat (limited to 'src/frontEnd/DockArea.py')
-rw-r--r-- | src/frontEnd/DockArea.py | 30 |
1 files changed, 30 insertions, 0 deletions
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() |