diff options
author | fahim | 2015-03-13 11:47:05 +0530 |
---|---|---|
committer | fahim | 2015-03-13 11:47:05 +0530 |
commit | ed8eee97618542efea1b3fa439f2b10b6c5bd07d (patch) | |
tree | 1a60c9e47b61afa5cf62939ade5a26a5ef8fd5e6 /src/projManagement/openProject.py | |
parent | 4f46af3248e4516df492f76cf789f80ec7c7e54a (diff) | |
download | eSim-ed8eee97618542efea1b3fa439f2b10b6c5bd07d.tar.gz eSim-ed8eee97618542efea1b3fa439f2b10b6c5bd07d.tar.bz2 eSim-ed8eee97618542efea1b3fa439f2b10b6c5bd07d.zip |
Subject: Move Repository to FOSSEE
Description: Move Repository to FOSSEE
Diffstat (limited to 'src/projManagement/openProject.py')
-rw-r--r-- | src/projManagement/openProject.py | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/projManagement/openProject.py b/src/projManagement/openProject.py new file mode 100644 index 00000000..a5342901 --- /dev/null +++ b/src/projManagement/openProject.py @@ -0,0 +1,59 @@ + +#=============================================================================== +# +# FILE: openProject.py +# +# USAGE: --- +# +# DESCRIPTION: It is called whenever new project is being called. +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Fahim Khan, fahim.elex@gmail.com +# ORGANIZATION: eSim team at FOSSEE, IIT Bombay. +# CREATED: Wednesday 12 February 2015 +# REVISION: --- +#=============================================================================== + +from PyQt4 import QtGui +from Validation import Validation +from configuration.Appconfig import Appconfig + + + +class OpenProjectInfo(QtGui.QWidget): + """ + Class ProjectInfo accept model information from user + + """ + def __init__(self): + super(OpenProjectInfo, self).__init__() + self.obj_validation = Validation() + + def body(self): + self.projDir = QtGui.QFileDialog.getExistingDirectory() + + if self.obj_validation.validateOpenproj(self.projDir) == True: + print "Pass open project test" + self.obj_Appconfig = Appconfig() + self.obj_Appconfig.current_project['ProjectName'] = str(self.projDir) + + + else: + print "Failed open project test" + reply = QtGui.QMessageBox.critical(None, "Error Message",'''<b> Error: The project doesn't contain .proj file.</b><br/> + <b>Please select the proper project directory else you won't be able to perform any operation</b>''',QtGui.QMessageBox.Ok|QtGui.QMessageBox.Cancel) + if reply == QtGui.QMessageBox.Ok: + self.body() + elif reply == QtGui.QMessageBox.Cancel: + pass + else: + pass + + + + + +
\ No newline at end of file |