summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/configuration/Appconfig.py4
-rw-r--r--src/configuration/Appconfig.pycbin1384 -> 1388 bytes
-rwxr-xr-xsrc/frontEnd/Application.py112
-rw-r--r--src/frontEnd/Application.pycbin4607 -> 5680 bytes
-rwxr-xr-xsrc/frontEnd/ViewManagement.py16
-rw-r--r--src/frontEnd/ViewManagement.pycbin2931 -> 2902 bytes
6 files changed, 98 insertions, 34 deletions
diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py
index cb5bdca3..84502e5d 100644
--- a/src/configuration/Appconfig.py
+++ b/src/configuration/Appconfig.py
@@ -26,14 +26,16 @@ class Appconfig(QtGui.QWidget):
All configuration goes here.
May change in future for code optimization.
"""
+
#Home directory
home = os.path.join(os.path.expanduser("~"),"eSim-Workspace")
default_workspace = {"workspace":home}
#Current Project detail
current_project = {"ProjectName":None}
#Workspace detail
- workspace_text = '''ecSim stores your project in a folder called a workspace. You can choose a different workspace folder to use for this session.'''
+ workspace_text = '''eSim stores your project in a folder called a eSim-Workspace. You can choose a different workspace folder to use for this session.'''
procThread_list = []
+
def __init__(self):
super(Appconfig, self).__init__()
diff --git a/src/configuration/Appconfig.pyc b/src/configuration/Appconfig.pyc
index dc4428f2..7d047db5 100644
--- a/src/configuration/Appconfig.pyc
+++ b/src/configuration/Appconfig.pyc
Binary files differ
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index b1c9252b..ae92939b 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -22,12 +22,14 @@ from PyQt4 import QtGui, QtCore
from configuration.Appconfig import Appconfig
from projManagement.openProject import OpenProjectInfo
from projManagement.newProject import NewProjectInfo
+from projManagement.Kicad import Kicad
import os
import ViewManagement
import Workspace
import sys
import time
import subprocess
+import TestView
class Application(QtGui.QMainWindow):
@@ -41,6 +43,11 @@ class Application(QtGui.QMainWindow):
#Calling __init__ of super class
QtGui.QMainWindow.__init__(self,*args)
+ #Init Workspace
+ self.obj_workspace = Workspace.Workspace()
+
+ #Creating object of Kicad.py
+ self.obj_kicad = Kicad()
#Creating Application configuration object
self.obj_appconfig = Appconfig()
@@ -49,21 +56,62 @@ class Application(QtGui.QMainWindow):
self.obj_appconfig._app_width,
self.obj_appconfig._app_heigth)
self.setWindowTitle(self.obj_appconfig._APPLICATION)
- #Init Workspace
- self.obj_workspace = Workspace.Workspace()
-
+
+
#Init necessary components in sequence
- self.initActions()
- self.initView()
+ self.initToolBar()
+ #self.initView()
+ self.setCentralWidget(self.initMainView())
+
+
+ def initMainView(self):
- def initActions(self):
+ self.mainWidget = QtGui.QWidget()
+ self.leftSplit = QtGui.QSplitter()
+ self.middleSplit = QtGui.QSplitter()
+ self.rightSplit = QtGui.QSplitter() #Will be use in future for Browser
+
+ self.projectExplorer = QtGui.QTextEdit()
+ self.mainArea = QtGui.QTextEdit()
+ self.noteArea = QtGui.QTextEdit()
+ self.browserArea = QtGui.QTextEdit()
+
+ self.mainLayout = QtGui.QVBoxLayout()
+
+ #Intermediate Widget
+ self.middleContainer = QtGui.QWidget()
+ self.middleContainerLayout = QtGui.QVBoxLayout()
+
+ #Adding content to middle Split whichis vertical
+ self.middleSplit.setOrientation(QtCore.Qt.Vertical)
+ self.middleSplit.addWidget(self.mainArea)
+ self.middleSplit.addWidget(self.noteArea)
+ #Adding middle split to Middle Container Widget
+ self.middleContainerLayout.addWidget(self.middleSplit)
+ self.middleContainer.setLayout(self.middleContainerLayout)
+
+ #Adding content ot left split
+ self.leftSplit.addWidget(self.projectExplorer)
+ self.leftSplit.addWidget(self.middleContainer)
+
+
+ #Adding to main Layout
+ self.mainLayout.addWidget(self.leftSplit)
+ self.mainWidget.setLayout(self.mainLayout)
+
+ return self.mainWidget
+
+
+
+ def initToolBar(self):
+
+ #Top Tool bar
self.newproj = QtGui.QAction(QtGui.QIcon('../images/newProject.png'),'<b>New Project</b>',self)
self.newproj.setShortcut('Ctrl+N')
self.newproj.triggered.connect(self.new_project)
-
-
+
self.openproj = QtGui.QAction(QtGui.QIcon('../images/openProject.png'),'<b>Open Project</b>',self)
self.openproj.setShortcut('Ctrl+O')
self.openproj.triggered.connect(self.open_project)
@@ -76,23 +124,44 @@ class Application(QtGui.QMainWindow):
self.helpfile.setShortcut('Ctrl+H')
self.helpfile.triggered.connect(self.help_project)
- self.mainToolbar = self.addToolBar('Top Navigation')
- self.mainToolbar.addAction(self.newproj)
- self.mainToolbar.addAction(self.openproj)
- self.mainToolbar.addAction(self.exitproj)
- self.mainToolbar.addAction(self.helpfile)
+ self.topToolbar = self.addToolBar('Top Tool Bar')
+ self.topToolbar.addAction(self.newproj)
+ self.topToolbar.addAction(self.openproj)
+ self.topToolbar.addAction(self.exitproj)
+ self.topToolbar.addAction(self.helpfile)
+
+ #Left Tool bar Start
+ 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('Left ToolBar')
+ self.addToolBar(QtCore.Qt.LeftToolBarArea, self.lefttoolbar)
+ 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)
+ self.lefttoolbar.setOrientation(QtCore.Qt.Vertical)
-
-
def initView(self):
"""
Create GUI from the class Views and initialize it
"""
self.view = ViewManagement.ViewManagement()
self.setCentralWidget(self.view)
-
+
def new_project(self):
"""
This function call New Project Info class.
@@ -100,7 +169,7 @@ class Application(QtGui.QMainWindow):
print "New Project called"
self.project = NewProjectInfo()
self.project.body()
-
+
def open_project(self):
"""
@@ -128,14 +197,11 @@ class Application(QtGui.QMainWindow):
def help_project(self):
print "Help is called"
print "Current Project : ",self.obj_appconfig.current_project
-
-
+
def testing(self):
print "Success hit kicad button"
-
-
-
+
def main(args):
"""
diff --git a/src/frontEnd/Application.pyc b/src/frontEnd/Application.pyc
index 617abc6f..9cf8e665 100644
--- a/src/frontEnd/Application.pyc
+++ b/src/frontEnd/Application.pyc
Binary files differ
diff --git a/src/frontEnd/ViewManagement.py b/src/frontEnd/ViewManagement.py
index b7a5dff0..2160be8b 100755
--- a/src/frontEnd/ViewManagement.py
+++ b/src/frontEnd/ViewManagement.py
@@ -23,6 +23,7 @@ from PyQt4 import QtCore
from PyQt4 import QtGui
from projManagement.Kicad import Kicad
from ProjectExplorer import ProjectExplorer
+from Plotting import Plotting
class ViewManagement(QtGui.QSplitter):
@@ -48,10 +49,10 @@ class ViewManagement(QtGui.QSplitter):
#Adding view into views dictionary
self.addView(ProjectExplorer, 'ProjectExplorer')
self.addView(QtGui.QTextEdit, 'MainArea')
- self.addView(QtGui.QTextEdit, 'Plotting')
+ self.addView(Plotting, 'Plotting')
self.addView(QtGui.QTextEdit, 'Browser')
-
+
def setupView(self):
#setup views to define various areas, such as placement of individual views
@@ -59,10 +60,7 @@ class ViewManagement(QtGui.QSplitter):
self.right = QtGui.QSplitter()
self.right.setOrientation(QtCore.Qt.Vertical)
- #Layout
- self.grid = QtGui.QGridLayout()
-
-
+
#Button for Project Tool Bar
self.kicad = QtGui.QAction(QtGui.QIcon('../images/default.png'),'<b>Open Schematic</b>',self)
self.kicad.triggered.connect(self.obj_kicad.openSchematic)
@@ -93,13 +91,11 @@ class ViewManagement(QtGui.QSplitter):
self.lefttoolbar.setParent(self)
self.lefttoolbar.setOrientation(QtCore.Qt.Vertical)
- self.views['ProjectExplorer'].setParent(self)
+ self.views['ProjectExplorer'].setParent(self)
self.views['MainArea'].setParent(self.right)
-
self.views['Plotting'].setParent(self.right)
- self.views['Plotting'].setReadOnly(True)
-
+ #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 603aff6b..ef6ae7ee 100644
--- a/src/frontEnd/ViewManagement.pyc
+++ b/src/frontEnd/ViewManagement.pyc
Binary files differ