[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KApplication::cut()....
From: Benjamin Meyer <ben () meyerhome ! net>
Date: 2005-09-23 12:43:24
Message-ID: 200509230902.21913.ben () meyerhome ! net
[Download RAW message or body]
On Friday 23 September 2005 8:14 am, Simon Hausmann wrote:
> On Friday 23 September 2005 14:04, Joseph Wenninger wrote:
> > Hi !
> >
> > I don't think it really belongs to KMainWindow. What about a a KFramework
> > (find a better name) class, which contains all those "global" convenience
> > functions ? I guess there will be more of those in other classes too,
> > which are not really associated with the class they are in ?
>
> Why bother with having those functions public at all? Most of the time you
> just want to get the action object, and for those it definitely makes sense
> to bind them to a mainwindow.
>
> Simon
What functions something like this:
/**
* If the widget with focus provides a cut() slot, call that slot. Thus
for a
* simple application cut can be implemented as:
* \code
* createAutomaticCutAction(actionCollection());
* \endcode
*/
KAction *createAutomaticCutAction(KActionCollection *collection) const;
KAction *KMainWindow::createAutomaticCutAction(KActionCollection *collection)
const
{
return KStdAction::cut( this, SLOT( invokeEditSlot( SLOT( cut() ) ) ),
collection );
}
-Benjamin Meyer
--
aka icefox
Public Key: http://www.icefox.net/public_key.asc
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic