コード例 #1
0
void PlatformMetadata::SetHeight(float value)
{
    HierarchyTreePlatformNode* platformNode = GetPlatformNode();
    if (platformNode)
    {
        platformNode->SetSize(platformNode->GetWidth(), value);
    }
}
コード例 #2
0
float PlatformMetadata::GetWidth() const
{
    HierarchyTreePlatformNode* platformNode = GetPlatformNode();
    if (platformNode)
    {
        return platformNode->GetWidth();
    }
    
    return -1.0f;
}
コード例 #3
0
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);
}
コード例 #4
0
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());
	}
}