本文整理汇总了Python中Components.config.ConfigSubsection.timeValue方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigSubsection.timeValue方法的具体用法?Python ConfigSubsection.timeValue怎么用?Python ConfigSubsection.timeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Components.config.ConfigSubsection
的用法示例。
在下文中一共展示了ConfigSubsection.timeValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ConfigYesNo
# 需要导入模块: from Components.config import ConfigSubsection [as 别名]
# 或者: from Components.config.ConfigSubsection import timeValue [as 别名]
config.plugins.KiddyTimer.enabled = ConfigYesNo(default=False)
config.plugins.KiddyTimer.position_x = ConfigInteger(default=590)
config.plugins.KiddyTimer.position_y = ConfigInteger(default=35)
config.plugins.KiddyTimer.timerStyle = ConfigSelection(choices = [("clock", _("Clock")), ("smiley", _("Smiley")), ("noimage", _("no Image"))])
config.plugins.KiddyTimer.lastStartDay = ConfigText(default="")
config.plugins.KiddyTimer.lastStatus = ConfigText(default="") # Used for cheat detection
config.plugins.KiddyTimer.monitorStartTime = ConfigClock(default=KTglob.FOUROCLOCK)
config.plugins.KiddyTimer.monitorEndTime = ConfigClock(default=KTglob.EIGHTOCLOCKNOON)
config.plugins.KiddyTimer.activationDialogTimeout = ConfigInteger(default=10)
config.plugins.KiddyTimer.pin = ConfigPIN(default = 1111 , censor = "*")
config.plugins.KiddyTimer.remainingTime = ConfigInteger(default=int(KTglob.ONEHOUR), limits = (0,86400) )
config.plugins.KiddyTimer.dayTimes = ConfigSubList()
for i in range(0, 7):
s = ConfigSubsection()
s.timeValue = ConfigClock(default=KTglob.ONEOCLOCK)
config.plugins.KiddyTimer.dayTimes.append(s)
del s
def setup(session, **kwargs):
session.open(KiddyTimerSetup)
def sessionstart(reason, **kwargs):
if reason == 0:
kiddyTimer.gotSession(kwargs["session"])
def autostart(reason, **kwargs):
if reason == 1:
global kiddyTimer
kiddyTimer.stopTimer()
kiddyTimer = None