(self, point)
return float(height)
Return the cluster height at the point in widget local coordinates.
Return the cluster height at the point in widget local coordinates.
Return the cluster height at the point in widget local coordinates .
def heightAt(self, point):
        # type: (QPointF) -> float
        """
        Return the cluster height at the point in widget local coordinates.
        """
        if not self._root:
            return 0
        tinv, ok = self._transform.inverted()
        if not ok:
            return 0
        tpoint = tinv.map(point)
        if self.orientation in [self.Left, self.Right]:
            height = tpoint.x()
        else:
            height = tpoint.y()
        # Undo geometry prescaling
        base = self._root.value.height
        scale = self._height_scale_factor()
        # Use better better precision then double provides.
        Fr = fractions.Fraction
        if scale > 0:
            height = Fr(height) / Fr(scale)
        else:
            height = 0
        if self.orientation in [self.Left, self.Bottom]:
            height = Fr(base) - Fr(height)
        return float(height)
def heightAt ( self , point ) : # type: (QPointF) -> float if not self . _root : return 0 tinv , ok = self . _transform . inverted ( ) if not ok : return 0 tpoint = tinv . map ( point ) if self . orientation in [ self . Left , self . Right ] : height = tpoint . x ( ) else : height = tpoint . y ( ) # Undo geometry prescaling base = self . _root . value . height scale = self . _height_scale_factor ( ) # Use better better precision then double provides. Fr = fractions . Fraction if scale > 0 : height = Fr ( height ) / Fr ( scale ) else : height = 0 if self . orientation in [ self . Left , self . Bottom ] : height = Fr ( base ) - Fr ( height ) return float ( height )