karbon

VCommand Class Reference

#include <vcommand.h>

Inheritance diagram for VCommand:

VVisitor VAlignCmd VBooleanCmd VCleanUpCmd VClipartCmd VCreateShadowCmd VDeleteCmd VDeleteNodeCmd VDistributeCmd VFillCmd VGroupCmd VImageTool::VInsertImageCmd VInsertCmd VLayerCmd VReplacingCmd VShapeCmd VStrokeCmd VTransformCmd VTranslateBezierCmd VTranslatePointCmd VUnGroupCmd VZOrderCmd List of all members.

Detailed Description

The base class for all karbon commands.

It basically defines the common interface that all commands should implement.

Definition at line 41 of file vcommand.h.


Public Member Functions

 VCommand (VDocument *doc, const QString &name, const QString &icon="14_action")
virtual ~VCommand ()
virtual void execute ()=0
virtual void unexecute ()
virtual bool changesSelection () const
QString name () const
void setName (const QString &name)
QString icon () const
VDocumentdocument () const

Constructor & Destructor Documentation

VCommand::VCommand ( VDocument doc,
const QString &  name,
const QString &  icon = "14_action" 
) [inline]

Constructs a new command.

Parameters:
doc the document the command should work on
name the name of the command (appears in command history)
icon the icon of the command (appears in command history)

Definition at line 51 of file vcommand.h.

virtual VCommand::~VCommand (  )  [inline, virtual]

Destroys the command.

Definition at line 60 of file vcommand.h.


Member Function Documentation

virtual void VCommand::execute (  )  [pure virtual]

Executes the command.

All the changes to the document are done here. All commands have to implement this function.

Implemented in VAlignCmd, VBooleanCmd, VCleanUpCmd, VClipartCmd, VDeleteCmd, VDeleteNodeCmd, VDistributeCmd, VFillCmd, VGroupCmd, VInsertCmd, VLayerCmd, VReplacingCmd, VShapeCmd, VStrokeCmd, VTransformCmd, VTranslateBezierCmd, VTranslatePointCmd, VUnGroupCmd, VZOrderCmd, VImageTool::VInsertImageCmd, and VCreateShadowCmd.

virtual void VCommand::unexecute (  )  [inline, virtual]

virtual bool VCommand::changesSelection (  )  const [inline, virtual]

Returns if the command changes the actual document selection.

This flag is checked to determine if the document has to be redrawn.

Returns:
true if the selection is changed, else false

Reimplemented in VClipartCmd, VDeleteCmd, VDistributeCmd, VFillCmd, VShapeCmd, VStrokeCmd, VImageTool::VInsertImageCmd, VCreateShadowCmd, and VWhirlPinchCmd.

Definition at line 84 of file vcommand.h.

QString VCommand::name (  )  const [inline]

Returns the name of the command.

Returns:
the command name

Definition at line 91 of file vcommand.h.

void VCommand::setName ( const QString &  name  )  [inline]

Sets the name of the command.

Parameters:
name the new command name

Definition at line 101 of file vcommand.h.

QString VCommand::icon (  )  const [inline]

Returns the icon of the command.

Returns:
the command icon

Definition at line 111 of file vcommand.h.

VDocument* VCommand::document (  )  const [inline]

Returns the document the command works on.

Returns:
the command's document

Definition at line 121 of file vcommand.h.


The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys