![]() Registered Member ![]()
|
Hello folks,
I am new to programming QML Plasmoids and Plasmoids in general ![]() Now as it comes to "plasma", I have two different DataSources, the "live" and the "results" source. As keys I chose the kind of sports, like "football", "tennis" and so on. So the value consists of a list of different events, like special tennis tournaments or right now the football EM. Here is a screenshot from `plasmaengineexplorer` as it shows up right now: ![]() So my problem is quite obvious: How can I use the nice structured data within a QML plasmoid? I didn't found something like a "JSONModel".. so how I can "declare" that my values consists of other structured data? So my questions are: - is my approach maybe wrong? - is there a (easy) way to deal with such data? - should I reorganize my data? And what could be a better way to provide all the informations? If there is no good way, I would just stay with Python and write a plasmoid within it. In Python it is quite easy to deal with such data...
Last edited by chausknecht on Sun Jun 24, 2012 7:46 pm, edited 1 time in total.
|
![]() Registered Member ![]()
|
Hm... not so much users around here? Or are my questions not understandable?
|
![]() Registered Member ![]()
|
Ok, I started doing the Plasmoid in Python right now. Although it was quite hard to figure out all stuff, because imho there is a lack of *good* and *profound* documentation, I just got a result:
![]() Quite satisfying to see a visual result of all work ![]() Now I can start polish some stuff and add some more features... perhaps someday I can release my small piece of "plasma" to the wild ![]() But my questions above are still "alive"! I definitly want to learn more about QML; so if anybody can tell me something about, I would appreciate that. |
![]() Administrator ![]()
|
In my experience, questions regarding QML and Plasma Data Engines / Applets should generally be made to the plasma-devel@kde.org mailing list.
In any case, you should look at QJSON to handle JSON data.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks for your reply. `QJson` seems to be interesting
![]() Hm... I am no friend of mailinglists. In this special case perhaps I will give it a try. |
![]() Registered Member ![]()
|
Ok, I managed to improve my plasmoid; it is quite stable right now and I cleand much Code and structure smells. Right time for that, as Wimbledon starts today
![]() ![]() But there is at least one functionality left: After every Update the TabBars are generated new and therefor the `currentIndex` is resettet. So I have to "scroll" back to the event I wanna see: ![]() It seems I have to invest some more brain power to solve this problem ![]() |
![]() Registered Member ![]()
|
I am having problems too with DataSources and I am right now stuck because I can't find a good documentation or somebody who could help. Could you please post the source code of your plasmoid?
|
![]() Registered Member ![]()
|
Yes I will - but I am going to holidays right now for a week. So as I have to clean up the code further more, it will take some time.
|
![]() Registered Member ![]()
|
I think I would better not publish my plasmoid and dataengine! I know that sounds sad, but I do not wanna risk to break legal terms of the data source. As I scrape results from a website, which explicitly enables users to copy their contents in an electronic form - nothing else I do by fetching the website - I am not shure whether it is legal to spread a software, which does that. So as long as I am not shure whether it is legal, I just use it of my own.
It works quite well - shows me Olympic results without adding / changing something to the dataengine source ![]() |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient