Below you will find pages that utilize the taxonomy term “Qml”
Creating Nice-Looking Buttons in QML on KDE
Back in October I created a GUI for my Python amortization table program. One of the things I lamented was that the buttons in QML look like crap. I want my buttons to look like buttons, not blue patches no a white screen. I don’t really know what made me look, but yesterday (during the No Snow Snow Day) I was looking through the file system and it turned out I had Plasma Components installed on my system. So I added
My Second Ever Useful GUI Program
A while ago I wrote about my first ever useful GUI program. And in one of the series of posts that followed I explained that the reason I hadn’t made a useful GUI program before now is because all the typical stuff has already been made over and over. We don’t need any more tetris clones, word processors, or music programs. Recently I had reason to create my second program. A while ago I created a an amortization calculator in python which you can find here.
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 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.