当前位置: 首页>>代码示例>>C++>>正文


C++ TabWidget::isFloatingWindowChild方法代码示例

本文整理汇总了C++中TabWidget::isFloatingWindowChild方法的典型用法代码示例。如果您正苦于以下问题:C++ TabWidget::isFloatingWindowChild方法的具体用法?C++ TabWidget::isFloatingWindowChild怎么用?C++ TabWidget::isFloatingWindowChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TabWidget的用法示例。


在下文中一共展示了TabWidget::isFloatingWindowChild方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: assert

TabWidget*
GuiPrivate::getOnly1NonFloatingPane(int & count) const
{
    count = 0;
    std::list<TabWidgetI*> tabs = _gui->getApp()->getTabWidgetsSerialization();
    if ( tabs.empty() ) {
        return NULL;
    }
    TabWidget* firstNonFloating = 0;
    for (std::list<TabWidgetI*>::const_iterator it = tabs.begin(); it != tabs.end(); ++it) {
        TabWidget* isWidget = dynamic_cast<TabWidget*>(*it);
        assert(isWidget);
        if (!isWidget) {
            continue;
        }
        if ( !isWidget->isFloatingWindowChild() ) {
            if (!firstNonFloating) {
                firstNonFloating = isWidget;
            }
            ++count;
        }
    }
    ///there should always be at least 1 non floating window
    assert(firstNonFloating);

    return firstNonFloating;
}
开发者ID:kcotugno,项目名称:Natron,代码行数:27,代码来源:GuiPrivate.cpp

示例2: getParentPane

void
PanelWidget::handleUnCaughtKeyPressEvent(QKeyEvent* e)
{
    if (!_gui) {
        return;
    }
    _gui->setLastKeyPressVisitedClickFocus(_gui->getCurrentPanelFocus() == this);
    TabWidget* parentPane = getParentPane();
    if ( parentPane && parentPane->isFloatingWindowChild() ) {
        //We have to send the event to the Gui object, because it won't receive it as they are part from different windows
        qApp->sendEvent(_gui, e);
    }
}
开发者ID:ebrayton,项目名称:Natron,代码行数:13,代码来源:PanelWidget.cpp

示例3: assert

void
Gui::maximize(TabWidget* what)
{
    assert(what);
    if ( what->isFloatingWindowChild() ) {
        return;
    }

    std::list<TabWidgetI*> panes = getApp()->getTabWidgetsSerialization();
    for (std::list<TabWidgetI*>::iterator it = panes.begin(); it != panes.end(); ++it) {
        TabWidget* pane = dynamic_cast<TabWidget*>(*it);
        if (!pane) {
            continue;
        }
        //if the widget is not what we want to maximize and it is not floating , hide it
        if ( (pane != what) && !pane->isFloatingWindowChild() ) {
            // also if we want to maximize the workshop pane, don't hide the properties pane

            bool hasProperties = false;
            for (int i = 0; i < pane->count(); ++i) {
                QString tabName = pane->tabAt(i)->getWidget()->objectName();
                if ( tabName == QString::fromUtf8(kPropertiesBinName) ) {
                    hasProperties = true;
                    break;
                }
            }

            bool hasNodeGraphOrCurveEditor = false;
            for (int i = 0; i < what->count(); ++i) {
                QWidget* tab = what->tabAt(i)->getWidget();
                assert(tab);
                NodeGraph* isGraph = dynamic_cast<NodeGraph*>(tab);
                AnimationModuleEditor* isEditor = dynamic_cast<AnimationModuleEditor*>(tab);
                if (isGraph || isEditor) {
                    hasNodeGraphOrCurveEditor = true;
                    break;
                }
            }

            if (hasProperties && hasNodeGraphOrCurveEditor) {
                continue;
            }
            pane->hide();
        }
    }
    _imp->_toolBox->hide();
}
开发者ID:azerupi,项目名称:Natron,代码行数:47,代码来源:Gui20.cpp


注:本文中的TabWidget::isFloatingWindowChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。