Integrating QExtMDI's window menu in a KAction based app

Roland Krause rokrau at yahoo.com
Wed Feb 20 07:23:02 UTC 2002


Falk, I've finally figured it out. 

The merging can be done quite easily as follows. 

I create an entry for the Menu as an Action but not as a Menu in
kdevelopui.rc . I.e. 

...
</Menu>
<Action name="window_menu" />
<Menu name="bookmarks">
...

Then I create a KActionMenu for this Action and retrieve the KPopupMenu
pointer which gets assigned to QextMdiMainFrm::m_pWindowMenu .
Following, some attributes for the menu have to be set and the object
SIGNAL/SLOTS have to be reconnected. 

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. Allthough I believe that is not strictly necessary, I
wouldnt mind encapsulating this stuff a bit better. 

Roland
PS: with this the entire KDevelop menu is now taken care of via
KActions. I'll have to do a bit work on defining "States" and getting a
patch done for KXMLGUIClient but otherwise this is working great. 




> 

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com




More information about the KDevelop-devel mailing list