Main plug-in of score. More...
Detailed Description
Main plug-in of score.
This plug-in introduces the central logic of score : a hierarchical model of objects in a timeline.
It also has the core graphics logic of score based on QGraphicsScene and QGraphicsView.
As such, it is quite complex and provides a lot of classes.
We have :
- The Scenario::ProcessModel process.
- The Scenario::PanelDelegate used to display elements.
- The Scenario::ScenarioDocumentModel, Scenario::ScenarioDocumentPresenter, Scenario::ScenarioDocumentView classes which set-up and displays the central part of an score document.
- The Scenario::ScenarioApplicationPlugin which handles tools, Actions, and process focus.
- Model-view-presenter classes for the major score concepts :
- Scenario::IntervalModel,
- Scenario::EventModel,
- Scenario::TimeSyncModel,
- Scenario::StateModel,
- Scenario::RackModel,
- Scenario::SlotModel
- Scenario::BaseScenario is a minimalist, fixed scenario with a single interval, a start state and an end state.
- Inspector elements for all these objects
- Scenario::Palette handles user input, movements, etc.
Typedefs | |
using | SavedPort = Dataflow::SavedPort |
template<typename System_T > | |
using | GenericIntervalComponent = Scenario::IntervalComponent< score::GenericComponent< System_T > > |
using | GraphVertex = Scenario::TimeSyncModel * |
using | GraphEdge = Scenario::IntervalModel * |
using | Graph = boost::directed_graph< GraphVertex, GraphEdge > |
using | Rack = std::vector< Slot > |
using | FullRack = std::vector< FullSlot > |
using | TimeSignatureMapDtlVector = std::vector< boost::container::dtl::pair< TimeVal, ossia::time_signature > > |
using | TimeSignatureMapStdVector = std::vector< std::pair< TimeVal, ossia::time_signature > > |
using | TimeSignatureFlatMap = boost::container::flat_map< TimeVal, ossia::time_signature, std::less< TimeVal >, TimeSignatureMapStdVector > |
using | TimeSignatureFlatMapImpl = std::remove_cvref_t< decltype(TimeSignatureFlatMap{}.tree().get_sequence_cref())> |
using | CentralDisplay = ossia::slow_variant< ossia::monostate, CentralIntervalDisplay, CentralNodalDisplay > |
using | TempoFactory = Process::ProcessFactory_T< Scenario::TempoProcess > |
using | TempoLayerFactory = Curve::CurveLayerFactory_T< Scenario::TempoProcess, Scenario::TempoPresenter, Scenario::TempoView, Automation::Colors, Process::DefaultHeaderDelegate > |
using | ClickOnNothing_Event = PositionedScenarioEvent< ClickOnNothing > |
using | ClickOnTimeSync_Event = PositionedWithId_ScenarioEvent< TimeSyncModel, ClickOnTimeSync > |
using | ClickOnEvent_Event = PositionedWithId_ScenarioEvent< EventModel, ClickOnEvent > |
using | ClickOnInterval_Event = PositionedWithId_ScenarioEvent< IntervalModel, ClickOnInterval > |
using | ClickOnState_Event = PositionedWithId_ScenarioEvent< StateModel, ClickOnState > |
using | ClickOnTrigger_Event = score::NumberedWithPath_Event< TriggerModel, ClickOnTrigger > |
using | ClickOnLeftBrace_Event = PositionedWithId_ScenarioEvent< IntervalModel, ClickOnLeftBrace > |
using | ClickOnRightBrace_Event = PositionedWithId_ScenarioEvent< IntervalModel, ClickOnRightBrace > |
using | MoveOnNothing_Event = PositionedScenarioEvent< MoveOnNothing > |
using | MoveOnTimeSync_Event = PositionedWithId_ScenarioEvent< TimeSyncModel, MoveOnTimeSync > |
using | MoveOnEvent_Event = PositionedWithId_ScenarioEvent< EventModel, MoveOnEvent > |
using | MoveOnInterval_Event = PositionedWithId_ScenarioEvent< IntervalModel, MoveOnInterval > |
using | MoveOnState_Event = PositionedWithId_ScenarioEvent< StateModel, MoveOnState > |
using | MoveOnTrigger_Event = score::NumberedWithPath_Event< TriggerModel, MoveOnTrigger > |
using | MoveOnLeftBrace_Event = PositionedWithId_ScenarioEvent< IntervalModel, MoveOnLeftBrace > |
using | MoveOnRightBrace_Event = PositionedWithId_ScenarioEvent< IntervalModel, MoveOnRightBrace > |
using | ReleaseOnNothing_Event = PositionedScenarioEvent< ReleaseOnNothing > |
using | ReleaseOnTimeSync_Event = PositionedWithId_ScenarioEvent< TimeSyncModel, ReleaseOnTimeSync > |
using | ReleaseOnEvent_Event = PositionedWithId_ScenarioEvent< EventModel, ReleaseOnEvent > |
using | ReleaseOnInterval_Event = PositionedWithId_ScenarioEvent< IntervalModel, ReleaseOnInterval > |
using | ReleaseOnState_Event = PositionedWithId_ScenarioEvent< StateModel, ReleaseOnState > |
using | ReleaseOnTrigger_Event = score::NumberedWithPath_Event< TriggerModel, ReleaseOnTrigger > |
using | ReleaseOnLeftBrace_Event = PositionedWithId_ScenarioEvent< IntervalModel, ReleaseOnLeftBrace > |
using | ReleaseOnRightBrace_Event = PositionedWithId_ScenarioEvent< IntervalModel, ReleaseOnRightBrace > |
template<typename Scenario_T , typename T > | |
using | GenericTransition = score::StateAwareTransition< Scenario::StateBase< Scenario_T >, T > |
template<typename Scenario_T > | |
using | ClickOnEvent_Transition = Transition_T< Scenario_T, ClickOnEvent > |
template<typename Scenario_T > | |
using | MoveOnEvent_Transition = Transition_T< Scenario_T, MoveOnEvent > |
template<typename Scenario_T > | |
using | ReleaseOnEvent_Transition = Transition_T< Scenario_T, ReleaseOnEvent > |
template<typename Scenario_T > | |
using | ClickOnInterval_Transition = Transition_T< Scenario_T, ClickOnInterval > |
template<typename Scenario_T > | |
using | MoveOnInterval_Transition = Transition_T< Scenario_T, MoveOnInterval > |
template<typename Scenario_T > | |
using | ClickOnLeftBrace_Transition = Transition_T< Scenario_T, ClickOnLeftBrace > |
template<typename Scenario_T > | |
using | ClickOnRightBrace_Transition = Transition_T< Scenario_T, ClickOnRightBrace > |
template<typename Scenario_T > | |
using | ClickOnNothing_Transition = Transition_T< Scenario_T, ClickOnNothing > |
template<typename Scenario_T > | |
using | MoveOnNothing_Transition = Transition_T< Scenario_T, MoveOnNothing > |
template<typename Scenario_T > | |
using | ReleaseOnNothing_Transition = Transition_T< Scenario_T, ReleaseOnNothing > |
template<typename Scenario_T > | |
using | ClickOnState_Transition = Transition_T< Scenario_T, ClickOnState > |
template<typename Scenario_T > | |
using | MoveOnState_Transition = Transition_T< Scenario_T, MoveOnState > |
template<typename Scenario_T > | |
using | ReleaseOnState_Transition = Transition_T< Scenario_T, ReleaseOnState > |
template<typename Scenario_T > | |
using | ClickOnTimeSync_Transition = Transition_T< Scenario_T, ClickOnTimeSync > |
template<typename Scenario_T > | |
using | MoveOnTimeSync_Transition = Transition_T< Scenario_T, MoveOnTimeSync > |
template<typename Scenario_T > | |
using | ReleaseOnTimeSync_Transition = Transition_T< Scenario_T, ReleaseOnTimeSync > |
using | ScenarioFactory = Process::ProcessFactory_T< Scenario::ProcessModel > |
Functions | |
MagneticStates | magneticStates (MagneticStates cur, Scenario::Point pt, const Scenario::ScenarioPresenter &pres) |
auto | selectedIntervalsInCurrentDocument (const score::GUIApplicationContext &appContext) |
template<typename Scenario_T > | |
void | copySelected (JSONReader &r, const Scenario_T &sm, CategorisedScenario &cs, QObject *parent) |
void | copySelectedScenarioElements (JSONReader &r, const Scenario::ProcessModel &sm, CategorisedScenario &cat) |
void | copyWholeScenario (JSONReader &r, const Scenario::ProcessModel &sm) |
void | copySelectedScenarioElements (JSONReader &r, const Scenario::ProcessModel &sm) |
void | copySelectedScenarioElements (JSONReader &r, const BaseScenarioContainer &sm, QObject *parent) |
template<typename Vector > | |
std::vector< const typename Vector::value_type * > | selectedElementsVec (const Vector &in) |
void | copySelectedElementsToJson (JSONReader &r, ScenarioInterface &si, const score::DocumentContext &ctx) |
bool | copySelectedProcesses (JSONReader &r, const score::DocumentContext &ctx) |
void | copyBaseInterval (JSONReader &, const IntervalModel &) |
template<typename Data > | |
QAction * | makeToolbarAction (const QString &name, QObject *parent, const Data &data, const QKeySequence &shortcut) |
const ScenarioInterface * | focusedScenarioInterface (const score::DocumentContext &ctx) |
const ProcessModel * | focusedScenarioModel (const score::DocumentContext &ctx) |
void | test_parse_expr_full () |
void | CreateCurves (const std::vector< const Scenario::IntervalModel * > &selected_intervals, const score::CommandStackFacade &stack) |
std::vector< Process::ProcessModel * > | CreateCurvesFromAddress (const Scenario::IntervalModel &interval, const Device::FullAddressAccessorSettings &as, Scenario::Command::Macro &m) |
int | CreateCurvesFromAddresses (const Scenario::IntervalModel &interval, const Scenario::ScenarioInterface &scenar, const CategorizedAddresses &addresses, int N, Scenario::Command::Macro &m, std::vector< Process::ProcessModel * > &created) |
std::vector< Process::ProcessModel * > | CreateCurvesFromAddresses (const Scenario::IntervalModel &interval, const std::vector< Device::FullAddressSettings > &a, Scenario::Command::Macro &m) |
std::vector< Process::ProcessModel * > | CreateCurvesFromAddresses (const std::vector< const Scenario::IntervalModel * > &selected_intervals, const std::vector< Device::FullAddressSettings > &a, Scenario::Command::Macro &m) |
void | CreateCurvesFromAddresses (const std::vector< const Scenario::IntervalModel * > &selected_intervals, const std::vector< Device::FullAddressSettings > &a, const score::CommandStackFacade &stack) |
template<typename Fun > | |
void | DoForSelectedIntervals (const score::DocumentContext &doc, Fun f) |
void | SnapshotParametersInStates (const score::DocumentContext &doc) |
double | findSlotHeightByProcess (const IntervalModel &itv, const Process::ProcessModel &proc) |
void | DecapsulateScenario (const ProcessModel &scenar, const score::CommandStackFacade &stack) |
void | EncapsulateInScenario (const ProcessModel &scenar, const score::CommandStackFacade &stack) |
void | Duplicate (const ProcessModel &scenar, const score::CommandStackFacade &stack) |
EncapsData | EncapsulateElements (Scenario::Command::Macro &m, CategorisedScenario &cat, const ProcessModel &scenar) |
std::vector< Process::CableData > | cableDataFromCablesJson (const rapidjson::Document::ConstArray &arr) |
std::vector< Process::CableData > | cableDataFromCablesJson (const rapidjson::Document::Array &arr) |
template<typename CopiedObjects , typename ParentObject > | |
ossia::flat_map< Id< Process::Cable >, Process::CableData > | mapCopiedCables (const score::DocumentContext &ctx, std::vector< Process::CableData > &cables, std::vector< CopiedObjects * > &intervals, const std::vector< Id< CopiedObjects >> &interval_ids, const ParentObject &scenario) |
const QVector< Id< IntervalModel > > | intervalsBeforeTimeSync (const BaseScenario &scen, const Id< TimeSyncModel > &timeSyncId) |
auto | intervals (const BaseScenarioContainer &scenar) |
auto | events (const BaseScenarioContainer &scenar) |
auto | timeSyncs (const BaseScenarioContainer &scenar) |
auto | states (const BaseScenarioContainer &scenar) |
const QPainterPath & | startMarkerPath () |
void | swap (Scenario::Slot &lhs, Scenario::Slot &rhs) |
bool | isInFullView (const IntervalModel &cstr) noexcept |
bool | isInFullView (const Process::ProcessModel &cstr) noexcept |
bool | isBus (const IntervalModel &model, const score::DocumentContext &ctx) noexcept |
ParentTimeInfo | closestParentWithMusicalMetrics (const IntervalModel *self) |
ParentTimeInfo | closestParentWithQuantification (const IntervalModel *self) |
ParentTimeInfo | closestParentWithTempo (const IntervalModel *self) |
QPointF | newProcessPosition (const IntervalModel &cst) noexcept |
IntervalModel * | closestParentInterval (const QObject *parentObj) noexcept |
TimeVal | timeDelta (const IntervalModel *self, const IntervalModel *parent) |
IntervalPixmaps & | intervalPixmaps (const Process::Style &style) |
template<typename T > | |
const T::view_type * | view (const T *obj) |
template<typename T > | |
T::view_type * | view (T *obj) |
template<typename T > | |
T::view_type & | view (const T &obj) |
template<typename T > | |
T::view_type & | view (T &obj) |
Process::ProcessModel * | closestParentProcessBeforeInterval (const QObject *obj) |
void | createProcessInCable (Scenario::ScenarioDocumentPresenter &parent, const Library::ProcessData &dat, const Process::Cable &cbl) |
void | loadPresetInCable (Scenario::ScenarioDocumentPresenter &parent, const Process::Preset &dat, const Process::Cable &cbl) |
void | createProcessBeforePort (Scenario::ScenarioDocumentPresenter &parent, const Library::ProcessData &dat, const Process::ProcessModel &parentProcess, const Process::Inlet &p) |
void | createProcessAfterPort (Scenario::ScenarioDocumentPresenter &parent, const Library::ProcessData &dat, const Process::ProcessModel &parentProcess, const Process::Outlet &p) |
void | loadPresetBeforePort (Scenario::ScenarioDocumentPresenter &parent, const Process::Preset &dat, const Process::ProcessModel &parentProcess, const Process::Inlet &p) |
void | loadPresetAfterPort (Scenario::ScenarioDocumentPresenter &parent, const Process::Preset &dat, const Process::ProcessModel &parentProcess, const Process::Outlet &p) |
QVariant | valueColumnData (const MessageItemModel::node_type &node, int role) |
Process::MessageNode * | getNodeFromString_impl (Process::MessageNode &n, QStringList::const_iterator begin, QStringList::const_iterator end) |
void | updateTreeWithMessageList (Process::MessageNode &rootNode, State::MessageList lst) |
void | updateTreeWithMessageList (Process::MessageNode &rootNode, State::MessageList lst, const Id< Process::ProcessModel > &proc, ProcessPosition pos) |
void | updateTreeWithRemovedProcess (Process::MessageNode &rootNode, const Id< Process::ProcessModel > &proc, ProcessPosition pos) |
void | updateTreeWithRemovedInterval (Process::MessageNode &rootNode, ProcessPosition pos) |
void | updateTreeWithRemovedUserMessage (Process::MessageNode &rootNode, const State::AddressAccessor &addr) |
void | updateTreeWithRemovedNode (Process::MessageNode &rootNode, const State::AddressAccessor &addr) |
void | removeAllUserMessages (Process::MessageNode &rootNode) |
int | countNodes (Process::MessageNode &rootNode) |
Process::MessageNode * | getNthChild (Process::MessageNode &rootNode, int n) |
int | getChildIndex (Process::MessageNode &rootNode, Process::MessageNode *node) |
void | renameAddress (Process::MessageNode &rootNode, const State::AddressAccessor &oldAddr, const State::AddressAccessor &newAddr) |
void | findAndReplaceAddresses (Process::MessageNode &rootNode, const State::Address &oldAddr, const State::Address &newAddr) |
void | updateModelWithMessageList (MessageItemModel &model, State::MessageList lst) |
void | renameAddress (MessageItemModel &model, const State::AddressAccessor &oldAddr, const State::AddressAccessor &newAddr) |
void | updateModelWithMessageList (MessageItemModel &model, State::MessageList lst, const Id< Process::ProcessModel > &proc, ProcessPosition pos) |
void | updateModelWithRemovedProcess (MessageItemModel &model, const Id< Process::ProcessModel > &proc, ProcessPosition pos) |
void | updateModelWithRemovedInterval (MessageItemModel &model, ProcessPosition pos) |
void | updateModelWithRemovedUserMessage (MessageItemModel &model, const State::AddressAccessor &addr) |
void | updateModelWithRemovedNode (MessageItemModel &model, const State::AddressAccessor &addr) |
void | removeAllUserMessages (MessageItemModel &model) |
void | layoutTimeText (ossia::bar_time timings, ossia::bar_time increment, QTextLayout &layout) |
template<class... Durations, class DurationIn > | |
std::tuple< Durations... > | break_down_durations (DurationIn d) |
void | layoutTimeText (TimeRuler::Format format, QTextLayout &layout, std::chrono::nanoseconds t) |
auto | colorPalette () -> color_widgets::ColorPaletteModel & |
template<typename T > | |
void | add_if_contains (const T &o, const QString &str, Selection &sel) |
void | add_if_contains (const Scenario::CommentBlockModel &o, const QString &str, Selection &sel) |
template<int N> | |
QString | debug_StateMachineIDs () |
Point | ConvertToScenarioPoint (const QPointF &point, ZoomRatio zoom, double height) noexcept |
QPointF | ConvertFromScenarioPoint (const Point &point, ZoomRatio zoom, double height) noexcept |
constexpr bool | isCreationTool (Tool t) noexcept |
void | doStateSelection (Selection &sel, const StateModel &m, const BaseScenario &model) |
void | doStateSelection (Selection &sel, const StateModel &m, const ProcessModel &model) |
template<typename Scenario_T > | |
StateModel & | startState (const IntervalModel &cst, const Scenario_T &scenario) |
template<typename Scenario_T > | |
StateModel & | endState (const IntervalModel &cst, const Scenario_T &scenario) |
template<typename Scenario_T > | |
EventModel & | startEvent (const IntervalModel &cst, const Scenario_T &scenario) |
template<typename Scenario_T > | |
EventModel & | endEvent (const IntervalModel &cst, const Scenario_T &scenario) |
template<typename Scenario_T > | |
TimeSyncModel & | startTimeSync (const IntervalModel &cst, const Scenario_T &scenario) |
template<typename Scenario_T > | |
TimeSyncModel & | endTimeSync (const IntervalModel &cst, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const TimeSyncModel & | parentTimeSync (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const TimeSyncModel & | parentTimeSync (const Id< EventModel > &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const EventModel & | parentEvent (const Id< StateModel > &st, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const EventModel & | parentEvent (const StateModel &st, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const TimeSyncModel & | parentTimeSync (const StateModel &st, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const TimeSyncModel & | parentTimeSync (const Id< StateModel > &st, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const TimeSyncModel & | parentTimeSync (const TimeSyncModel &st, const Scenario_T &) |
template<typename Scenario_T > | |
const IntervalModel & | previousInterval (const StateModel &st, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const IntervalModel & | nextInterval (const StateModel &st, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | nextIntervals (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | nextNonGraphIntervals (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | previousIntervals (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | previousNonGraphIntervals (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | hasPreviousIntervals (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | hasNextIntervals (const EventModel &ev, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | hasPreviousIntervals (const IntervalModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | hasNextIntervals (const IntervalModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | isSingular (const IntervalModel &itv, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | nextIntervals (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | nextNonGraphIntervals (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | previousIntervals (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< IntervalModel > > | previousNonGraphIntervals (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | hasPreviousIntervals (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
bool | hasNextIntervals (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Scenario_T > | |
std::list< Id< StateModel > > | states (const TimeSyncModel &tn, const Scenario_T &scenario) |
template<typename Element_T , typename Scenario_T > | |
const TimeVal & | date (const Element_T &e, const Scenario_T &scenario) |
template<typename Scenario_T > | |
const TimeVal & | date (const IntervalModel &e, const Scenario_T &scenario) |
template<typename Element_T > | |
Scenario::ScenarioInterface & | parentScenario (Element_T &&e) |
void | AddProcess (IntervalModel &interval, Process::ProcessModel *proc) |
void | RemoveProcess (IntervalModel &interval, const Id< Process::ProcessModel > &proc_id) |
void | EraseProcess (IntervalModel &interval, const Id< Process::ProcessModel > &proc_id) |
void | SetPreviousInterval (StateModel &state, const IntervalModel &interval) |
void | SetNextInterval (StateModel &state, const IntervalModel &interval) |
void | SetNoPreviousInterval (StateModel &state) |
void | SetNoNextInterval (StateModel &state) |
void | updateTimeSyncExtent (TimeSyncPresenter &tn) |
void | updateEventExtent (ScenarioPresenter &pres, EventPresenter &ev, double view_height) |
void | updateIntervalVerticalPos (ScenarioPresenter &pres, IntervalModel &itv, double y, double view_height) |
void | clearContentFromSelection (const Scenario::ScenarioInterface &si, const score::DocumentContext &ctx) |
void | removeSelection (const Scenario::ProcessModel &scenario, const score::DocumentContext &ctx) |
template<typename T > | |
auto | make_ordered (const Scenario::ProcessModel &scenario) |
void | mergeTimeSyncs (const Scenario::ProcessModel &scenario, const score::CommandStackFacade &f) |
void | mergeEvents (const Scenario::ProcessModel &scenario, const score::CommandStackFacade &f) |
void | removeSelection (const BaseScenario &, const score::DocumentContext &ctx) |
void | removeSelection (const score::DocumentContext &ctx) |
template<typename T > | |
auto | startId () |
template<typename T > | |
auto | endId () |
const QVector< Id< IntervalModel > > | intervalsBeforeTimeSync (const Scenario::ProcessModel &scenar, const Id< TimeSyncModel > &timeSyncId) |
Scenario::ProcessModel * | closestParentScenario (const QObject *parentObj) noexcept |
auto & | intervals (const Scenario::ProcessModel &scenar) |
auto & | events (const Scenario::ProcessModel &scenar) |
auto & | timeSyncs (const Scenario::ProcessModel &scenar) |
auto & | states (const Scenario::ProcessModel &scenar) |
template<typename Scenario_T > | |
ossia::small_vector< StateModel *, 8 > | getStates (const TimeSyncModel &ts, const Scenario_T &scenario) |
const StateModel * | furthestSelectedState (const Scenario::ProcessModel &scenar) |
const EventModel * | furthestSelectedEvent (const Scenario::ScenarioPresenter &scenar) |
const TimeSyncModel * | furthestSelectedSync (const Scenario::ScenarioPresenter &scenar) |
const StateModel * | furthestSelectedStateWithoutFollowingInterval (const Scenario::ProcessModel &scenar) |
const TimeSyncModel * | furthestHierarchicallySelectedTimeSync (const ScenarioPresenter &scenario) |
std::vector< QObject * > | findByAddress (const score::DocumentContext &ctx, const State::Address &root) |
bool | selectionHasScenarioElements (const Selection &sel) |
template<typename T > | |
void | update_min_max (const T &val, T &min, T &max) |
double | getNewLayerHeight (const score::ApplicationContext &ctx, const Process::ProcessModel &proc) noexcept |
TimeVal | getDate (const Scenario::ProcessModel &scenario, const Id< StateModel > &state) |
TimeVal | getDate (const Scenario::ProcessModel &scenario, const Id< EventModel > &event) |
TimeVal | getDate (const Scenario::ProcessModel &scenario, const Id< TimeSyncModel > ×ync) |
Variables | |
const double | deltaX = 10. |
const double | deltaY = 45. |
Function Documentation
◆ copySelectedScenarioElements()
void Scenario::copySelectedScenarioElements | ( | JSONReader & | , |
const BaseScenarioContainer & | sm, | ||
QObject * | parent | ||
) |
The parent should be in the object tree of the scenario. This is because the StateModel needs access to the command stack of the document upon creation.
TODO instead we should follow the second part of this article : https://doc.qt.io/archives/qq/qq25-undo.html which explains how to use a proxy model to perform the undo - redo operations. This proxy model should be owned by the presenters where there is an easy and sensical access to the command stack