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

Method toggleView

src/3rdparty/Qt-Advanced-Docking-System/src/DockWidget.cpp:734–761  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

732
733//============================================================================
734void CDockWidget::toggleView(bool Open)
735{
736 // If the toggle view action mode is ActionModeShow, then Open is always
737 // true if the sender is the toggle view action
738 QAction* Sender = qobject_cast<QAction*>(sender());
739 if (Sender == d->ToggleViewAction && !d->ToggleViewAction->isCheckable())
740 {
741 Open = true;
742 }
743
744 // If the dock widget state is different, then we really need to toggle
745 // the state. If we are in the right state, then we simply make this
746 // dock widget the current dock widget
747 auto AutoHideContainer = autoHideDockContainer();
748 if (d->Closed != !Open)
749 {
750 toggleViewInternal(Open);
751 }
752 else if (Open && d->DockArea && !AutoHideContainer)
753 {
754 raise();
755 }
756
757 if (Open && AutoHideContainer)
758 {
759 AutoHideContainer->collapseView(false);
760 }
761}
762
763
764//============================================================================

Callers 15

closeEventMethod · 0.45
hideEventMethod · 0.45
showDockWidgetMethod · 0.45
toggleViewInternalMethod · 0.45
activateNextDockMethod · 0.45
activatePreviousDockMethod · 0.45
toggleDockWidgetMethod · 0.45

Calls 1

collapseViewMethod · 0.80

Tested by

no test coverage detected