KApplication::cut()....

Simon Hausmann hausmann at kde.org
Thu Sep 22 14:54:05 BST 2005


On Thursday 22 September 2005 15:41, Scott Wheeler wrote:
> On Thursday 22 September 2005 14:40, Benjamin Meyer wrote:
> > Yah they looked like good ideas and was a little surprised that I
> > couldn't find anything looking through several of the modules.  What do
> > you think of moving them to KMainWindow?
>
> I'm not really sure that they belong in KMainWindow since they're not
> window specific.  They're tied to focusWidget() which is a feature of
> QApplication.
>
> Put the other way -- why would you like to see them in KMainWindow?
>
> (I also noticed on doing a grep that at least DataKiosk and KTorrent are
> using these methods as well.)

Maybe we don't need those slots as publically accessible functions at all
and instead just need to provide methods that do what you already
pasted as the common way of using them:

	KStdAction::cut(kapp, SLOT(cut()), actionCollection);

Perhaps something like:

KMainWindow::createAutomaticCutAction(KActionCollection *collection = actionCollection())

The slot itself may not be related to the mainwindow, but the action is
bound to it after all. (strictly speaking only to the actioncollection but hey,
we're trying to simplify the common case :)

Simon




More information about the kde-core-devel mailing list