+ 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()
+
+ def keyEvent(self, code):
+# print "code " + str(code)
+ if code == 32:
+ self.currentDialog["okbutton"].instance.push()
+
+ if code == 33:
+ self.currentDialog["channelSwitcher"].instance.push()
+
+ if code >= 0x30 and code <= 0x39:
+ try:
+ self.currentDialog["menu"].instance.moveSelection(code - 0x31)
+ except:
+ self.currentDialog["list"].instance.moveSelection(code - 0x31)
+
+ def close(self):
+ self.delayTimer.start(0, 1)
+
+def runScreenTest():
+ session = Session()
+ session.desktop = getDesktop()
+
+ session.nav = pNavigation()
+
+ session.open(infoBar)
+
+ CONNECT(keyPressedSignal(), session.keyEvent)
+
+ runMainloop()