本文整理汇总了C++中MythUIType::MoveToTop方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUIType::MoveToTop方法的具体用法?C++ MythUIType::MoveToTop怎么用?C++ MythUIType::MoveToTop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUIType
的用法示例。
在下文中一共展示了MythUIType::MoveToTop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Finalize
/**
* \copydoc MythUIType::Finalize()
*/
void MythUIEditBar::Finalize(void)
{
MythUIType *position = GetChild("position");
if (position)
position->MoveToTop();
}
示例2: Display
//.........这里部分代码省略.........
}
if (cuttoleft)
cuttoleft->SetVisible(false);
if (cuttoright)
cuttoright->SetVisible(false);
if (keeptoleft)
keeptoleft->SetVisible(false);
if (keeptoright)
keeptoright->SetVisible(false);
if (position && keeparea.isValid())
{
int offset = position->GetArea().width() / 2;
int newx = (int)(((float)keeparea.width() * m_editPosition) + 0.5f);
int newy = position->GetArea().top();
position->SetPosition(newx - offset, newy);
position->SetVisible(true);
}
ClearImages();
if (!m_regions.size())
{
if (keep)
keep->SetVisible(true);
return;
}
MythUIShape *barshape = dynamic_cast<MythUIShape *>(cut);
MythUIImage *barimage = dynamic_cast<MythUIImage *>(cut);
MythUIShape *leftshape = dynamic_cast<MythUIShape *>(cuttoleft);
MythUIImage *leftimage = dynamic_cast<MythUIImage *>(cuttoleft);
MythUIShape *rightshape = dynamic_cast<MythUIShape *>(cuttoright);
MythUIImage *rightimage = dynamic_cast<MythUIImage *>(cuttoright);
QListIterator<QPair<float, float> > regions(m_regions);
while (regions.hasNext() && cutarea.isValid())
{
QPair<float, float> region = regions.next();
int left = (int)((region.first * cutarea.width()) + 0.5f);
int right = (int)((region.second * cutarea.width()) + 0.5f);
if (left >= right)
right = left + 1;
if (cut)
{
AddBar(barshape, barimage, QRect(left, cutarea.top(), right - left,
cutarea.height()));
}
if (cuttoleft && (region.second < 1.0f))
AddMark(leftshape, leftimage, right, true);
if (cuttoright && (region.first > 0.0f))
AddMark(rightshape, rightimage, left, false);
}
CalcInverseRegions();
barshape = dynamic_cast<MythUIShape *>(keep);
barimage = dynamic_cast<MythUIImage *>(keep);
leftshape = dynamic_cast<MythUIShape *>(keeptoleft);
leftimage = dynamic_cast<MythUIImage *>(keeptoleft);
rightshape = dynamic_cast<MythUIShape *>(keeptoright);
rightimage = dynamic_cast<MythUIImage *>(keeptoright);
QListIterator<QPair<float, float> > regions2(m_invregions);
while (regions2.hasNext() && keeparea.isValid())
{
QPair<float, float> region = regions2.next();
int left = (int)((region.first * keeparea.width()) + 0.5f);
int right = (int)((region.second * keeparea.width()) + 0.5f);
if (left >= right)
right = left + 1;
if (keep)
{
AddBar(barshape, barimage, QRect(left, keeparea.top(), right - left,
keeparea.height()));
}
if (keeptoleft && (region.second < 1.0f))
AddMark(leftshape, leftimage, right, true);
if (keeptoright && (region.first > 0.0f))
AddMark(rightshape, rightimage, left, false);
}
if (position)
position->MoveToTop();
}