From: Luis G. <lui...@us...> - 2010-11-13 16:28:52
|
On Sat, Nov 13, 2010 at 3:49 PM, Orcan Ogetbil <oge...@gm...> wrote: > Well, there is an "Add Synth" submenu there. The contents of this > submenu is not fixed and is calculated (e.g. it looks for what DSSI > synths you have installed in your system etc.) on the fly. > > Any other ideas how to handle this? > At first glance that seems a candidate for a QSignalMapper. Create a signal mapper. Create as many actions as synths. Since it seems SynthI takes a string to create a synth, you would register (setMapping) every action with the mapper using that string, and connect every trigger signal to its map() slot. Then create an addDSSISynth(QString) slot in Song and connect the mapper mapped(QString) signal to it. That's how I would first think of going about it, but I don't know the application in detail and I might be missing something. Luis |