00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef COMMAND_GROUP_H
00024 #define COMMAND_GROUP_H
00025
00026 #include "Command.h"
00027
00028 #include <QList>
00029
00030 class CommandGroup : public Command
00031 {
00032 public :
00033 CommandGroup(ContextItem* parent, const QString& des, bool historable=true)
00034 : Command(parent, des)
00035 {
00036 m_isHistorable = historable;
00037 };
00038 ~CommandGroup();
00039
00040 int prepare_actions();
00041 int do_action();
00042 int undo_action();
00043
00044 void add_command(Command* cmd) {
00045 Q_ASSERT(cmd);
00046 m_commands.append(cmd);
00047 }
00048 ;
00049
00050 private :
00051 QList<Command* > m_commands;
00052
00053 };
00054
00055 #endif
00056
00057
00058