本文整理汇总了C++中CanvasItem::move_to方法的典型用法代码示例。如果您正苦于以下问题:C++ CanvasItem::move_to方法的具体用法?C++ CanvasItem::move_to怎么用?C++ CanvasItem::move_to使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CanvasItem
的用法示例。
在下文中一共展示了CanvasItem::move_to方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: move_to
void Guideline::move_to(int x, int y, bool store_undo, bool human)
{
Q_UNUSED (x)
Q_UNUSED (y)
Q_UNUSED (store_undo)
Q_UNUSED (human)
#if 0
CanvasItem *cobj = this;
int newval = 0;
bool is_leader = false;
int newx = 4 - cxoff, newy = 4 - cyoff;
if (type == GUIDE_TYPE_VERT)
{
newval = x;
newx = x;
}
else if (type == GUIDE_TYPE_HORI)
{
newval = y;
newy = y;
}
fPos = newval;
if ((newx == xpos) && (newy == ypos))
{
// Not moving, so do nothing.
return;
}
bool freeshift = canvas()->isLayoutSuspended();
if (freeshift)
{
d_printf("FREESHIFT\n");
}
if (human && (!is_leader || freeshift))
{
removeFromDistributions(freeshift);
// Since the previous call will have suggested new values for
// the guidelines involved in the distribution we need to resolve
// here to avoid what looks like an unsovable state.
}
cobj->move_to(newx, newy, store_undo);
#endif
}