def __init__(self, parent): self.parent = parent self.PassivePopup = KPassivePopup() IconLoader = KIconLoader() self.icoCancel = IconLoader.loadIcon('cancel', KIcon.Small) self.icoInfo = IconLoader.loadIcon('info', KIcon.Small) self.st = parent.systray
class KdePopupNotifier: def __init__(self, parent): self.parent = parent self.PassivePopup = KPassivePopup() IconLoader = KIconLoader() self.icoCancel = IconLoader.loadIcon('cancel', KIcon.Small) self.icoInfo = IconLoader.loadIcon('info', KIcon.Small) self.st = parent.systray def error(self, msg, hold=False): self.PassivePopup.setTimeout((30, -1)[hold]) self.PassivePopup.message("PyQLogger Status:", msg, self.icoCancel, self.st) def info(self, msg, hold=False): self.PassivePopup.setTimeout((30, -1)[hold]) self.PassivePopup.message("PyQLogger Status:", msg, self.icoInfo, self.st) def warn(self, msg, hold=False): self.PassivePopup.setTimeout((30, -1)[hold]) self.PassivePopup.message("PyQLogger Status:", msg, self.icoCancel, self.st) def status(self, msg, hold=False): self.PassivePopup.setTimeout((30, -1)[hold]) self.PassivePopup.message("PyQLogger Status:", msg, self.icoInfo, self.st)
class KdePopupNotifier: def __init__(self, parent): self.parent = parent self.PassivePopup = KPassivePopup() IconLoader = KIconLoader() self.icoCancel = IconLoader.loadIcon('cancel', KIcon.Small) self.icoInfo = IconLoader.loadIcon('info', KIcon.Small) self.st = parent.systray def error(self, msg, hold=False): self.PassivePopup.setTimeout( (30,-1)[hold] ) self.PassivePopup.message("PyQLogger Status:", msg, self.icoCancel, self.st) def info(self, msg, hold=False): self.PassivePopup.setTimeout( (30,-1)[hold] ) self.PassivePopup.message("PyQLogger Status:", msg, self.icoInfo, self.st) def warn(self, msg, hold=False): self.PassivePopup.setTimeout( (30,-1)[hold] ) self.PassivePopup.message("PyQLogger Status:", msg, self.icoCancel, self.st) def status(self, msg, hold=False): self.PassivePopup.setTimeout( (30,-1)[hold] ) self.PassivePopup.message("PyQLogger Status:", msg, self.icoInfo, self.st)