docs: def save(self):
          """
          Saves the snapshot based on the current region.
          """
          # close down the snapshot widget
          if self.hideWindow():
              self.hideWindow().hide()
          
          self.hide()
          QApplication.processEvents()
          time.sleep(1)
          
          # create the pixmap to save
          wid = QApplication.desktop().winId()
          
          if not self._region.isNull():
              x = self._region.x()
              y = self._region.y()
              w = self._region.width()
              h = self._region.height()
          else:
              x = self.x()
              y = self.y()
              w = self.width()
              h = self.height()
          
          pixmap = QPixmap.grabWindow(wid, x, y, w, h)
          pixmap.save(self.filepath())
          
          self.close()
          self.deleteLater()
          if self.hideWindow():
              self.hideWindow().show()