code: def rectangle(self):
          
          if self.start_point is None or self.end_point is None:
              return QgsRectangle()
          elif self.start_point.x() == self.end_point.x() or \
                  self.start_point.y() == self.end_point.y():
              return QgsRectangle()
  
          return QgsRectangle(self.start_point, self.end_point)
docs: Accessor for the rectangle.
  
          :return: A rectangle showing the designed extent.
          :rtype: QgsRectangle