##// END OF EJS Templates
Variable deletion (5)...
Alexandre Leroux -
r334:bd7aec6a1752
parent child
Show More
@@ -38,6 +38,9 public slots:
38 void attachVariableMenu(QMenu *menu,
38 void attachVariableMenu(QMenu *menu,
39 const QVector<std::shared_ptr<Variable> > &variables) noexcept;
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 private:
44 private:
42 Ui::VisualizationWidget *ui;
45 Ui::VisualizationWidget *ui;
43 };
46 };
@@ -4,6 +4,7
4 #include "Visualization/VisualizationTabWidget.h"
4 #include "Visualization/VisualizationTabWidget.h"
5 #include "Visualization/VisualizationZoneWidget.h"
5 #include "Visualization/VisualizationZoneWidget.h"
6 #include "Visualization/operations/GenerateVariableMenuOperation.h"
6 #include "Visualization/operations/GenerateVariableMenuOperation.h"
7 #include "Visualization/operations/RemoveVariableOperation.h"
7 #include "Visualization/qcustomplot.h"
8 #include "Visualization/qcustomplot.h"
8
9
9 #include "ui_VisualizationWidget.h"
10 #include "ui_VisualizationWidget.h"
@@ -133,3 +134,10 void VisualizationWidget::attachVariableMenu(
133 "selected");
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