[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Signal and class design question
From:       Mosfet <mosfet () jorsm ! com>
Date:       1999-08-04 19:59:36
[Download RAW message or body]

Well, looking at kdeui this is applied inconsistently. For example,
KColorButton doesn't emit when you set the color and I should probably either
follow that or change both of them...

On Wed, 04 Aug 1999, Richard Moore wrote:
> Mosfet wrote:
> > 
> > I am doing a widget for my application called KDualColorButton that manages two
> > cascaded colors (usually a foreground and background color). I think this
> > is generally useful so will probably contribute it to kdeui since it saves
> > space when two related colors are needed.
> > 
> > When a new color is selected via KColorDialog I emit either a fgChanged or
> > bgChanged signal. My design question is should I also generate these signals
> > when the programmer manually switches the colors via one of the methods, or
> > only when the user does?
> 
> Personally I try to emit signals whenever the state of a QObject
> changes. I would say you should emit them whether they are changed
> by the user or not. You always retain the option of passing a flag to
> differentiate user from programmer inspired changes.
> 
> Rich.
> ps. Your reply-to header is wrong. You shouldn't specifiy this at all.

Uh, okay... ;-)
> 
> > 
> > --
> > Daniel M. Duley - Unix developer & sys admin.
> > mosfet@kde.org
> > mosfet@jorsm.com
> 
> -- 
>      Richard Moore		rich@ipso-facto.freeserve.co.uk
> http://www.robocast.com/	richard@robocast.com
> http://developer.kde.org/	rich@kde.org
-- 
Daniel M. Duley - Unix developer & sys admin.
mosfet@kde.org
mosfet@jorsm.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic