[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop
Subject:    Re: Menu Hell !
From:       Eric Sorensen <esorensen () arcormail ! de>
Date:       2001-04-13 2:37:12
[Download RAW message or body]


> 
> 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;

DONE !

> -----------------------------
> 
> and initiate them before createGUI() in initView() in the .cpp

createGUI is at the bottom of *App::initActions(), but I inserted the 
code above it.

> -------------------------------- 
> 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);

This is also done.  and it compiles quite nicely and does
absolutely nothing (that I can see)


What do you say that I should do with my XML file.  I use QDesigner (Qt 2.3.0)
and KDevelop 1.4
> ---------------------------------------
> and edit "*ui.rc" XML gui file
> 
> -*ui.rc--------------------------------------
> 
> 
> 
> <----------- add it
> 
> 
> 
> ------------------------------------
> 
> then compile it, it may help you
at least the project compiles again.

My project was initially created with the new project wizzard (KDE 2 Normal - \
Project). The problem may be that I don't see where the 'Top' menubar is defined.  I \
suspect that I  never get around to adding menu entries to THAT menubar.  The default \
KDE 2 project inserts a dozen or so 'KStdAction' in *App::initActions() but never \
defines the MenuBar itself.  Obviously I don't know where to look or what to do.  I \
get the feeling that I  missed someting here :-)

Any further advice for me?  Thank you for you efforts.

Eric Sorensen - an American lost some where in Germany


> 
> 
> from Korea 
> 
> 
> 
> 
> -------------
> 
> Not so special, just a little different.
> 
> from Dalsoogie.



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic