Archive for posts tagged with 'development'
Sorting functors and bikinis
I stand up next to a mountain
Originally uploaded by Mark Witton.
Sorting is one of the most common operations done on a data structure and it’s one of the best examples for generic code and C++ templates.
Qt provides a handy qSort() method which comes in different flavours.
One is quite interesting as it allows you to use a custom sort function.
void qSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan)
LessThen is actually a template parameter. I guess most of the times you will just use a pointer to a global function.
The drawbacks are that you cannot pass parameters to the sorting function, unless you use global static variables. And that’s rather ugly.
Untitled post about wynona’s puppet
Coffee … break !
Originally uploaded by Christiane Michaud.
Sorry folks, I was lying. This post is not about wynona. I’m really really sorry.
I have spent the whole day trying to build an apache module using Qt and qmake so I have to blog about my success.
I know, the guys at apache (btw. I’m really impressed by their work) advise against writing C++ modules or linking shared libraries, but I’ll have to do that for a project I’m working on at Clickout Ltd. so we’ll have to discuss those issues some day.
Nevertheless, the traditional mod_helloworld buit with no hassle on windows but there was no way to make it work on Linux/GCC so I had quite some fun figuring out the issue. So, here is a quick tutorial ![]()
Read more
Moving on
End Of The Day
Originally uploaded by creativesam.
It’s a sunny day so this will be a short post. I need to go out and stomp daisies
Well, this post is just a quick update about movida. I have finally integrated WebKit into movida so you will need Qt 4.4 (RC1 or later). Both the template based “details” view and the movie preview of the movie import plugin use the new super duper cool QtWebKit module.
It still needs some fixes - mostly because WebKit is a fully featured browser so I need to disable and handle a couple of things but it works great.
The screen below shows the new embedded default template. Too sad that WebKit doesn’t allow to access embedded resources from an HTML file, so I had to embed both CSS and images into the HTML (thank the Holy Spaghetti Monster if the Troll’s didn’t embed IE into Qt, so this was no issue at all
).
I’m also planning to add some nifty features: for instance, clicking on an actor name should apply a filter and show all movies featuring that guy. This would also make the shared data view needless. Cool
Ok. It’s daisy stomping time!
PS: actor (as well as any other shared data) order is now user defined and preserved when loading/saving a collection. Now you should be able to tell movida that Taxi Driver is about De Niro and Foster, and not about Shepherd
PPSSP: templates will be i18n-able sooner or later. I just need to find out the best way to achieve this ![]()
No Eastern bunnies died whilst writing this post
Huge Eastern SVN commit for movida.
I have found some time to add a couple of nifty features and fix old bugs. And the new features confirm that movida is acting more as my personal Qt / C++ / Perl playground than an application that will ever see v. 1.0
As to the new features I have mainly cleaned up and extended the support for filter functions and added initial support for various d&d operations.
No commentsMoving on
Ok, long time no posts about movida, mostly because I didn’t find the time to work on it again.
Now, I have managed to commit a huge amount of code written about last Christmas (O___O) and a couple of new bug fixes and features.
I am trying to actually import my own movie collection into movida and it’s quite a PITA because it’s pretty huge.
I have a text file listing the titles of all my movies but using it all at once to make queries on IMDb is nonsense. You would end up having to check and filter an endless list of matching search results.
And given that none of the titles on my movies list is 100% accurate there is really no way in adding some magic.
So, I ended up importing about 5-6 movies at a time. It will still take days though
Nevertheless, this funny task helped me to find bugs and important features that were missing. Number one: advanced filtering.

The screenshot above shows the new support for filter functions. IOW, it is now possible to enter special strings in the filter box and trigger special filters.
The screen shows the only working filter so far — @id(ID_LIST) — used internally (IDs are not visible to users, who wouldn’t give a squirrel about it) to show only imported movies after using the.. yeah, the (plugged-in) IMDb import wizard
Pretty cool. Now I can set some properties on the whole bulk of just-imported movies, like tagging them all as “seen”
PS: yes, that last comma in the ID list has been removed before committing on the SVN O___O
PPS: the format of those special functions is only temporary. I don’t know if @function(parameter, parameter, …) is powerful enough to build up some interesting (though automatically generated or user-friendly) filters.



