class_docstr: Abstract class used for exporting graphics to file / printer / whatever.
class_docstr_tok: ["Abstract","class","used","for","exporting","graphics","to","file","\/","printer","\/","whatever","."]
docstr: Return a list of all items that should be painted in the correct order.
docstr_tok: ["Return","a","list","of","all","items","that","should","be","painted","in","the","correct","order","."]
code: def getPaintItems(self, root=None):
      """Return a list of all items that should be painted in the correct order."""
      if root is None:
          root = self.item
      preItems = []
      postItems = []
      if isinstance(root, QtWidgets.QGraphicsScene):
          childs = [i for i in root.items() if i.parentItem() is None]
          rootItem = []
      else:
          childs = root.childItems()
          rootItem = [root]
      childs.sort(key=lambda a: a.zValue())
      while len(childs) > 0:
          ch = childs.pop(0)
          tree = self.getPaintItems(ch)
          if (
              ch.flags() & ch.GraphicsItemFlag.ItemStacksBehindParent
          ) or (
              ch.zValue() < 0
              and (
                  ch.flags()
                  & ch.GraphicsItemFlag.ItemNegativeZStacksBehindParent
              )
          ):
              preItems.extend(tree)
          else:
              postItems.extend(tree)
  
      return preItems + rootItem + postItems
  
file_path: pyqtgraph/pyqtgraph/exporters/Exporter.py
imports: import os
  import re
  from ..GraphicsScene import GraphicsScene
  from ..Qt import QtCore, QtWidgets
  from ..widgets.FileDialog import FileDialog
label_desc: Use image node_id 11 for calling the Exporter obj's underlying member method code with example usage: obj.getPaintItems(root) and returns: unknown