docs: def recordWidget(xparent, widget):
          """
          Records the inputed widget to the parent profile.
          
          :param      xparent | <xml.etree.Element>
                      widget  | <QWidget>
          """
          # record a splitter
          if isinstance(widget, XSplitter):
              xwidget = ElementTree.SubElement(xparent, 'split')
              if ( widget.orientation() == Qt.Horizontal ):
                  xwidget.set('orient', 'horizontal')
              else:
                  xwidget.set('orient', 'vertical')
              
              xwidget.set('state', nativestring(widget.saveState().toBase64()))
              
              # record sub-widgets
              for i in range(widget.count()):
                  XViewProfile.recordWidget(xwidget, widget.widget(i))
          
          # record a view panel
          elif isinstance(widget, XViewPanel):
              xwidget = ElementTree.SubElement(xparent, 'panel')
              xwidget.set('current', nativestring(widget.currentIndex()))
              xwidget.set('hideTabs', nativestring(widget.hideTabsWhenLocked()))
              for i in range(widget.count()):
                  XViewProfile.recordWidget(xwidget, widget.widget(i))
          
          # record a view
          elif widget is not None:
              xwidget = ElementTree.SubElement(xparent, 'view')
              xwidget.set('name',  nativestring(widget.objectName()))
              xwidget.set('title', nativestring(widget.windowTitle()))
              xwidget.set('type',  nativestring(widget.viewTypeName()))
              xwidget.set('group', nativestring(widget.viewingGroup()))
              
              # store that this was the current widget
              if widget.isCurrent():
                  xwidget.set('current', 'True')
              
              widget.saveXml(xwidget)