MCPcopy Create free account
hub / github.com/KDE/kdevelop / goPrevNextDock

Method goPrevNextDock

kdevplatform/sublime/idealcontroller.cpp:872–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872void IdealController::goPrevNextDock(IdealController::Direction direction)
873{
874 IdealDockWidget *currentDock = currentDockWidget();
875 if (!currentDock)
876 return;
877 IdealButtonBarWidget *bar = barForDockArea(currentDock->dockWidgetArea());
878
879 auto index = bar->actions().indexOf(m_view_to_action.value(currentDock->view()));
880 int step = (direction == NextDock) ? 1 : -1;
881
882 if (bar->area() == Qt::BottomDockWidgetArea)
883 step = -step;
884
885 index += step;
886
887 if (index < 0)
888 index = bar->actions().count() - 1;
889
890 if (index > bar->actions().count() - 1)
891 index = 0;
892
893 bar->actions().at(index)->setChecked(true);
894}
895
896void IdealController::toggleDocksShown()
897{

Callers 2

selectNextDockMethod · 0.80
selectPreviousDockMethod · 0.80

Calls 8

dockWidgetAreaMethod · 0.80
indexOfMethod · 0.45
actionsMethod · 0.45
valueMethod · 0.45
viewMethod · 0.45
areaMethod · 0.45
countMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected