From a903ba510fca71c308c0268d3c99f98192dc95c0 Mon Sep 17 00:00:00 2001 From: komalsheth236 Date: Tue, 5 May 2015 17:42:16 +0530 Subject: Project Explorer Completed --- src/projManagement/Kicad.pyc | Bin 4309 -> 4309 bytes src/projManagement/Validation.pyc | Bin 2404 -> 2404 bytes src/projManagement/Worker.pyc | Bin 1507 -> 1507 bytes src/projManagement/__init__.pyc | Bin 145 -> 145 bytes src/projManagement/newProject.py | 44 ++++++++++--------------------------- src/projManagement/newProject.pyc | Bin 3749 -> 2971 bytes src/projManagement/openProject.pyc | Bin 1771 -> 1771 bytes 7 files changed, 12 insertions(+), 32 deletions(-) (limited to 'src/projManagement') diff --git a/src/projManagement/Kicad.pyc b/src/projManagement/Kicad.pyc index 7f977180..1a1c7183 100644 Binary files a/src/projManagement/Kicad.pyc and b/src/projManagement/Kicad.pyc differ diff --git a/src/projManagement/Validation.pyc b/src/projManagement/Validation.pyc index 54ae7db1..b66bd3af 100644 Binary files a/src/projManagement/Validation.pyc and b/src/projManagement/Validation.pyc differ diff --git a/src/projManagement/Worker.pyc b/src/projManagement/Worker.pyc index b8f921e3..28b7afff 100644 Binary files a/src/projManagement/Worker.pyc and b/src/projManagement/Worker.pyc differ diff --git a/src/projManagement/__init__.pyc b/src/projManagement/__init__.pyc index a5c33b52..87910074 100644 Binary files a/src/projManagement/__init__.pyc and b/src/projManagement/__init__.pyc differ 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 index 9a413352..ad569488 100644 Binary files a/src/projManagement/newProject.pyc and b/src/projManagement/newProject.pyc differ diff --git a/src/projManagement/openProject.pyc b/src/projManagement/openProject.pyc index c4b544ae..d9c25b77 100644 Binary files a/src/projManagement/openProject.pyc and b/src/projManagement/openProject.pyc differ -- cgit