| 642 | } |
| 643 | |
| 644 | void PlotDocker::toggleFullscreen(DockWidget* dock) { |
| 645 | if (fullscreen_dock_) { |
| 646 | // Exit: re-show exactly the docks the maximize hid (those still alive). |
| 647 | // toggleView(true) re-shows each dock and its collapsed parent splitters, |
| 648 | // restoring the layout the maximize folded away. |
| 649 | for (const QPointer<ads::CDockWidget>& hidden : hidden_by_fullscreen_) { |
| 650 | if (hidden) { |
| 651 | hidden->toggleView(true); |
| 652 | } |
| 653 | } |
| 654 | hidden_by_fullscreen_.clear(); |
| 655 | fullscreen_dock_ = nullptr; |
| 656 | return; |
| 657 | } |
| 658 | if (dock == nullptr) { |
| 659 | return; |
| 660 | } |
| 661 | // Enter: hide every currently shown dock except the target. toggleView(false) |
| 662 | // routes through ADS' hideDockWidget -> hideEmptyParentSplitters, collapsing |
| 663 | // the emptied branches so the survivor reflows to fill the tab. (It only |
| 664 | // deletes content under DeleteContentOnClose, not the DeleteOnClose flag the |
| 665 | // docks carry, so the hidden docks survive to be restored.) |
| 666 | // openedDockWidgets() (not dockWidgetsMap(), which is keyed by objectName — |
| 667 | // every PJ4 dock is named "Plot", so the map collapses to a single entry and |
| 668 | // only one sibling would hide). |
| 669 | hidden_by_fullscreen_.clear(); |
| 670 | for (ads::CDockWidget* other : openedDockWidgets()) { |
| 671 | if (other == dock) { |
| 672 | continue; |
| 673 | } |
| 674 | other->toggleView(false); |
| 675 | hidden_by_fullscreen_.append(other); |
| 676 | } |
| 677 | fullscreen_dock_ = dock; |
| 678 | } |
| 679 | |
| 680 | void PlotDocker::onStylesheetChanged(QString theme) { |
| 681 | for (int index = 0; index < plotCount(); ++index) { |
no test coverage detected