diff options
author | Fahim | 2015-05-05 17:44:39 +0530 |
---|---|---|
committer | Fahim | 2015-05-05 17:44:39 +0530 |
commit | 4b4c0f629b77baa250c6535cd95e759b0cda3cba (patch) | |
tree | 29cf1aefda7da653ce64d723b86b09b2dfd66c6e /src/projManagement | |
parent | 4140d1931e819f5a1ba71dbe306847a564b581e6 (diff) | |
parent | a903ba510fca71c308c0268d3c99f98192dc95c0 (diff) | |
download | eSim-4b4c0f629b77baa250c6535cd95e759b0cda3cba.tar.gz eSim-4b4c0f629b77baa250c6535cd95e759b0cda3cba.tar.bz2 eSim-4b4c0f629b77baa250c6535cd95e759b0cda3cba.zip |
Merge pull request #23 from komalsheth236/master
Project Explorer Completed
Diffstat (limited to 'src/projManagement')
-rw-r--r-- | src/projManagement/Kicad.pyc | bin | 4309 -> 4309 bytes | |||
-rw-r--r-- | src/projManagement/Validation.pyc | bin | 2404 -> 2404 bytes | |||
-rw-r--r-- | src/projManagement/Worker.pyc | bin | 1507 -> 1507 bytes | |||
-rw-r--r-- | src/projManagement/__init__.pyc | bin | 145 -> 145 bytes | |||
-rw-r--r-- | src/projManagement/newProject.py | 44 | ||||
-rw-r--r-- | src/projManagement/newProject.pyc | bin | 3749 -> 2971 bytes | |||
-rw-r--r-- | src/projManagement/openProject.pyc | bin | 1771 -> 1771 bytes |
7 files changed, 12 insertions, 32 deletions
diff --git a/src/projManagement/Kicad.pyc b/src/projManagement/Kicad.pyc Binary files differindex 7f977180..1a1c7183 100644 --- a/src/projManagement/Kicad.pyc +++ b/src/projManagement/Kicad.pyc diff --git a/src/projManagement/Validation.pyc b/src/projManagement/Validation.pyc Binary files differindex 54ae7db1..b66bd3af 100644 --- a/src/projManagement/Validation.pyc +++ b/src/projManagement/Validation.pyc diff --git a/src/projManagement/Worker.pyc b/src/projManagement/Worker.pyc Binary files differindex b8f921e3..28b7afff 100644 --- a/src/projManagement/Worker.pyc +++ b/src/projManagement/Worker.pyc diff --git a/src/projManagement/__init__.pyc b/src/projManagement/__init__.pyc Binary files differindex a5c33b52..87910074 100644 --- a/src/projManagement/__init__.pyc +++ b/src/projManagement/__init__.pyc diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index d6045fd3..77c583d3 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -20,6 +20,7 @@ from PyQt4 import QtGui,QtCore from Validation import Validation from configuration.Appconfig import Appconfig import os +import json class NewProjectInfo(QtGui.QWidget): """ @@ -30,44 +31,16 @@ class NewProjectInfo(QtGui.QWidget): super(NewProjectInfo, self).__init__() self.obj_validation = Validation() self.obj_appconfig = Appconfig() + - - def body(self): - """ - This function create gui for New Project Info - """ - #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.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() - - - def createProject(self): + def createProject(self,projName): """ This function create Project related directories and files """ #print "Create Project Called" + self.projName= projName self.workspace = self.obj_appconfig.default_workspace['workspace'] - self.projName = self.projEdit.text() + #self.projName = self.projEdit.text() self.projName = str(self.projName).rstrip().lstrip() #Remove leading and trailing space self.projDir = os.path.join(self.workspace,str(self.projName)) @@ -97,7 +70,14 @@ class NewProjectInfo(QtGui.QWidget): f.close() #Now Change the current working project + newprojlist = [] + #self.obj_appconfig = Appconfig() self.obj_appconfig.current_project['ProjectName'] = self.projDir + newprojlist.append(self.projName+'.proj') + self.obj_appconfig.project_explorer[self.projDir] = newprojlist + + json.dump(self.obj_appconfig.project_explorer, open(self.obj_appconfig.dictPath,'w')) + elif self.reply == "CHECKEXIST": #print "Project already exist" diff --git a/src/projManagement/newProject.pyc b/src/projManagement/newProject.pyc Binary files differindex 9a413352..ad569488 100644 --- a/src/projManagement/newProject.pyc +++ b/src/projManagement/newProject.pyc diff --git a/src/projManagement/openProject.pyc b/src/projManagement/openProject.pyc Binary files differindex c4b544ae..d9c25b77 100644 --- a/src/projManagement/openProject.pyc +++ b/src/projManagement/openProject.pyc |