summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2020-09-18 14:40:33 +0300
committerKaj Grönholm <kaj.gronholm@qt.io>2020-09-25 11:04:22 +0300
commit98d888b6beeda9e301625ecba8e377cf552e7231 (patch)
tree2201c7ee29accc46d78816c2f047b1e784a73df0 /src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
parent3bcbc804004d293eba409b5e65ff5c5e38c572fe (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/ui/RowTimeline.cpp')
-rw-r--r--src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
index 2d7cf19d..b2a8f6dc 100644
--- a/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
+++ b/src/Authoring/Qt3DStudio/Palettes/TimelineGraphicsView/ui/RowTimeline.cpp
@@ -219,6 +219,18 @@ void RowTimeline::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio
painter->drawLine(startXActual, 0, startXActual, currHeight);
painter->drawLine(edgeOffset + m_endX, 0, edgeOffset + m_endX, currHeight);
}
+
+ // Paint possible timeline actions
+ auto actions = m_rowTree->m_activateActions;
+ bool paintActivate = actions.testFlag(ITimelineItem::ActivateAction::Activate);
+ bool paintDeactivate = actions.testFlag(ITimelineItem::ActivateAction::Deactivate);
+ int aw = TimelineConstants::ACTION_W;
+ QColor aColor = CStudioPreferences::timelineActionColor();
+ if (paintActivate)
+ painter->fillRect(QRect(x - aw/2, 0, aw, currHeight), aColor);
+ if (paintDeactivate)
+ painter->fillRect(QRect(x + w - aw/2, 0, aw, currHeight), aColor);
+
}
painter->restore();