Integrating QExtMDI's window menu in a KAction based app

F@lk Brettschneider gigafalk at yahoo.com
Wed Feb 20 09:00:08 UTC 2002


Roland Krause wrote:
> 
> Falk, I've finally figured it out.
Hey cool! Once I struggled with those dynamic KActions but gave up
because of de2eng("räudige") documentation for that.

> Now Falk, is there a way to add a method to QextMdiMainFrm that
> encapsulates the assignment and takes care of freeing the memory of the
> original pointer.
QextMdiMainFrm::fillWindowMenu() is the one you're looking for.
The mechanism is that everytime you click the menu entry "Window" the
menu is cleared and newly build up because we simply must be sure the
entries for the opened windows and the MDI mode state and so on are
synchronized with the reality. That's why the QextMdiMainFrm constructor
connects this:
  QObject::connect( m_pWindowMenu, SIGNAL(aboutToShow()), this,
SLOT(fillWindowMenu()) );
Roland, I'd like the idea to take KActions because it's a new step for
getting QextMDI a real KDE base library. So I think having a "#ifndef
NO_KDE2 ... #endif" paragraph in fillWindowMenu() is the right way to
go. 
Note also that every entry for an open view is connected to
QextMdiChildView::slot_clickedInWindowMenu(). That is for the view
activation. But shouldn't be a problem with KAction....


> Roland
> PS: with this the entire KDevelop menu is now taken care of via
> KActions.
Great. I know it's a lot of work...

Ciao,F at lk

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





More information about the KDevelop-devel mailing list