KFormDesigner::CommandGroup Class Reference
#include <commands.h>
Inheritance diagram for KFormDesigner::CommandGroup:

Detailed Description
A Command Group is a command that holds several subcommands. It will appear as one to the user and in the command history, but it can use the implementation of multiple commands internally. It extends KMacroCommand by providing the list of commands executed. Selected subcommands can be marked as nonexecutable by adding them using addCommand(KCommand *command, bool allowExecute) special method.
Definition at line 321 of file commands.h.
Public Member Functions | |
| CommandGroup (const QString &name, WidgetPropertySet *propSet) | |
| virtual | ~CommandGroup () |
| void | addCommand (KCommand *command, bool allowExecute) |
| virtual void | execute () |
| virtual void | unexecute () |
| virtual QString | name () const |
| const QPtrList< KCommand > & | commands () const |
| void | resetAllowExecuteFlags () |
| virtual void | debug () |
Protected Attributes | |
| SubCommands * | m_subCommands |
| QPtrDict< char > | m_commandsShouldntBeExecuted |
| Used to store pointers to subcommands that shouldn't be executed on CommandGroup::execute(). | |
| WidgetPropertySet * | m_propSet |
Constructor & Destructor Documentation
|
||||||||||||
|
Definition at line 1531 of file commands.cpp. |
|
|
Definition at line 1538 of file commands.cpp. References m_subCommands. |
Member Function Documentation
|
||||||||||||
|
Like KmacroCommand::addCommand(KCommand*) but if allowExecute is false, command will not be executed as a subcommand when CommandGroup::execute() is called. This is useful e.g. in KexiFormView::insertAutoFields(), where a number of subcommands of InsertWidgetCommand type and subcommands is groupped using CommandGroup but some of these subcommands are executed before executing CommandGroup::execute(). If allowExecute is true, this method behaves exactly like KmacroCommand::addCommand(KCommand*). Note that unexecute() doesn't check allowExecute flag: all subcommands will be unexecuted (in reverse order to the one in which they were added). Definition at line 1548 of file commands.cpp. References m_commandsShouldntBeExecuted, and m_subCommands. Referenced by KFormDesigner::WidgetPropertySet::createPropertyCommandsInDesignMode(), and KexiFormView::insertAutoFields(). |
|
|
Definition at line 1543 of file commands.cpp. References m_subCommands. Referenced by KexiFormManager::slotHistoryCommandExecuted(). |
|
|
Implements KFormDesigner::Command. Definition at line 1586 of file commands.cpp. References m_commandsShouldntBeExecuted, m_subCommands, and name(). |
|
|
Executes all subcommands added to this group in the same order as they were added. Subcommands added with addCommand(KCommand *command, bool allowExecute) where allowExecute == false, will not be executed. Definition at line 1558 of file commands.cpp. References m_commandsShouldntBeExecuted, m_propSet, m_subCommands, and KFormDesigner::FormManager::self(). Referenced by KexiFormView::insertAutoFields(). |
|
|
Definition at line 1575 of file commands.cpp. References m_subCommands. Referenced by debug(). |
|
|
Resets all 'allowExecute' flags that was set in addCommand(). Call this after calling CommandGroup::execute() to ensure that in the future, when REDO is be executed, all subcommands will be executed. Definition at line 1580 of file commands.cpp. References m_commandsShouldntBeExecuted. Referenced by KexiFormView::insertAutoFields(). |
|
|
Unexecutes all subcommands added to this group, (in reversed order). Definition at line 1568 of file commands.cpp. References m_propSet, m_subCommands, and KFormDesigner::FormManager::self(). |
Member Data Documentation
|
|
Used to store pointers to subcommands that shouldn't be executed on CommandGroup::execute().
Definition at line 374 of file commands.h. Referenced by addCommand(), debug(), execute(), and resetAllowExecuteFlags(). |
|
|
Definition at line 375 of file commands.h. Referenced by execute(), and unexecute(). |
|
|
Definition at line 370 of file commands.h. Referenced by addCommand(), commands(), debug(), execute(), name(), unexecute(), and ~CommandGroup(). |
The documentation for this class was generated from the following files:
