| 374 | } |
| 375 | |
| 376 | QAction* IdealButtonBarWidget::addWidget(IdealDockWidget* dock, bool initiallyVisible) |
| 377 | { |
| 378 | auto dockFeatures = dock->features(); |
| 379 | if (m_area == Qt::BottomDockWidgetArea || m_area == Qt::TopDockWidgetArea) { |
| 380 | dockFeatures |= QDockWidget::DockWidgetVerticalTitleBar; |
| 381 | } else { |
| 382 | dockFeatures &= ~QDockWidget::DockWidgetVerticalTitleBar; |
| 383 | } |
| 384 | dock->setFeatures(dockFeatures); |
| 385 | dock->setDockWidgetArea(m_area); |
| 386 | |
| 387 | auto action = new ToolViewAction(dock, this); |
| 388 | if (initiallyVisible) { |
| 389 | action->setChecked(true); |
| 390 | m_lastCheckedActionsTracker->justChecked(action); |
| 391 | } |
| 392 | addAction(action); |
| 393 | |
| 394 | return action; |
| 395 | } |
| 396 | |
| 397 | QWidget* IdealButtonBarWidget::corner() const |
| 398 | { |
no test coverage detected