Showing posts with label hildon. Show all posts
Showing posts with label hildon. Show all posts

Hildon UI elements in QML

I've been playing with PySide and QML this week (more on that soon), but here's something that might be interesting to the Maemo community: Using the native Hildon look and feel of Maemo 5 in QML.

This QML demo uses the current theme graphics of Hildon and provides QML components that can be used just like their Hildon counterparts, but inside QML UIs. This is not a complete library, just a test of what could be possible in case anyone wants to step up and create and maintain a Hildon library of QML components. Here's a video:

The code for this demo is on Gitorious - you can try it out on your N900 using qmlviewer.

MaePadWeb 2.0: Take your MaePad anywhere (even on a N8)

The companion app to MaePad that has been announced some days ago is now available in Extras-Devel for your N900, with some nifty features:

  • Fully edit the checklists in your database
  • Native Maemo 5 look and feel in the browser (title bar, toolbar, lists, ...)
  • Dynamic themeing based on current Maemo theme
  • Per-session password for some security (inspired by MAD Developer)
MaePadWeb in a web browser

This means that if you are using the NSeries theme, it looks like this, but if you are using Digital Nature, this is how it looks (and that should work for all themes). On your device, you will see a simple info window. Now, that's bringing the Maemo 5 UI to your Desktop computer's web browser. But does it work on mobile devices as well? Of course! Let me present you MaePadWeb running in the Symbian web browser on a N8-00:

MaePadWeb on a N8-00

If you think that this looks shopped, check out the video for further proof and to see the checklist editor view in action :)

This project brings together some great technologies: Python (for the backend) and HTML/CSS and JavaScript (using JQuery for convenience) for the frontend. Apart from the artwork, it does not depend on anything from Maemo 5/Hildon that isn't available in MeeGo already. In fact, Python with SQLite3 support is the only real dependency of this app on the backend side. With all the confusion on what to use for MeeGo Handset UIs (MeeGo Touch Framework, QWidget-based Qt, QWidget inside QGraphicsView, QML, Qt Components, ...), the HTML/CSS/JavaScript combo seems like a good cross-platform alternative (you still have to run the backend somewhere, but it can run on the same device, of course). All you need is a good browser/JS engine/rendering engine combo (Fennec/QtWebKit on MeeGo Handset, MicroB on Maemo). This also works on the N8x0 with MicroB :)

Modifying the Maemo 5 task switcher and launcher

This will be the last post for this week, I promise ;) After playing around with the MeeGo Handset launcher and task switcher, I decided to have a look at how this could be implemented in Fremantle, because the big previews and the paginated launcher are easier to use in some cases (you can also checkout the contents of a window while scrolling by without having to activate it). hildon-desktop manages the task switcher and launcher, among other things. The results of two days of hacking are two patches:

What I'm missing right now and did not succeed in implementing straight away is the "snapping" of TidyFingerScroll to page boundaries, so that whenever a scroll operation is finished, it automatically scrolls to center the icon page (for the launcher) or a preview window (for the task switcher). Obligatory demo video (.debs and patches are linked from the threads above if you want to try it out yourself) here:

If you happen to have experience in Clutter, why not give it a try? I suppose you would just need to implement another scroll mode in TidyFingerScroll and then request this mode in hd-task-navigator.c and hd-launcher-page.c. Who's up for the challenge? :)

Random observation: Hidden in hd-task-navigator.c one can find a geeky gem:

  xthumb = ythumb = 0xB002E;

A new gPodder release should be ready next week. And now back to some Uni stuff :)

MaemoPad+ ported to Desktop Linux

Some weeks ago, a user of MaemoPad+ asked me if it was possible to port MaemoPad+ to the Desktop, so users of Tablet PCs can make use of it. Apart from that, this can also be useful for users of MaePad to copy their "memos.db" file from the N900 to their PC and edit the file (or just view the contents) on the big screen. The file format used by both MaemoPad+ and MaePad is the same, so users of the mobile versions can share their database files with the Desktop version (and vice versa), which by the way looks like this at the moment:

Screenshot of MaemoPad+ on the Desktop

Most of the Maemo 4 libraries are readily available in Debian (hildon, libosso, hildon-icons, etc..), so the initial port has not been too difficult, even though proper Desktop integration obviously needs more work, and there are some ugly crashers still hidden inside the code ;)

I wonder if it's possible to also package Maemo 5 libraries (Hildon 2.2, etc..) for Debian and upload them to the Debian repositories - this should make it easier to port Maemo 5 applications to the Linux Desktop without having to re-write the whole UI layer. Another cool thing would be to have Hildon 2.2 for Diablo, which would allow us to "backport" Maemo 5 apps to Maemo 4 - again, without the work of having to re-write the UI.

Packages for Ubuntu are available from the MaemoPad+ PPA, and the source is available via Git. Please send backtraces of crashes or (even better!) patches against the "desktop" branch in the Git repo.

SketchyAetch, gPodder/Qt and living in the present

After the very interesting Nokia Mobile Developers Forum in Hagenberg on Friday and Saturday (Petri Niemi did several interesting Qt introductory talks), I decided to play a bit with QGraphicsView again and this time try to come up with an app that actually does something: SketchyAetch!

Having not done much with C++ for several months, the GCC error messages (at least for C++) are still kind of cryptic. The fact that code gets pre-processed by moc does not help here, as the error messages might appear in a different location than where the real error/typo is. It should not be too difficult to get around these issues after some practice, and from that point on, getting things done (in C++) with the Qt libraries should be nice.

Already-drawn lines will fade away when you shake your device just like you would expect. The package is available in Extras-Devel.

Now something for the Qt fanboys out there: If you're running gPodder 2.3 on your device, you can try

   python -m gpodder.qtui

for a PoC "yes we could use Qt for the UI layer". This is not something that we will be working on in the near future (after all, the Hildon-based Maemo 5 UI is perfectly fine and "native" and it will get some more fine-tuning with the next release), but it shows that it won't be too difficult to do a DirectUI GUI for gPodder on top of the existing podcast client for M6/MG. We probably get around to implementing a DirectUI GUI for gPodder later this year when it's time to think about "Maemo 6" support.

Looking back how strange the gPodder Fremantle UI looked back in June 2009 (and how much changed in both the Framework and gPodder until the first Fremantle version was released), there's no rush in switching to Qt or DirectUI (at least for existing applications). I just hope that good Python bindings will be available for DirectUI/Qt when it's time to support the new UI, but I'm sure the PyMaemo team will do a great job just as they did with Hildon/Fremantle.

Maemo 5 is very polished these days, and I expect it to be even more mature when PR1.2 is out. It's also nice to see the Qt bits fall in place, DirectUI widget demos being made available, and MADDE becoming integrated with QtCreator, so the tooling support is ready when it's time to write M6/MeeGo apps. Maemo 6/MeeGo is for later this year, now it's time to enjoy Maemo 5, the N900 and all the great open source apps :)