本文整理汇总了C++中ViewerNodePtr::isInfoBarVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewerNodePtr::isInfoBarVisible方法的具体用法?C++ ViewerNodePtr::isInfoBarVisible怎么用?C++ ViewerNodePtr::isInfoBarVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewerNodePtr
的用法示例。
在下文中一共展示了ViewerNodePtr::isInfoBarVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fm
NATRON_NAMESPACE_ENTER
ViewerTab::ViewerTab(const std::string& scriptName,
const std::list<NodeGuiPtr> & existingNodesContext,
const std::list<NodeGuiPtr>& activePluginsContext,
Gui* gui,
const NodeGuiPtr& node_ui,
QWidget* parent)
: QWidget(parent)
, PanelWidget(scriptName, this, gui)
, _imp( new ViewerTabPrivate(this, node_ui) )
{
ViewerNodePtr node = node_ui->getNode()->isEffectViewerNode();
installEventFilter(this);
setMouseTracking(true);
NodePtr internalNode = node->getNode();
QObject::connect( internalNode.get(), SIGNAL(scriptNameChanged(QString)), this, SLOT(onInternalNodeScriptNameChanged(QString)) );
QObject::connect( internalNode.get(), SIGNAL(labelChanged(QString,QString)), this, SLOT(onInternalNodeLabelChanged(QString,QString)) );
QObject::connect( node.get(), SIGNAL(internalViewerCreated()), this, SLOT(onInternalViewerCreated()));
_imp->mainLayout = new QVBoxLayout(this);
setLayout(_imp->mainLayout);
_imp->mainLayout->setSpacing(0);
_imp->mainLayout->setContentsMargins(0, 0, 0, 0);
QFontMetrics fm(font(), 0);
_imp->viewerContainer = new QWidget(this);
_imp->viewerLayout = new QHBoxLayout(_imp->viewerContainer);
_imp->viewerLayout->setContentsMargins(0, 0, 0, 0);
_imp->viewerLayout->setSpacing(0);
_imp->viewerSubContainer = new QWidget(_imp->viewerContainer);
_imp->viewerSubContainerLayout = new QVBoxLayout(_imp->viewerSubContainer);
_imp->viewerSubContainerLayout->setContentsMargins(0, 0, 0, 0);
_imp->viewerSubContainerLayout->setSpacing(1);
// Info bars
QString inputNames[2] = {
QString::fromUtf8("A:"), QString::fromUtf8("B:")
};
bool infobarvisible = node->isInfoBarVisible();
for (int i = 0; i < 2; ++i) {
_imp->infoWidget[i] = new InfoViewerWidget(inputNames[i], this);
}
// Viewer
_imp->viewer = new ViewerGL(this);
GuiAppInstancePtr app = gui->getApp();
// Init viewer to project format
{
Format projectFormat;
app->getProject()->getProjectDefaultFormat(&projectFormat);
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);
//.........这里部分代码省略.........