Let the shared class handle alert dialogs

This commit is contained in:
Veronica Berglyd Olsen
2023-08-14 17:08:53 +02:00
parent 3441ff38de
commit a17e73b5a2
17 changed files with 107 additions and 236 deletions
-28
View File
@@ -31,31 +31,13 @@ class MockGuiMain(QWidget):
def __init__(self):
super().__init__()
self.mainStatus = MockStatusBar()
self.projPath = ""
# Test Variables
self.askResponse = True
self.lastAlert = ""
self.lastQuestion = ""
return
def postLaunchTasks(self, cmdOpen):
return
def makeAlert(self, text, info="", detals="", level=0, exc=None):
assert isinstance(text, str)
print("%s: %s" % (str(level), text))
self.lastAlert = str(text)
return
def askQuestion(self, text, info="", details="", level=3):
print("Question: %s" % text)
self.lastQuestion = text
return self.askResponse
def setStatus(self, theMessage):
return
@@ -72,16 +54,6 @@ class MockGuiMain(QWidget):
def close(self):
return "close"
# Test Functions
def undo(self):
self.askResponse = True
return
def clear(self):
self.lastAlert = ""
return
# END Class MockGuiMain