code: def scale_view(self, x, y):
          
          d = self.declaration
          factor = self.widget.transform().scale(x, y).mapRect(
              QRectF(0, 0, 1, 1)).width()
          if (d.min_zoom > factor > d.max_zoom):
              return
          self.widget.scale(x, y)
          return factor
docs: Scale the zoom but keep in in the min and max zoom bounds.