Developing my first plasmoid part 3
By EricMesa
- 3 minutes read - 463 wordsI 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:
- make the add and remove buttons change color to green or red to indicate success or failure, respectively
- add “Time until next flickr day” because these groups only let you add 5 photos per day, but flickr’s day resets some time in the evening (they’re probably on GMT)
- Add a button force the data engine to refresh its data
- Combine the add/remove to group code. I put it into two different helper programs but 99.9% of the code is the same. It’d be easier maintenance if they were in one program
- Clean up the code by moving some of it to separate qml files that get imported in so it’s easier to read what’s going on
I’m quite excited and I plan to post the code, along with some explanations soon.