Just another example that I don't have finished last Sunday. This is a simple widget that tries to be similar at the iPhone Mobile Safari Tabs Page. It's a really nice concept used also by Palm Pre to display the running apps. To switch item swipe left or right (Press Mouse Button, Move mouse in a specified direction and Release it).
Source code is available here: Qt4 PageFlow Source Code.
Saturday, April 11, 2009
Sunday, April 5, 2009
Qt4 CoverFlow and QThreadPool
My OpenMoko cannot stay without CoverFlow, so here some code. But I need a lightweight class that allows me to load all files in a directory or a list of files. Scanning directory with QDir entryList can take long time, and loading all the images can take much more, So what I need is a class that solve this problem internally.
I've choose the way of QRunnable and QThreadPool to solve this problem, so I've a class that execute QDir EntryList and another one that load an Image. When file is Ready (FileName, Path) a gray square is displayed and will be replaced by the Image once it is fully loaded and scaled. Using this method you can flow between files even if CPU and Disk are still loading to load images, this means No UI Freeze when CoverFlow starts.
Note 1: You can flow between images using Left and Right Key or Clicking with mouse at the Left or the Right of the Central one.
Note 2: If you want a CoverFlow with a great transition effect take a look at Ariya's PictureFlow.
The Source code Is Available Here: Qt4 CoverFlow Source Code.
I've choose the way of QRunnable and QThreadPool to solve this problem, so I've a class that execute QDir EntryList and another one that load an Image. When file is Ready (FileName, Path) a gray square is displayed and will be replaced by the Image once it is fully loaded and scaled. Using this method you can flow between files even if CPU and Disk are still loading to load images, this means No UI Freeze when CoverFlow starts.
Note 1: You can flow between images using Left and Right Key or Clicking with mouse at the Left or the Right of the Central one.
Note 2: If you want a CoverFlow with a great transition effect take a look at Ariya's PictureFlow.
The Source code Is Available Here: Qt4 CoverFlow Source Code.
Saturday, April 4, 2009
Qt4 Photos Preview
After a great start of the year, working on B*Tree and other Indexing Data Structure, it's about two month that I'm experimenting with User Interface... My Love still remains Networking and File-Systems but it's fun drawing images, shadows and UI Components.
Ok, Networking and Bytes can wait till next week. Today I've watched the PALM Pre Preview, No Back buttons, No Save buttons touch capability outside the glass... Data Abstraction... It's really nice.
But, There are so much things... so I've extracted a tiny nice one. A Nice way to display a "Photo Folders". You can customize the output a bit, Shadow, Photo Size, Second and Third Photo Offsets, but it's an example not a reusable class...
You can find the Source Code Here: Qt4 Photos Preview Source Code.
Ok, Networking and Bytes can wait till next week. Today I've watched the PALM Pre Preview, No Back buttons, No Save buttons touch capability outside the glass... Data Abstraction... It's really nice.
But, There are so much things... so I've extracted a tiny nice one. A Nice way to display a "Photo Folders". You can customize the output a bit, Shadow, Photo Size, Second and Third Photo Offsets, but it's an example not a reusable class...
You can find the Source Code Here: Qt4 Photos Preview Source Code.
QtCentre Contest 2008 a Nice Surprise...
Backing home yesterday, I've found a postal package from QtCentre, there's also a QtCentre T-Shirt but this raining day doesn't permit to have great photos.
I would like to thanks again, all the QtCentre, Contest Sponsors (ICS, KDAB, BitRock, Thorsen, ...) and the "Trolltech" Team, for this, for the OpenMoko, and the incredible jobs they do!
Saturday, March 28, 2009
iPhone: Download and Display Gravatar
Back to the real iPhone for a while... Gravatar, or globally recognized avatar, is an interesting free service. It can be integrated with AddressBook app or other apps that can have a picture related to email address. Here an Objective-C Example to retrive the Gravatar. It's really simple!
The Source Code is Available Here: iPhone Gravatar Example.
The Apple Worldwide Developers Conference (WWDC) takes place June 8-12, 2009 held at Moscone Center West in San Francisco. http://developer.apple.com/WWDC/.
The Source Code is Available Here: iPhone Gravatar Example.
The Apple Worldwide Developers Conference (WWDC) takes place June 8-12, 2009 held at Moscone Center West in San Francisco. http://developer.apple.com/WWDC/.
Qt4 iPhone Like App Prefs
Here a simple example on How to Customize an ItemView class, in this case a QTreeView, to be similar to the iPhone Application Preferences Panel.
All the look'n' feel magic is provided by the ItemDelegate that paint the right object using the specified type.
There're six different item types: Button, Link, Group, Value, Multi-Value, Info. Values are all string except boolean that are painted as On/Off Button. Double Tap on this item to change is value. For all the others item when you click on it a right event will be dispatched, and you'll have to handle it to load the right "Edit" page.
This is Just an Example, to use in an application you need, at least, to differentiate the Display Role Value and the real KeyName value.
The Source Code is Available Here: Qt4 iPhone Like App Prefs Source Code.
All the look'n' feel magic is provided by the ItemDelegate that paint the right object using the specified type.
There're six different item types: Button, Link, Group, Value, Multi-Value, Info. Values are all string except boolean that are painted as On/Off Button. Double Tap on this item to change is value. For all the others item when you click on it a right event will be dispatched, and you'll have to handle it to load the right "Edit" page.
This is Just an Example, to use in an application you need, at least, to differentiate the Display Role Value and the real KeyName value.
The Source Code is Available Here: Qt4 iPhone Like App Prefs Source Code.
Tuesday, March 24, 2009
Qt4 Drawing Notification Badges
Wow a Couple of Minutes of Free Time, and here two lines of code example to answer at Dave's question "How to Draw iPhone Like Notification Badges".Badges are used olso in Mac OS X in application like iTunes and in the DockBar, check this post "Cocoa Notification Badge" to see how to use it with cocoa.
Obviously Notification Badges will be a features of My OpenMoko Apps.
The Example is very simple, there's a method that draws the badge with specified text and Brush, you can put the badge where you want not only on top left as showed in the picture :)
The Source Code is Available here: Qt Draw Badges Source Code.
Subscribe to:
Posts (Atom)




