MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / loadState

Method loadState

src/Gui/DockWindowManager.cpp:617–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615}
616
617void DockWindowManager::loadState()
618{
619 ParameterGrp::handle hPref = App::GetApplication()
620 .GetUserParameter()
621 .GetGroup("BaseApp")
622 ->GetGroup("MainWindow")
623 ->GetGroup("DockWindows");
624 const QList<DockWindowItem>& dockItems = d->_dockWindowItems.dockWidgets();
625 for (QList<DockWindowItem>::ConstIterator it = dockItems.begin(); it != dockItems.end(); ++it) {
626 QDockWidget* dw = findDockWidget(d->_dockedWindows, it->name);
627 if (dw) {
628 QByteArray dockName = it->name.toUtf8();
629 bool visible = hPref->GetBool(dockName.constData(), it->visibility);
630 dw->setVisible(visible);
631 }
632 }
633}
634
635QDockWidget* DockWindowManager::findDockWidget(const QList<QDockWidget*>& dw, const QString& name) const
636{

Callers 1

applyMethod · 0.80

Calls 7

findDockWidgetFunction · 0.85
GetBoolMethod · 0.80
constDataMethod · 0.80
GetGroupMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected