Applies the profile to the inputed view widget.
        
        :param      viewWidget | <XViewWidget>

def restore(self, viewWidget):
        """
        Applies the profile to the inputed view widget.
        
        :param      viewWidget | <XViewWidget>
        """
        if self._xmlElement is None:
            return False
        
        # disable all the information
        viewWidget.blockSignals(True)
        viewWidget.setUpdatesEnabled(False)
        viewWidget.setCursor(Qt.WaitCursor)
        
        viewWidget.reset(force=True)
        
        # make sure all the cleanup happens (short of GUI updates)
        QApplication.sendPostedEvents()
        
        # restore the widget data
        try:
            xml_elem = self._xmlElement[0]
        except IndexError:
            viewWidget.unsetCursor()
            viewWidget.blockSignals(False)
            viewWidget.setUpdatesEnabled(True)
            return False
        
        widget = self.restoreWidget(viewWidget,
                                    viewWidget,
                                    xml_elem)
                                    
        viewWidget.setWidget(widget)
        viewWidget.setLocked(self._xmlElement.get('locked') == 'True')
        
        # enable the infromation
        viewWidget.unsetCursor()
        viewWidget.blockSignals(False)
        viewWidget.setUpdatesEnabled(True)
        return True