Tree and Output window positions

F@lk Brettschneider gigafalk at yahoo.com
Wed May 16 18:05:49 UTC 2001


Hi Roland,

Roland Krause wrote:
> 
> Falk,
> I was trying to store and retrieve the current geometry settings for
> the tree and output widgets. So far I have not been able to understand
> much of this at all... Here are some questions:
> 
> In CKDevelop::initView(), the widgets for class_tree and output are
> created and then added as toolwindows to the MDI framework, right?
yep.

> There seems to be some kind of a percentage for their initial size,
> right?
yep. A splitter relationship.

> 
> Are these windows accesible later, how?
It's all very dynamic. If you dock around, dockwidgets will be deleted
or reparented or recreated. That's why it's useless to store one of the
KDockWidget pointers. After a while you'll just have dangling pointers.
Furthermore, the fact that the tool-views (messages_widget, class_tree,
...) are covered by dockwidgets should be hidden as good as possible.
That's why when I need the dockwidget cover of a tool-view I just get it
by ->parentWidget()->parentWidget() which is safe 'cause this is
guaranteed by QextMDI.

> Is there a pointer, that I can access the window geometry through?
> Maybe class_tree, resp. messages_widget?
for instance: class_tree->parentWidget()->parentWidget()->geometry().
The first parent widget is a QextMdiChildView, the second parent widget
is a KDockWidget.

> 
> Do I then call the setGeometry() and geometry() methods inherited from
> QFrame for these windows? Or do i need to call methods of
> QextMdiChildView?
If you want to store and retrieve the dockwidget szenario, you can use
CKDevelop::readDockConfig and CKDevelop::writeDockConfig. You know
CKDevelop inherits QextMdiMainFrm and this inherits
KParts::DockMainWindow which also inherits KDockMainWindow.
They are already used in class CKDevelop but commented out since it was
not safe to use them due the changes during the MDI rewrite. I don't
know if it works now, you must be VERY CAREFULLY with enabling that
again. Test it much and don't commit before you're not 100% sure that it
works again. I'm still afraid we can get the user in a messed up
kdeveloprc file.

> 
> What about docking state how can I find out about that?
Please, have a look at KDockWidget&Co.

Ciao,
F at lk

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list