[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: ANNOUNCE: DialogBase and KAboutDialog in kdelibs/kdeui
From: Mirko Sucker <mirko.sucker () unibw-hamburg ! de>
Date: 1999-07-11 14:44:07
[Download RAW message or body]
Harri Porten wrote:
> Mirko Sucker wrote:
> >
> > Hello,
> > like we discussed on LinuxTag in Kaiserslautern, I added two classes to the KDE
> > user interface library:
> >
> > ° DialogBase (dialogbase.h, dialogbase.cpp):
> >
> > A class that manages common tasks required for writing up-to-date dialogs. It
> > provides "OK", "Apply" and "Cancel" buttons, tooltips, quickhelp, a link to
> > show the help window, some frames and general geometry management. To use it,
> > simply create a widget that suits as the main part of the dialog, set its
> > minimum size and hand it over to a DialogBase object as the dialogs "main
>
> I have yet to look at example applications but wouldn't it work using
> sizeHint() ? One of the postive effects of converting code to Qt 2.0 was
> the chance to kick out all the setMinimumSize() calls and let the
> geometry managment figure out the sizes on its own ? (Just speculating
> since I haven't read trough the code intensely enough)
AFAIK the meanings of the sizehint and the minimumsize are not similar.
I will check if it is possible to use the minimum rectangle of the sizehint
and the minimum size.
But the dialogbase sets its own minimum size to a value calculated from
the main widgets minimum size. What if both are different?
Any ideas? Trolls?
> I bet you have developed these classes for Qt 1.x originally.
Yes. See kab's sources.
> Since you
> are assigning the function parameters to QStrings anyway and want to
> make them Unicode safe you should consider replacing most of the "const
> char*" to "const QString&". The following code
>
> KAboutContributor::setName(const char* n)
> {
> if(n==0)
> {
> name->setText("");
> } else {
> name->setText(n);
> }
> }
>
> would then be reduced to
>
> KAboutContributor::setName(const QString& n)
> {
> name->setText(n);
> }
I will check it. Same is for dialogbase.
Greetings,
--Mirko.
--
Denn der Mensch liebt und ehrt den Menschen, solange er ihn
nicht zu beurteilen vermag, und die Sehnsucht ist ein Erzeugnis
mangelhafter Erkenntnis. (Thomas Mann)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic