summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfahim2015-02-19 13:01:30 +0530
committerfahim2015-02-19 13:01:30 +0530
commitd7553c754ceb107042d75345e3c77115fdd735ab (patch)
tree2108924fe0d3b276df2021feac1ab37d1e88d8f0
parent6e070b2fccfb9142ead325a9f437f28144e99ce8 (diff)
downloadeSim-d7553c754ceb107042d75345e3c77115fdd735ab.tar.gz
eSim-d7553c754ceb107042d75345e3c77115fdd735ab.tar.bz2
eSim-d7553c754ceb107042d75345e3c77115fdd735ab.zip
Subject: Modified newProject.py
Description: Created GUI for newProject Block. Also added new module for openKicad functionality (Implementation is remaining)
-rwxr-xr-xsrc/frontEnd/Application.py3
-rw-r--r--src/frontEnd/Workspace.py1
-rw-r--r--src/frontEnd/Workspace.pycbin3466 -> 3466 bytes
-rw-r--r--src/projManagement/newProject.py70
-rw-r--r--src/projManagement/openKicad.py35
-rw-r--r--src/projManagement/openProject.py1
6 files changed, 109 insertions, 1 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index e3e04b97..0ef5b8b4 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -21,6 +21,7 @@
from PyQt4 import QtGui, QtCore
from configuration.Appconfig import Appconfig
from projManagement.openProject import ProjectInfo
+from projManagement.newProject import NewProjectInfo
import os
import ViewManagement
import Workspace
@@ -89,6 +90,8 @@ class Application(QtGui.QMainWindow):
def new_project(self):
print "New Project called"
+ self.project = NewProjectInfo()
+ self.project.body()
def open_project(self):
diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py
index fc41501d..921e0a56 100644
--- a/src/frontEnd/Workspace.py
+++ b/src/frontEnd/Workspace.py
@@ -54,6 +54,7 @@ class Workspace(QtGui.QWidget):
self.cancelbtn.clicked.connect(self.defaultWorkspace)
#Set Geometry
+ #Need to set Geometry properly
self.note.setGeometry(QtCore.QRect(0, 0, 400, 100))
self.workspace_label.setGeometry(QtCore.QRect(10, 130, 81, 17))
self.worspace_loc.setGeometry(QtCore.QRect(100, 150, 200, 100))
diff --git a/src/frontEnd/Workspace.pyc b/src/frontEnd/Workspace.pyc
index 99d373d5..d2010c9f 100644
--- a/src/frontEnd/Workspace.pyc
+++ b/src/frontEnd/Workspace.pyc
Binary files differ
diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py
index 1bbbbaf7..f7670033 100644
--- a/src/projManagement/newProject.py
+++ b/src/projManagement/newProject.py
@@ -16,4 +16,74 @@
# CREATED: Wednesday 12 February 2015
# REVISION: ---
#===============================================================================
+from PyQt4 import QtGui,QtCore
+
+class NewProjectInfo(QtGui.QWidget):
+ """
+ Class ProjectInfo accept model information from user
+ """
+
+ def __init__(self):
+ super(NewProjectInfo, self).__init__()
+
+
+ def body(self):
+ print "Calling NewProjectInfo"
+ self.projLabel = QtGui.QLabel("Enter Project Name :")
+ self.projEdit = QtGui.QLineEdit()
+
+ self.okbtn = QtGui.QPushButton("OK")
+ self.okbtn.clicked.connect(self.createProject)
+
+ self.cancelbtn = QtGui.QPushButton("Cancel")
+ self.cancelbtn = QtGui.QPushButton('Cancel')
+ self.cancelbtn.clicked.connect(self.cancelProject)
+
+
+ #Layout
+ self.grid = QtGui.QGridLayout()
+ self.grid.addWidget(self.projLabel,2,0)
+ self.grid.addWidget(self.projEdit, 2,1,1,5)
+ self.grid.addWidget(self.okbtn,3,1)
+ self.grid.addWidget(self.cancelbtn,3,2)
+ self.setLayout(self.grid)
+
+ self.setGeometry(QtCore.QRect(80,80,80,80))
+ self.setWindowTitle("New Project")
+ self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
+ self.show()
+
+
+ '''
+ self.LEGroup = QtGui.QGroupBox()
+ self.LElayout = QtGui.QHBoxLayout()
+ self.LElayout.addWidget(self.projLabel)
+ self.LElayout.addWidget(self.projEdit)
+ self.LEGroup.setLayout(self.LElayout)
+
+ self.BtnGroup = QtGui.QGroupBox()
+ self.Btnlayout = QtGui.QVBoxLayout()
+ self.Btnlayout.addWidget(self.okbtn)
+ self.Btnlayout.addWidget(self.cancelbtn)
+ self.BtnGroup.setLayout(self.Btnlayout)
+
+ self.mainlayout = QtGui.QHBoxLayout()
+ self.mainlayout.addWidget(self.LEGroup)
+ self.mainlayout.addWidget(self.BtnGroup)
+ self.mainlayout.addStretch(1)
+
+ self.setLayout(self.mainlayout)
+ '''
+ self.show()
+
+ def createProject(self):
+ print "Create Project Called"
+
+ def cancelProject(self):
+ self.close()
+
+
+
+
+ \ No newline at end of file
diff --git a/src/projManagement/openKicad.py b/src/projManagement/openKicad.py
new file mode 100644
index 00000000..9376589f
--- /dev/null
+++ b/src/projManagement/openKicad.py
@@ -0,0 +1,35 @@
+#===============================================================================
+#
+# FILE: openKicad.py
+#
+# USAGE: ---
+#
+# DESCRIPTION: It call kicad schematic
+#
+# OPTIONS: ---
+# REQUIREMENTS: ---
+# BUGS: ---
+# NOTES: ---
+# AUTHOR: Fahim Khan, fahim.elex@gmail.com
+# ORGANIZATION: ecSim team at FOSSEE, IIT Bombay.
+# CREATED: Tuesday 17 Feb 2015
+# REVISION: ---
+#===============================================================================
+
+class Kicad:
+ """
+ Class Kicad open Schematic,PCB and Layout
+ """
+ def __init__(self):
+ pass
+
+ def openSchematic(self):
+ print "Kicad Schematic is called"
+
+ def openFootprint(self):
+ print "Kicad Foot print Editor called"
+
+ def openLayout(self):
+ print "Kicad Layout is called"
+
+ \ No newline at end of file
diff --git a/src/projManagement/openProject.py b/src/projManagement/openProject.py
index a5c8c323..6972b1ed 100644
--- a/src/projManagement/openProject.py
+++ b/src/projManagement/openProject.py
@@ -32,7 +32,6 @@ class ProjectInfo:
pass
def body(self):
- print "Create Dialog box"
self.proj_directory = QtGui.QFileDialog.getExistingDirectory()
self.obj_validation = Validation()