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

List:       kfm-devel
Subject:    Re: PATCH adds PluginInterface to KonqPopupMenu
From:       Simon Hausmann <hausmann () kde ! org>
Date:       2001-10-30 12:41:33
[Download RAW message or body]

On Tue, Oct 30, 2001 at 01:17:26PM +0100, Holger Freyther wrote:
> On Tuesday 30 October 2001 13:00, Simon Hausmann wrote:
> 
> > > Your're right- I didn't know about KActionMenu. I guess it's not working
> > > like this. KAction menu isn't exporting any signals like AboutToShow so
> > > it's not sufficent for my purpose. We could skip the slotXMLGUIFinished
> > > but then I would connect the signal in the constructor of my plugin.
> > > In a different thread I and Martijn talked about KActions. My post was
> > > called Kde3 ideas or something like this. It would be good fi KActions
> > > could export some signals. but it's off topic ( I would like to add it)
> > > Oj just read KActionMenu I'm able to retrieve the submenu.
> > > Couldn't there be a function like KActionMenu::insert( KactionMenu* ...).
> > > I know I could down_cast KActionMenu... just an idea
> >
> > Now I'm a little bit confused ;)
> >
> > Wouldn't KActionMenu::insert( KActionMenu * ) just be like
> > action->popup()->insertItem( otherActionMenu->popup(), ... ) ?
> >
> I wrote the first part, read more Kaction sources and added some stuff to the 
> paragraph above.
> The way you described will sure work but
> action->insert( otherActionMenu ); looks cleaner or doesn't it?

Hm, ok, we already have popup( const QPoint & ) , so I guess another
stub doesn't hurt. Hmmm, I agree on an insert( KActionMenu * ) stub
(David, what do you think?) , but I don't think we should add signal
forward to KActionMenu (like forwarding the aboutToShow() signal
from the popup menu) - we have the popupMenu() accessor for a reason
;-)

> > > > > Inheritance should be good
> > > > > class KonqXMLManipulator : KXMLGUIClient {}
> > > > > class KonqPopupMenu : KonqXMLManipulator : QPopupMenu {}
> > > >
> > > > Yup :) Maybe KonqXMLManipulator doesn't even need to inherit from
> > > > KXMLGUIClient (or does it need any specific functionality of
> > > > KXMLGUIClient?)
> > >
> > > I called it KonqXMLGUIClient : KXMLGUIClient. And it's needed and it's
> > > good for a plugin too. I think it's eases some work.
> >
> > But why is the inheritance needed? :) (I don't mind about it, I'm just
> > curious :)
> I'll try to explain this for KonqPopupMenu it's need to inherit the XML 
> manipulator stuff and the KXMLGUIClient. My way it just needs to inherit 
> KonqXMLGUIClient. KonqPopupMenu reimplemented some methods of KXMLGUIClient I 
> moved those to KonqXMLGUIClient.
> In KonqPopupMenu::addPlugins() I'm going to call insertChildClient( plugin ); 
> so yes it's really needed

Hmm hm hm ok, agreed :)

Simon

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

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