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

List:       kde-core-devel
Subject:    Re: KDialogBase / KMessageBox
From:       Espen Sand <espen.sand () neo ! no>
Date:       1999-11-05 12:07:27
[Download RAW message or body]

On fre, 05 nov 1999, Waldo Bastian wrote:
>Hiya,
>
>I am curently looking into the possibility to let KMessageBox  use
>KDialogBase. I encountered a few issues while doing so.
>
>* KDialogBase does not really fit to "Yes/No" or "Yes/No/Cancel"
>dialogs. It seems to be very much aimed at configuration dialogs (?)
>
Correct, but actually any dialog that is not a message box should be ok ;)

>
>(I currently use User1 as Yes and User2 as No buttons.)
>
I can add "Yes" and "No" buttons. Should these be aligned to an edge or be
centered. The button bar is missing some functionality and centering in one
example.

>* It's not easy to make a modal dialog which terminates when one of the
>buttons is pressed. I either need to subclass the KDialogBase class for
>this, or I need to connect a signal to a slot. Unfortunately there is no
>other object than the dialog itself within KMessageBox, so I can't make
>a slot anywhere. 
>
Is it diffcult because the buttons you use do not terminate the the dialog
as an "OK" or "Cancel" (returning accept or reject)? If so I can fix this.
(see below)

>
>* The buttons are much closer together than with a QMessageBox.
>
I have more or less planned that the spacings should be configureable by some 
central object. Currently there are only two values: marginHint() which controls
the spacing from the dialog edge to the outermost widgets and spacingHint()
which controls the spacing between widgets. 

The action button spacing are controlled by the spacingHint() and they will be
moved to the right area of the dialog, not centered as in the messagte boxes. 

I can make a new KDialogBase constructor (don't know how it will look like yet)
or dialog mode that will turn the class into a message box state. In this state
one can then  specify "yes", No" "Cancel" and it will provide slots and signals
for those buttons and center them as well.


-- 
Espen Sand

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

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