Creates the widget with the inputed parent based on the given xml type.
        
        :param      viewWidget  | <XViewWidget>
                    parent      | <QWidget>
                    xwidget     | <xml.etree.Element>
        
        :return     <QWidget>

def restoreWidget(self, viewWidget, parent, xwidget):
        """
        Creates the widget with the inputed parent based on the given xml type.
        
        :param      viewWidget  | <XViewWidget>
                    parent      | <QWidget>
                    xwidget     | <xml.etree.Element>
        
        :return     <QWidget>
        """
        # create a new splitter
        if xwidget.tag == 'split':
            widget = XSplitter(parent)
            
            if ( xwidget.get('orient') == 'horizontal' ):
                widget.setOrientation( Qt.Horizontal )
            else:
                widget.setOrientation( Qt.Vertical )
            
            # restore the children
            for xchild in xwidget:
                widget.addWidget( self.restoreWidget( viewWidget,
                                                      widget,
                                                      xchild ) )
                                                     
            widget.restoreState(QByteArray.fromBase64(xwidget.get('state')))
            
            return widget
        
        # create a new panel
        elif xwidget.tag == 'panel':
            widget = XViewPanel(parent, viewWidget.isLocked())
            hide = xwidget.get('hideTabs', 'True') == 'True'
            widget.setHideTabsWhenLocked(hide)
            widget.blockSignals(True)
            
            # restore the children
            for xchild in xwidget:
                child = self.restoreWidget( viewWidget,
                                            widget,
                                            xchild )
                
                if ( not child ):
                    err = 'Missing View Type: %s' % xchild.get('type')
                    logger.warning(err)
                    continue
                
                widget.addTab(child, child.windowTitle())
            
            widget.setCurrentIndex(int(xwidget.get('current', 0)))
            widget.blockSignals(False)
            widget.markCurrentChanged()
            
            view = widget.currentWidget()
            if isinstance(view, XView):
                view.initialize(force=True)
            
            return widget
        
        # create a new view
        else:
            viewType = viewWidget.findViewType(xwidget.get('type'))
            if not viewType:
                return None
            
            widget = viewType.createInstance(parent, viewWidget)
            widget.setObjectName(xwidget.get('name'))
            widget.restoreXml(xwidget)
            widget.setViewingGroup(int(xwidget.get('group', 0)))
            
            title = xwidget.get('title')
            if title:
                widget.setWindowTitle(title)
            
            # set the current view for this instance
            if xwidget.get('current', 'False') == 'True':
                widget.setCurrent()
            
            return widget