============================================================================
| 504 | |
| 505 | //============================================================================ |
| 506 | CDockManager::CDockManager(QWidget *parent) : |
| 507 | CDockContainerWidget(this, parent), |
| 508 | d(new DockManagerPrivate(this)) |
| 509 | { |
| 510 | createRootSplitter(); |
| 511 | createSideTabBarWidgets(); |
| 512 | QMainWindow* MainWindow = qobject_cast<QMainWindow*>(parent); |
| 513 | if (MainWindow) |
| 514 | { |
| 515 | MainWindow->setCentralWidget(this); |
| 516 | } |
| 517 | |
| 518 | d->ViewMenu = new QMenu(tr("Show View"), this); |
| 519 | d->DockAreaOverlay = new CDockOverlay(this, CDockOverlay::ModeDockAreaOverlay); |
| 520 | d->ContainerOverlay = new CDockOverlay(this, CDockOverlay::ModeContainerOverlay); |
| 521 | d->Containers.append(this); |
| 522 | d->loadStylesheet(); |
| 523 | |
| 524 | if (CDockManager::testConfigFlag(CDockManager::FocusHighlighting)) |
| 525 | { |
| 526 | d->FocusController = new CDockFocusController(this); |
| 527 | } |
| 528 | |
| 529 | |
| 530 | window()->installEventFilter(this); |
| 531 | |
| 532 | #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) |
| 533 | connect(qApp, &QApplication::focusWindowChanged, [](QWindow* focusWindow) |
| 534 | { |
| 535 | // bring modal dialogs to foreground to ensure that they are in front of any |
| 536 | // floating dock widget |
| 537 | if (focusWindow && focusWindow->isModal()) |
| 538 | { |
| 539 | focusWindow->raise(); |
| 540 | } |
| 541 | }); |
| 542 | #endif |
| 543 | } |
| 544 | |
| 545 | //============================================================================ |
| 546 | CDockManager::~CDockManager() |
nothing calls this directly
no test coverage detected