[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Protux-devel] reimplementation of GlobalProperties
From: |
Martin Herren |
Subject: |
Re: [Protux-devel] reimplementation of GlobalProperties |
Date: |
Thu, 16 Jan 2003 21:54:45 +0100 |
On Thu, 16 Jan 2003 15:02:42 -0200
Luciano Giordana <address@hidden> wrote:
> > 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.
>
> That is good. I had many problems with static callbacks (remember Reinhard
> ;-) in 2001
hope there will be less here !
There is just a small problem with using signal and slots with
MustuxGlobalProperties: only objects derived from QObject can emit and receive
qt-signals, but MustuxGlobalProperties is not a class. So i see 2 solutions:
- make MustuxGlobalProperties a class derived from QObject. This means also
that there won't be any more static functions to access MustuxGlobalProperties,
but you'll have to call a member function of an object of this class. Of course
the pointer to this object will be declared global. So the application using
Mustux will have to instanciate such an object at the begining (instead of the
current init(), which will be performed by the constructor).
(application code will have to do a properties->set() instead of a
MustuxGlobalProperties::set())
- keep all function of MustuxGlobalProperties static, and deriving the
internal class KeyData from QObject. This would need a new
MustuxGlobalProperties function: get_keydata(QString key), so that the
application can connect to it. Furthermore KeyData must then be declared in a
header file, but i prefere keeping this whole class private.
So i recommend the first solution, as it's more clean, and from the application
perspective it will also be easier to use. And there is only one step required
to connect to it (connect), instead of two (get_keydata and connect).
/Martin
--
Open your Windows - Free your Mind - Enjoy
http://gnuwin.epfl.ch
Martin Herren +41 (0)79 746 57 83
OpenPGP Public key @ http://www.on-the-web.ch/sputnik/gpg.asc
pgp07bajI98QW.pgp
Description: PGP signature
- [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/14
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/14
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/15
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties,
Martin Herren <=
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/21
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/21
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/21
- Re: [OT] [Protux-devel] reimplementation of GlobalProperties, booker, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/16