Tuesday 4 August 2009

Big, Isn't it?

On a scale thing, Qt stands up there with the likes of wxWidgets for the number of classes and methods which make up the API.

I try not to think about it too much, because it's just too scary! Better to instead focus on specific functionality one Type at a time. Which is where I think my current method of gradually building up the library of fully-functional examples is helping immensely.
Before I know it, all of the really interesting stuff will be working ;-)

I'm still juggling with the issues of being able to "connect" to objects that I have been created by Qt, rather than by me. The biggest problem of course is connecting BlitzMax to a signal, which needs to be instantiated in C++. I believe I have a good method for this when I can create my own objects, but for Qt-specific objects, I'm still wandering around in the dark.
Two options I can see for this :
  1. Rather than subclass the original classes, we instead use a "wrapper" class, which itself contains all the slots/connect glue. It would need to connect itself to the "parent" class's destructor signal in order that it could clean both itself and the BlitzMax object up. All signalling would pass through this wrapper class (one per QObject super class)
  2. For Qt-generated objects, we check if we already have a connection with them in BlitzMax. If not, we attach a "signal handler" object to it, and have it connect to the destcructor signal of the object. The signal handler would simply set up the various signal/slots as per the wrapper class in 1.
Of course, now I've written all this down, No 1 seems to be the obvious course I should have taken from the start...

:-p

No comments:

Post a Comment