summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configuration/Appconfig.pycbin1387 -> 1384 bytes
-rw-r--r--src/configuration/__init__.pycbin144 -> 143 bytes
-rw-r--r--src/frontEnd/Application.pycbin4468 -> 4607 bytes
-rwxr-xr-xsrc/frontEnd/ProjectExplorer.py73
-rw-r--r--src/frontEnd/ProjectExplorer.pycbin0 -> 3009 bytes
-rwxr-xr-xsrc/frontEnd/ViewManagement.py74
-rw-r--r--src/frontEnd/ViewManagement.pycbin3354 -> 2931 bytes
-rw-r--r--src/frontEnd/Workspace.pycbin3533 -> 3526 bytes
-rw-r--r--src/frontEnd/__init__.pycbin138 -> 138 bytes
-rw-r--r--src/projManagement/Kicad.pycbin4309 -> 4302 bytes
-rw-r--r--src/projManagement/Validation.pycbin2404 -> 2397 bytes
-rw-r--r--src/projManagement/Worker.pycbin1507 -> 1501 bytes
-rw-r--r--src/projManagement/__init__.pycbin145 -> 144 bytes
-rw-r--r--src/projManagement/newProject.pycbin3749 -> 3743 bytes
-rw-r--r--src/projManagement/openProject.pycbin1771 -> 1767 bytes
15 files changed, 104 insertions, 43 deletions
diff --git a/src/configuration/Appconfig.pyc b/src/configuration/Appconfig.pyc
index 9cbb8f38..dc4428f2 100644
--- a/src/configuration/Appconfig.pyc
+++ b/src/configuration/Appconfig.pyc
Binary files differ
diff --git a/src/configuration/__init__.pyc b/src/configuration/__init__.pyc
index ff997e84..4997c274 100644
--- a/src/configuration/__init__.pyc
+++ b/src/configuration/__init__.pyc
Binary files differ
diff --git a/src/frontEnd/Application.pyc b/src/frontEnd/Application.pyc
index eb322c39..617abc6f 100644
--- a/src/frontEnd/Application.pyc
+++ b/src/frontEnd/Application.pyc
Binary files differ
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
new file mode 100755
index 00000000..82c740fa
--- /dev/null
+++ b/src/frontEnd/ProjectExplorer.py
@@ -0,0 +1,73 @@
+import sys
+from PyQt4 import QtGui,QtCore
+from configuration.Appconfig import Appconfig
+
+class ProjectExplorer(QtGui.QWidget):
+ """
+ This Class create the project explorer windows of eSim-Workspace
+ """
+ def __init__(self,parent=None):
+ QtGui.QWidget.__init__(self)
+ #Creating object of AppConfig
+ self.obj_appconfig = Appconfig()
+
+ self.startpath = self.obj_appconfig.default_workspace["workspace"]
+
+ self.view = QtGui.QTreeView()
+
+ self.grid= QtGui.QGridLayout()
+ self.model = QtGui.QFileSystemModel()
+
+ self.view.setModel(self.model)
+ self.view.setRootIndex(self.model.setRootPath(self.startpath))
+ self.view.setHeaderHidden(True)
+ self.view.hideColumn(1)
+ self.view.hideColumn(2)
+ self.view.hideColumn(3)
+
+ self.view.doubleClicked.connect(self.on_clicked)
+ self.grid.addWidget(self.view)
+
+
+ self.setLayout(self.grid)
+ self.show()
+
+ def on_clicked(self,index):
+
+ self.indexItem = self.model.index(index.row(), 0, index.parent())
+
+ self.textwindow = QtGui.QWidget()
+ self.text = QtGui.QTextEdit()
+ self.save = QtGui.QPushButton('Save and Exit')
+ self.save.setDisabled(True)
+ self.windowgrid = QtGui.QGridLayout()
+
+ self.filePath = self.model.filePath(self.indexItem)
+
+
+ self.fopen = open(self.filePath, 'r')
+ lines = self.fopen.readlines()
+ for line in lines:
+ self.text.append(line)
+
+ QtCore.QObject.connect(self.text,QtCore.SIGNAL("textChanged()"), self.enable_save)
+ splitter_filelist = QtGui.QSplitter()
+ splitter_filelist.setOrientation(QtCore.Qt.Vertical)
+
+ vbox_main = QtGui.QVBoxLayout(self.textwindow)
+ vbox_main.addWidget(splitter_filelist)
+ vbox_main.addWidget(self.text)
+ vbox_main.addWidget(self.save)
+ self.save.clicked.connect(self.save_data)
+ #self.connect(exit,QtCore.SIGNAL('close()'), self.onQuit)
+
+ self.textwindow.show()
+
+ def enable_save(self):
+ self.save.setEnabled(True)
+
+ def save_data(self):
+ self.fopen=open(self.filePath, 'w')
+ self.fopen.write(self.text.toPlainText())
+ self.fopen.close()
+ self.textwindow.close() \ No newline at end of file
diff --git a/src/frontEnd/ProjectExplorer.pyc b/src/frontEnd/ProjectExplorer.pyc
new file mode 100644
index 00000000..fe22b7f0
--- /dev/null
+++ b/src/frontEnd/ProjectExplorer.pyc
Binary files differ
diff --git a/src/frontEnd/ViewManagement.py b/src/frontEnd/ViewManagement.py
index cc95c12c..b7a5dff0 100755
--- a/src/frontEnd/ViewManagement.py
+++ b/src/frontEnd/ViewManagement.py
@@ -22,7 +22,7 @@
from PyQt4 import QtCore
from PyQt4 import QtGui
from projManagement.Kicad import Kicad
-from kicadtoNgspice.KicadtoNgspice import *
+from ProjectExplorer import ProjectExplorer
class ViewManagement(QtGui.QSplitter):
@@ -46,12 +46,13 @@ class ViewManagement(QtGui.QSplitter):
def createView(self):
#Adding view into views dictionary
- self.addView(QtGui.QTextEdit, 'ProjectExplorer')
- self.addView(QtGui.QTextEdit, 'ProjectToolbar')
- self.addView(QtGui.QTextEdit, 'CurrentProject')
+ self.addView(ProjectExplorer, 'ProjectExplorer')
+ self.addView(QtGui.QTextEdit, 'MainArea')
+ self.addView(QtGui.QTextEdit, 'Plotting')
self.addView(QtGui.QTextEdit, 'Browser')
+
def setupView(self):
#setup views to define various areas, such as placement of individual views
# the right segment also is a splitter, but with vertical orientation
@@ -63,54 +64,41 @@ class ViewManagement(QtGui.QSplitter):
#Button for Project Tool Bar
- self.kicad_btn = QtGui.QPushButton()
- self.kicad_btn.setIcon(QtGui.QIcon('../images/default.png'))
- self.kicad_btn.setIconSize(QtCore.QSize(50,50))
- self.kicad_btn.setToolTip('<b>Open Schematic</b>')
- self.kicad_btn.clicked.connect(self.obj_kicad.openSchematic)
- self.grid.addWidget(self.kicad_btn,0,0)
-
- self.conversion_btn = QtGui.QPushButton()
- self.conversion_btn.setIcon(QtGui.QIcon('../images/default.png'))
- self.conversion_btn.setIconSize(QtCore.QSize(50,50))
- self.conversion_btn.setToolTip('<b>Convert Kicad to Ngspice</b>')
- self.conversion_btn.clicked.connect(self.obj_kicad.openKicadToNgspice)
- self.grid.addWidget(self.conversion_btn,0,1)
-
-
- self.ngspice_btn = QtGui.QPushButton()
- self.ngspice_btn.setIcon(QtGui.QIcon('../images/default.png'))
- self.ngspice_btn.setIconSize(QtCore.QSize(50,50))
- self.ngspice_btn.setToolTip('<b>Simulation</b>')
- self.grid.addWidget(self.ngspice_btn,0,2)
-
- self.footprint_btn = QtGui.QPushButton()
- self.footprint_btn.setIcon(QtGui.QIcon('../images/default.png'))
- self.footprint_btn.setIconSize(QtCore.QSize(50,50))
- self.footprint_btn.setToolTip('<b>Footprint Editor</b>')
- self.footprint_btn.clicked.connect(self.obj_kicad.openFootprint)
- self.grid.addWidget(self.footprint_btn,1,0)
-
- self.pcb_btn = QtGui.QPushButton()
- self.pcb_btn.setIcon(QtGui.QIcon('../images/default.png'))
- self.pcb_btn.setIconSize(QtCore.QSize(50,50))
- self.pcb_btn.setToolTip('<b>PCB Layout</b>')
- self.pcb_btn.clicked.connect(self.obj_kicad.openLayout)
- self.grid.addWidget(self.pcb_btn,1,1)
+ self.kicad = QtGui.QAction(QtGui.QIcon('../images/default.png'),'<b>Open Schematic</b>',self)
+ self.kicad.triggered.connect(self.obj_kicad.openSchematic)
+
+ self.conversion = QtGui.QAction(QtGui.QIcon('../images/default.png'),'<b>Convert Kicad to Ngspice</b>',self)
+ self.conversion.triggered.connect(self.obj_kicad.openKicadToNgspice)
+
+
+ self.ngspice = QtGui.QAction(QtGui.QIcon('../images/default.png'), '<b>Simulation</b>', self)
+
+ self.footprint = QtGui.QAction(QtGui.QIcon('../images/default.png'),'<b>Footprint Editor</b>',self)
+ self.footprint.triggered.connect(self.obj_kicad.openFootprint)
+
+ self.pcb = QtGui.QAction(QtGui.QIcon('../images/default.png'),'<b>PCB Layout</b>',self)
+ self.pcb.triggered.connect(self.obj_kicad.openLayout)
+ self.lefttoolbar= QtGui.QToolBar()
+ self.lefttoolbar.addAction(self.kicad)
+ self.lefttoolbar.addAction(self.conversion)
+ self.lefttoolbar.addAction(self.ngspice)
+ self.lefttoolbar.addAction(self.footprint)
+ self.lefttoolbar.addAction(self.pcb)
#Adding one more splitter
self.browser = QtGui.QSplitter()
self.browser.setOrientation(QtCore.Qt.Vertical)
# bind the top level views into the framework
+
+ self.lefttoolbar.setParent(self)
+ self.lefttoolbar.setOrientation(QtCore.Qt.Vertical)
self.views['ProjectExplorer'].setParent(self)
- self.views['ProjectToolbar'].setParent(self.right)
- self.views['ProjectToolbar'].setLayout(self.grid)
- self.views['ProjectToolbar'].setReadOnly(True)
+ self.views['MainArea'].setParent(self.right)
- self.views['CurrentProject'].setParent(self.right)
- self.views['CurrentProject'].setReadOnly(True)
+ self.views['Plotting'].setParent(self.right)
+ self.views['Plotting'].setReadOnly(True)
self.views['Browser'].setParent(self.browser)
self.views['Browser'].setReadOnly(True)
diff --git a/src/frontEnd/ViewManagement.pyc b/src/frontEnd/ViewManagement.pyc
index 8a34616a..603aff6b 100644
--- a/src/frontEnd/ViewManagement.pyc
+++ b/src/frontEnd/ViewManagement.pyc
Binary files differ
diff --git a/src/frontEnd/Workspace.pyc b/src/frontEnd/Workspace.pyc
index 614d455e..935ed8d5 100644
--- a/src/frontEnd/Workspace.pyc
+++ b/src/frontEnd/Workspace.pyc
Binary files differ
diff --git a/src/frontEnd/__init__.pyc b/src/frontEnd/__init__.pyc
index 4fed5140..107c0b45 100644
--- a/src/frontEnd/__init__.pyc
+++ b/src/frontEnd/__init__.pyc
Binary files differ
diff --git a/src/projManagement/Kicad.pyc b/src/projManagement/Kicad.pyc
index f57ea45f..3cb015de 100644
--- a/src/projManagement/Kicad.pyc
+++ b/src/projManagement/Kicad.pyc
Binary files differ
diff --git a/src/projManagement/Validation.pyc b/src/projManagement/Validation.pyc
index 0051122d..a1bbf393 100644
--- a/src/projManagement/Validation.pyc
+++ b/src/projManagement/Validation.pyc
Binary files differ
diff --git a/src/projManagement/Worker.pyc b/src/projManagement/Worker.pyc
index 7ac4407c..4f8652b7 100644
--- a/src/projManagement/Worker.pyc
+++ b/src/projManagement/Worker.pyc
Binary files differ
diff --git a/src/projManagement/__init__.pyc b/src/projManagement/__init__.pyc
index 6c12ed77..2f39d337 100644
--- a/src/projManagement/__init__.pyc
+++ b/src/projManagement/__init__.pyc
Binary files differ
diff --git a/src/projManagement/newProject.pyc b/src/projManagement/newProject.pyc
index 12ced1e6..a5fbed82 100644
--- a/src/projManagement/newProject.pyc
+++ b/src/projManagement/newProject.pyc
Binary files differ
diff --git a/src/projManagement/openProject.pyc b/src/projManagement/openProject.pyc
index 402faa94..49ac9b28 100644
--- a/src/projManagement/openProject.pyc
+++ b/src/projManagement/openProject.pyc
Binary files differ