summaryrefslogtreecommitdiff
path: root/src/projManagement/openProject.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/projManagement/openProject.py')
-rw-r--r--src/projManagement/openProject.py59
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