RFC: prelim patch against Qt to replace portions of KMDI -- QDockBar
Adam Treat
treat at kde.org
Wed Feb 15 05:07:40 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: dockbars.tar.gz
Type: application/x-tgz
Size: 5645 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060215/d132b744/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dockbar.diff.gz
Type: application/x-gzip
Size: 7106 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060215/d132b744/attachment-0001.bin>
More information about the kde-core-devel
mailing list