+void ModelPropertyMapper::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) {
+ QItemSelectionRange changedRange(topLeft, bottomRight);
+ foreach(Mapping mapping, _mappings) {
+ QModelIndex index = _selectionModel->currentIndex().sibling(_selectionModel->currentIndex().row(), mapping.column);
+ if(changedRange.contains(index)) {
+ mapping.target->setProperty(mapping.property, index.data(mapping.role));
+ }
+ }
+}