| 199 | } |
| 200 | |
| 201 | void DockWidget::setPlaceholderWidget() { |
| 202 | clearCurrentContent(true); |
| 203 | placeholder_widget_ = new VisualizationPlaceholderWidget(this); |
| 204 | content_widget_ = placeholder_widget_; |
| 205 | setWidget(placeholder_widget_); |
| 206 | setName(QStringLiteral("...")); |
| 207 | connect( |
| 208 | placeholder_widget_, &VisualizationPlaceholderWidget::catalogItemsDropped, this, |
| 209 | &DockWidget::onCatalogItemsDropped); |
| 210 | connect( |
| 211 | placeholder_widget_, &VisualizationPlaceholderWidget::catalogItemsXyRequested, this, |
| 212 | &DockWidget::onCatalogItemsXyRequested); |
| 213 | connect(placeholder_widget_, &VisualizationPlaceholderWidget::splitHorizontalRequested, this, [this]() { |
| 214 | splitHorizontal(); |
| 215 | }); |
| 216 | connect(placeholder_widget_, &VisualizationPlaceholderWidget::splitVerticalRequested, this, [this]() { |
| 217 | splitVertical(); |
| 218 | }); |
| 219 | connect( |
| 220 | placeholder_widget_, &VisualizationPlaceholderWidget::visualizationRequested, this, |
| 221 | &DockWidget::onVisualizationRequested); |
| 222 | connect( |
| 223 | placeholder_widget_, &VisualizationPlaceholderWidget::pasteRequested, this, |
| 224 | &DockWidget::pastePlaceholderWidgetFromClipboard); |
| 225 | connect( |
| 226 | placeholder_widget_, &VisualizationPlaceholderWidget::contextMenuAboutToShow, this, |
| 227 | &DockWidget::updatePlaceholderPasteAction); |
| 228 | updatePlaceholderPasteAction(); |
| 229 | } |
| 230 | |
| 231 | void DockWidget::onVisualizationRequested(VisualizationKind kind) { |
| 232 | if (kind == VisualizationKind::kPlot) { |