QuickFlickr on N900

Last spring I started to write QuickFlickr application i.e. a Flickr client for N900. Back then I wrote this article of it. For me this is just a learning process to study QML and trying to figure out how I can write a real application using C++ for a lower layer and QML for the UI.  The biggest challenge so far has been to design C++ side so that it provides usable interface to QML side. Before going too deep into details here’s the video about QuickFlickr running first on OS X and after that on N900.

What’s new?

You might wonder what’s new since the last time I published a video about QuickFlickr? Here’s the list:

  • Flickr authentication is fully done with QML UI. No external browser is used for that
  • Description of an image is shown and the text is Flickable
  • Flickr webpage is displayed for selected imageif user clicks “Go Flickr” button in “Details” state in Fullscreen mode
  • I removed the possibility to show image in fullsize in the contact list page
  • Long press is always the “return gesture” to the previous page
  • New graphics for the background
  • Bunch of stuff done in C++ side

Architecture

The architecture of QuickFlickr hasn’t change since the previous post of QuickFlickr so the basically there are the C++ and QML layers. C++ side is used for interacting with Flickr and providing Q_INVOKABLE methods, properties and data models for QML side. That’s basically it. I must admit, the the code in C++ side is far from perfect, but as I said this is a learning process and the application itself is not even near to be finished.

Performance

As you can see from the video the performance is not an issue on OS X, but in N900 it basically sucks. I’m using Qt 4 Maemo Experimental packages on device, but it would also be interested in to test running QuickFlickr on custom built Qt that I usually have done.

I have also heard that there are some issues on device with PR 1.2 and OpenGL, but I’m not sure about those. According Declarative documentation about the performance it’s possible to gain more boost if running the application with different options e.g. using QGLWidget as a viewport with raster graphics system.

I also haven’t tested to use Loaders in delegate to create e.g. the details part when image is clicked in fullscreen mode. I guess this is one thing to test later.

In QuickFlickr I’m rendering bunch of images which probably causes a lot of slowness especially on N900. According the documentation there are some tricks that I haven’t tested yet.

My plan is also to compile everything to the single binary using Qt’s resource mechanism, but I guess this shouldn’t effect on the performance too much.

Anyway the performance must be improved in order to make QuickFlickr usable on device. Let’s see if I figure out something which makes it fly…

Source Code

The source code of QuickFlickr is available in Gitorious http://www.gitorious.org/quickflickr, but you must remember that this code is under heavy development (read:”code sucks”)… When ever I have time for development and I can’t recommended anyone to use it. My plan is to provide debian packaging for the QuickFlickr at some point, but I will inform about that via this blog.

The Future

The future plan is to continue with QuickFlickr and provide more functionality like possibility to see recent activity and checkout our own photostream. Maybe at some point I will add a possibility to upload images, but that’s something I will do in the last phase then.

Thanks for reading my blog.

Tags: , , , , ,

9 Responses to “QuickFlickr on N900”

  1. wenzhezujie says:

    good job.

  2. wenzhezujie says:

    hi ,could you please tell me how can i run the Qt project with QML files on symbian S60v5. now Nokia Qt SDK desn’t support it.

    • zchydem says:

      @wenzhezujie I haven’t ever tested to run any Qt projects on Symbian and I don’t know how Nokia has planned to release Qt 4.7 for Symbian platform. So I’m sorry, but I can’t help you.

  3. bale says:

    Hi,

    first of all thanks for your posts, I find your blog very useful. If you are looking for inspiration of what to write next, I have a humble suggestion: what is the best way in Qt to create a list view where the items have a non-standard and moderately complex layout (few lines of text with different sizes, images etc)? It’s a pretty common use case in mobile apps, but there is surprising little information around about how to do it in Qt. I think there is a gap to fill if you are interested.

    And sorry for posting this comment here, it’s not really QML or Flickr related but I didn’t know how else to contact you.

    • zchydem says:

      @bale Hi Francesco:)

      Thanks for your tip and yes, you are welcome to post any comments you like. I don’t mind that. Thanks for your proposal for the topic. Quick Tip for your question is that you can use Qt’s delegates for that.

      What a delegate does is that, it can provide a custom look and editing behavior for your items in a Qt’s model view based widgets. You can do custom drawing there e.g. icons, text background color etc.

      Delegate doc: http://doc.qt.nokia.com/4.7-snapshot/qabstractitemdelegate.html
      ModelView doc: http://doc.qt.nokia.com/4.7-snapshot/model-view-programming.html

      Btw, I have a one post in my mind which is pretty close what you proposed, but it’s actually a QGraphicsView based solution for pannable list with delegates.

      • bale says:

        Thanks! I should have specified that it would be nice if the post was suitable for noobs like me ;)

        Delegates and model views is what most of the info seems to point to, but I can’t figure out what’s the best way to create the custom drawing. For example, can I use layouts in some way, or do I need to position the text by hand and take care of resizing etc.? Is it possible to create the items in Qt Designer (yes, I’m that lazy ;))?

        I’ve also seen QGraphicsView mentioned as a way to do it, so I’m definitely looking forward to your upcoming post! Would be interesting to know what are the advantages compared to a normal list view.

        Keep up the good work!

  4. bale says:

    Hey there, I compiled the latest source on Mac and tried to run it, but when I authenticate with my Flickr account I get the error “Oops! There’s no “api_key” parameter”. Should I use my own API key?

    In any case thanks for sharing, I’m writing my own QML app and will use your source as reference (http://www.balenet.com/flexo/blog/2011/02/flexo-qml/)

Leave a Reply

You must be logged in to post a comment.