'return the screen geometry of the viewbox'

def screenGeometry(self):

    v = self.getViewWidget()
    if (v is None):
        return None
    b = self.sceneBoundingRect()
    wr = v.mapFromScene(b).boundingRect()
    pos = v.mapToGlobal(v.pos())
    wr.adjust(pos.x(), pos.y(), pos.x(), pos.y())
    return wr
