git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add SNRdB to TunerInfo
[enigma2.git]
/
lib
/
python
/
Components
/
GUIComponent.py
diff --git
a/lib/python/Components/GUIComponent.py
b/lib/python/Components/GUIComponent.py
index deb8b34a6356c11c6c30a8851af1627fce44c425..7e1bafb977bac95fefebb197c7063faeab6d41c1 100644
(file)
--- a/
lib/python/Components/GUIComponent.py
+++ b/
lib/python/Components/GUIComponent.py
@@
-1,6
+1,6
@@
import skin
import skin
-from enigma import ePoint
+from enigma import ePoint
, eSize
class GUIComponent(object):
""" GUI component """
class GUIComponent(object):
""" GUI component """
@@
-11,6
+11,7
@@
class GUIComponent(object):
self.__visible = 0
self.visible = 1
self.skinAttributes = None
self.__visible = 0
self.visible = 1
self.skinAttributes = None
+ self.deprecationInfo = None
def execBegin(self):
pass
def execBegin(self):
pass
@@
-28,14
+29,14
@@
class GUIComponent(object):
self.__dict__.clear()
# this works only with normal widgets - if you don't have self.instance, override this.
self.__dict__.clear()
# this works only with normal widgets - if you don't have self.instance, override this.
- def applySkin(self, desktop):
+ def applySkin(self, desktop
, parent
):
if not self.visible:
self.instance.hide()
if self.skinAttributes is None:
return False
if not self.visible:
self.instance.hide()
if self.skinAttributes is None:
return False
- skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
+ skin.applyAllAttributes(self.instance, desktop, self.skinAttributes
, parent.scale
)
return True
def move(self, x, y = None):
return True
def move(self, x, y = None):
@@
-44,10
+45,15
@@
class GUIComponent(object):
self.instance.move(x)
else:
self.instance.move(ePoint(int(x), int(y)))
self.instance.move(x)
else:
self.instance.move(ePoint(int(x), int(y)))
-
- def resize(self, size):
- self.instance.resize(size)
-
+
+ def resize(self, x, y = None):
+ self.width = x
+ self.height = y
+ if y is None:
+ self.instance.resize(x)
+ else:
+ self.instance.resize(eSize(int(x), int(y)))
+
def setZPosition(self, z):
self.instance.setZPosition(z)
def setZPosition(self, z):
self.instance.setZPosition(z)
@@
-86,6
+92,12
@@
class GUIComponent(object):
def getPosition(self):
p = self.instance.position()
return (p.x(), p.y())
def getPosition(self):
p = self.instance.position()
return (p.x(), p.y())
+
+ def getWidth(self):
+ return self.width
+
+ def getHeight(self):
+ return self.height
position = property(getPosition, setPosition)
position = property(getPosition, setPosition)