32 template <
typename ScaleFun>
33 static void updateDuration(
34 SimpleScenario_T& scenar,
const TimeVal& newDuration, ScaleFun&& scaleMethod)
36 scenar.endEvent().setDate(newDuration);
37 scenar.endTimeSync().setDate(newDuration);
39 auto& interval = scenar.interval();
40 IntervalDurations::Algorithms::changeAllDurations(interval, newDuration);
41 for(
auto& process : interval.processes)
43 scaleMethod(process, newDuration);
50 return ::CommandFactoryName<SimpleScenario_T>();
52 const CommandKey& key()
const noexcept override {
return static_key(); }
53 QString description()
const override
55 return QObject::tr(
"Move a %1 event")
69 double y, ExpandMode mode, LockMode)
75 m_oldDate = interval.duration.defaultDuration();
88 auto& scenar = m_path.find(ctx);
105 auto& interval = scenar.interval();
106 m_saveData.reload(interval);
111 auto& scenar = m_path.find(ctx);
133 s << m_path << m_oldDate << m_newDate << (int)m_mode << m_saveData;
138 s >> m_path >> m_oldDate >> m_newDate >> mode >> m_saveData;
139 m_mode =
static_cast<ExpandMode
>(mode);
148 ExpandMode m_mode{ExpandMode::Scale};
Definition DocumentContext.hpp:18