Re: Menu Hell !

dalsoogie at sogang.ac.kr dalsoogie at sogang.ac.kr
Fri Apr 13 22:15:18 BST 2001


for example, if you want to add "view" menu with "zoomIn, zoomOut" actions on menubar

add belows in *App class 
----------------------------
 void slotZoomIn();
 void slotZoomOut();

  KAction *zoomIn;
  KAction *zoomOut;
  KActionMenu *viewMenu;
-----------------------------

and initiate them before createGUI() in initView() in the .cpp
-------------------------------- 
 zoomIn = new KAction( i18n( "Zoom in 10%" ), "viewmag+", 0, this, SLOT(slotZoomIn() ), actionCollection(), 0 );
  zoomOut = new KAction( i18n( "Zoom out 10%" ), "viewmag-", 0, this, SLOT(slotZoomOut() ), actionCollection(), 0 );

  viewMenu = new KActionMenu(i18n("&View"), actionCollection(), "view_menu");
  viewMenu->insert(zoomIn);
  viewMenu->insert(zoomOut);
---------------------------------------
and edit "*ui.rc" XML gui file

-*ui.rc--------------------------------------



     <----------- add it
  


------------------------------------

then compile it, it may help you


from Korea 
> 
> -----원본메시지-----
> 보낸사람: "EricSorensen" 
> 받는사람: kdevelop at kdevelop.org
> 날짜: 2001/04/13(금)06:41
> 제목: Menu Hell !
> 
> I've looked and looked and looked and just can't seem to find the information 
> I'm looking for.  Can someone put me on track.  How do I add a menu entry?  
> Following the online documentation just leads to a dead end.  Hacking through 
> the KDevelop source code didn't help me much either.  All advice welcome.  
> 
> By the way why does the Output-View sometimes show up 'detached' at the top 
> of my screen when I start KDevelop new.  I suspect it is after I reduce it's 
> size more than it finds acceptable and then close the program. 
> 
> Thanks in advance.
> 
> -
> to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
> unsubscribe 퍈our-email-address?> 
> 




-------------

Not so special, just a little different.

from Dalsoogie.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20010414/1a792f1c/attachment.html>


More information about the KDevelop mailing list