• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDE3Support

K3Command Class Reference

#include <k3command.h>

Inheritance diagram for K3Command:

Inheritance graph
[legend]

List of all members.


Detailed Description

The abstract base class for all Commands.

Commands are used to store information needed for Undo/Redo functionality...

Note: you might want to use the QUndo framework instead. It didn't exist when K3Command was written.

Definition at line 41 of file k3command.h.


Public Member Functions

virtual void execute ()=0
virtual QString name () const =0
virtual void unexecute ()=0
virtual ~K3Command ()

Protected Member Functions

 K3Command ()
virtual void virtual_hook (int id, void *data)

Constructor & Destructor Documentation

K3Command::K3Command (  )  [protected]

Creates a command.

Definition at line 33 of file k3command.cpp.

K3Command::~K3Command (  )  [virtual]

Definition at line 38 of file k3command.cpp.


Member Function Documentation

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

The main method: executes this command.

Implement here what this command is about, and remember to record any information that will be helpful for unexecute.

Implemented in K3MacroCommand.

virtual QString K3Command::name (  )  const [pure virtual]

Returns:
the name of this command, translated, since it will appear in the menus.

Implemented in K3NamedCommand.

virtual void K3Command::unexecute (  )  [pure virtual]

Unexecutes (undo) this command.

Implement here the steps to take for undoing the command. If your application uses actions for everything (it should), and if you implement unexecute correctly, the application is in the same state after unexecute as it was before execute. This means, the next call to execute will do the same thing as it did the first time.

Implemented in K3MacroCommand.

void K3Command::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented in K3NamedCommand, and K3MacroCommand.

Definition at line 435 of file k3command.cpp.


The documentation for this class was generated from the following files:
  • k3command.h
  • k3command.cpp

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal