diff options
author | fahim | 2015-06-01 17:56:05 +0530 |
---|---|---|
committer | fahim | 2015-06-01 17:56:05 +0530 |
commit | b55f693aae4b4874e89514b83d59f5566f8d3998 (patch) | |
tree | 456774c47b58c68eb5cda542501c2ded4d07ffd0 /src/frontEnd | |
parent | ae00efd3b5f0b64f103469a168c63e6fcedd563f (diff) | |
download | eSim-b55f693aae4b4874e89514b83d59f5566f8d3998.tar.gz eSim-b55f693aae4b4874e89514b83d59f5566f8d3998.tar.bz2 eSim-b55f693aae4b4874e89514b83d59f5566f8d3998.zip |
Subject: Adding changes for Model Editor
Description: Adding Changes for Model Editor
Diffstat (limited to 'src/frontEnd')
-rwxr-xr-x | src/frontEnd/Application.py | 13 | ||||
-rw-r--r-- | src/frontEnd/DockArea.py | 23 |
2 files changed, 35 insertions, 1 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 7f00e7a7..ca9471c6 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -26,7 +26,6 @@ from projManagement.Kicad import Kicad from frontEnd import ProjectExplorer import Workspace import DockArea - import os import sys import time @@ -106,6 +105,9 @@ class Application(QtGui.QMainWindow): self.pcb = QtGui.QAction(QtGui.QIcon('../images/pcb.png'),'<b>PCB Layout</b>',self) self.pcb.triggered.connect(self.obj_kicad.openLayout) + + self.model = QtGui.QAction(QtGui.QIcon('../images/model.png'),'<b>Model Editor</b>',self) + self.model.triggered.connect(self.open_modelEditor) #Adding Action Widget to tool bar self.lefttoolbar = QtGui.QToolBar('Left ToolBar') @@ -115,6 +117,7 @@ class Application(QtGui.QMainWindow): self.lefttoolbar.addAction(self.ngspice) self.lefttoolbar.addAction(self.footprint) self.lefttoolbar.addAction(self.pcb) + self.lefttoolbar.addAction(self.model) self.lefttoolbar.setOrientation(QtCore.Qt.Vertical) def new_project(self): @@ -205,6 +208,14 @@ class Application(QtGui.QMainWindow): print "Current Project : ",self.obj_appconfig.current_project #self.obj_Mainview.obj_dockarea.plottingEditor() + + def open_modelEditor(self): + print "model editor is called" + self.obj_Mainview.obj_dockarea.modelEditor() + + def testing(self): + print "Success hit kicad button" + class MainView(QtGui.QWidget): """ diff --git a/src/frontEnd/DockArea.py b/src/frontEnd/DockArea.py index 875b3b90..76216aa6 100644 --- a/src/frontEnd/DockArea.py +++ b/src/frontEnd/DockArea.py @@ -2,6 +2,7 @@ from PyQt4 import QtGui,QtCore from ngspiceSimulation.pythonPlotting import plotWindow from ngspiceSimulation.NgspiceWidget import NgspiceWidget from configuration.Appconfig import Appconfig +from modelEditor.ModelEditor import ModelEditorclass import os dockList = ['Welcome'] @@ -107,6 +108,28 @@ class DockArea(QtGui.QMainWindow): dock['NgSpice-'+str(count)].raise_() count = count + 1 + + def modelEditor(self): + print"in model editor" + global count + self.modelwidget = QtGui.QWidget() + + self.modellayout = QtGui.QVBoxLayout() + self.modellayout.addWidget(ModelEditorclass()) + + #Adding to main Layout + self.modelwidget.setLayout(self.modellayout) + + dock['Model Editor-'+str(count)] = QtGui.QDockWidget('Model Editor-'+str(count)) + dock['Model Editor-'+str(count)].setWidget(self.modelwidget) + self.addDockWidget(QtCore.Qt.TopDockWidgetArea, dock['Model Editor-'+str(count)]) + self.tabifyDockWidget(dock['Welcome'],dock['Model Editor-'+str(count)]) + + dock['Model Editor-'+str(count)].setVisible(True) + dock['Model Editor-'+str(count)].setFocus() + dock['Model Editor-'+str(count)].raise_() + + count = count + 1 |