RFC: prelim patch against Qt to replace portions of KMDI -- QDockBar

Adam Treat treat at kde.org
Wed Feb 15 05:00:41 GMT 2006


Hey All,

I've been working on a patch for Qt that will provide the benefit of KMDI's 
ideal like mode with minimal overhead.  Because Qt4's mainwindow classes do 
their own layout management, this is implemented as a lightweight patch 
against Qt and interfaces directly with the mainwindow layout manager.  As 
such, it will require TT's blessing.  I would appreciate if folks could take 
a look and see what they think.

Attached you'll find a preliminary preview of this patch that gives the basic 
idea.  So far, I've only added _two_ methods to the public QMainWindow API 
although I have ideas to add about 3-4 more eventually.

Here are the sigs for the two new methods:

    bool dockBarEnabled(Qt::DockWidgetArea area) const;
    void setDockBarEnabled(Qt::DockWidgetArea area, bool enable);

That's it.  With this I've added an "ideal" mode, but with greater 
flexibility.

Eventually, I want to add:

  void setDockBarDelegate(Qt::DockWidgetArea area, QDockBarDelegate 
*delegate );

...which will provide the ability to modify the behavior of the dockbar class 
as well as provide custom painting routines so that, for instance, KDevelop 
could provide Eclipse style dockmanagers if we were so inclined.

Sincerely,
Adam

PS  The patch is broken WRT tracking the dockwidgets as they are dragged and 
floated.  I am fixing this, but I wanted to get some feedback before I get 
too far down the road.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dockbar.diff
Type: text/x-diff
Size: 31949 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060215/130c9247/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dockbars.tar.gz
Type: application/x-tgz
Size: 119496 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060215/130c9247/attachment.bin>
-------------- next part --------------
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel at kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


More information about the kde-core-devel mailing list