code: def exportProfile(self, profile, filename=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
docs: Exports this toolbar to the given filename.
          
          :param      profile  | <XViewProfile>
                      filename | <str> || None