class_docstr: Extends QProgressDialog:
  
    * Adds context management so the dialog may be used in `with` statements
    * Allows nesting multiple progress dialogs
  
  Example::
  
      with ProgressDialog("Processing..", minVal, maxVal) as dlg:
          # do stuff
          dlg.setValue(i)   ## could also use dlg += 1
          if dlg.wasCanceled():
              raise Exception("Processing canceled by user")
code: def __enter__(self):
      if self.disabled:
          return self
      if self.busyCursor:
          QtWidgets.QApplication.setOverrideCursor(
              QtGui.QCursor(QtCore.Qt.CursorShape.WaitCursor)
          )
  
      if self.nested and len(ProgressDialog.allDialogs) > 0:
          topDialog = ProgressDialog.allDialogs[0]
          topDialog._addSubDialog(self)
          self._topDialog = topDialog
          topDialog.canceled.connect(self.cancel)
  
      ProgressDialog.allDialogs.append(self)
  
      return self
  
imports: from time import perf_counter
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 2 for calling the ProgressDialog obj's underlying member method code with example usage: obj.__enter__() and returns: self, self