Sets the view types that can be used for this widget.  If the optional \
        window member is supplied, then the registerToWindow method will be \
        called for each view.
        
        :param      viewTypes | [<sublcass of XView>, ..]
                    window    | <QMainWindow> || <QDialog> || None

def setViewTypes(self, viewTypes, window=None):
        """
        Sets the view types that can be used for this widget.  If the optional \
        window member is supplied, then the registerToWindow method will be \
        called for each view.
        
        :param      viewTypes | [<sublcass of XView>, ..]
                    window    | <QMainWindow> || <QDialog> || None
        """
        if window:
            for viewType in self._viewTypes:
                viewType.unregisterFromWindow(window)
        
        self._viewTypes = viewTypes[:]
        self._panelMenu = None
        self._pluginMenu = None
        
        if window:
            for viewType in viewTypes:
                viewType.registerToWindow(window)