22#include "vcleanupcmd.h"
27 : VCommand( doc, i18n( "Clean Up" ) )
31VCleanUpCmd::~VCleanUpCmd()
47VCleanUpCmd::visitVLayer( VLayer& layer )
49 VObjectListIterator itr( layer. objects() );
50 for( ; itr.current(); ++itr )
54 delete( itr.current() );
55 layer. take( *itr.current() );
The base class for all karbon commands.
virtual void unexecute() Unexecutes the command.
VDocument * document() const Returns the document the command works on.
virtual void execute()=0 Executes the command.
All non-visual, static doc info is in here.
void take(const VObject &object) Removes the reference to child object, not the object itself.
const VObjectList & objects() const Read only access to the grouped objects.
VLayer manages a set of vobjects.
@ deleted deleted, nearly dead
virtual bool visit(VObject &object) General visit method.
|