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

Method restoreDefaultDockState

src/frontend/MainWin.cpp:1477–1491  ·  view source on GitHub ↗

! * restores the default state of the default application dock widgets (Project Explorer, etc.) */

Source from the content-addressed store, hash-verified

1475 * restores the default state of the default application dock widgets (Project Explorer, etc.)
1476 */
1477void MainWin::restoreDefaultDockState() const {
1478 auto group = Settings::group(QStringLiteral("MainWin"));
1479 if (group.hasKey(QStringLiteral("DockWidgetState"))) {
1480 auto state = group.readEntry(QStringLiteral("DockWidgetState"), QByteArray());
1481 m_dockManagerMain->restoreState(state); // restore the state of of the default docks
1482 } else {
1483 // the state of the dock widgets not available yet, starting for the first time:
1484 // show the project and properties explorers, hide the worksheet preview.
1485 // for this, check the actions for the project and properties explorer, uncheck for worksheet preview
1486 m_projectExplorerDockAction->setChecked(true);
1487 m_propertiesDockAction->setChecked(true);
1488 m_worksheetPreviewAction->setChecked(false);
1489 m_worksheetPreviewDock->toggleView(false);
1490 }
1491}
1492
1493void MainWin::openProject() {
1494 bool supportOthers = false;

Callers

nothing calls this directly

Calls 3

groupFunction · 0.85
restoreStateMethod · 0.45
toggleViewMethod · 0.45

Tested by

no test coverage detected