Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

Rosegarden::BasicCommand::BasicCommand ( const QString &  name,
Segment segment,
timeT  start,
timeT  end,
bool  bruteForceRedoRequired = false 
) [protected]

You should pass "bruteForceRedoRequired = true" if your subclass's implementation of modifySegment uses discrete event pointers or segment iterators to determine which events to modify, in which case it won't work when replayed for redo because the pointers may no longer be valid. In which case, BasicCommand will implement redo much like undo, and will only call your modifySegment the very first time the command object is executed.

It is always safe to pass bruteForceRedoRequired true, it's just normally a waste of memory.

Definition at line 22 of file BasicCommand.cpp.

References Rosegarden::Segment::clear(), Rosegarden::Segment::erase(), Rosegarden::Segment::findTime(), Rosegarden::Segment::getType(), and Rosegarden::Segment::insert().

BasicCommand::BasicCommand(const QString &name, Segment &segment,
                           timeT start, timeT end, bool bruteForceRedo) :
    m_startTime(calculateStartTime(start, segment)),
    m_endTime(calculateEndTime(end, segment)),
    m_savedEvents(segment.getType(), m_startTime),

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index