[kde-edu]: KNewStuff HOWTO?

annemarie.mahfouf at free.fr annemarie.mahfouf at free.fr
Thu Apr 15 14:15:24 CEST 2004


Quoting Jason Harris <kstars at 30doradus.org>:

> Hello,
> 
> I see that KNewStuff is finally part of kdelibs, and I am eager to start
> using 
> it in KStars.  Is there a tutorial or HOWTO for how to use this class?  I 
> have seen the API docs for it, but it isn't clear how to format data files 
> for use with KNewStuff.  Is the meta-data for the file (author, version, 
> description) embedded in the file somehow, or entered separately?  How do I 
> send files to the server initially?  Do I use the KNewStuff::upload() 
> function for that?  Do I have to register a "kstars/data" type somehow first?
> 
> With whom do I register?  
> 
> Are these questions answered somewhere already?
> 
> thanks,
> Jason
Hi,

Here is Josef's tutorial:
http://mindx.josefspillner.de/kde/hotstuff/
I'll write something to explain the points that I myself found difficult and
I'll put in on edu.kde.org. I'll send the link as soon as it's done (probably
this evening)
You can check out KLettres from HEAD which is KNewStuff-ready. 

The newstuff.org website is down and a replacement is in process. I don't use it
myself.
What I do myself is that I put my data on edu.kde.org/khangman/downloads (for
KHangMan)
There I put the providers.xml and knewstuff.xml files plus the data (tarballs).
The upload function is not usable yet.
Author, version, description are in the knewstuff.xml.

In the code, I add a class KHNewStuff which derives from KNewStuff. An instance
of KHNewStuff is called when the File->Get New Language action is clicked.
This KHNewStuff class will install my data (for me it untars the files and put
them in ~/.kde/share/apps/khangman/data)
Then it refreshes the Language menu so the user can immediately use the data. 

I'll write this in more details and I'll be available to answer any questions.
Josef also will help if I am unable to do so. He lives in Brazil and has a slow
connection but anytime I sent him a mail he kindly answered :)

Cheers,

annma





More information about the kde-edu mailing list