本文整理汇总了C++中ViewerNodePtr::setViewersSynchroEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewerNodePtr::setViewersSynchroEnabled方法的具体用法?C++ ViewerNodePtr::setViewersSynchroEnabled怎么用?C++ ViewerNodePtr::setViewersSynchroEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewerNodePtr
的用法示例。
在下文中一共展示了ViewerNodePtr::setViewersSynchroEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fm
//.........这里部分代码省略.........
RectD canonicalFormat = projectFormat.toCanonicalFormat();
for (int i = 0; i < 2; ++i) {
_imp->viewer->setInfoViewer(_imp->infoWidget[i], i);
_imp->viewer->setRegionOfDefinition(canonicalFormat, projectFormat.getPixelAspectRatio(), i);
setInfoBarAndViewerResolution(projectFormat, canonicalFormat, projectFormat.getPixelAspectRatio(), i);
}
_imp->viewer->resetWipeControls();
}
_imp->viewerSubContainerLayout->addWidget(_imp->viewer);
for (int i = 0; i < 2; ++i) {
_imp->viewerSubContainerLayout->addWidget(_imp->infoWidget[i]);
_imp->viewer->setInfoViewer(_imp->infoWidget[i], i);
if (i == 1 || !infobarvisible) {
_imp->infoWidget[i]->hide();
}
}
manageSlotsForInfoWidget(0, true);
_imp->viewerLayout->addWidget(_imp->viewerSubContainer);
_imp->mainLayout->addWidget(_imp->viewerContainer);
TimeLinePtr timeline = app->getTimeLine();
_imp->timeLineGui = new TimeLineGui(node, timeline, getGui(), this);
QObject::connect( _imp->timeLineGui, SIGNAL(boundariesChanged(SequenceTime,SequenceTime)),
this, SLOT(onTimelineBoundariesChanged(SequenceTime,SequenceTime)) );
QObject::connect( app->getProject().get(), SIGNAL(frameRangeChanged(int,int)), _imp->timeLineGui, SLOT(onProjectFrameRangeChanged(int,int)) );
_imp->timeLineGui->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
if (!node->isTimelineVisible()) {
_imp->timeLineGui->hide();
}
//Add some spacing because the timeline might be black as the info
_imp->mainLayout->addSpacing( TO_DPIY(5) );
_imp->mainLayout->addWidget(_imp->timeLineGui);
double leftBound, rightBound;
leftBound = node->getPlaybackInPointKnob()->getValue();
rightBound = node->getPlaybackOutPointKnob()->getValue();
TimeValue projectLeft, projectRight;
app->getProject()->getFrameRange(&projectLeft, &projectRight);
_imp->timeLineGui->setBoundaries(leftBound, rightBound);
onTimelineBoundariesChanged(leftBound, rightBound);
_imp->timeLineGui->setFrameRangeEdited(projectLeft != leftBound || projectRight != rightBound);;
manageTimelineSlot(false, timeline);
QObject::connect( node.get(), SIGNAL(renderStatsAvailable(int,double,RenderStatsMap)),
this, SLOT(onRenderStatsAvailable(int,double,RenderStatsMap)) );
QObject::connect( _imp->viewer, SIGNAL(zoomChanged(int)), this, SLOT(updateZoomComboBox(int)) );
QObject::connect( node.get(), SIGNAL(viewerDisconnected()), this, SLOT(disconnectViewer()) );
createNodeViewerInterface(node_ui);
setPluginViewerInterface(node_ui);
for (std::list<NodeGuiPtr>::const_iterator it = existingNodesContext.begin(); it != existingNodesContext.end(); ++it) {
ViewerNodePtr isViewerNode = (*it)->getNode()->isEffectViewerNode();
// For viewers, create the viewer interface separately
if (!isViewerNode) {
createNodeViewerInterface(*it);
}
}
for (std::list<NodeGuiPtr>::const_iterator it = activePluginsContext.begin(); it != activePluginsContext.end(); ++it) {
ViewerNodePtr isViewerNode = (*it)->getNode()->isEffectViewerNode();
// For viewers, create the viewer interface separately
if (!isViewerNode) {
setPluginViewerInterface(*it);
}
}
setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
_imp->viewerNode.lock()->setUiContext( getViewer() );
QTimer::singleShot( 25, _imp->timeLineGui, SLOT(recenterOnBounds()) );
//Refresh the viewport lock state
const std::list<ViewerTab*>& viewers = getGui()->getViewersList();
if ( !viewers.empty() ) {
ViewerTab* other = viewers.front();
if ( other->getInternalNode()->isViewersSynchroEnabled() ) {
double left, bottom, factor, par;
other->getViewer()->getProjection(&left, &bottom, &factor, &par);
_imp->viewer->setProjection(left, bottom, factor, par);
node->setViewersSynchroEnabled(true);
}
}
_imp->cachedFramesThread.reset(new CachedFramesThread(this));
_imp->cachedFramesThread->start();
}