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

Method closeArea

src/3rdparty/Qt-Advanced-Docking-System/src/DockAreaWidget.cpp:1203–1235  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1201
1202//============================================================================
1203void CDockAreaWidget::closeArea()
1204{
1205 // If there is only one single dock widget and this widget has the
1206 // DeleteOnClose feature or CustomCloseHandling, then we delete the dock widget now;
1207 // in the case of CustomCloseHandling, the CDockWidget class will emit its
1208 // closeRequested signal and not actually delete unless the signal is handled in a way that deletes it
1209 auto OpenDockWidgets = openedDockWidgets();
1210 if (OpenDockWidgets.count() == 1 &&
1211 (OpenDockWidgets[0]->features().testFlag(CDockWidget::DockWidgetDeleteOnClose) || OpenDockWidgets[0]->features().testFlag(CDockWidget::CustomCloseHandling))
1212 && !isAutoHide())
1213 {
1214 OpenDockWidgets[0]->closeDockWidgetInternal();
1215 }
1216 else
1217 {
1218 for (auto DockWidget : openedDockWidgets())
1219 {
1220 if ((DockWidget->features().testFlag(CDockWidget::DockWidgetDeleteOnClose) && DockWidget->features().testFlag(CDockWidget::DockWidgetForceCloseWithArea)) ||
1221 DockWidget->features().testFlag(CDockWidget::CustomCloseHandling))
1222 {
1223 DockWidget->closeDockWidgetInternal();
1224 }
1225 else if (DockWidget->features().testFlag(CDockWidget::DockWidgetDeleteOnClose) && isAutoHide())
1226 {
1227 DockWidget->closeDockWidgetInternal();
1228 }
1229 else
1230 {
1231 DockWidget->toggleView(false);
1232 }
1233 }
1234 }
1235}
1236
1237
1238enum eBorderLocation

Callers 3

closeOtherAreasMethod · 0.80
onCloseButtonClickedMethod · 0.80

Calls 4

countMethod · 0.45
featuresMethod · 0.45
toggleViewMethod · 0.45

Tested by

no test coverage detected