summaryrefslogtreecommitdiff
path: root/src/projManagement/newProject.py
diff options
context:
space:
mode:
authorkomalsheth2362015-05-05 17:42:16 +0530
committerkomalsheth2362015-05-05 17:42:16 +0530
commita903ba510fca71c308c0268d3c99f98192dc95c0 (patch)
tree29cf1aefda7da653ce64d723b86b09b2dfd66c6e /src/projManagement/newProject.py
parent4140d1931e819f5a1ba71dbe306847a564b581e6 (diff)
downloadeSim-a903ba510fca71c308c0268d3c99f98192dc95c0.tar.gz
eSim-a903ba510fca71c308c0268d3c99f98192dc95c0.tar.bz2
eSim-a903ba510fca71c308c0268d3c99f98192dc95c0.zip
Project Explorer Completed
Diffstat (limited to 'src/projManagement/newProject.py')
-rw-r--r--src/projManagement/newProject.py44
1 files changed, 12 insertions, 32 deletions
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"