In the above screen shot, you can see three features that I added:
1. First, I added opacity to ink and text objects. Notice the "highlight" effect over "Monkey Attack". I added that by inking over the text, setting the ink color, and then decreasing the opacity until it looked kind of like highlighter. This doesn't work on images (yet), just ink and text so far.
2. I changed the layout of the window a bit. Particularly, I put the Picture directory pictures in a tab, as I plan to add features that include other sources there. While I was at it, I put the loading of the pictures on a thread. Note that I used on my Quidgets for that, AsynchTaskProgressBox. This is a handy widget which you can show or not, but it basically handles setting up thread code for you.
pic_task = AsynchTaskProgressBox(self.__load_pics)
pic_task.start()
def __load_pics(self, params):
images = []
#lots of slow code that will be run in a thread ....
Those two lines are all it takes to run a function in a thread. AsynchTaskProgressBox has some other features as well, like you can pass parameters to your thread, you can kind of cancel the thread, and you can display it as a widget just by adding it to a Window or Dialog, and calling show().I saw some postings on planet.ubuntu over the last few days regarding threaded programming in Python. Perhaps Quidgets can help make it a bit more easy and fun.
3. I also added a cropping tool. That thing in the lower right is supposed to look like a scalpel. It's used by drawing a line around a picture, and then the picture gets cropped. Here's what it looks like as I am cropping the wise old monkey:
I also tweaked some interactions with buttons and such here and there.
About Quidgets
Quickly + Widgets = Quidgets
There is a Launchpad Project for Quidgets
The most up to date changes are in the Quidgets Trunk Branch
Quickly + Widgets = Quidgets
There is a Launchpad Project for Quidgets
The most up to date changes are in the Quidgets Trunk Branch
No comments:
Post a Comment