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

Method positionOfDock

src/plugins/core/uicontroller/mainwindow.cpp:522–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522Position MainWindow::positionOfDock(const QString &dockName)
523{
524 if (!d->dockList.contains(dockName)) {
525 qWarning() << "no dockWidget named: " << dockName;
526 return Position::FullWindow;
527 }
528
529 auto area = dockWidgetArea(d->dockList[dockName]);
530 switch (area) {
531 case Qt::LeftDockWidgetArea:
532 return Position::Left;
533 case Qt::RightDockWidgetArea:
534 return Position::Right;
535 case Qt::TopDockWidgetArea:
536 return Position::Top;
537 case Qt::BottomDockWidgetArea:
538 return Position::Bottom;
539 default:
540 return Position::Left;
541 }
542}

Callers 1

showWidgetAtPositionMethod · 0.80

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected