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

List:       kde-core-devel
Subject:    Status: DialogCore class
From:       Espen Sand <espen.sand () neo ! no>
Date:       1999-09-14 7:59:18
[Download RAW message or body]

(sorry for this rather long mail)

I have been working on making the DialogCore compatible (using the same
methods) with the current DialogBase.  When doing this I have copied much of
the code/ideas from DialogBase and added a number of improvements/features,

The goal is to make a very easy to use dialog class that provides features
such as tabbed, and treelists type (and more) dialogs and that uses defined but
changable margins and spacings (provided by hint() methods) so that all dialogs
use the  same settings. I have added a simple but powerful action button layout
mechanism that controls the button order (see below 6-8). The number of
predefined dialogs types (faces) can easily be extended later without breaking
old code.

SO: What does it take to replace the current DialogBase with the new code?

I think this will be a great improvement that can help us standardize dialogs.
(which is badly needed) I can "guaranty" ;) it is stable (khexedit uses it in
every dialog and I have never seen any problem at all). See below: 3

I have not yet made documentation. I can copy/paste a lot from the current
DialogCore and add the new that is needed. Most of all I want to make a
tutorial with copy/paste examples with screenshots (based from khexedit)
that goes to developer.kde.org.


FINER BUT IMPORTAINT POINTS
-------------------------

1. Renamed to KDialogBase (just so that it can coexists with DialogBase for now)

2. Does everything DialogBase currently do + much more.

3. I have installed it in my local kdeui lib and replaced the
instances of DialogBase with KDialogBase etc in the CVS. Everything (using 
DialogBase) works as before as far as I can see!

4. Provides Tabbed, TreeList, a Plain mode (empty widget) and a swallow
mode Using "Swallow" the uses makes a widget that is a parent of the dialog
and do a setMainWidget() to install it. KDialogBase uses a new widget 
KJanusWidget for this. The KJanusWidget hides the problems away from the 
user. If you have a tabbed dialog, it can be turned into a treelist dialog just
by changing the "face" from Tabbed to TreeList in the constructor.

5. All margin and spaces of the dialog class are defined by sizeHints()
menthods. The outer margins can be changed while the dialog is displayed.

6. The action button box now orders the buttons using a style hint, This hint
can be changed while the dialog is displayed. It is trivial to expand the
number of styles later.

7. The action buttons are as follows: 
Help|Default|User3|User2|User|Ok|Apply|Cancel. "Cancel" can be replaced
by "Close" and "Apply" with "Try". All buttons use accelerators. The user
can decide the name of the "UserN" buttons. Buttons can be grayed out, 
and/or hidden (should not be used much tough)

8. The user decides what buttons should be present, but do no decide in what
order. The order is defined by the style and can be controlled centrally.
I think this is a big advantage.

9. The standard caption is "captionText - <appName>". setCaption() has 
been reimplemented to to do this automatically. There is a setPlainCaption()
that does things the std way.



-- 
Espen Sand

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

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