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

List:       kde-devel
Subject:    Dialogs [Re: KDevelop & Kstudio & another small issue]
From:       Espen Sand <espen.sand () neo ! no>
Date:       1999-08-30 12:37:53
[Download RAW message or body]

Since the issue dialogs, layouts etc appeared I'll resend the message I sent
to kde-core list today. I think this will greatly reduce the "burden" of making
good dialogs. (you must use QLayouts in the dialogs, this makes the task 99%
simpler :) I think I will have the code+doc ready in a week or so (although if
somebody wants now I can send it by mail this evening)

<BEGIN MESSAGE>

FYI: From My Struggle towards (even) better dialogs in KDE.

I have been working this weekend on a dialog base class - DialogCore
The reason for this is to make a class that more or less forces the user to
follow certain rules when making dialogs. My goal is to get this class into 
kdeui so that I can use it in other (than khexedit) programs I have planned to
"clean up".


*DialogCore provides three layouts (defined in constructor)
+Plain (std dialog)
+Tabbed (a tabbed dialog)
+TreeList (treelist+pages as config window in khexedit, korganizer). The
treelist is based on the QSplitter + QlistView.

*DialogCore defines an inner and outer margin. The outer is used by the
DialogCore itself and and the user should use the "innerMagin()" only.
(I hope DialogCore can read these margins from a central KDE object later).

*DialogCore is modeless (by default).

*The dialog caption is automatically set to:
"<appName>: <titletext provided in constructor>"  

*A separator can be created above the Action button (not by default)

Action Buttons:
*The layout below will be used:
<Help><Default>[stretchable space]<User3><User2><User1><Apply><Ok><Cancel> 
*Defined in constructor
*A default button is defined (in constructor)
*<Cancel> can be replaced by <Close> but one of them must be present
*Any combination is allowed (but the sequence remains) eg:
<Help><Default>[stretchable space]<Apply><Ok><Cancel> 
[stretchable space]<Print><Ok><Cancel> (User1 is defined as <Print>) 
*Buttons can be grayed out
*The dialog provides virtual slots for all buttons.
*All buttons use an accelerator (except for the user definable)
*The buttonbox uses the innerMargin() and outerMargin()


I have successfully converted all dialogs in khexedit to subclass
from DialogCore. The resulting binary file is smaller and the code
is easier to read (and less translations is required).

I have begun making a general "about dialog" core class, AboutCore, that will be
able to create the "About KDE dialog" as well as my current "About khexedit" and
more. The  AboutCore is sublassed from the "DialogCore". I can
already make the "About KDE dialog" using this class. I will try to implement
all features from the (nice :-) "KAboutDialog" by Mirko Sucker. 



</END MESSAGE>



On man, 30 aug 1999, Don Sanders wrote:
>Yes you are right. My reply was somewhat of a knee jerk reaction.
>
>Not that by "b" I meant dialogs quickly, I was thinking more along the lines
>of a good app. Suggestions for improving the dialogs I'm creating will
>have to come from others, I have spent time on such nicieties (sp?) as using
>layouts to improve resizing behaviour, and improving keyboard support, I have
>listened to and am considering further improvements like talk/irc/icq support
>and customization to allow users to create their own dialogs. I know my
>limitations and a radical redesign of the dialogs I'm creating, for the better,
>is beyond my abilities, at least in the forseeable future; a fact that somewhat
>irritates me.
>
>That is I'm doing the best I can.

-- 
Espen Sand

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

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