MCPcopy Create free account
hub / github.com/KDE/labplot / setActiveTab

Method setActiveTab

src/3rdparty/Qt-Advanced-Docking-System/src/DockWidgetTab.cpp:586–629  ·  view source on GitHub ↗

============================================================================

Source from the content-addressed store, hash-verified

584
585//============================================================================
586void CDockWidgetTab::setActiveTab(bool active)
587{
588 d->updateCloseButtonVisibility(active);
589
590 if(CDockManager::testConfigFlag(CDockManager::ShowTabTextOnlyForActiveTab) && !d->Icon.isNull())
591 {
592 if(active)
593 d->TitleLabel->setVisible(true);
594 else
595 d->TitleLabel->setVisible(false);
596 }
597
598 // Focus related stuff
599 if (CDockManager::testConfigFlag(CDockManager::FocusHighlighting) && !d->DockWidget->dockManager()->isRestoringState())
600 {
601 bool UpdateFocusStyle = false;
602 if (active && !hasFocus())
603 {
604 //setFocus(Qt::OtherFocusReason);
605 d->focusController()->setDockWidgetTabFocused(this);
606 UpdateFocusStyle = true;
607 }
608
609 if (d->IsActiveTab == active)
610 {
611 if (UpdateFocusStyle)
612 {
613 updateStyle();
614 }
615 return;
616 }
617 }
618 else if (d->IsActiveTab == active)
619 {
620 return;
621 }
622
623 d->IsActiveTab = active;
624 updateStyle();
625 update();
626 updateGeometry();
627
628 Q_EMIT activeTabChanged();
629}
630
631
632//============================================================================

Callers 1

updateTabsMethod · 0.80

Calls 7

isNullMethod · 0.80
isRestoringStateMethod · 0.80
focusControllerMethod · 0.80
setVisibleMethod · 0.45
dockManagerMethod · 0.45

Tested by

no test coverage detected