def METHOD_NAME(self, export, opts=None):
    """
    Call setExportMode(export, opts) on all items that will 
    be painted during the export. This informs the item
    that it is about to be painted for export, allowing it to 
    alter its appearance temporarily
    *export*  - bool; must be True before exporting and False afterward
    *opts*    - dict; common parameters are 'antialias' and 'background'
    """
    if opts is None:
        opts = {}
    for item in self.getPaintItems():
        if hasattr(item, 'setExportMode'):
            item.METHOD_NAME(export, opts)