docs: def restart(self):
          """
          Restarts the whole wizard from the beginning.
          """
          # hide all of the pages
          for page in self._pages.values():
              page.hide()
  
          pageId = self.startId()
          try:
              first_page = self._pages[pageId]
          except KeyError:
              return
  
          self._currentId = pageId
          self._navigation = [pageId]
  
          page_size = self.pageSize()
          x = (self.width() - page_size.width()) / 2
          y = (self.height() - page_size.height()) / 2
  
          first_page.move(self.width()+first_page.width(), y)
          first_page.show()
  
          # animate the current page out
          anim_out = QtCore.QPropertyAnimation(self)
          anim_out.setTargetObject(first_page)
          anim_out.setPropertyName('pos')
          anim_out.setStartValue(first_page.pos())
          anim_out.setEndValue(QtCore.QPoint(x, y))
          anim_out.setDuration(self.animationSpeed())
          anim_out.setEasingCurve(QtCore.QEasingCurve.Linear)
          anim_out.finished.connect(anim_out.deleteLater)
  
          # update the button states
          self._buttons[self.WizardButton.BackButton].setVisible(False)
          self._buttons[self.WizardButton.NextButton].setVisible(self.canGoForward())
          self._buttons[self.WizardButton.CommitButton].setVisible(first_page.isCommitPage())
          self._buttons[self.WizardButton.FinishButton].setVisible(first_page.isFinalPage())
          self.adjustSize()
  
          first_page.initializePage()
          self.currentIdChanged.emit(pageId)
          anim_out.start()