Files, config, and welcome (again)
markg85 at gmail.com
Sun Apr 15 16:22:52 UTC 2012
Op 15 apr. 2012 02:20 schreef "Michał 'rysiek' Woźniak" <rysiek at fwioo.pl>
> I have already written to this list and some of you might know me from
> other channels (like IRC or StatusNet). Either way - hi and hello!
> Also, I hope I am writing in the right place. If not, do tell and
> point me in the right direction.
> Now, to the point!
> I am writing a Todo/tasks plasmoid, inspired by TaskTimer. Here's my
> braindump about it:
> One thing I am missing at this moment, and am missing dearly, is a way
> to save the state of the tasks (text, elapsed time, etc) so that it
> gets restored upon plasmoid "restart" (not sure if this is the right
> word). This can be easily done with a simple JSON text file, or even
> an INI file for that matter.
> So basically what I need is either a config store or a way to
> read/write pure text files.
> I tried using the KConfig XT, but surprisingly the values did not get
> saved (yes, main.xml file is created and contains the right stuff);
> this happened even with the kdeexamples configuration example.
> Besides, I am wondering if the rigid structure of KConfig XT files is
> a good bet here; I am adding/removing todo items in the plasmoid, and
> as far as I understand config entries are defined beforehand - so I
> would have to store key-value pairs (in JSON?) within the config XML
> file. Doesn't seem "right".
> So, three questions:
> - am I missing something about the KConfig XT approach?
> - maybe there is a better config API for QML/JS plasmoids?
> - is there a way to read/write files from a QML/JS plasmoid?
> I am running KDE SC 4.7.4 in Debian Sid.
> Michał "rysiek" Woźniak
> Fundacja Wolnego i Otwartego Oprogramowania
> Plasma-devel mailing list
> Plasma-devel at kde.org
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.
Once you start using Qt5 you can use "qtjsondb" to store your data.
The option (and best option) you have right now is to use akanodi with the
http://api.kde.org/4.x-api/kdepimlibs-apidocs/kcal/html/index.html . 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
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...).
Just letting you know :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Plasma-devel