summaryrefslogtreecommitdiff
path: root/src/subcircuit/uploadSub.py
diff options
context:
space:
mode:
authorrahulp132020-02-15 14:41:09 +0530
committerrahulp132020-02-15 14:41:09 +0530
commit94326c365e361137412272a46caafe7f97620196 (patch)
tree5ccf3695b50a3168a26230e07fafeb9911160213 /src/subcircuit/uploadSub.py
parentb173d88ac0059b67e60a042293b1e486c9620d8a (diff)
downloadeSim-94326c365e361137412272a46caafe7f97620196.tar.gz
eSim-94326c365e361137412272a46caafe7f97620196.tar.bz2
eSim-94326c365e361137412272a46caafe7f97620196.zip
set modality to QErrorMessage
Diffstat (limited to 'src/subcircuit/uploadSub.py')
-rw-r--r--src/subcircuit/uploadSub.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/subcircuit/uploadSub.py b/src/subcircuit/uploadSub.py
index 34ec8c33..4bb8df34 100644
--- a/src/subcircuit/uploadSub.py
+++ b/src/subcircuit/uploadSub.py
@@ -41,21 +41,25 @@ class UploadSub(QtGui.QWidget):
if ext != '.sub':
self.msg = QtGui.QErrorMessage(self)
- self.msg.showMessage("Please ensure that filename ends with .sub")
+ self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
+ self.msg.showMessage("Please ensure that filename ends with .sub")
+ self.msg.exec_()
print("Invalid filename")
return
valid = self.obj_validation.validateSubcir(editfile, create_subcircuit)
if not valid:
self.msg = QtGui.QErrorMessage(self)
+ self.msg.setModal(True)
+ self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
"Content of file does not meet the required format. " +
"Please ensure that file starts with **.subckt " +
create_subcircuit + " ** and ends with **.ends " +
create_subcircuit + " **"
)
- self.msg.setWindowTitle("Error Message")
+ self.msg.exec_()
print("Invalid file format")
return
@@ -80,15 +84,19 @@ class UploadSub(QtGui.QWidget):
print("Project name already exists.")
print("==========================")
msg = QtGui.QErrorMessage(self)
+ msg.setModal(True)
+ msg.setWindowTitle("Error Message")
msg.showMessage(
"The project already exist. Please select "
"a different name or delete existing project")
- msg.setWindowTitle("Error Message")
+ msg.exec_()
elif reply == "CHECKNAME":
print("Name can not contain space between them")
print("===========================")
msg = QtGui.QErrorMessage(self)
+ msg.setModal(True)
+ msg.setWindowTitle("Error Message")
msg.showMessage(
'The project name should not contain space between them')
- msg.setWindowTitle("Error Message")
+ msg.exec_()