Next: , Previous: MarSystemQtWrapper, Up: Writing Qt4 applications


9.3.3 Passing controls to a MarSystemQtWrapper

Since your MarSystem is wrapped up, you cannot access controls using the normal methods. Instead, you must use a MarControlPtr:

     MarControlPtr filenamePtr;
     MarControlPtr positionPtr;
     
     filenamePtr = mrsWrapper->getctrl("SoundFileSource/src/mrs_string/filename");
     positionPtr = mrsWrapper->getctrl("SoundFileSource/src/mrs_natural/pos");
     
     mrsWrapper->updctrl(filenamePtr,fileName);
     ... wait a bit...
     newPos = (mrs_natural) positionPtr->to<mrs_natural>();