Below you will find pages that utilize the taxonomy term “Plasmoid”
Developing My First Plasmoid: The QML Code
Back in February I posted the code to the data engine I developed for my plastmoid. At the time I’d wanted to clean up my plasmoid before posting it on here, however, I’ve become stuck on a key feature so I was hoping that maybe by posting the code I could get some help. (As well as provide an example to others)
First of all, plasmoids need a certain structure to the folders. Here’s what mine looks like:
. ??? contents ? ??? ui ? ??? Button.qml ? ??? Button.qml~ ? ??? content ? ? ??? ItemDelegate.qml ? ? ??? ItemDelegate.qml~ ? ??? flickrhelpers ? ? ??? addtogroup.py ? ? ??? addtogroup.py~ ? ? ??? removefromgroup.py ? ? ??? removefromgroup.py~ ? ??? flickrviews.py~ ? ??? flickrviews.qml ? ??? flickrviews.qml~ ? ??? test.qml~ ??? metadata.desktop ??? metadata.desktop~
Developing my first plasmoid: The Data Engine (in python)
I figured it’d be neat to show you how my plasmoid works so you could use it when developing your own plasmoids. Here’s the main.py of my data engine. The indentation is off, in case you try to copy and past this in.
Here are the imports:
from PyQt4.QtCore import * from PyKDE4.kdecore import * from PyKDE4 import plasmascript #for flickr import views
Those are pretty standard. The last one is the part of my engine that interacts with flickr. Right now I have some work to do to get that presentable, but all you need to know is that it outputs XML to this main part of the data engine.
Developing my first plasmoid part 3
I did it! I have created my first ever useful GUI program. After all these years of thinking that all the useful GUIs had already been invented - I found an itch to scratch. And here’s how the final, working version looks:
[caption id=“attachment_5357” align=“aligncenter” width=“310” caption=“flickr views plasmoid completed!”] [/caption]
And so there it is! I was actually surprised that this last little bit of the program wasn’t as hard to finish up as I thought it would be. So, as currently implemented, when the plasmoid loads up it makes the data engine fill itself. Once that’s complete you can click on the buttons along the top to load up all the photos from that group that are ready to be promoted to the next group. Clicking on a particular photo loads up the small thumbnail. View on flickr allows you to jump to the website in case you want or need to do that. Originally I implemented it so that if the next part was hard, I’d at least have the functionality of the command line version of this software. Then came the new part that happens to be easier in a GUI than on the commandline. You can add the photo to the next group and remove it from the current one. The reason I did it that way was so that if the photo couldn’t be added to the next group, it wouldn’t be removed from the current one. I tested it first with a fake group and then the real thing and it works fine. Before I post the code for my data engine and plasmoid, I have some cleaning up to do. I also need to add in a bit more functionality for robustness. After that, if I’m going to make it so that anyone can use it (and post it on kde-look.org), I will need to do some extra work. So that’s version 0.1. For version 0.2 here’s what I’d have on my TODO list:
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.
KDE Look Part 6: 4 Months In
I started using KDE in November of last yea r so I figured that I’d give an update on how things are working for me four months in. First off, KDE 4.6.x has not yet hit the official Fedora repositories. Since I like to yum upgrade or preupgrade from release to release, I try to stay with the official repos and RPMFusion. So no KDE 4.6 for me. At this rate, it doesn’t seem that it’s going to make it until around Fedora 15. But, if that means they iron out any extra bugs, that’s fine with me. So, with that said, let’s get to the info.
Developing my first plasmoid Part 1
I have three main hobbies: photography, my webcomic and programming. After spending a year working on my 365 Project, I’ve been taking a lot less photos as that part of my brain takes a break. After working with Dan to get the story for INM worked out through May of this year and working on strips that will appear this March, I wanted to take a bit of a break from that. The one bit of code I wrote for myself that I use on a daily basis is my flickr views code.