MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / redistributeDocks

Method redistributeDocks

gui/qt/mainwindow.cpp:978–998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976}
977
978bool MainWindow::redistributeDocks(const QPoint &pos, const QPoint &offset,
979 Qt::CursorShape cursorShape,
980 int (QSize::*dimension)() const,
981 Qt::Orientation orientation) {
982#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
983 if (cursor().shape() == cursorShape) {
984 if (DockWidget *before = redistributeFindDock(pos - offset)) {
985 if (DockWidget *after = redistributeFindDock(pos + offset)) {
986 if (before != after) {
987 int size = (before->size().*dimension)() + (after->size().*dimension)();
988 resizeDocks({before, after}, {size / 2, size - size / 2}, orientation);
989 return true;
990 }
991 }
992 }
993 }
994#else
995 (void)pos; (void)offset; (void)cursorShape; (void)dimension; (void)orientation;
996#endif
997 return false;
998}
999
1000void MainWindow::raiseContainingDock(QWidget *widget) {
1001 QWidget *dock = findSelfOrParent<QDockWidget*>(widget);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected