@@ -173,6 +173,10 MainWindow::MainWindow(QWidget *parent) | |||||
173 | auto timeWidget = new TimeWidget{}; |
|
173 | auto timeWidget = new TimeWidget{}; | |
174 | mainToolBar->addWidget(timeWidget); |
|
174 | mainToolBar->addWidget(timeWidget); | |
175 |
|
175 | |||
|
176 | // Controllers / controllers connections | |||
|
177 | connect(&sqpApp->timeController(), SIGNAL(timeUpdated(SqpDateTime)), | |||
|
178 | &sqpApp->variableController(), SLOT(onDateTimeOnSelection(SqpDateTime))); | |||
|
179 | ||||
176 | // Widgets / controllers connections |
|
180 | // Widgets / controllers connections | |
177 |
|
181 | |||
178 | // DataSource |
|
182 | // DataSource | |
@@ -183,8 +187,10 MainWindow::MainWindow(QWidget *parent) | |||||
183 | connect(timeWidget, SIGNAL(timeUpdated(SqpDateTime)), &sqpApp->timeController(), |
|
187 | connect(timeWidget, SIGNAL(timeUpdated(SqpDateTime)), &sqpApp->timeController(), | |
184 | SLOT(onTimeToUpdate(SqpDateTime))); |
|
188 | SLOT(onTimeToUpdate(SqpDateTime))); | |
185 |
|
189 | |||
186 | connect(&sqpApp->timeController(), SIGNAL(timeUpdated(SqpDateTime)), |
|
190 | // Visualization | |
187 | &sqpApp->variableController(), SLOT(onDateTimeOnSelection(SqpDateTime))); |
|
191 | connect(&sqpApp->visualizationController(), | |
|
192 | SIGNAL(variableAboutToBeDeleted(std::shared_ptr<Variable>)), m_Ui->view, | |||
|
193 | SLOT(onVariableAboutToBeDeleted(std::shared_ptr<Variable>))); | |||
188 |
|
194 | |||
189 | // Widgets / widgets connections |
|
195 | // Widgets / widgets connections | |
190 |
|
196 |
@@ -34,6 +34,7 public: | |||||
34 | * Deletes from the controller the variable passed in parameter. |
|
34 | * Deletes from the controller the variable passed in parameter. | |
35 | * |
|
35 | * | |
36 | * Delete a variable includes: |
|
36 | * Delete a variable includes: | |
|
37 | * - the deletion of the various references to the variable in SciQlop | |||
37 | * - the deletion of the model variable |
|
38 | * - the deletion of the model variable | |
38 | * - the deletion of the provider associated with the variable |
|
39 | * - the deletion of the provider associated with the variable | |
39 | * - removing the cache associated with the variable |
|
40 | * - removing the cache associated with the variable | |
@@ -50,6 +51,8 public: | |||||
50 | void deleteVariables(const QVector<std::shared_ptr<Variable> > &variables) noexcept; |
|
51 | void deleteVariables(const QVector<std::shared_ptr<Variable> > &variables) noexcept; | |
51 |
|
52 | |||
52 | signals: |
|
53 | signals: | |
|
54 | /// Signal emitted when a variable is about to be deleted from the controller | |||
|
55 | void variableAboutToBeDeleted(std::shared_ptr<Variable> variable); | |||
53 | /// Signal emitted when a variable has been created |
|
56 | /// Signal emitted when a variable has been created | |
54 | void variableCreated(std::shared_ptr<Variable> variable); |
|
57 | void variableCreated(std::shared_ptr<Variable> variable); | |
55 |
|
58 |
@@ -32,6 +32,10 public: | |||||
32 | connect(m_VariableController.get(), SIGNAL(variableCreated(std::shared_ptr<Variable>)), |
|
32 | connect(m_VariableController.get(), SIGNAL(variableCreated(std::shared_ptr<Variable>)), | |
33 | m_VisualizationController.get(), |
|
33 | m_VisualizationController.get(), | |
34 | SIGNAL(variableCreated(std::shared_ptr<Variable>))); |
|
34 | SIGNAL(variableCreated(std::shared_ptr<Variable>))); | |
|
35 | connect(m_VariableController.get(), | |||
|
36 | SIGNAL(variableAboutToBeDeleted(std::shared_ptr<Variable>)), | |||
|
37 | m_VisualizationController.get(), | |||
|
38 | SIGNAL(variableAboutToBeDeleted(std::shared_ptr<Variable>)), Qt::DirectConnection); | |||
35 |
|
39 | |||
36 | m_DataSourceController->moveToThread(&m_DataSourceControllerThread); |
|
40 | m_DataSourceController->moveToThread(&m_DataSourceControllerThread); | |
37 | m_VariableController->moveToThread(&m_VariableControllerThread); |
|
41 | m_VariableController->moveToThread(&m_VariableControllerThread); |
@@ -68,8 +68,8 void VariableInspectorWidget::onTableMenuRequested(const QPoint &pos) noexcept | |||||
68 | // Adds menu-specific actions |
|
68 | // Adds menu-specific actions | |
69 | if (!selectedVariables.isEmpty()) { |
|
69 | if (!selectedVariables.isEmpty()) { | |
70 | // 'Delete' action |
|
70 | // 'Delete' action | |
71 | auto deleteFun = []() { |
|
71 | auto deleteFun = [&selectedVariables]() { | |
72 | /// @todo ALX : call variable deletion |
|
72 | sqpApp->variableController().deleteVariables(selectedVariables); | |
73 | }; |
|
73 | }; | |
74 |
|
74 | |||
75 | tableMenu.addSeparator(); |
|
75 | tableMenu.addSeparator(); |
General Comments 0
You need to be logged in to leave comments.
Login now