Developing my first plamoid Part 2


OK, so it’s been a year since I last blogged about working on this program.  I tried working on the data engine in August and then got stuck right around the time I started my first semester of grad school so I had to drop it, even though it got stuck in my head and I was thinking about it for weeks until the light bulb went off.  I wrote my idea and just had the idea to work on it recently.  I have to say that, overall, QML is pretty awesome for making a quick GUI.  I’ve always struggled with GUI code, but with QML I was able to put together a quick GUI in about 20 minutes.  Now, don’t judge QML too harshly because my plasmoid looks ugly.  It looks ugly because I just put together the minimum GUI to implement grabbing data from my Data Engine.  Once I get everything working right, I’ll fix it up.  After all, GUIs are really so easy in QML that it can be the icing on the cake in the end.

flickr views plasmoid
flickr views plasmoid – my first ever original plasmoid!

Man, when I got my plasmoid to this point I was soooo happy!  Unfortunately, I wasted countless hours trying to figure out why my plasmoid couldn’t talk to my data engine and it turned out it was because I was using QT Creator (an AWESOME IDE for QML development) and for some reason using that instead of the plasmoidviewer commandline argument to launch my plasmoid means that it can’t talk to engines.  It was so frustrating when I found out that was the reason for the issues.  I had literally spent hours trying to figure that out.  I’d say, use QT Creator to make your GUI and then maybe create some fake data you can read out of a file to make sure the GUI’s working.  Then move to plasmoidviwer for your final development.

One other annoyance was that in the XmlListView I had to change had to change source: to xml: – another hour or so wasted from not quite understanding the documentation well enough.  Basically it can only read xml from a data engine if the type is xml.  If you use source, it only works if it’s a web page or a file on your computer.  That’s kinda non-intuitive and wasted at least another hour of pointless debugging.

But I’m really happy because now I’m at the point where I’ve essentially ironed out enough of how QML and data engines work in order to finalize the look/feel of the plasmoid.  Then, once that’s done I’ll need to get help from the IRC or the mailing list to iron out the final bugs.  And after that I’ll post my code because there’s a real dearth of example code out there because QML and data engines are so new.  And it’s not always clear from the code documentation exactly how things could fit together.  Speaking of help, sreich on the plasma IRC room and Sebastian Kugler on the mailing list.  They were very patient with me as I worked otu what was going wrong with my plasmoid.  sreich even used his homework procrastination time to help me out.

Hopefully I’ll be able to have another post really soon where things are working at 80-90% of where I want them.  It all depends on how much time I can find to work on the code.

, ,