Dock widgets

Alexander Dymo adymo at mksat.net
Mon Feb 21 22:28:04 CET 2005


Hi!
Despite of the mdi modes we choose to implement, we need a working dockwidget.
I mean that we _do_ need a replacement for KDockWidget. If you didn't look
at it before, please do and prepare to be frightened ;)

If seriously, KDockWidget has following problems:
1) placement inside dock area is broken
2) positions/sizes inside and outside the dock area are not saved
3) only one row of dock widgets inside one area is possible

Can we solve those problems by improving KDockWidget?
I answer no because it will take no less time than a complete rewrite.
The quality of KDockWidget code is too low.

Will those problems be finished in Qt4 in QDockWindow class?
Now I don't have the answer. QDockWindow behaves really cool
but it doesn't provide an API to modify dock header thus making
kmdi implementation difficult.
I sent a mail to TT with the explanation of our potential problems and
now I'm waiting for the next Qt4 beta to see what happens.

Ok, let's now imagine we won't get necessary API for QDockWindow in Qt4.
What to do next? Fork QDockWindow or create our own implementation.

Several months ago I took a look at dockwidget problems and wrote some
experimental code which you can find in the attachment.
It probably doesn't work correctly but you should have an idea about the
API we want from dockwidget classes.
Please take a look at Ideal::DockSplitter class and it's test example under
src4. An example uses QTextEdit widgets instead of dock widgets but
should give an idea on how an ideal dock area should behave.
It should be always possible to add dock widgets to arbitrary resizable
cell inside the dock area and testsplitter example shows how can that
be done.

What to do now? I'd prefer to wait until next Qt4 beta in March and see
what happens with QDockWindow and whether we can use it.
If not, I'll continue to work on dock widget stuff again.

-- 
Alexander Dymo
ICST Department, National University of Shipbuilding, Mykolayiv, Ukraine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ideal.tar.bz2
Type: application/x-tbz
Size: 218516 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kmdi-devel/attachments/20050221/2d80cfce/ideal.tar-0001.bin


More information about the Kmdi-devel mailing list