diff options
author | Kaj Grönholm <kaj.gronholm@qt.io> | 2020-09-18 14:40:33 +0300 |
---|---|---|
committer | Kaj Grönholm <kaj.gronholm@qt.io> | 2020-09-25 11:04:22 +0300 |
commit | 98d888b6beeda9e301625ecba8e377cf552e7231 (patch) | |
tree | 2201c7ee29accc46d78816c2f047b1e784a73df0 /src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp | |
parent | 3bcbc804004d293eba409b5e65ff5c5e38c572fe (diff) |
Improve timeline signal actionsv2.8.0-beta1
- Support new signal type object with icons. Bump generated UIP
version to 7.
- When creating a signal, also create initial onActivate action.
- Don't show basic node properties for signals, only the name.
- When adding new action to signal, default to onActivate and
emit signal.
- Show small ticks on timeline bar if onActivate or onDeactivate
actions have been set to the object.
Task-number: QT3DS-4165
Change-Id: I16d1129536ac4d22c23c27bbc95741aa66adf597
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp')
-rw-r--r-- | src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp index d05fe12d..4b599cbf 100644 --- a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/TimelineWidget.cpp @@ -385,6 +385,9 @@ void TimelineWidget::OnNewPresentation() m_connections.push_back(theSignalProvider->ConnectActionDeleted( std::bind(&TimelineWidget::onActionEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3))); + m_connections.push_back(theSignalProvider->ConnectEventSet( + std::bind(&TimelineWidget::onActionModifiedEvent, this, + std::placeholders::_1))); // connect property linked/unlinked m_connections.push_back(theSignalProvider->ConnectPropertyLinked( @@ -741,6 +744,7 @@ void TimelineWidget::updateActionStates(const QSet<RowTree *> &rows) states |= RowTree::ActionState::ComponentAction; } row->setActionStates(states); + row->setActivateActions(binding->getActivateActions()); } } @@ -994,6 +998,15 @@ void TimelineWidget::onAsyncUpdate() m_graphicsScene->rowManager()->finalizeRowDeletions(); } +void TimelineWidget::onActionModifiedEvent(qt3dsdm::Qt3DSDMActionHandle inAction) +{ + // We don't have action owner here, so just do full reconstruct as action + // event types are anyway rarely changed. + m_fullReconstruct = true; + if (!m_asyncUpdateTimer.isActive()) + m_asyncUpdateTimer.start(); +} + void TimelineWidget::onActionEvent(qt3dsdm::Qt3DSDMActionHandle inAction, qt3dsdm::Qt3DSDMSlideHandle inSlide, qt3dsdm::Qt3DSDMInstanceHandle inOwner) |