diff options
author | rahulp13 | 2020-02-15 14:41:09 +0530 |
---|---|---|
committer | rahulp13 | 2020-02-15 14:41:09 +0530 |
commit | 94326c365e361137412272a46caafe7f97620196 (patch) | |
tree | 5ccf3695b50a3168a26230e07fafeb9911160213 /src/projManagement/newProject.py | |
parent | b173d88ac0059b67e60a042293b1e486c9620d8a (diff) | |
download | eSim-94326c365e361137412272a46caafe7f97620196.tar.gz eSim-94326c365e361137412272a46caafe7f97620196.tar.bz2 eSim-94326c365e361137412272a46caafe7f97620196.zip |
set modality to QErrorMessage
Diffstat (limited to 'src/projManagement/newProject.py')
-rw-r--r-- | src/projManagement/newProject.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index b7cce397..b04dbd10 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -83,13 +83,17 @@ class NewProjectInfo(QtGui.QWidget): self.projFile = os.path.join( self.projDir, self.projName + ".proj") f = open(self.projFile, "w") + except BaseException: self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'Unable to create project. Please make sure you have ' + 'write permission on ' + self.workspace ) - self.msg.setWindowTitle("Error Message") + self.msg.exec_() + f.write("schematicFile " + self.projName + ".sch\n") f.close() @@ -112,23 +116,29 @@ class NewProjectInfo(QtGui.QWidget): elif self.reply == "CHECKEXIST": self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'The project "' + self.projName + '" already exist.Please select the different name or delete' + ' existing project' ) - self.msg.setWindowTitle("Error Message") + self.msg.exec_() elif self.reply == "CHECKNAME": self.msg = QtGui.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") self.msg.showMessage( 'The project name should not contain space between them') - self.msg.setWindowTitle("Error Message") + self.msg.exec_() elif self.reply == "NONE": self.msg = QtGui.QErrorMessage(self) - self.msg.showMessage('The project name cannot be empty') + self.msg.setModal(True) self.msg.setWindowTitle("Error Message") + self.msg.showMessage('The project name cannot be empty') + self.msg.exec_() def cancelProject(self): self.close() |