21 : QSortFilterProxyModel( parent )
22 , mFilters( AllTypes )
25 setSourceModel( mModel );
35 bool QgsFieldProxyModel::isReadOnly(
const QModelIndex &index )
const
38 if ( originVariant.isNull() )
83 QModelIndex index = sourceModel()->index( source_row, 0, source_parent );
85 if ( mFilters.testFlag(
HideReadOnly ) && isReadOnly( index ) )
94 if ( typeVar.isNull() )
98 QVariant::Type type = ( QVariant::Type )typeVar.toInt( &ok );
102 if ( ( mFilters.testFlag(
String ) && type == QVariant::String ) ||
103 ( mFilters.testFlag(
LongLong ) && type == QVariant::LongLong ) ||
104 ( mFilters.testFlag(
Int ) && type == QVariant::Int ) ||
105 ( mFilters.testFlag(
Double ) && type == QVariant::Double ) ||
106 ( mFilters.testFlag(
Date ) && type == QVariant::Date ) ||
107 ( mFilters.testFlag(
Date ) && type == QVariant::DateTime ) ||
108 ( mFilters.testFlag(
DateTime ) && type == QVariant::DateTime ) ||
109 ( mFilters.testFlag(
Time ) && type == QVariant::Time ) )
133 return leftId < rightId;