def exportProfile(self, profile, filename=None):
        """
        Exports this toolbar to the given filename.
        
        :param      profile  | <XViewProfile>
                    filename | <str> || None
        """
        if not filename:
            filename = QFileDialog.getSaveFileName(self,
                                                   'Export Profile',
                                                   '',
                                                   'XML Files (*.xml)')
            if type(filename) == tuple:
                filename = nativestring(filename[0])
        
        if not filename:
            return False
        
        profile.save(filename)
        return True