<p><br>
Op 15 apr. 2012 02:20 schreef "Micha³ 'rysiek' Wo¼niak" <<a href="mailto:rysiek@fwioo.pl">rysiek@fwioo.pl</a>> het volgende:<br>
><br>
> Hello,<br>
><br>
> I have already written to this list and some of you might know me from<br>
> other channels (like IRC or StatusNet). Either way - hi and hello!<br>
><br>
> Also, I hope I am writing in the right place. If not, do tell and<br>
> point me in the right direction.<br>
><br>
> Now, to the point!<br>
><br>
> I am writing a Todo/tasks plasmoid, inspired by TaskTimer. Here's my<br>
> braindump about it:<br>
> <a href="http://rys.io/en/71">http://rys.io/en/71</a><br>
><br>
> One thing I am missing at this moment, and am missing dearly, is a way<br>
> to save the state of the tasks (text, elapsed time, etc) so that it<br>
> gets restored upon plasmoid "restart" (not sure if this is the right<br>
> word). This can be easily done with a simple JSON text file, or even<br>
> an INI file for that matter.<br>
><br>
> So basically what I need is either a config store or a way to<br>
> read/write pure text files.<br>
><br>
> I tried using the KConfig XT, but surprisingly the values did not get<br>
> saved (yes, main.xml file is created and contains the right stuff);<br>
> this happened even with the kdeexamples configuration example.<br>
><br>
> Besides, I am wondering if the rigid structure of KConfig XT files is<br>
> a good bet here; I am adding/removing todo items in the plasmoid, and<br>
> as far as I understand config entries are defined beforehand - so I<br>
> would have to store key-value pairs (in JSON?) within the config XML<br>
> file. Doesn't seem "right".<br>
><br>
> So, three questions:<br>
>  - am I missing something about the KConfig XT approach?<br>
>  - maybe there is a better config API for QML/JS plasmoids?<br>
>  - is there a way to read/write files from a QML/JS plasmoid?<br>
><br>
> I am running KDE SC 4.7.4 in Debian Sid.<br>
><br>
> --<br>
> Pozdrawiam<br>
> Micha³ "rysiek" Wo¼niak<br>
><br>
> Fundacja Wolnego i Otwartego Oprogramowania<br>
><br>
> _______________________________________________<br>
> Plasma-devel mailing list<br>
> <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
> <a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
></p>
<p>Hi, </p>
<p>I can't really answer your questions since I don't know the answer. However, I do would like to point you to perhaps some interesting ways to store your data.</p>
<p>Once you start using Qt5 you can use "qtjsondb" to store your data.</p>
<p>The option (and best option) you have right now is to use akanodi with the KCal class <a href="http://api.kde.org/4.x-api/kdepimlibs-apidocs/kcal/html/index.html">http://api.kde.org/4.x-api/kdepimlibs-apidocs/kcal/html/index.html</a> . It implements the I calendar specification and also has support for todo items. Using the KCal classes will also make them show in any app that uses KCal.</p>

<p>If you're making a qml only plasmoid then KCal is not possible since it doesn't have a qml binding (as far as I know...).</p>
<p>Just letting you know :)<br></p>
<p>Mark</p>