Restores the dataset settings to the inputed data set for the given key.
    
    :param      settings | <QSettings>
                key      | <str>
                dataSet  | <projex.dataset.DataSet>

def restoreDataSet( settings, key, dataSet ):
    """
    Restores the dataset settings to the inputed data set for the given key.
    
    :param      settings | <QSettings>
                key      | <str>
                dataSet  | <projex.dataset.DataSet>
    """
    for datakey in dataSet.keys():
        vtype = unwrapVariant(settings.value('%s/%s/type' % (key, datakey)))
        value = unwrapVariant(settings.value('%s/%s/value' % (key, datakey)))
        
        if ( vtype is None ):
            continue
        
        vtype = nativestring(vtype)
        
        if ( vtype in _dataValueTypes ):
            datavalue = _dataValueTypes[vtype][1](value)
        else:
            logger.warning('Could not restore %s' % vtype)
            continue
        
        if ( type(datavalue).__name__ == 'QString' ):
            datavalue = unicode(datavalue)
        
        dataSet.setValue(datakey, datavalue)