def exportProfile(self, filename=''):
        """
        Exports the current profile to a file.
        
        :param      filename | <str>
        """
        if not (filename and isinstance(filename, basestring)):
            filename = QtGui.QFileDialog.getSaveFileName(self,
                                                         'Export Layout as...',
                                                         QtCore.QDir.currentPath(),
                                                         'XView (*.xview)')
            
            if type(filename) == tuple:
                filename = filename[0]
        
        filename = nativestring(filename)
        if not filename:
            return
        
        if not filename.endswith('.xview'):
            filename += '.xview'
        
        profile = self.saveProfile()
        profile.save(filename)