summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2018-02-27 14:37:41 +0200
committerMahmoud Badri <mahmoud.badri@qt.io>2018-03-19 09:03:27 +0000
commit089ab17e462646dcd9edf785aa6850ad92b3a8e0 (patch)
treea58f0c08022bb2ca1a0dae672ff796dd1a7a62ac /src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
parent6741e0b808aef4992c81df1128b8db0f8113f49f (diff)
Continue timeline work
Split timeline and tree views, implement layer locking, filter rows, start connection to the app data mode. Task-number: QT3DS-1262 Change-Id: I54fb659e5c4f1103b8cf792b04bcaf012779cf1a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp41
1 files changed, 16 insertions, 25 deletions
diff --git a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
index 02ff7c58..eefe295a 100644
--- a/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
+++ b/src/Authoring/Studio/Palettes/Timeline/Bindings/Qt3DSDMTimelineItemBinding.cpp
@@ -375,11 +375,22 @@ ITimelineItem *Qt3DSDMTimelineItemBinding::GetTimelineItem()
return this;
}
+// Mahmoud_TODO: remove after finishing the new timeline
CBaseStateRow *Qt3DSDMTimelineItemBinding::GetRow()
{
return m_Row;
}
+RowTree *Qt3DSDMTimelineItemBinding::getRowTree() const
+{
+ return m_rowTree;
+}
+
+void Qt3DSDMTimelineItemBinding::setRowTree(RowTree *row)
+{
+ m_rowTree = row;
+}
+
void Qt3DSDMTimelineItemBinding::SetSelected(bool inMultiSelect)
{
if (!inMultiSelect)
@@ -880,12 +891,12 @@ Qt3DSDMTimelineItemBinding::GetOrCreatePropertyBinding(Qt3DSDMPropertyHandle inP
* @param inAppend true to skip the check to find where to insert. ( true if this is a
* loading/initializing step, where the call is already done in order )
*/
-CPropertyRow *Qt3DSDMTimelineItemBinding::AddPropertyRow(Qt3DSDMPropertyHandle inPropertyHandle,
+void Qt3DSDMTimelineItemBinding::AddPropertyRow(Qt3DSDMPropertyHandle inPropertyHandle,
bool inAppend /*= false */)
{
ITimelineItemProperty *theTimelineProperty = GetPropertyBinding(inPropertyHandle);
if (theTimelineProperty && theTimelineProperty->GetRow()) // if created, bail
- return {};
+ return;
if (!theTimelineProperty)
theTimelineProperty = GetOrCreatePropertyBinding(inPropertyHandle);
@@ -917,21 +928,8 @@ CPropertyRow *Qt3DSDMTimelineItemBinding::AddPropertyRow(Qt3DSDMPropertyHandle i
}
}
- CPropertyRow *propertyRow = nullptr;
- // Create a new property row
- if (m_createUIRow) {
- propertyRow = m_TransMgr->CreateNewPropertyRow(theTimelineProperty, m_Row,
- theNextProperty ? theNextProperty->GetRow() : nullptr);
- } else {
- propertyRow = new CPropertyRow(theTimelineProperty, m_Row);
- m_Row->AddPropertyRow(propertyRow, theNextProperty ? theNextProperty->GetRow() : nullptr);
- theTimelineProperty->Bind(propertyRow);
- }
-
// Update keyframes
AddKeyframes(theTimelineProperty);
-
- return propertyRow;
}
void Qt3DSDMTimelineItemBinding::RemovePropertyRow(Qt3DSDMPropertyHandle inPropertyHandle)
@@ -940,16 +938,8 @@ void Qt3DSDMTimelineItemBinding::RemovePropertyRow(Qt3DSDMPropertyHandle inPrope
if (theIter != m_PropertyBindingMap.end()) {
ITimelineItemProperty *thePropertyBinding = theIter->second;
- bool theUpdateUI = DeleteAssetKeyframesWhereApplicable(thePropertyBinding);
-
- m_TransMgr->RemovePropertyRow(thePropertyBinding);
+ DeleteAssetKeyframesWhereApplicable(thePropertyBinding);
m_PropertyBindingMap.erase(theIter);
-
- // UI must update
- if (m_Row && theUpdateUI) {
- m_Row->ForceEmitChildrenChanged();
- m_Row->setDirty(true);
- }
}
}
@@ -1243,7 +1233,8 @@ void Qt3DSDMTimelineItemBinding::OnAddChild(Qt3DSDMInstanceHandle inInstance)
if (theNextChild != 0)
theNextItem = m_TransMgr->GetOrCreate(theNextChild);
- m_Row->AddChildRow(m_TransMgr->GetOrCreate(inInstance), theNextItem);
+ // Mahmoud_TODO: remove
+// m_Row->AddChildRow(m_TransMgr->GetOrCreate(inInstance), theNextItem);
}
}