+ def green(self):
+ print "green"
+ pass
+
+ def yellow(self):
+ print "yellow"
+ pass
+
+ def blue(self):
+ print "blue"
+ pass
+
+ def deleteForward(self):
+ self.resetCounter()
+ if (self.wizard[self.currStep]["config"]["screen"] != None):
+ self.configInstance.keyDelete()
+ elif (self.wizard[self.currStep]["config"]["type"] == "dynamic"):
+ self["config"].handleKey(KEY_DELETE)
+ print "deleteForward"
+
+ def deleteBackward(self):
+ self.resetCounter()
+ if (self.wizard[self.currStep]["config"]["screen"] != None):
+ self.configInstance.keyBackspace()
+ elif (self.wizard[self.currStep]["config"]["type"] == "dynamic"):
+ self["config"].handleKey(KEY_BACKSPACE)
+ print "deleteBackward"
+
+ def setLCDTextCallback(self, callback):
+ self.lcdCallbacks.append(callback)
+
+ def back(self):
+ if self.disableKeys:
+ return
+ print "getting back..."
+ print "stepHistory:", self.stepHistory
+ if len(self.stepHistory) > 1:
+ self.currStep = self.stepHistory[-2]
+ self.stepHistory = self.stepHistory[:-2]
+ if self.currStep < 1:
+ self.currStep = 1
+ print "currStep:", self.currStep
+ print "new stepHistory:", self.stepHistory
+ self.updateValues()
+ print "after updateValues stepHistory:", self.stepHistory
+
+ def markDone(self):
+ pass
+
+ def getStepWithID(self, id):
+ print "getStepWithID:", id
+ count = 0
+ for x in self.wizard.keys():
+ if self.wizard[x]["id"] == id:
+ print "result:", count
+ return count
+ count += 1
+ print "result: nothing"
+ return 0
+
+ def finished(self, gotoStep = None, *args, **kwargs):
+ print "finished"
+ currStep = self.currStep
+
+ if self.updateValues not in self.onShown:
+ self.onShown.append(self.updateValues)
+
+ if self.showConfig:
+ if self.wizard[currStep]["config"]["type"] == "dynamic":
+ eval("self." + self.wizard[currStep]["config"]["evaluation"])()
+
+ if self.showList:
+ if (len(self.wizard[currStep]["evaluatedlist"]) > 0):
+ print "current:", self["list"].current
+ nextStep = self["list"].current[1]
+ if (self.wizard[currStep].has_key("listevaluation")):
+ exec("self." + self.wizard[self.currStep]["listevaluation"] + "('" + nextStep + "')")
+ else:
+ self.currStep = self.getStepWithID(nextStep)
+
+ print_now = True
+ if ((currStep == self.numSteps and self.wizard[currStep]["nextstep"] is None) or self.wizard[currStep]["id"] == "end"): # wizard finished
+ print "wizard finished"
+ self.markDone()
+ self.close()