KMediaPlayer Interface

David Faure david at mandrakesoft.com
Mon Apr 8 13:39:56 BST 2002


On Saturday 06 April 2002 19:06, Neil Stevens wrote:
> I have one more question: What should I put in the desktop file for 
> KMediaPlayer/Engine?  Should I mark that it's derived from ReadOnlyPart or 
> Player even though it won't be putting out a widget?

IMHO: define a new servicetype, call it MediaPlayer, add it to the ServiceTypes line
of the .desktop file for your part, and add to the factory code
of your part:
 if className == "MediaPlayer"
    create a mediaplayer with no GUI (e.g. ctor option)
 else if className == "KParts/ReadOnlyPart" (is it '::'?)
    create a mediaplayer with a GUI
(see e.g. khtml_factory.cpp, KHTMLFactory::createPartObject)

In any case, don't let Konqueror, which asks for a KParts/ReadOnlyPart,
get no widget in return.

-- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today






More information about the kde-core-devel mailing list