Adding KUndoGroup

David Faure faure at kde.org
Fri May 2 09:46:58 BST 2008


On Thursday 01 May 2008, Albert Astals Cid wrote:
> A Dijous 01 Maig 2008, Albert Astals Cid va escriure:
> > Might i add KUndoGroup that inherits QUndoGroup and adds proper
> > QAction *createRedoAction(KActionCollection* actionCollection, const
> > QString& actionName)
> > and
> > QAction *createUndoAction(KActionCollection* actionCollection, const
> > QString& actionName)
> > like KUndoStack does?
> >
> > That is, set the KDE proper icon, icon text, shortcut and add it to the
> > actioncollection.
> >
> > Albert
> 
> Well, i did some copy&paste, here is the patch i'm proposing.

Just a thought:
This data is in KStandardAction already... does one -have- to call QUndoGroup::createRedoAction,
or couldn't one just do KStandardAction::undo(theUndoGroup, SLOT(undo()), this) ?
Then we wouldn't need KUndoGroup or KUndoStack at all...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list