Sure, so what this does is take the name of some property which is (presumably) a nominal attribute, and maps every value of that property to some integer (integers ranging from 0:(nclasses-1)). So the first parameter is the target property, and the other two optional parameters define the mapping, QString->int is the property value to int mapping (I'd actually make this QVariant->int if that was feasible, but although QVariant defines ==, it defines neither < or a hash function), and int->QVariant is for looking up the original qvariant from the integer labels.