本文整理汇总了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;
}
示例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);
}
}
示例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();
}