本文整理汇总了C++中QSharedPointer::SetFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ QSharedPointer::SetFocus方法的具体用法?C++ QSharedPointer::SetFocus怎么用?C++ QSharedPointer::SetFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSharedPointer
的用法示例。
在下文中一共展示了QSharedPointer::SetFocus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCurrentImage
void qwDecoratedCanvas::setCurrentImage(const QSharedPointer<CImgContext> &_ptr)
{
if((_ptr == currentImgPtr)&&(!_ptr.isNull()))
if((currentImgPtr->getActivePanel(myID)))
return;
myGridCanvasPtr->refreshView("Fetching...");
myBottomPanelPtr->linearTransformDialogPtr->closeMe();
if(!_ptr.isNull())
_ptr->SetFocus(myID);
if(_ptr != currentImgPtr)
if(!currentImgPtr.isNull())
currentImgPtr->LostFocus(myID);
currentImgPtr = _ptr;
if(_ptr.isNull())
{
myGridCanvasPtr->refreshView("Empty view");
goto __EXIT_POINT;
}
// if(myID == panelLeftTop)
{
if(Globals::sharedViewFlagsEnabled)
{
bool needRefresh = false;
if(currentImgPtr->getMul(R) != Globals::sharedMul[0]){ currentImgPtr->setMul(R, Globals::sharedMul[0]); needRefresh = true;}
if(currentImgPtr->getDiv(R) != Globals::sharedDiv[0]){ currentImgPtr->setDiv(R, Globals::sharedDiv[0]); needRefresh = true;}
if(currentImgPtr->getBias(R) != Globals::sharedBias[0]){ currentImgPtr->setBias(R, Globals::sharedBias[0]); needRefresh = true;}
if(currentImgPtr->getMul(G) != Globals::sharedMul[1]){ currentImgPtr->setMul(G, Globals::sharedMul[1]); needRefresh = true;}
if(currentImgPtr->getDiv(G) != Globals::sharedDiv[1]){ currentImgPtr->setDiv(G, Globals::sharedDiv[1]); needRefresh = true;}
if(currentImgPtr->getBias(G) != Globals::sharedBias[1]){currentImgPtr->setBias(G, Globals::sharedBias[1]); needRefresh = true;}
if(currentImgPtr->getMul(B) != Globals::sharedMul[2]){ currentImgPtr->setMul(B, Globals::sharedMul[2]); needRefresh = true;}
if(currentImgPtr->getDiv(B) != Globals::sharedDiv[2]){ currentImgPtr->setDiv(B, Globals::sharedDiv[2]); needRefresh = true;}
if(currentImgPtr->getBias(B) != Globals::sharedBias[2]){ currentImgPtr->setBias(B, Globals::sharedBias[2]); needRefresh = true;}
if(currentImgPtr->getFlags() != Globals::sharedViewFlags){ currentImgPtr->setFlags( Globals::sharedViewFlags); needRefresh = true;}
if(needRefresh){currentImgPtr->applyOnTheFlyFilters(); currentImgPtr->applyPreFilters();}
};
if(Globals::sharedZoomEnabled)
{
currentImgPtr->setZoomFactor(Globals::sharedZoom);
}
if(Globals::sharedPositionEnabled)
{
currentImgPtr->setImgOffset(axX, Globals::sharedPosition[0]);
currentImgPtr->setImgOffset(axY, Globals::sharedPosition[1]);
}
}
myBottomPanelPtr->linearTransformDialogPtr->setRParams(currentImgPtr->getMul(R),
currentImgPtr->getDiv(R),
currentImgPtr->getBias(R));
myBottomPanelPtr->linearTransformDialogPtr->setGParams(currentImgPtr->getMul(G),
currentImgPtr->getDiv(G),
currentImgPtr->getBias(G));
myBottomPanelPtr->linearTransformDialogPtr->setBParams(currentImgPtr->getMul(B),
currentImgPtr->getDiv(B),
currentImgPtr->getBias(B));
__EXIT_POINT:
myBottomPanelPtr->myNoteBox.setCurrentImage(currentImgPtr);
myGridCanvasPtr->setImgContext(currentImgPtr);
myGridCanvasPtr->refreshView();
restoreSWButtonsState();
refreshInfoBar();
}