void PlatformMetadata::SetWidth(float value) { HierarchyTreePlatformNode* platformNode = GetPlatformNode(); if (platformNode) { platformNode->SetSize(value, platformNode->GetHeight()); } }
float PlatformMetadata::GetHeight() const { HierarchyTreePlatformNode* platformNode = GetPlatformNode(); if (platformNode) { return platformNode->GetHeight(); } return -1.0f; }
void HierarchyTreeScreenNode::SetParent(HierarchyTreeNode* node, HierarchyTreeNode* insertAfter) { HierarchyTreePlatformNode* newPlatform = dynamic_cast<HierarchyTreePlatformNode*>(node); DVASSERT(newPlatform); if (!newPlatform) return; HierarchyTreePlatformNode* oldPlatform = GetPlatform(); if (oldPlatform) { oldPlatform->RemoveTreeNode(this, false, false); } parent = newPlatform; GetScreen()->SetRect(Rect(0, 0, newPlatform->GetWidth(), newPlatform->GetHeight())); newPlatform->AddTreeNode(this, insertAfter); }
void CreateAggregatorDlg::SetDefaultPlatform(HierarchyTreeNode::HIERARCHYTREENODEID platformId) { HierarchyTreePlatformNode* node = dynamic_cast<HierarchyTreePlatformNode*>(HierarchyTreeController::Instance()->GetTree().GetNode(platformId)); if (!node) { node = HierarchyTreeController::Instance()->GetActivePlatform(); if (node) { platformId = node->GetId(); } } int id = ui->platformsCombo->findData(QVariant(platformId)); ui->platformsCombo->setCurrentIndex(id); if (node) { ui->width->setValue(node->GetWidth()); ui->height->setValue(node->GetHeight()); } }