void PlatformMetadata::SetHeight(float value) { HierarchyTreePlatformNode* platformNode = GetPlatformNode(); if (platformNode) { platformNode->SetSize(platformNode->GetWidth(), value); } }
float PlatformMetadata::GetWidth() const { HierarchyTreePlatformNode* platformNode = GetPlatformNode(); if (platformNode) { return platformNode->GetWidth(); } 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()); } }