lib

Command Class Reference

Inheritance diagram for Command:

PlainCommand KNamedCommand KCommand FontCommand KFCAdd KFCAddReplacing KFCAddToken KFCRemove KFCRemoveEnclosing KFCRemoveSelection CharFamilyCommand CharStyleCommand KFCAddGenericIndex KFCReplace KFCAddIndex KFCReplaceToken KFCSplitToken List of all members.

Detailed Description

Definition at line 79 of file kformulacommand.h.


Public Member Functions

 Command (const QString &name, Container *document)
virtual ~Command ()

Protected Member Functions

FormulaCursorgetExecuteCursor ()
FormulaCursorgetUnexecuteCursor ()
void setExecuteCursor (FormulaCursor *cursor)
void setUnexecuteCursor (FormulaCursor *cursor)
FormulaCursorgetActiveCursor ()
void testDirty ()
ContainergetDocument () const

Constructor & Destructor Documentation

Command::Command ( const QString &  name,
Container document 
)

Sets up the command.

Be careful not to change the cursor in the constructor of any command. Each command must use the selection it finds when it is executed for the first time. This way you can use the KMacroCommand .

Parameters:
name a description to be used as menu entry.
document the container we are working for.

Definition at line 50 of file kformulacommand.cc.


Member Function Documentation

FormulaCursor * Command::getExecuteCursor (  )  [protected]

Returns:
the cursor that is to be used to execute the command.

Definition at line 61 of file kformulacommand.cc.

FormulaCursor * Command::getUnexecuteCursor (  )  [protected]

Returns:
the cursor that is to be used to unexecute the command.

Definition at line 79 of file kformulacommand.cc.

void Command::setExecuteCursor ( FormulaCursor cursor  )  [protected]

Saves the cursor that is used to execute the command.

Definition at line 73 of file kformulacommand.cc.

void Command::setUnexecuteCursor ( FormulaCursor cursor  )  [protected]

Sets the cursor that is to be used to unexecute the command.

This has to be called by execute after the formula has been changed but before the cursor has been normalized.

Definition at line 87 of file kformulacommand.cc.

FormulaCursor* Command::getActiveCursor (  )  [inline, protected]

Returns:
the cursor that is active.

It will be used to execute the command.

Definition at line 126 of file kformulacommand.h.

void Command::testDirty (  )  [inline, protected]

Tells the document to check if the formula changed.

Needs to be called by each execute and unexecute .

Definition at line 132 of file kformulacommand.h.

Container* Command::getDocument (  )  const [inline, protected]

Returns:
our document.

Definition at line 137 of file kformulacommand.h.


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