22#include "vdeletecmd.h"
23#include "vselection.h"
27 : VCommand( doc, i18n( "Delete Objects" ), "edit-delete" )
29 m_selection = document()->selection()->clone();
31 if( m_selection->objects().count() == 1 )
32 setName( i18n( "Delete Object" ) );
36 : VCommand( doc, i18n( "Delete Object" ), "edit-delete" )
39 m_selection->append( object );
42VDeleteCmd::~VDeleteCmd()
44 delete( m_selection );
51 VObjectListIterator itr( m_selection->objects() );
52 for ( ; itr.current() ; ++itr )
65 VObjectListIterator itr( m_selection->objects() );
66 for ( ; itr.current() ; ++itr )
The base class for all karbon commands.
VDocument * document() const Returns the document the command works on.
virtual void unexecute() Unexecutes the command.
virtual void execute() Executes the command.
All non-visual, static doc info is in here.
VSelection * selection() const Returns a pointer to the selection.
The base class for all karbon objects.
@ selected visible, active and can be manipulated by tools
@ deleted deleted, nearly dead
VSelection manages a set of selected vobjects.
void append() Adds all objects to the selection.
void clear() Removes the references to all objects, not the objects themselves.
void setSuccess(bool success=true) Set the success property.
|