| 870 | } |
| 871 | |
| 872 | void 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 | |
| 896 | void IdealController::toggleDocksShown() |
| 897 | { |