|
From: | Martin Herren |
Subject: | Re: [Protux-devel] reimplementation of GlobalProperties |
Date: | Thu, 16 Jan 2003 11:09:42 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 |
Martin Herren wrote:
MustuxGlobalProperties has been written with a new extension in mind (not implemenented yet): callback function registration. So if several classes access the same property, and one changes it, the others can get notified about it if they registered a callback function before. Also when ProjectManagerWindow changes the values of the properties, the change will be able to take effect immediately where necessary. (registration will be on a per key/value basis, so you get only notified when an actually needed key/value changes) what do you think about this idea ?
ok, it's implemented know and seems to work fine. i'm thinking about additionally let MustuxGlobalProperties emit a signal when a specific key changes... so you can get notified in a more QTish way when a key changes, and that won't required to have static callback functions.
other change which have to be done in MustuxGlobalProperties since it's in libmustux now: in MustuxGlobalProperties::init(QString rcFilename), the 'default value setting' code which initializes the dictionary when no rcFilename file is found, should be removed, as it's the application's job to do that. Mustux can't know what default key and with which value a specific application will need. So init() should return false when no file is found, so the application will know it has to set the default values.
ok, now i think it's again time to work on autostuff, and writing one of the last piece of the puzzle: a good qt m4 macro well suited for mustux' need.
/Martin
[Prev in Thread] | Current Thread | [Next in Thread] |