comparison data/model/ImageModel.h @ 1742:52705a328b34 by-id

Rejig ById so as to put everything in a single pool, so that at the core you can go from numeric id (untyped) to anything the object can be dynamic_cast to. Useful for building other abstractions like PlayParameter-type registrations that don't know about e.g. Models. Probably some more tweaking needed. Also add tests
author Chris Cannam
date Fri, 28 Jun 2019 17:36:30 +0100
parents 9d82b164f264
children 6d09d68165a4
comparison
equal deleted inserted replaced
1741:9d82b164f264 1742:52705a328b34
229 case 1: e1 = e0.withFrame(value.toInt()); break; 229 case 1: e1 = e0.withFrame(value.toInt()); break;
230 case 2: e1 = e0.withURI(value.toString()); break; 230 case 2: e1 = e0.withURI(value.toString()); break;
231 case 3: e1 = e0.withLabel(value.toString()); break; 231 case 3: e1 = e0.withLabel(value.toString()); break;
232 } 232 }
233 233
234 auto command = new ChangeEventsCommand<Model>(getId(), tr("Edit Data")); 234 auto command = new ChangeEventsCommand(getId().untyped, tr("Edit Data"));
235 command->remove(e0); 235 command->remove(e0);
236 command->add(e1); 236 command->add(e1);
237 return command->finish(); 237 return command->finish();
238 } 238 }
239 239