@@ -59,7 +59,9 void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) | |||
|
59 | 59 | |
|
60 | 60 | void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
61 | 61 | { |
|
62 | // TODO: manage the visitor | |
|
62 | if (visitor) { | |
|
63 | visitor->visit(this); | |
|
64 | } | |
|
63 | 65 | } |
|
64 | 66 | |
|
65 | 67 | void VisualizationGraphWidget::close() |
@@ -63,7 +63,21 void VisualizationTabWidget::removeZone(VisualizationZoneWidget *zone) | |||
|
63 | 63 | |
|
64 | 64 | void VisualizationTabWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
65 | 65 | { |
|
66 | // TODO: manage the visitor | |
|
66 | if (visitor) { | |
|
67 | visitor->visitEnter(this); | |
|
68 | ||
|
69 | // Apply visitor to zone children | |
|
70 | for (auto i = 0; i < layout()->count(); ++i) { | |
|
71 | if (auto item = layout()->itemAt(i)) { | |
|
72 | if (auto visualizationZoneWidget | |
|
73 | = dynamic_cast<VisualizationZoneWidget *>(item->widget())) { | |
|
74 | visualizationZoneWidget->accept(visitor); | |
|
75 | } | |
|
76 | } | |
|
77 | } | |
|
78 | ||
|
79 | visitor->visitLeave(this); | |
|
80 | } | |
|
67 | 81 | } |
|
68 | 82 | |
|
69 | 83 | void VisualizationTabWidget::close() |
@@ -84,7 +84,19 void VisualizationWidget::removeTab(VisualizationTabWidget *tab) | |||
|
84 | 84 | |
|
85 | 85 | void VisualizationWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
86 | 86 | { |
|
87 | // TODO: manage the visitor | |
|
87 | if (visitor) { | |
|
88 | visitor->visitEnter(this); | |
|
89 | ||
|
90 | // Apply visitor for tab children | |
|
91 | for (auto i = 0; i < ui->tabWidget->count(); ++i) { | |
|
92 | if (auto visualizationTabWidget | |
|
93 | = dynamic_cast<VisualizationTabWidget *>(ui->tabWidget->widget(i))) { | |
|
94 | visualizationTabWidget->accept(visitor); | |
|
95 | } | |
|
96 | } | |
|
97 | ||
|
98 | visitor->visitLeave(this); | |
|
99 | } | |
|
88 | 100 | } |
|
89 | 101 | |
|
90 | 102 | void VisualizationWidget::close() |
@@ -57,7 +57,22 void VisualizationZoneWidget::removeGraph(VisualizationGraphWidget *graph) | |||
|
57 | 57 | |
|
58 | 58 | void VisualizationZoneWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
59 | 59 | { |
|
60 | // TODO: manage the visitor | |
|
60 | if (visitor) { | |
|
61 | visitor->visitEnter(this); | |
|
62 | ||
|
63 | // Apply visitor to graph children | |
|
64 | auto layout = ui->visualizationZoneFrame->layout(); | |
|
65 | for (auto i = 0; i < layout->count(); ++i) { | |
|
66 | if (auto item = layout->itemAt(i)) { | |
|
67 | if (auto visualizationGraphWidget | |
|
68 | = dynamic_cast<VisualizationGraphWidget *>(item->widget())) { | |
|
69 | visualizationGraphWidget->accept(visitor); | |
|
70 | } | |
|
71 | } | |
|
72 | } | |
|
73 | ||
|
74 | visitor->visitLeave(this); | |
|
75 | } | |
|
61 | 76 | } |
|
62 | 77 | |
|
63 | 78 | void VisualizationZoneWidget::close() |
General Comments 0
You need to be logged in to leave comments.
Login now