- if self.desktop != None:
- self.currentWindow = wnd = eWindow(self.desktop)
-# wnd.setTitle("Screen from python!")
-# wnd.move(ePoint(300, 100))
-# wnd.resize(eSize(300, 300))
-
- gui = GUIOutputDevice()
- gui.parent = wnd
- gui.create(self.currentDialog)
-
- applyGUIskin(self.currentDialog, wnd, None, screen.__class__.__name__)
-
- wnd.show()
- else:
- self.currentWindow = None
+ return dlg
+
+ def pushCurrent(self):
+ if self.currentDialog:
+ self.dialogStack.append(self.currentDialog)
+ self.execEnd()
+
+ def popCurrent(self):
+ if len(self.dialogStack):
+ self.currentDialog = self.dialogStack.pop()
+ self.execBegin()
+
+ def execDialog(self, dialog):
+ self.pushCurrent()
+ self.currentDialog = dialog
+ self.currentDialog.isTmp = False
+ self.execBegin()
+
+ def open(self, screen, *arguments):
+ self.pushCurrent()
+ self.currentDialog = self.instantiateDialog(screen, *arguments)
+ self.currentDialog.isTmp = True
+ self.execBegin()