Thursday, September 16, 2010

Qt gui for pyKake is now (mostly) ready!

I have banged my head to the wall few last weeks with Qt. This is not because it is stupid (all but that), but because I weren't familiar with it - and of course, because I wanted to write everything by myself, not with QtDesigner. But now it is time to say, the gui (for version 0.7) is now pretty much ready. All there is left to do now is little cleaning (simplification) to the code and transfer the functionally from old GTK pyKake to new Qt pyKake. The transfering old code to new will probably take some extra time (because I need to Qtlize some functions) but I think the hardest part is now done (don't tell me I'm wrong).

So, after the break, I will show off the screenshots of dummy gui (its almost totally non-functionnally at the moment).

Friday, September 10, 2010

State of pyKake vol. 2

I haven't had much time to work with pyKake since the spring, but in last few weeks I crabbed my self from the neck and started again. As you may know, the current version of pyKake is 0.6 and it is in extras-testing (Maemo.org), hoping to get enough testers to get the way to Extras. But happy news for anyone intrested, the next version 0.7 is coming - slow, but it might catch the extras-devel in few weeks. 

Originally I was planning that the next version will be the 1.0, but again some nice ideas about new features popped up and it will take some more time to check the possibilities, find the way and get them rock and rolling in the app. That is why I decide to rise it at the step by step instead of main jump to the 1.0. Of course I could do that anyway, but in the other hand, that would be stupid because then it wouldn't be ready, missing those features that are coming.

0.7 will include some major changes, most important part of it will be the GUI, which is no longer GTK/Hildon, instead it will be Qt (as I was planning at the begining, but then leaved it out, because the legendary delay of Pr 1.2) and instead of multiple stacked windows, there will be only one tabbed window, which could might be a fullscreen too. Main reason for new GUI is, that I wanted to learn Qt and the reason for tabs instead of stack is that I find it more handy (example now on you don't need to return back to main window to get in the differend one). 

What I have learn in last few weeks is, that there is good and bad things in this move to Qt. Good things is that I learn Qt (of course), bad thing is, that I had to rewrite most of the code, which will take some time. Of course, I could use Qt Designer and pyuic to generate the Ui without write a single line of code, but the thing is I want to learn it and the best way to learn something is to do it by yourself. Still, maybe in the future, when I work with some new app, I will do the magic with Designer, but for now, it is not easier but the better way to do it myself. 

The graphical outfit will also change, because there is some nasty bug in Qt-Hildon interaction that cause some ugly buttons like you can see in next image:

 The basic mode view in Qt.
 
Yeah, as you can figure out, there should only be 2 buttons, but instead of spreading one image of button per button to cover it, Hildon-desktop just duplicates the image again and again to cover the area. To get rid of this nasty bug, I will use CSS (yes you read right, Cascading style sheet, the same thing you use to decorate the web-pages), which is one of nicest thing I have found from Qt as far, because now customizing the application is as easier than stealing the lollipop from a child (application won't cry). 

This also means, that there is possibility to create skins to application. I don't say that you can create and add own skin in the next version of pyKake (or you can, but it will be from the hard way), but probably yes, when we think about the version 1.0. So, in the next version, there will (most porbably) be only one css file for pyKake, which is sad, because it made by me, but in future, there might be more and the best part is, that you can change the style from settings and you can also create own. Or at least I hope it will be as simple as I told. But more about styling when it is current.

As you might saw from the photo, there is also a new feature, Timed photography, which is a time lapse function.  The idea was suggested by barchan in pyKakes talk.maemo.org thread. The basic idea is to automatically take photos during chosen time. Example, you can set up, that your camera will take photo every 6th minute in 2 hour period. In this mode user can choose the time period the photos are taken (or leave it empty, which means it takes photos until manual stop), amount of photos taken (or leave empty, same as previous) and the time interval for the photos. I will also add a bulb mode in this, which basically means that time lapse will take a series of bulb photos. But more about this when the version 0.7 is coming out.

There also may be some new menu entrys, but I'm not sure yet, do I move those in the later versions (time will show). One of these is a simple fixing program to fix the nasty small error created by QtIrreco. The problem is simple but annoying, and fixing it needs a little bit skills, it is that when installing QtIrreco, it will rewrite the whole lirc.config file and when doing that it changes all paths of existing remote config files from the orginal  (which is for pyKake /opt/pykake/) to /home/user/MyDoc/... and this of course causes the non-working program. There is hard way fix fit, I have explained it in here, but I think I will write up a small script to fix this just a press of button, but it needs to be written and then some serious testing before release (because it could be fatal if there is bugs in it,) so it might take to later release.

I also think about bugtracker button (which actually just takes the user to the talk.maemo.org thread but at least something). And to  help users (and myself) to solve plausible problems, I think I will also write up a some kind of logging system. Currently there is no logging system, caused by that , than when I started to write pyKake, idea was to write simple remote just to take bulb photos whit my Olympus e-420, but some how, in some reason it has grown (and I can't see the end). 
    • The other features which we will, or will not see in the future versions (after 0.7) are:
    • N900 as a remote flash (using the N900 cameras flash as flash :p ) from rantom in maemo.talk.org.
    • Using pyKake to take series of photos with different exposure to create HDR photos by Fedmahn Kassad in maemo.talk.org.
    • Translations to different languages (I can do the Finnish and English and may get the Russia and few others done by friends but rest is up to you).
    • Customized css styles (when we start to work with styling, I am terirble in it, so hopefully I got some nice styles from you).
    • Icons to most of function buttons, I think buttons like shutter, next, prev, zoom in, zoom out etc don't actually need a text, so I will replace them with icons in some point of development (this could already happens with 0.7 or not).
    I also hope that I could get a remote configure file to Sonys remote, so I could add Sony to the list of supported cameras. So if anyone have Sony DSLR and remote control for it and knowledge or will to learn Lirc - Please made a configure file for me. To get this started, go here.