MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / showWidgetAtPosition

Method showWidgetAtPosition

src/plugins/core/uicontroller/controller.cpp:519–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519void Controller::showWidgetAtPosition(const QString &name, Position pos, bool replace)
520{
521 if (replace)
522 d->mainWindow->hideWidget(pos);
523
524 if (!d->allWidgets.contains(name)) {
525 qWarning() << "no widget named: " << name;
526 return;
527 }
528
529 auto &info = d->allWidgets[name];
530 if (!info.created) {
531 info.defaultPos = pos;
532 info.replace = replace;
533 createDockWidget(info);
534 } else if (!info.hiddenByManual || d->widgetBindToNavigation.contains(name)) {
535 d->mainWindow->showWidget(name);
536 info.hiddenByManual = false;
537 }
538
539 if (pos != Position::Central && pos != Position::FullWindow) {
540 if (replace) {
541 for (auto name : d->currentDocks) {
542 if (d->mainWindow->positionOfDock(name) == pos)
543 d->currentDocks.removeOne(name);
544 }
545 }
546 d->currentDocks.append(name);
547 }
548
549 checkDocksManager();
550}
551
552void Controller::resizeDocks(const QList<QString> &docks, const QList<int> &sizes, Qt::Orientation orientation)
553{

Callers 4

startMethod · 0.80
initializeMethod · 0.80
startMethod · 0.80
switchToSearchMethod · 0.80

Calls 5

showWidgetMethod · 0.80
positionOfDockMethod · 0.80
hideWidgetMethod · 0.45
containsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected