aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/Converter/Makefile.am3
-rw-r--r--lib/python/Components/Converter/ValueBitTest.py13
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/python/Components/Converter/Makefile.am b/lib/python/Components/Converter/Makefile.am
index 46aac523..b1dc1416 100644
--- a/lib/python/Components/Converter/Makefile.am
+++ b/lib/python/Components/Converter/Makefile.am
@@ -4,4 +4,5 @@ install_PYTHON = \
__init__.py ClockToText.py Converter.py EventName.py StaticText.py EventTime.py \
Poll.py RemainingToText.py StringList.py ServiceName.py FrontendInfo.py ServiceInfo.py \
ConditionalShowHide.py ServicePosition.py ValueRange.py RdsInfo.py Streaming.py \
- StaticMultiList.py ServiceTime.py MovieInfo.py MenuEntryCompare.py StringListSelection.py
+ StaticMultiList.py ServiceTime.py MovieInfo.py MenuEntryCompare.py StringListSelection.py \
+ ValueBitTest.py Global.py
diff --git a/lib/python/Components/Converter/ValueBitTest.py b/lib/python/Components/Converter/ValueBitTest.py
new file mode 100644
index 00000000..b53a8fcb
--- /dev/null
+++ b/lib/python/Components/Converter/ValueBitTest.py
@@ -0,0 +1,13 @@
+from Converter import Converter
+from Components.Element import cached
+
+class ValueBitTest(Converter, object):
+ def __init__(self, arg):
+ Converter.__init__(self, arg)
+ self.value = int(arg)
+
+ @cached
+ def getBoolean(self):
+ return self.source.value & self.value and True or False
+
+ boolean = property(getBoolean)