@@ -38,6 +38,9 public slots: | |||
|
38 | 38 | void attachVariableMenu(QMenu *menu, |
|
39 | 39 | const QVector<std::shared_ptr<Variable> > &variables) noexcept; |
|
40 | 40 | |
|
41 | /// Slot called when a variable is about to be deleted from SciQlop | |
|
42 | void onVariableAboutToBeDeleted(std::shared_ptr<Variable> variable) noexcept; | |
|
43 | ||
|
41 | 44 | private: |
|
42 | 45 | Ui::VisualizationWidget *ui; |
|
43 | 46 | }; |
@@ -4,6 +4,7 | |||
|
4 | 4 | #include "Visualization/VisualizationTabWidget.h" |
|
5 | 5 | #include "Visualization/VisualizationZoneWidget.h" |
|
6 | 6 | #include "Visualization/operations/GenerateVariableMenuOperation.h" |
|
7 | #include "Visualization/operations/RemoveVariableOperation.h" | |
|
7 | 8 | #include "Visualization/qcustomplot.h" |
|
8 | 9 | |
|
9 | 10 | #include "ui_VisualizationWidget.h" |
@@ -133,3 +134,10 void VisualizationWidget::attachVariableMenu( | |||
|
133 | 134 | "selected"); |
|
134 | 135 | } |
|
135 | 136 | } |
|
137 | ||
|
138 | void VisualizationWidget::onVariableAboutToBeDeleted(std::shared_ptr<Variable> variable) noexcept | |
|
139 | { | |
|
140 | // Calls the operation of removing all references to the variable in the visualization | |
|
141 | auto removeVariableOperation = RemoveVariableOperation{variable}; | |
|
142 | accept(&removeVariableOperation); | |
|
143 | } |
General Comments 0
You need to be logged in to leave comments.
Login now