comparison base/Command.cpp @ 47:bac8b14ab355

* Add menu for re-adding existing layers * Fix layer tree window so that it at least approximates correct * Add bundled operations in command history, for use with things like multiple consecutive changes to a parameter value * Disambiguate plugins that happen to have identical descriptions * Add spectral centroid plugin (could use some parameters!) * Some other fixes
author Chris Cannam
date Fri, 17 Mar 2006 17:38:28 +0000
parents a7ed14263fe4
children 39ae3dee27b9
comparison
equal deleted inserted replaced
46:5364a9d338a2 47:bac8b14ab355
39 return; 39 return;
40 } 40 }
41 } 41 }
42 } 42 }
43 43
44 bool
45 MacroCommand::haveCommands() const
46 {
47 return !m_commands.empty();
48 }
49
44 void 50 void
45 MacroCommand::execute() 51 MacroCommand::execute()
46 { 52 {
47 for (size_t i = 0; i < m_commands.size(); ++i) { 53 for (size_t i = 0; i < m_commands.size(); ++i) {
48 m_commands[i]->execute(); 54 m_commands[i]->execute();
55 for (size_t i = 0; i < m_commands.size(); ++i) { 61 for (size_t i = 0; i < m_commands.size(); ++i) {
56 m_commands[m_commands.size() - i - 1]->unexecute(); 62 m_commands[m_commands.size() - i - 1]->unexecute();
57 } 63 }
58 } 64 }
59 65
66 QString
67 MacroCommand::getName() const
68 {
69 return m_name;
70 }
71
72 void
73 MacroCommand::setName(QString name)
74 {
75 m_name = name;
76 }
77