Auto status change to "Under Review"
@@ -1,242 +1,244 | |||||
1 | #include <Variable/Variable.h> |
|
1 | #include <Variable/Variable.h> | |
2 | #include <Variable/VariableCacheController.h> |
|
2 | #include <Variable/VariableCacheController.h> | |
3 | #include <Variable/VariableController.h> |
|
3 | #include <Variable/VariableController.h> | |
4 | #include <Variable/VariableModel.h> |
|
4 | #include <Variable/VariableModel.h> | |
5 |
|
5 | |||
6 | #include <Data/DataProviderParameters.h> |
|
6 | #include <Data/DataProviderParameters.h> | |
7 | #include <Data/IDataProvider.h> |
|
7 | #include <Data/IDataProvider.h> | |
8 | #include <Data/IDataSeries.h> |
|
8 | #include <Data/IDataSeries.h> | |
9 | #include <Time/TimeController.h> |
|
9 | #include <Time/TimeController.h> | |
10 |
|
10 | |||
11 | #include <QDateTime> |
|
11 | #include <QDateTime> | |
12 | #include <QMutex> |
|
12 | #include <QMutex> | |
13 | #include <QThread> |
|
13 | #include <QThread> | |
14 | #include <QUuid> |
|
14 | #include <QUuid> | |
15 | #include <QtCore/QItemSelectionModel> |
|
15 | #include <QtCore/QItemSelectionModel> | |
16 |
|
16 | |||
17 | #include <unordered_map> |
|
17 | #include <unordered_map> | |
18 |
|
18 | |||
19 | Q_LOGGING_CATEGORY(LOG_VariableController, "VariableController") |
|
19 | Q_LOGGING_CATEGORY(LOG_VariableController, "VariableController") | |
20 |
|
20 | |||
21 | struct VariableController::VariableControllerPrivate { |
|
21 | struct VariableController::VariableControllerPrivate { | |
22 | explicit VariableControllerPrivate(VariableController *parent) |
|
22 | explicit VariableControllerPrivate(VariableController *parent) | |
23 | : m_WorkingMutex{}, |
|
23 | : m_WorkingMutex{}, | |
24 | m_VariableModel{new VariableModel{parent}}, |
|
24 | m_VariableModel{new VariableModel{parent}}, | |
25 | m_VariableSelectionModel{new QItemSelectionModel{m_VariableModel, parent}}, |
|
25 | m_VariableSelectionModel{new QItemSelectionModel{m_VariableModel, parent}}, | |
26 | m_VariableCacheController{std::make_unique<VariableCacheController>()} |
|
26 | m_VariableCacheController{std::make_unique<VariableCacheController>()} | |
27 | { |
|
27 | { | |
28 | } |
|
28 | } | |
29 |
|
29 | |||
30 | QMutex m_WorkingMutex; |
|
30 | QMutex m_WorkingMutex; | |
31 | /// Variable model. The VariableController has the ownership |
|
31 | /// Variable model. The VariableController has the ownership | |
32 | VariableModel *m_VariableModel; |
|
32 | VariableModel *m_VariableModel; | |
33 | QItemSelectionModel *m_VariableSelectionModel; |
|
33 | QItemSelectionModel *m_VariableSelectionModel; | |
34 |
|
34 | |||
35 |
|
35 | |||
36 | TimeController *m_TimeController{nullptr}; |
|
36 | TimeController *m_TimeController{nullptr}; | |
37 | std::unique_ptr<VariableCacheController> m_VariableCacheController; |
|
37 | std::unique_ptr<VariableCacheController> m_VariableCacheController; | |
38 |
|
38 | |||
39 | std::unordered_map<std::shared_ptr<Variable>, std::shared_ptr<IDataProvider> > |
|
39 | std::unordered_map<std::shared_ptr<Variable>, std::shared_ptr<IDataProvider> > | |
40 | m_VariableToProviderMap; |
|
40 | m_VariableToProviderMap; | |
41 | std::unordered_map<std::shared_ptr<Variable>, QUuid> m_VariableToIdentifierMap; |
|
41 | std::unordered_map<std::shared_ptr<Variable>, QUuid> m_VariableToIdentifierMap; | |
42 | }; |
|
42 | }; | |
43 |
|
43 | |||
44 | VariableController::VariableController(QObject *parent) |
|
44 | VariableController::VariableController(QObject *parent) | |
45 | : QObject{parent}, impl{spimpl::make_unique_impl<VariableControllerPrivate>(this)} |
|
45 | : QObject{parent}, impl{spimpl::make_unique_impl<VariableControllerPrivate>(this)} | |
46 | { |
|
46 | { | |
47 | qCDebug(LOG_VariableController()) << tr("VariableController construction") |
|
47 | qCDebug(LOG_VariableController()) << tr("VariableController construction") | |
48 | << QThread::currentThread(); |
|
48 | << QThread::currentThread(); | |
49 |
|
49 | |||
50 | connect(impl->m_VariableModel, &VariableModel::abortProgessRequested, this, |
|
50 | connect(impl->m_VariableModel, &VariableModel::abortProgessRequested, this, | |
51 | &VariableController::onAbortProgressRequested); |
|
51 | &VariableController::onAbortProgressRequested); | |
52 | } |
|
52 | } | |
53 |
|
53 | |||
54 | VariableController::~VariableController() |
|
54 | VariableController::~VariableController() | |
55 | { |
|
55 | { | |
56 | qCDebug(LOG_VariableController()) << tr("VariableController destruction") |
|
56 | qCDebug(LOG_VariableController()) << tr("VariableController destruction") | |
57 | << QThread::currentThread(); |
|
57 | << QThread::currentThread(); | |
58 | this->waitForFinish(); |
|
58 | this->waitForFinish(); | |
59 | } |
|
59 | } | |
60 |
|
60 | |||
61 | VariableModel *VariableController::variableModel() noexcept |
|
61 | VariableModel *VariableController::variableModel() noexcept | |
62 | { |
|
62 | { | |
63 | return impl->m_VariableModel; |
|
63 | return impl->m_VariableModel; | |
64 | } |
|
64 | } | |
65 |
|
65 | |||
66 | QItemSelectionModel *VariableController::variableSelectionModel() noexcept |
|
66 | QItemSelectionModel *VariableController::variableSelectionModel() noexcept | |
67 | { |
|
67 | { | |
68 | return impl->m_VariableSelectionModel; |
|
68 | return impl->m_VariableSelectionModel; | |
69 | } |
|
69 | } | |
70 |
|
70 | |||
71 | void VariableController::setTimeController(TimeController *timeController) noexcept |
|
71 | void VariableController::setTimeController(TimeController *timeController) noexcept | |
72 | { |
|
72 | { | |
73 | impl->m_TimeController = timeController; |
|
73 | impl->m_TimeController = timeController; | |
74 | } |
|
74 | } | |
75 |
|
75 | |||
76 | void VariableController::deleteVariable(std::shared_ptr<Variable> variable) noexcept |
|
76 | void VariableController::deleteVariable(std::shared_ptr<Variable> variable) noexcept | |
77 | { |
|
77 | { | |
78 | if (!variable) { |
|
78 | if (!variable) { | |
79 | qCCritical(LOG_VariableController()) << "Can't delete variable: variable is null"; |
|
79 | qCCritical(LOG_VariableController()) << "Can't delete variable: variable is null"; | |
80 | return; |
|
80 | return; | |
81 | } |
|
81 | } | |
82 |
|
82 | |||
83 | // Spreads in SciQlop that the variable will be deleted, so that potential receivers can |
|
83 | // Spreads in SciQlop that the variable will be deleted, so that potential receivers can | |
84 | // make some treatments before the deletion |
|
84 | // make some treatments before the deletion | |
85 | emit variableAboutToBeDeleted(variable); |
|
85 | emit variableAboutToBeDeleted(variable); | |
86 |
|
86 | |||
87 | // Deletes identifier |
|
87 | // Deletes identifier | |
88 | impl->m_VariableToIdentifierMap.erase(variable); |
|
88 | impl->m_VariableToIdentifierMap.erase(variable); | |
89 |
|
89 | |||
90 | // Deletes provider |
|
90 | // Deletes provider | |
91 | auto nbProvidersDeleted = impl->m_VariableToProviderMap.erase(variable); |
|
91 | auto nbProvidersDeleted = impl->m_VariableToProviderMap.erase(variable); | |
92 | qCDebug(LOG_VariableController()) |
|
92 | qCDebug(LOG_VariableController()) | |
93 | << tr("Number of providers deleted for variable %1: %2") |
|
93 | << tr("Number of providers deleted for variable %1: %2") | |
94 | .arg(variable->name(), QString::number(nbProvidersDeleted)); |
|
94 | .arg(variable->name(), QString::number(nbProvidersDeleted)); | |
95 |
|
95 | |||
96 | // Clears cache |
|
96 | // Clears cache | |
97 | impl->m_VariableCacheController->clear(variable); |
|
97 | impl->m_VariableCacheController->clear(variable); | |
98 |
|
98 | |||
99 | // Deletes from model |
|
99 | // Deletes from model | |
100 | impl->m_VariableModel->deleteVariable(variable); |
|
100 | impl->m_VariableModel->deleteVariable(variable); | |
101 | } |
|
101 | } | |
102 |
|
102 | |||
103 | void VariableController::deleteVariables( |
|
103 | void VariableController::deleteVariables( | |
104 | const QVector<std::shared_ptr<Variable> > &variables) noexcept |
|
104 | const QVector<std::shared_ptr<Variable> > &variables) noexcept | |
105 | { |
|
105 | { | |
106 | for (auto variable : qAsConst(variables)) { |
|
106 | for (auto variable : qAsConst(variables)) { | |
107 | deleteVariable(variable); |
|
107 | deleteVariable(variable); | |
108 | } |
|
108 | } | |
109 | } |
|
109 | } | |
110 |
|
110 | |||
111 | void VariableController::abortProgress(std::shared_ptr<Variable> variable) |
|
111 | void VariableController::abortProgress(std::shared_ptr<Variable> variable) | |
112 | { |
|
112 | { | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | void VariableController::createVariable(const QString &name, const QVariantHash &metadata, |
|
115 | void VariableController::createVariable(const QString &name, const QVariantHash &metadata, | |
116 | std::shared_ptr<IDataProvider> provider) noexcept |
|
116 | std::shared_ptr<IDataProvider> provider) noexcept | |
117 | { |
|
117 | { | |
118 |
|
118 | |||
119 | if (!impl->m_TimeController) { |
|
119 | if (!impl->m_TimeController) { | |
120 | qCCritical(LOG_VariableController()) |
|
120 | qCCritical(LOG_VariableController()) | |
121 | << tr("Impossible to create variable: The time controller is null"); |
|
121 | << tr("Impossible to create variable: The time controller is null"); | |
122 | return; |
|
122 | return; | |
123 | } |
|
123 | } | |
124 |
|
124 | |||
125 | auto dateTime = impl->m_TimeController->dateTime(); |
|
125 | auto dateTime = impl->m_TimeController->dateTime(); | |
126 |
|
126 | |||
127 | if (auto newVariable = impl->m_VariableModel->createVariable(name, dateTime, metadata)) { |
|
127 | if (auto newVariable = impl->m_VariableModel->createVariable(name, dateTime, metadata)) { | |
128 | auto identifier = QUuid::createUuid(); |
|
128 | auto identifier = QUuid::createUuid(); | |
129 |
|
129 | |||
130 | // store the provider |
|
130 | // store the provider | |
131 | impl->m_VariableToProviderMap[newVariable] = provider; |
|
131 | impl->m_VariableToProviderMap[newVariable] = provider; | |
132 | impl->m_VariableToIdentifierMap[newVariable] = identifier; |
|
132 | impl->m_VariableToIdentifierMap[newVariable] = identifier; | |
133 |
|
133 | |||
134 | auto addDateTimeAcquired = [ this, varW = std::weak_ptr<Variable>{newVariable} ]( |
|
134 | auto addDateTimeAcquired = [ this, varW = std::weak_ptr<Variable>{newVariable} ]( | |
135 | QUuid identifier, auto dataSeriesAcquired, auto dateTimeToPutInCache) |
|
135 | QUuid identifier, auto dataSeriesAcquired, auto dateTimeToPutInCache) | |
136 | { |
|
136 | { | |
137 | if (auto variable = varW.lock()) { |
|
137 | if (auto variable = varW.lock()) { | |
138 | auto varIdentifier = impl->m_VariableToIdentifierMap.at(variable); |
|
138 | auto varIdentifier = impl->m_VariableToIdentifierMap.at(variable); | |
139 | if (varIdentifier == identifier) { |
|
139 | if (varIdentifier == identifier) { | |
140 | impl->m_VariableCacheController->addDateTime(variable, dateTimeToPutInCache); |
|
140 | impl->m_VariableCacheController->addDateTime(variable, dateTimeToPutInCache); | |
141 | variable->setDataSeries(dataSeriesAcquired); |
|
141 | variable->setDataSeries(dataSeriesAcquired); | |
142 | emit variable->updated(); |
|
142 | emit variable->updated(); | |
143 | } |
|
143 | } | |
144 | } |
|
144 | } | |
145 | }; |
|
145 | }; | |
146 |
|
146 | |||
147 | connect(provider.get(), &IDataProvider::dataProvided, addDateTimeAcquired); |
|
147 | connect(provider.get(), &IDataProvider::dataProvided, addDateTimeAcquired); | |
148 | connect(provider.get(), &IDataProvider::dataProvidedProgress, this, |
|
148 | connect(provider.get(), &IDataProvider::dataProvidedProgress, this, | |
149 | &VariableController::onVariableRetrieveDataInProgress); |
|
149 | &VariableController::onVariableRetrieveDataInProgress); | |
150 | this->onRequestDataLoading(newVariable, dateTime); |
|
150 | this->onRequestDataLoading(newVariable, dateTime); | |
151 | } |
|
151 | } | |
152 | } |
|
152 | } | |
153 |
|
153 | |||
154 | void VariableController::onDateTimeOnSelection(const SqpDateTime &dateTime) |
|
154 | void VariableController::onDateTimeOnSelection(const SqpDateTime &dateTime) | |
155 | { |
|
155 | { | |
156 | qCDebug(LOG_VariableController()) << "VariableController::onDateTimeOnSelection" |
|
156 | qCDebug(LOG_VariableController()) << "VariableController::onDateTimeOnSelection" | |
157 | << QThread::currentThread()->objectName(); |
|
157 | << QThread::currentThread()->objectName(); | |
158 | auto selectedRows = impl->m_VariableSelectionModel->selectedRows(); |
|
158 | auto selectedRows = impl->m_VariableSelectionModel->selectedRows(); | |
159 |
|
159 | |||
160 | for (const auto &selectedRow : qAsConst(selectedRows)) { |
|
160 | for (const auto &selectedRow : qAsConst(selectedRows)) { | |
161 | if (auto selectedVariable = impl->m_VariableModel->variable(selectedRow.row())) { |
|
161 | if (auto selectedVariable = impl->m_VariableModel->variable(selectedRow.row())) { | |
162 | selectedVariable->setDateTime(dateTime); |
|
162 | selectedVariable->setDateTime(dateTime); | |
163 | this->onRequestDataLoading(selectedVariable, dateTime); |
|
163 | this->onRequestDataLoading(selectedVariable, dateTime); | |
|
164 | ||||
|
165 | // notify that rescale operation has to be done | |||
164 | emit rangeChanged(selectedVariable, dateTime); |
|
166 | emit rangeChanged(selectedVariable, dateTime); | |
165 | } |
|
167 | } | |
166 | } |
|
168 | } | |
167 | } |
|
169 | } | |
168 |
|
170 | |||
169 | void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress) |
|
171 | void VariableController::onVariableRetrieveDataInProgress(QUuid identifier, double progress) | |
170 | { |
|
172 | { | |
171 | auto findReply = [identifier](const auto &entry) { return identifier == entry.second; }; |
|
173 | auto findReply = [identifier](const auto &entry) { return identifier == entry.second; }; | |
172 |
|
174 | |||
173 | auto end = impl->m_VariableToIdentifierMap.cend(); |
|
175 | auto end = impl->m_VariableToIdentifierMap.cend(); | |
174 | auto it = std::find_if(impl->m_VariableToIdentifierMap.cbegin(), end, findReply); |
|
176 | auto it = std::find_if(impl->m_VariableToIdentifierMap.cbegin(), end, findReply); | |
175 | if (it != end) { |
|
177 | if (it != end) { | |
176 | impl->m_VariableModel->setDataProgress(it->first, progress); |
|
178 | impl->m_VariableModel->setDataProgress(it->first, progress); | |
177 | } |
|
179 | } | |
178 | } |
|
180 | } | |
179 |
|
181 | |||
180 | void VariableController::onAbortProgressRequested(std::shared_ptr<Variable> variable) |
|
182 | void VariableController::onAbortProgressRequested(std::shared_ptr<Variable> variable) | |
181 | { |
|
183 | { | |
182 | qCDebug(LOG_VariableController()) << "TORM: VariableController::onAbortProgressRequested" |
|
184 | qCDebug(LOG_VariableController()) << "TORM: VariableController::onAbortProgressRequested" | |
183 | << QThread::currentThread()->objectName(); |
|
185 | << QThread::currentThread()->objectName(); | |
184 |
|
186 | |||
185 | auto it = impl->m_VariableToIdentifierMap.find(variable); |
|
187 | auto it = impl->m_VariableToIdentifierMap.find(variable); | |
186 | if (it != impl->m_VariableToIdentifierMap.cend()) { |
|
188 | if (it != impl->m_VariableToIdentifierMap.cend()) { | |
187 | impl->m_VariableToProviderMap.at(variable)->requestDataAborting(it->second); |
|
189 | impl->m_VariableToProviderMap.at(variable)->requestDataAborting(it->second); | |
188 | } |
|
190 | } | |
189 | else { |
|
191 | else { | |
190 | qCWarning(LOG_VariableController()) |
|
192 | qCWarning(LOG_VariableController()) | |
191 | << tr("Aborting progression of inexistant variable detected !!!") |
|
193 | << tr("Aborting progression of inexistant variable detected !!!") | |
192 | << QThread::currentThread()->objectName(); |
|
194 | << QThread::currentThread()->objectName(); | |
193 | } |
|
195 | } | |
194 | } |
|
196 | } | |
195 |
|
197 | |||
196 |
|
198 | |||
197 | void VariableController::onRequestDataLoading(std::shared_ptr<Variable> variable, |
|
199 | void VariableController::onRequestDataLoading(std::shared_ptr<Variable> variable, | |
198 | const SqpDateTime &dateTime) |
|
200 | const SqpDateTime &dateTime) | |
199 | { |
|
201 | { | |
200 | qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading" |
|
202 | qCDebug(LOG_VariableController()) << "VariableController::onRequestDataLoading" | |
201 | << QThread::currentThread()->objectName(); |
|
203 | << QThread::currentThread()->objectName(); | |
202 | // we want to load data of the variable for the dateTime. |
|
204 | // we want to load data of the variable for the dateTime. | |
203 | // First we check if the cache contains some of them. |
|
205 | // First we check if the cache contains some of them. | |
204 | // For the other, we ask the provider to give them. |
|
206 | // For the other, we ask the provider to give them. | |
205 | if (variable) { |
|
207 | if (variable) { | |
206 |
|
208 | |||
207 | auto dateTimeListNotInCache |
|
209 | auto dateTimeListNotInCache | |
208 | = impl->m_VariableCacheController->provideNotInCacheDateTimeList(variable, dateTime); |
|
210 | = impl->m_VariableCacheController->provideNotInCacheDateTimeList(variable, dateTime); | |
209 |
|
211 | |||
210 | if (!dateTimeListNotInCache.empty()) { |
|
212 | if (!dateTimeListNotInCache.empty()) { | |
211 | // Ask the provider for each data on the dateTimeListNotInCache |
|
213 | // Ask the provider for each data on the dateTimeListNotInCache | |
212 | auto identifier = impl->m_VariableToIdentifierMap.at(variable); |
|
214 | auto identifier = impl->m_VariableToIdentifierMap.at(variable); | |
213 | impl->m_VariableToProviderMap.at(variable)->requestDataLoading( |
|
215 | impl->m_VariableToProviderMap.at(variable)->requestDataLoading( | |
214 | identifier, |
|
216 | identifier, | |
215 | DataProviderParameters{std::move(dateTimeListNotInCache), variable->metadata()}); |
|
217 | DataProviderParameters{std::move(dateTimeListNotInCache), variable->metadata()}); | |
216 | } |
|
218 | } | |
217 | else { |
|
219 | else { | |
218 | emit variable->updated(); |
|
220 | emit variable->updated(); | |
219 | } |
|
221 | } | |
220 | } |
|
222 | } | |
221 | else { |
|
223 | else { | |
222 | qCCritical(LOG_VariableController()) << tr("Impossible to load data of a variable null"); |
|
224 | qCCritical(LOG_VariableController()) << tr("Impossible to load data of a variable null"); | |
223 | } |
|
225 | } | |
224 | } |
|
226 | } | |
225 |
|
227 | |||
226 |
|
228 | |||
227 | void VariableController::initialize() |
|
229 | void VariableController::initialize() | |
228 | { |
|
230 | { | |
229 | qCDebug(LOG_VariableController()) << tr("VariableController init") << QThread::currentThread(); |
|
231 | qCDebug(LOG_VariableController()) << tr("VariableController init") << QThread::currentThread(); | |
230 | impl->m_WorkingMutex.lock(); |
|
232 | impl->m_WorkingMutex.lock(); | |
231 | qCDebug(LOG_VariableController()) << tr("VariableController init END"); |
|
233 | qCDebug(LOG_VariableController()) << tr("VariableController init END"); | |
232 | } |
|
234 | } | |
233 |
|
235 | |||
234 | void VariableController::finalize() |
|
236 | void VariableController::finalize() | |
235 | { |
|
237 | { | |
236 | impl->m_WorkingMutex.unlock(); |
|
238 | impl->m_WorkingMutex.unlock(); | |
237 | } |
|
239 | } | |
238 |
|
240 | |||
239 | void VariableController::waitForFinish() |
|
241 | void VariableController::waitForFinish() | |
240 | { |
|
242 | { | |
241 | QMutexLocker locker{&impl->m_WorkingMutex}; |
|
243 | QMutexLocker locker{&impl->m_WorkingMutex}; | |
242 | } |
|
244 | } |
@@ -1,307 +1,307 | |||||
1 | #include "Visualization/VisualizationGraphWidget.h" |
|
1 | #include "Visualization/VisualizationGraphWidget.h" | |
2 | #include "Visualization/IVisualizationWidgetVisitor.h" |
|
2 | #include "Visualization/IVisualizationWidgetVisitor.h" | |
3 | #include "Visualization/VisualizationGraphHelper.h" |
|
3 | #include "Visualization/VisualizationGraphHelper.h" | |
4 | #include "ui_VisualizationGraphWidget.h" |
|
4 | #include "ui_VisualizationGraphWidget.h" | |
5 |
|
5 | |||
6 | #include <Data/ArrayData.h> |
|
6 | #include <Data/ArrayData.h> | |
7 | #include <Data/IDataSeries.h> |
|
7 | #include <Data/IDataSeries.h> | |
8 | #include <SqpApplication.h> |
|
8 | #include <SqpApplication.h> | |
9 | #include <Variable/Variable.h> |
|
9 | #include <Variable/Variable.h> | |
10 | #include <Variable/VariableController.h> |
|
10 | #include <Variable/VariableController.h> | |
11 |
|
11 | |||
12 | #include <unordered_map> |
|
12 | #include <unordered_map> | |
13 |
|
13 | |||
14 | Q_LOGGING_CATEGORY(LOG_VisualizationGraphWidget, "VisualizationGraphWidget") |
|
14 | Q_LOGGING_CATEGORY(LOG_VisualizationGraphWidget, "VisualizationGraphWidget") | |
15 |
|
15 | |||
16 | namespace { |
|
16 | namespace { | |
17 |
|
17 | |||
18 | /// Key pressed to enable zoom on horizontal axis |
|
18 | /// Key pressed to enable zoom on horizontal axis | |
19 | const auto HORIZONTAL_ZOOM_MODIFIER = Qt::NoModifier; |
|
19 | const auto HORIZONTAL_ZOOM_MODIFIER = Qt::NoModifier; | |
20 |
|
20 | |||
21 | /// Key pressed to enable zoom on vertical axis |
|
21 | /// Key pressed to enable zoom on vertical axis | |
22 | const auto VERTICAL_ZOOM_MODIFIER = Qt::ControlModifier; |
|
22 | const auto VERTICAL_ZOOM_MODIFIER = Qt::ControlModifier; | |
23 |
|
23 | |||
24 | } // namespace |
|
24 | } // namespace | |
25 |
|
25 | |||
26 | struct VisualizationGraphWidget::VisualizationGraphWidgetPrivate { |
|
26 | struct VisualizationGraphWidget::VisualizationGraphWidgetPrivate { | |
27 |
|
27 | |||
28 | // 1 variable -> n qcpplot |
|
28 | // 1 variable -> n qcpplot | |
29 | std::multimap<std::shared_ptr<Variable>, QCPAbstractPlottable *> m_VariableToPlotMultiMap; |
|
29 | std::multimap<std::shared_ptr<Variable>, QCPAbstractPlottable *> m_VariableToPlotMultiMap; | |
30 | }; |
|
30 | }; | |
31 |
|
31 | |||
32 | VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget *parent) |
|
32 | VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget *parent) | |
33 | : QWidget{parent}, |
|
33 | : QWidget{parent}, | |
34 | ui{new Ui::VisualizationGraphWidget}, |
|
34 | ui{new Ui::VisualizationGraphWidget}, | |
35 | impl{spimpl::make_unique_impl<VisualizationGraphWidgetPrivate>()} |
|
35 | impl{spimpl::make_unique_impl<VisualizationGraphWidgetPrivate>()} | |
36 | { |
|
36 | { | |
37 | ui->setupUi(this); |
|
37 | ui->setupUi(this); | |
38 |
|
38 | |||
39 | ui->graphNameLabel->setText(name); |
|
39 | ui->graphNameLabel->setText(name); | |
40 |
|
40 | |||
41 | // 'Close' options : widget is deleted when closed |
|
41 | // 'Close' options : widget is deleted when closed | |
42 | setAttribute(Qt::WA_DeleteOnClose); |
|
42 | setAttribute(Qt::WA_DeleteOnClose); | |
43 | connect(ui->closeButton, &QToolButton::clicked, this, &VisualizationGraphWidget::close); |
|
43 | connect(ui->closeButton, &QToolButton::clicked, this, &VisualizationGraphWidget::close); | |
44 | ui->closeButton->setIcon(sqpApp->style()->standardIcon(QStyle::SP_TitleBarCloseButton)); |
|
44 | ui->closeButton->setIcon(sqpApp->style()->standardIcon(QStyle::SP_TitleBarCloseButton)); | |
45 |
|
45 | |||
46 | // Set qcpplot properties : |
|
46 | // Set qcpplot properties : | |
47 | // - Drag (on x-axis) and zoom are enabled |
|
47 | // - Drag (on x-axis) and zoom are enabled | |
48 | // - Mouse wheel on qcpplot is intercepted to determine the zoom orientation |
|
48 | // - Mouse wheel on qcpplot is intercepted to determine the zoom orientation | |
49 | ui->widget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom); |
|
49 | ui->widget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom); | |
50 | ui->widget->axisRect()->setRangeDrag(Qt::Horizontal); |
|
50 | ui->widget->axisRect()->setRangeDrag(Qt::Horizontal); | |
51 | connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel); |
|
51 | connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel); | |
52 | connect(ui->widget->xAxis, |
|
52 | connect(ui->widget->xAxis, | |
53 | static_cast<void (QCPAxis::*)(const QCPRange &)>(&QCPAxis::rangeChanged), this, |
|
53 | static_cast<void (QCPAxis::*)(const QCPRange &)>(&QCPAxis::rangeChanged), this, | |
54 | &VisualizationGraphWidget::onRangeChanged); |
|
54 | &VisualizationGraphWidget::onRangeChanged); | |
55 |
|
55 | |||
56 | // Activates menu when right clicking on the graph |
|
56 | // Activates menu when right clicking on the graph | |
57 | ui->widget->setContextMenuPolicy(Qt::CustomContextMenu); |
|
57 | ui->widget->setContextMenuPolicy(Qt::CustomContextMenu); | |
58 | connect(ui->widget, &QCustomPlot::customContextMenuRequested, this, |
|
58 | connect(ui->widget, &QCustomPlot::customContextMenuRequested, this, | |
59 | &VisualizationGraphWidget::onGraphMenuRequested); |
|
59 | &VisualizationGraphWidget::onGraphMenuRequested); | |
60 |
|
60 | |||
61 | connect(this, &VisualizationGraphWidget::requestDataLoading, &sqpApp->variableController(), |
|
61 | connect(this, &VisualizationGraphWidget::requestDataLoading, &sqpApp->variableController(), | |
62 | &VariableController::onRequestDataLoading); |
|
62 | &VariableController::onRequestDataLoading); | |
63 | } |
|
63 | } | |
64 |
|
64 | |||
65 |
|
65 | |||
66 | VisualizationGraphWidget::~VisualizationGraphWidget() |
|
66 | VisualizationGraphWidget::~VisualizationGraphWidget() | |
67 | { |
|
67 | { | |
68 | delete ui; |
|
68 | delete ui; | |
69 | } |
|
69 | } | |
70 |
|
70 | |||
71 | void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) |
|
71 | void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) | |
72 | { |
|
72 | { | |
73 | // Uses delegate to create the qcpplot components according to the variable |
|
73 | // Uses delegate to create the qcpplot components according to the variable | |
74 | auto createdPlottables = VisualizationGraphHelper::create(variable, *ui->widget); |
|
74 | auto createdPlottables = VisualizationGraphHelper::create(variable, *ui->widget); | |
75 |
|
75 | |||
76 | for (auto createdPlottable : qAsConst(createdPlottables)) { |
|
76 | for (auto createdPlottable : qAsConst(createdPlottables)) { | |
77 | impl->m_VariableToPlotMultiMap.insert({variable, createdPlottable}); |
|
77 | impl->m_VariableToPlotMultiMap.insert({variable, createdPlottable}); | |
78 | } |
|
78 | } | |
79 |
|
79 | |||
80 | connect(variable.get(), SIGNAL(updated()), this, SLOT(onDataCacheVariableUpdated())); |
|
80 | connect(variable.get(), SIGNAL(updated()), this, SLOT(onDataCacheVariableUpdated())); | |
81 | } |
|
81 | } | |
82 | void VisualizationGraphWidget::addVariableUsingGraph(std::shared_ptr<Variable> variable) |
|
82 | void VisualizationGraphWidget::addVariableUsingGraph(std::shared_ptr<Variable> variable) | |
83 | { |
|
83 | { | |
84 |
|
84 | |||
85 | // when adding a variable, we need to set its time range to the current graph range |
|
85 | // when adding a variable, we need to set its time range to the current graph range | |
86 | auto grapheRange = ui->widget->xAxis->range(); |
|
86 | auto grapheRange = ui->widget->xAxis->range(); | |
87 | auto dateTime = SqpDateTime{grapheRange.lower, grapheRange.upper}; |
|
87 | auto dateTime = SqpDateTime{grapheRange.lower, grapheRange.upper}; | |
88 | variable->setDateTime(dateTime); |
|
88 | variable->setDateTime(dateTime); | |
89 |
|
89 | |||
90 | auto variableDateTimeWithTolerance = dateTime; |
|
90 | auto variableDateTimeWithTolerance = dateTime; | |
91 |
|
91 | |||
92 | // add 10% tolerance for each side |
|
92 | // add 10% tolerance for each side | |
93 | auto tolerance = 0.1 * (dateTime.m_TEnd - dateTime.m_TStart); |
|
93 | auto tolerance = 0.1 * (dateTime.m_TEnd - dateTime.m_TStart); | |
94 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
94 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
95 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
95 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
96 |
|
96 | |||
97 | // Uses delegate to create the qcpplot components according to the variable |
|
97 | // Uses delegate to create the qcpplot components according to the variable | |
98 | auto createdPlottables = VisualizationGraphHelper::create(variable, *ui->widget); |
|
98 | auto createdPlottables = VisualizationGraphHelper::create(variable, *ui->widget); | |
99 |
|
99 | |||
100 | for (auto createdPlottable : qAsConst(createdPlottables)) { |
|
100 | for (auto createdPlottable : qAsConst(createdPlottables)) { | |
101 | impl->m_VariableToPlotMultiMap.insert({variable, createdPlottable}); |
|
101 | impl->m_VariableToPlotMultiMap.insert({variable, createdPlottable}); | |
102 | } |
|
102 | } | |
103 |
|
103 | |||
104 | connect(variable.get(), SIGNAL(updated()), this, SLOT(onDataCacheVariableUpdated())); |
|
104 | connect(variable.get(), SIGNAL(updated()), this, SLOT(onDataCacheVariableUpdated())); | |
105 |
|
105 | |||
106 | // CHangement detected, we need to ask controller to request data loading |
|
106 | // CHangement detected, we need to ask controller to request data loading | |
107 | emit requestDataLoading(variable, variableDateTimeWithTolerance); |
|
107 | emit requestDataLoading(variable, variableDateTimeWithTolerance); | |
108 | } |
|
108 | } | |
109 |
|
109 | |||
110 | void VisualizationGraphWidget::removeVariable(std::shared_ptr<Variable> variable) noexcept |
|
110 | void VisualizationGraphWidget::removeVariable(std::shared_ptr<Variable> variable) noexcept | |
111 | { |
|
111 | { | |
112 | // Each component associated to the variable : |
|
112 | // Each component associated to the variable : | |
113 | // - is removed from qcpplot (which deletes it) |
|
113 | // - is removed from qcpplot (which deletes it) | |
114 | // - is no longer referenced in the map |
|
114 | // - is no longer referenced in the map | |
115 | auto componentsIt = impl->m_VariableToPlotMultiMap.equal_range(variable); |
|
115 | auto componentsIt = impl->m_VariableToPlotMultiMap.equal_range(variable); | |
116 | for (auto it = componentsIt.first; it != componentsIt.second;) { |
|
116 | for (auto it = componentsIt.first; it != componentsIt.second;) { | |
117 | ui->widget->removePlottable(it->second); |
|
117 | ui->widget->removePlottable(it->second); | |
118 | it = impl->m_VariableToPlotMultiMap.erase(it); |
|
118 | it = impl->m_VariableToPlotMultiMap.erase(it); | |
119 | } |
|
119 | } | |
120 |
|
120 | |||
121 | // Updates graph |
|
121 | // Updates graph | |
122 | ui->widget->replot(); |
|
122 | ui->widget->replot(); | |
123 | } |
|
123 | } | |
124 |
|
124 | |||
125 | void VisualizationGraphWidget::setRange(std::shared_ptr<Variable> variable, |
|
125 | void VisualizationGraphWidget::setRange(std::shared_ptr<Variable> variable, | |
126 | const SqpDateTime &range) |
|
126 | const SqpDateTime &range) | |
127 | { |
|
127 | { | |
128 | // auto componentsIt = impl->m_VariableToPlotMultiMap.equal_range(variable); |
|
128 | // auto componentsIt = impl->m_VariableToPlotMultiMap.equal_range(variable); | |
129 | // for (auto it = componentsIt.first; it != componentsIt.second;) { |
|
129 | // for (auto it = componentsIt.first; it != componentsIt.second;) { | |
130 | // } |
|
130 | // } | |
131 | ui->widget->xAxis->setRange(range.m_TStart, range.m_TEnd); |
|
131 | ui->widget->xAxis->setRange(range.m_TStart, range.m_TEnd); | |
132 | } |
|
132 | } | |
133 |
|
133 | |||
134 | void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
134 | void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor) | |
135 | { |
|
135 | { | |
136 | if (visitor) { |
|
136 | if (visitor) { | |
137 | visitor->visit(this); |
|
137 | visitor->visit(this); | |
138 | } |
|
138 | } | |
139 | else { |
|
139 | else { | |
140 | qCCritical(LOG_VisualizationGraphWidget()) |
|
140 | qCCritical(LOG_VisualizationGraphWidget()) | |
141 | << tr("Can't visit widget : the visitor is null"); |
|
141 | << tr("Can't visit widget : the visitor is null"); | |
142 | } |
|
142 | } | |
143 | } |
|
143 | } | |
144 |
|
144 | |||
145 | bool VisualizationGraphWidget::canDrop(const Variable &variable) const |
|
145 | bool VisualizationGraphWidget::canDrop(const Variable &variable) const | |
146 | { |
|
146 | { | |
147 | /// @todo : for the moment, a graph can always accomodate a variable |
|
147 | /// @todo : for the moment, a graph can always accomodate a variable | |
148 | Q_UNUSED(variable); |
|
148 | Q_UNUSED(variable); | |
149 | return true; |
|
149 | return true; | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | bool VisualizationGraphWidget::contains(const Variable &variable) const |
|
152 | bool VisualizationGraphWidget::contains(const Variable &variable) const | |
153 | { |
|
153 | { | |
154 | // Finds the variable among the keys of the map |
|
154 | // Finds the variable among the keys of the map | |
155 | auto variablePtr = &variable; |
|
155 | auto variablePtr = &variable; | |
156 | auto findVariable |
|
156 | auto findVariable | |
157 | = [variablePtr](const auto &entry) { return variablePtr == entry.first.get(); }; |
|
157 | = [variablePtr](const auto &entry) { return variablePtr == entry.first.get(); }; | |
158 |
|
158 | |||
159 | auto end = impl->m_VariableToPlotMultiMap.cend(); |
|
159 | auto end = impl->m_VariableToPlotMultiMap.cend(); | |
160 | auto it = std::find_if(impl->m_VariableToPlotMultiMap.cbegin(), end, findVariable); |
|
160 | auto it = std::find_if(impl->m_VariableToPlotMultiMap.cbegin(), end, findVariable); | |
161 | return it != end; |
|
161 | return it != end; | |
162 | } |
|
162 | } | |
163 |
|
163 | |||
164 | QString VisualizationGraphWidget::name() const |
|
164 | QString VisualizationGraphWidget::name() const | |
165 | { |
|
165 | { | |
166 | return ui->graphNameLabel->text(); |
|
166 | return ui->graphNameLabel->text(); | |
167 | } |
|
167 | } | |
168 |
|
168 | |||
169 | void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept |
|
169 | void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept | |
170 | { |
|
170 | { | |
171 | QMenu graphMenu{}; |
|
171 | QMenu graphMenu{}; | |
172 |
|
172 | |||
173 | // Iterates on variables (unique keys) |
|
173 | // Iterates on variables (unique keys) | |
174 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(), |
|
174 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(), | |
175 | end = impl->m_VariableToPlotMultiMap.cend(); |
|
175 | end = impl->m_VariableToPlotMultiMap.cend(); | |
176 | it != end; it = impl->m_VariableToPlotMultiMap.upper_bound(it->first)) { |
|
176 | it != end; it = impl->m_VariableToPlotMultiMap.upper_bound(it->first)) { | |
177 | // 'Remove variable' action |
|
177 | // 'Remove variable' action | |
178 | graphMenu.addAction(tr("Remove variable %1").arg(it->first->name()), |
|
178 | graphMenu.addAction(tr("Remove variable %1").arg(it->first->name()), | |
179 | [ this, var = it->first ]() { removeVariable(var); }); |
|
179 | [ this, var = it->first ]() { removeVariable(var); }); | |
180 | } |
|
180 | } | |
181 |
|
181 | |||
182 | if (!graphMenu.isEmpty()) { |
|
182 | if (!graphMenu.isEmpty()) { | |
183 | graphMenu.exec(mapToGlobal(pos)); |
|
183 | graphMenu.exec(mapToGlobal(pos)); | |
184 | } |
|
184 | } | |
185 | } |
|
185 | } | |
186 |
|
186 | |||
187 | void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1) |
|
187 | void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1) | |
188 | { |
|
188 | { | |
189 |
qC |
|
189 | qCDebug(LOG_VisualizationGraphWidget()) << tr("VisualizationGraphWidget::onRangeChanged") | |
190 | << QThread::currentThread()->objectName(); |
|
190 | << QThread::currentThread()->objectName(); | |
191 |
|
191 | |||
192 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); |
|
192 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); | |
193 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { |
|
193 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { | |
194 |
|
194 | |||
195 | auto variable = it->first; |
|
195 | auto variable = it->first; | |
196 | auto dateTime = SqpDateTime{t1.lower, t1.upper}; |
|
196 | auto dateTime = SqpDateTime{t1.lower, t1.upper}; | |
197 | auto dateTimeRange = dateTime; |
|
197 | auto dateTimeRange = dateTime; | |
198 |
|
198 | |||
199 | auto toleranceFactor = 0.2; |
|
199 | auto toleranceFactor = 0.2; | |
200 | auto tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); |
|
200 | auto tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); | |
201 | auto variableDateTimeWithTolerance = dateTime; |
|
201 | auto variableDateTimeWithTolerance = dateTime; | |
202 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
202 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
203 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
203 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
204 |
|
204 | |||
205 |
qC |
|
205 | qCDebug(LOG_VisualizationGraphWidget()) << "v" << dateTime; | |
206 |
qC |
|
206 | qCDebug(LOG_VisualizationGraphWidget()) << "vtol" << variableDateTimeWithTolerance; | |
207 | // If new range with tol is upper than variable datetime parameters. we need to request new |
|
207 | // If new range with tol is upper than variable datetime parameters. we need to request new | |
208 | // data |
|
208 | // data | |
209 | if (!variable->contains(variableDateTimeWithTolerance)) { |
|
209 | if (!variable->contains(variableDateTimeWithTolerance)) { | |
210 |
|
210 | |||
211 | auto variableDateTimeWithTolerance = dateTime; |
|
211 | auto variableDateTimeWithTolerance = dateTime; | |
212 | if (!variable->isInside(dateTime)) { |
|
212 | if (!variable->isInside(dateTime)) { | |
213 | auto variableDateTime = variable->dateTime(); |
|
213 | auto variableDateTime = variable->dateTime(); | |
214 | if (variableDateTime.m_TStart < dateTime.m_TStart) { |
|
214 | if (variableDateTime.m_TStart < dateTime.m_TStart) { | |
215 |
qC |
|
215 | qCDebug(LOG_VisualizationGraphWidget()) << tr("TORM: Detection pan to right:"); | |
216 |
|
216 | |||
217 | auto diffEndToKeepDelta = dateTime.m_TEnd - variableDateTime.m_TEnd; |
|
217 | auto diffEndToKeepDelta = dateTime.m_TEnd - variableDateTime.m_TEnd; | |
218 | dateTime.m_TStart = variableDateTime.m_TStart + diffEndToKeepDelta; |
|
218 | dateTime.m_TStart = variableDateTime.m_TStart + diffEndToKeepDelta; | |
219 | // Tolerance have to be added to the right |
|
219 | // Tolerance have to be added to the right | |
220 | // add tolerance for right (end) side |
|
220 | // add tolerance for right (end) side | |
221 | tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); |
|
221 | tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); | |
222 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
222 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
223 | } |
|
223 | } | |
224 | else if (variableDateTime.m_TEnd > dateTime.m_TEnd) { |
|
224 | else if (variableDateTime.m_TEnd > dateTime.m_TEnd) { | |
225 |
qC |
|
225 | qCDebug(LOG_VisualizationGraphWidget()) << tr("TORM: Detection pan to left: "); | |
226 | auto diffStartToKeepDelta = variableDateTime.m_TStart - dateTime.m_TStart; |
|
226 | auto diffStartToKeepDelta = variableDateTime.m_TStart - dateTime.m_TStart; | |
227 | dateTime.m_TEnd = variableDateTime.m_TEnd - diffStartToKeepDelta; |
|
227 | dateTime.m_TEnd = variableDateTime.m_TEnd - diffStartToKeepDelta; | |
228 | // Tolerance have to be added to the left |
|
228 | // Tolerance have to be added to the left | |
229 | // add tolerance for left (start) side |
|
229 | // add tolerance for left (start) side | |
230 | tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); |
|
230 | tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); | |
231 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
231 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
232 | } |
|
232 | } | |
233 | else { |
|
233 | else { | |
234 |
qC |
|
234 | qCDebug(LOG_VisualizationGraphWidget()) | |
235 | << tr("Detection anormal zoom detection: "); |
|
235 | << tr("Detection anormal zoom detection: "); | |
236 | } |
|
236 | } | |
237 | } |
|
237 | } | |
238 | else { |
|
238 | else { | |
239 |
qC |
|
239 | qCDebug(LOG_VisualizationGraphWidget()) << tr("Detection zoom out: "); | |
240 | // add 10% tolerance for each side |
|
240 | // add 10% tolerance for each side | |
241 | tolerance = 0.2 * (dateTime.m_TEnd - dateTime.m_TStart); |
|
241 | tolerance = 0.2 * (dateTime.m_TEnd - dateTime.m_TStart); | |
242 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
242 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
243 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
243 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
244 | } |
|
244 | } | |
245 | if (!variable->contains(dateTimeRange)) { |
|
245 | if (!variable->contains(dateTimeRange)) { | |
246 |
qC |
|
246 | qCDebug(LOG_VisualizationGraphWidget()) | |
247 | << "TORM: Modif on variable datetime detected" << dateTime; |
|
247 | << "TORM: Modif on variable datetime detected" << dateTime; | |
248 | variable->setDateTime(dateTime); |
|
248 | variable->setDateTime(dateTime); | |
249 | } |
|
249 | } | |
250 |
|
250 | |||
251 |
qC |
|
251 | qCDebug(LOG_VisualizationGraphWidget()) << tr("Request data detection: "); | |
252 | // CHangement detected, we need to ask controller to request data loading |
|
252 | // CHangement detected, we need to ask controller to request data loading | |
253 | emit requestDataLoading(variable, variableDateTimeWithTolerance); |
|
253 | emit requestDataLoading(variable, variableDateTimeWithTolerance); | |
254 | } |
|
254 | } | |
255 | else { |
|
255 | else { | |
256 |
qC |
|
256 | qCDebug(LOG_VisualizationGraphWidget()) << tr("Detection zoom in: "); | |
257 | } |
|
257 | } | |
258 | } |
|
258 | } | |
259 | } |
|
259 | } | |
260 |
|
260 | |||
261 | void VisualizationGraphWidget::onMouseWheel(QWheelEvent *event) noexcept |
|
261 | void VisualizationGraphWidget::onMouseWheel(QWheelEvent *event) noexcept | |
262 | { |
|
262 | { | |
263 | auto zoomOrientations = QFlags<Qt::Orientation>{}; |
|
263 | auto zoomOrientations = QFlags<Qt::Orientation>{}; | |
264 |
|
264 | |||
265 | // Lambda that enables a zoom orientation if the key modifier related to this orientation |
|
265 | // Lambda that enables a zoom orientation if the key modifier related to this orientation | |
266 | // has |
|
266 | // has | |
267 | // been pressed |
|
267 | // been pressed | |
268 | auto enableOrientation |
|
268 | auto enableOrientation | |
269 | = [&zoomOrientations, event](const auto &orientation, const auto &modifier) { |
|
269 | = [&zoomOrientations, event](const auto &orientation, const auto &modifier) { | |
270 | auto orientationEnabled = event->modifiers().testFlag(modifier); |
|
270 | auto orientationEnabled = event->modifiers().testFlag(modifier); | |
271 | zoomOrientations.setFlag(orientation, orientationEnabled); |
|
271 | zoomOrientations.setFlag(orientation, orientationEnabled); | |
272 | }; |
|
272 | }; | |
273 | enableOrientation(Qt::Vertical, VERTICAL_ZOOM_MODIFIER); |
|
273 | enableOrientation(Qt::Vertical, VERTICAL_ZOOM_MODIFIER); | |
274 | enableOrientation(Qt::Horizontal, HORIZONTAL_ZOOM_MODIFIER); |
|
274 | enableOrientation(Qt::Horizontal, HORIZONTAL_ZOOM_MODIFIER); | |
275 |
|
275 | |||
276 | ui->widget->axisRect()->setRangeZoom(zoomOrientations); |
|
276 | ui->widget->axisRect()->setRangeZoom(zoomOrientations); | |
277 | } |
|
277 | } | |
278 |
|
278 | |||
279 | void VisualizationGraphWidget::onDataCacheVariableUpdated() |
|
279 | void VisualizationGraphWidget::onDataCacheVariableUpdated() | |
280 | { |
|
280 | { | |
281 | // NOTE: |
|
281 | // NOTE: | |
282 | // We don't want to call the method for each component of a variable unitarily, but for |
|
282 | // We don't want to call the method for each component of a variable unitarily, but for | |
283 | // all |
|
283 | // all | |
284 | // its components at once (eg its three components in the case of a vector). |
|
284 | // its components at once (eg its three components in the case of a vector). | |
285 |
|
285 | |||
286 | // The unordered_multimap does not do this easily, so the question is whether to: |
|
286 | // The unordered_multimap does not do this easily, so the question is whether to: | |
287 | // - use an ordered_multimap and the algos of std to group the values by key |
|
287 | // - use an ordered_multimap and the algos of std to group the values by key | |
288 | // - use a map (unique keys) and store as values directly the list of components |
|
288 | // - use a map (unique keys) and store as values directly the list of components | |
289 |
|
289 | |||
290 | auto grapheRange = ui->widget->xAxis->range(); |
|
290 | auto grapheRange = ui->widget->xAxis->range(); | |
291 | auto dateTime = SqpDateTime{grapheRange.lower, grapheRange.upper}; |
|
291 | auto dateTime = SqpDateTime{grapheRange.lower, grapheRange.upper}; | |
292 |
|
292 | |||
293 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); |
|
293 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); | |
294 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { |
|
294 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { | |
295 | auto variable = it->first; |
|
295 | auto variable = it->first; | |
296 |
qC |
|
296 | qCDebug(LOG_VisualizationGraphWidget()) | |
297 | << "TORM: VisualizationGraphWidget::onDataCacheVariableUpdated S" |
|
297 | << "TORM: VisualizationGraphWidget::onDataCacheVariableUpdated S" | |
298 | << variable->dateTime(); |
|
298 | << variable->dateTime(); | |
299 |
qC |
|
299 | qCDebug(LOG_VisualizationGraphWidget()) | |
300 | << "TORM: VisualizationGraphWidget::onDataCacheVariableUpdated E" << dateTime; |
|
300 | << "TORM: VisualizationGraphWidget::onDataCacheVariableUpdated E" << dateTime; | |
301 | if (dateTime.contains(variable->dateTime()) || dateTime.intersect(variable->dateTime())) { |
|
301 | if (dateTime.contains(variable->dateTime()) || dateTime.intersect(variable->dateTime())) { | |
302 |
|
302 | |||
303 | VisualizationGraphHelper::updateData(QVector<QCPAbstractPlottable *>{} << it->second, |
|
303 | VisualizationGraphHelper::updateData(QVector<QCPAbstractPlottable *>{} << it->second, | |
304 | variable->dataSeries(), variable->dateTime()); |
|
304 | variable->dataSeries(), variable->dateTime()); | |
305 | } |
|
305 | } | |
306 | } |
|
306 | } | |
307 | } |
|
307 | } |
@@ -1,145 +1,148 | |||||
1 | #include "AmdaProvider.h" |
|
1 | #include "AmdaProvider.h" | |
2 | #include "AmdaDefs.h" |
|
2 | #include "AmdaDefs.h" | |
3 | #include "AmdaResultParser.h" |
|
3 | #include "AmdaResultParser.h" | |
4 |
|
4 | |||
5 | #include <Data/DataProviderParameters.h> |
|
5 | #include <Data/DataProviderParameters.h> | |
6 | #include <Network/NetworkController.h> |
|
6 | #include <Network/NetworkController.h> | |
7 | #include <SqpApplication.h> |
|
7 | #include <SqpApplication.h> | |
8 | #include <Variable/Variable.h> |
|
8 | #include <Variable/Variable.h> | |
9 |
|
9 | |||
10 | #include <QNetworkAccessManager> |
|
10 | #include <QNetworkAccessManager> | |
11 | #include <QNetworkReply> |
|
11 | #include <QNetworkReply> | |
12 | #include <QTemporaryFile> |
|
12 | #include <QTemporaryFile> | |
13 | #include <QThread> |
|
13 | #include <QThread> | |
14 |
|
14 | |||
15 | Q_LOGGING_CATEGORY(LOG_AmdaProvider, "AmdaProvider") |
|
15 | Q_LOGGING_CATEGORY(LOG_AmdaProvider, "AmdaProvider") | |
16 |
|
16 | |||
17 | namespace { |
|
17 | namespace { | |
18 |
|
18 | |||
19 | /// URL format for a request on AMDA server. The parameters are as follows: |
|
19 | /// URL format for a request on AMDA server. The parameters are as follows: | |
20 | /// - %1: start date |
|
20 | /// - %1: start date | |
21 | /// - %2: end date |
|
21 | /// - %2: end date | |
22 | /// - %3: parameter id |
|
22 | /// - %3: parameter id | |
23 | const auto AMDA_URL_FORMAT = QStringLiteral( |
|
23 | const auto AMDA_URL_FORMAT = QStringLiteral( | |
24 | "http://amda.irap.omp.eu/php/rest/" |
|
24 | "http://amda.irap.omp.eu/php/rest/" | |
25 | "getParameter.php?startTime=%1&stopTime=%2¶meterID=%3&sampling=60&outputFormat=ASCII&" |
|
25 | "getParameter.php?startTime=%1&stopTime=%2¶meterID=%3&sampling=60&outputFormat=ASCII&" | |
26 | "timeFormat=ISO8601&gzip=0"); |
|
26 | "timeFormat=ISO8601&gzip=0"); | |
27 |
|
27 | |||
28 | /// Dates format passed in the URL (e.g 2013-09-23T09:00) |
|
28 | /// Dates format passed in the URL (e.g 2013-09-23T09:00) | |
29 | const auto AMDA_TIME_FORMAT = QStringLiteral("yyyy-MM-ddThh:ss"); |
|
29 | const auto AMDA_TIME_FORMAT = QStringLiteral("yyyy-MM-ddThh:mm:ss"); | |
30 |
|
30 | |||
31 | /// Formats a time to a date that can be passed in URL |
|
31 | /// Formats a time to a date that can be passed in URL | |
32 | QString dateFormat(double sqpDateTime) noexcept |
|
32 | QString dateFormat(double sqpDateTime) noexcept | |
33 | { |
|
33 | { | |
34 | auto dateTime = QDateTime::fromMSecsSinceEpoch(sqpDateTime * 1000.); |
|
34 | auto dateTime = QDateTime::fromMSecsSinceEpoch(sqpDateTime * 1000.); | |
35 | return dateTime.toString(AMDA_TIME_FORMAT); |
|
35 | return dateTime.toString(AMDA_TIME_FORMAT); | |
36 | } |
|
36 | } | |
37 |
|
37 | |||
38 | } // namespace |
|
38 | } // namespace | |
39 |
|
39 | |||
40 | AmdaProvider::AmdaProvider() |
|
40 | AmdaProvider::AmdaProvider() | |
41 | { |
|
41 | { | |
42 | qCDebug(LOG_NetworkController()) << tr("AmdaProvider::AmdaProvider") |
|
42 | qCDebug(LOG_NetworkController()) << tr("AmdaProvider::AmdaProvider") | |
43 | << QThread::currentThread(); |
|
43 | << QThread::currentThread(); | |
44 | if (auto app = sqpApp) { |
|
44 | if (auto app = sqpApp) { | |
45 | auto &networkController = app->networkController(); |
|
45 | auto &networkController = app->networkController(); | |
46 | connect(this, SIGNAL(requestConstructed(QNetworkRequest, QUuid, |
|
46 | connect(this, SIGNAL(requestConstructed(QNetworkRequest, QUuid, | |
47 | std::function<void(QNetworkReply *, QUuid)>)), |
|
47 | std::function<void(QNetworkReply *, QUuid)>)), | |
48 | &networkController, |
|
48 | &networkController, | |
49 | SLOT(onProcessRequested(QNetworkRequest, QUuid, |
|
49 | SLOT(onProcessRequested(QNetworkRequest, QUuid, | |
50 | std::function<void(QNetworkReply *, QUuid)>))); |
|
50 | std::function<void(QNetworkReply *, QUuid)>))); | |
51 |
|
51 | |||
52 |
|
52 | |||
53 | connect(&sqpApp->networkController(), SIGNAL(replyDownloadProgress(QUuid, double)), this, |
|
53 | connect(&sqpApp->networkController(), SIGNAL(replyDownloadProgress(QUuid, double)), this, | |
54 | SIGNAL(dataProvidedProgress(QUuid, double))); |
|
54 | SIGNAL(dataProvidedProgress(QUuid, double))); | |
55 | } |
|
55 | } | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | void AmdaProvider::requestDataLoading(QUuid token, const DataProviderParameters ¶meters) |
|
58 | void AmdaProvider::requestDataLoading(QUuid token, const DataProviderParameters ¶meters) | |
59 | { |
|
59 | { | |
60 | // NOTE: Try to use multithread if possible |
|
60 | // NOTE: Try to use multithread if possible | |
61 | const auto times = parameters.m_Times; |
|
61 | const auto times = parameters.m_Times; | |
62 | const auto data = parameters.m_Data; |
|
62 | const auto data = parameters.m_Data; | |
63 | for (const auto &dateTime : qAsConst(times)) { |
|
63 | for (const auto &dateTime : qAsConst(times)) { | |
64 | retrieveData(token, dateTime, data); |
|
64 | retrieveData(token, dateTime, data); | |
65 | } |
|
65 | } | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | void AmdaProvider::requestDataAborting(QUuid identifier) |
|
68 | void AmdaProvider::requestDataAborting(QUuid identifier) | |
69 | { |
|
69 | { | |
70 | if (auto app = sqpApp) { |
|
70 | if (auto app = sqpApp) { | |
71 | auto &networkController = app->networkController(); |
|
71 | auto &networkController = app->networkController(); | |
72 | networkController.onReplyCanceled(identifier); |
|
72 | networkController.onReplyCanceled(identifier); | |
73 | } |
|
73 | } | |
74 | } |
|
74 | } | |
75 |
|
75 | |||
76 | void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const QVariantHash &data) |
|
76 | void AmdaProvider::retrieveData(QUuid token, const SqpDateTime &dateTime, const QVariantHash &data) | |
77 | { |
|
77 | { | |
78 | // Retrieves product ID from data: if the value is invalid, no request is made |
|
78 | // Retrieves product ID from data: if the value is invalid, no request is made | |
79 | auto productId = data.value(AMDA_XML_ID_KEY).toString(); |
|
79 | auto productId = data.value(AMDA_XML_ID_KEY).toString(); | |
80 | if (productId.isNull()) { |
|
80 | if (productId.isNull()) { | |
81 | qCCritical(LOG_AmdaProvider()) << tr("Can't retrieve data: unknown product id"); |
|
81 | qCCritical(LOG_AmdaProvider()) << tr("Can't retrieve data: unknown product id"); | |
82 | return; |
|
82 | return; | |
83 | } |
|
83 | } | |
|
84 | qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData") << dateTime; | |||
84 |
|
85 | |||
85 | // /////////// // |
|
86 | // /////////// // | |
86 | // Creates URL // |
|
87 | // Creates URL // | |
87 | // /////////// // |
|
88 | // /////////// // | |
88 |
|
89 | |||
89 | auto startDate = dateFormat(dateTime.m_TStart); |
|
90 | auto startDate = dateFormat(dateTime.m_TStart); | |
90 | auto endDate = dateFormat(dateTime.m_TEnd); |
|
91 | auto endDate = dateFormat(dateTime.m_TEnd); | |
91 |
|
92 | |||
92 | auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)}; |
|
93 | auto url = QUrl{QString{AMDA_URL_FORMAT}.arg(startDate, endDate, productId)}; | |
93 |
|
94 | qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData url:") << url; | ||
94 | auto tempFile = std::make_shared<QTemporaryFile>(); |
|
95 | auto tempFile = std::make_shared<QTemporaryFile>(); | |
95 |
|
96 | |||
96 | // LAMBDA |
|
97 | // LAMBDA | |
97 | auto httpDownloadFinished |
|
98 | auto httpDownloadFinished | |
98 | = [this, dateTime, tempFile, token](QNetworkReply *reply, QUuid dataId) noexcept { |
|
99 | = [this, dateTime, tempFile, token](QNetworkReply *reply, QUuid dataId) noexcept { | |
99 | Q_UNUSED(dataId); |
|
100 | Q_UNUSED(dataId); | |
100 |
|
101 | |||
101 | // Don't do anything if the reply was abort |
|
102 | // Don't do anything if the reply was abort | |
102 | if (reply->error() != QNetworkReply::OperationCanceledError) { |
|
103 | if (reply->error() != QNetworkReply::OperationCanceledError) { | |
103 |
|
104 | |||
104 | if (tempFile) { |
|
105 | if (tempFile) { | |
105 | auto replyReadAll = reply->readAll(); |
|
106 | auto replyReadAll = reply->readAll(); | |
106 | if (!replyReadAll.isEmpty()) { |
|
107 | if (!replyReadAll.isEmpty()) { | |
107 | tempFile->write(replyReadAll); |
|
108 | tempFile->write(replyReadAll); | |
108 | } |
|
109 | } | |
109 | tempFile->close(); |
|
110 | tempFile->close(); | |
110 |
|
111 | |||
111 | // Parse results file |
|
112 | // Parse results file | |
112 | if (auto dataSeries = AmdaResultParser::readTxt(tempFile->fileName())) { |
|
113 | if (auto dataSeries = AmdaResultParser::readTxt(tempFile->fileName())) { | |
113 | emit dataProvided(token, dataSeries, dateTime); |
|
114 | emit dataProvided(token, dataSeries, dateTime); | |
114 | } |
|
115 | } | |
115 | else { |
|
116 | else { | |
116 | /// @todo ALX : debug |
|
117 | /// @todo ALX : debug | |
117 | } |
|
118 | } | |
118 | } |
|
119 | } | |
119 | } |
|
120 | } | |
120 |
|
121 | |||
121 | }; |
|
122 | }; | |
122 | auto httpFinishedLambda |
|
123 | auto httpFinishedLambda | |
123 | = [this, httpDownloadFinished, tempFile](QNetworkReply *reply, QUuid dataId) noexcept { |
|
124 | = [this, httpDownloadFinished, tempFile](QNetworkReply *reply, QUuid dataId) noexcept { | |
124 |
|
125 | |||
125 | // Don't do anything if the reply was abort |
|
126 | // Don't do anything if the reply was abort | |
126 | if (reply->error() != QNetworkReply::OperationCanceledError) { |
|
127 | if (reply->error() != QNetworkReply::OperationCanceledError) { | |
127 | auto downloadFileUrl = QUrl{QString{reply->readAll()}}; |
|
128 | auto downloadFileUrl = QUrl{QString{reply->readAll()}}; | |
128 |
|
129 | |||
129 |
|
130 | |||
|
131 | qCInfo(LOG_AmdaProvider()) << tr("AmdaProvider::retrieveData downloadFileUrl:") | |||
|
132 | << downloadFileUrl; | |||
130 | // Executes request for downloading file // |
|
133 | // Executes request for downloading file // | |
131 |
|
134 | |||
132 | // Creates destination file |
|
135 | // Creates destination file | |
133 | if (tempFile->open()) { |
|
136 | if (tempFile->open()) { | |
134 | // Executes request |
|
137 | // Executes request | |
135 | emit requestConstructed(QNetworkRequest{downloadFileUrl}, dataId, |
|
138 | emit requestConstructed(QNetworkRequest{downloadFileUrl}, dataId, | |
136 | httpDownloadFinished); |
|
139 | httpDownloadFinished); | |
137 | } |
|
140 | } | |
138 | } |
|
141 | } | |
139 | }; |
|
142 | }; | |
140 |
|
143 | |||
141 | // //////////////// // |
|
144 | // //////////////// // | |
142 | // Executes request // |
|
145 | // Executes request // | |
143 | // //////////////// // |
|
146 | // //////////////// // | |
144 | emit requestConstructed(QNetworkRequest{url}, token, httpFinishedLambda); |
|
147 | emit requestConstructed(QNetworkRequest{url}, token, httpFinishedLambda); | |
145 | } |
|
148 | } |
General Comments 3
Pull request updated. Auto status change to "Under Review"
Changed commits: * 3 added * 0 removed Changed files: * A plugins/amda/tests-resources/TestAmdaResultParser/FileNotFound.txt * M gui/src/Visualization/operations/RescaleAxeOperation.cpp * M app/src/MainWindow.cpp * M core/include/Data/IDataProvider.h * M core/include/DataSource/DataSourceItemAction.h * M core/include/Variable/VariableController.h * M core/include/Variable/VariableModel.h * M core/include/Visualization/VisualizationController.h * M core/src/Network/NetworkController.cpp * M core/src/Variable/Variable.cpp * M core/src/Variable/VariableController.cpp * M core/src/Variable/VariableModel.cpp * M gui/include/Visualization/VisualizationGraphWidget.h * M gui/include/Visualization/VisualizationWidget.h * M gui/src/SqpApplication.cpp * M gui/src/Variable/VariableInspectorWidget.cpp * M gui/src/Visualization/VisualizationGraphHelper.cpp * M gui/src/Visualization/VisualizationGraphWidget.cpp * M gui/src/Visualization/VisualizationWidget.cpp * M gui/src/Visualization/VisualizationZoneWidget.cpp * M plugins/amda/include/AmdaProvider.h * M plugins/amda/src/AmdaProvider.cpp * M plugins/amda/src/AmdaResultParser.cpp * M plugins/amda/tests/TestAmdaResultParser.cpp * M plugins/mockplugin/include/CosinusProvider.h * M plugins/mockplugin/src/CosinusProvider.cpp * R COPYING * R app/ui/MainWindow.ui * R cmake/sciqlop_package_qt.cmake * R core/include/Common/MetaTypes.h * R core/include/Data/ArrayData.h * R core/include/Data/DataProviderParameters.h * R core/include/Data/DataSeries.h * R core/include/Data/IDataSeries.h * R core/include/Data/ScalarSeries.h * R core/include/Data/SqpDateTime.h * R core/include/Network/NetworkController.h * R core/include/Plugin/PluginManager.h * R core/include/Time/TimeController.h * R core/include/Variable/Variable.h * R core/include/Variable/VariableCacheController.h * R core/src/Data/ScalarSeries.cpp * R core/src/DataSource/DataSourceItemAction.cpp * R core/src/Plugin/PluginManager.cpp * R core/src/Time/TimeController.cpp * R core/src/Variable/VariableCacheController.cpp * R core/src/Visualization/VisualizationController.cpp * R core/tests/Variable/TestVariableCacheController.cpp * R gui/include/DataSource/DataSourceTreeWidgetItem.h * R gui/include/DataSource/DataSourceWidget.h * R gui/include/SidePane/SqpSidePane.h * R gui/include/TimeWidget/TimeWidget.h * R gui/include/Variable/VariableInspectorWidget.h * R gui/include/Variable/VariableMenuHeaderWidget.h * R gui/include/Visualization/IVariableContainer.h * R gui/include/Visualization/IVisualizationWidget.h * R gui/include/Visualization/IVisualizationWidgetVisitor.h * R gui/include/Visualization/VisualizationGraphHelper.h * R gui/include/Visualization/VisualizationTabWidget.h * R gui/include/Visualization/VisualizationZoneWidget.h * R gui/include/Visualization/operations/GenerateVariableMenuOperation.h * R gui/include/Visualization/operations/MenuBuilder.h * R gui/include/Visualization/operations/RemoveVariableOperation.h * R gui/include/Visualization/qcustomplot.h * R gui/resources/icones/dataSourceComponent.png * R gui/resources/icones/dataSourceNode.png * R gui/resources/icones/dataSourceProduct.png * R gui/resources/icones/dataSourceRoot.png * R gui/resources/icones/delete.png * R gui/resources/icones/next.png * R gui/resources/icones/openInspector.png * R gui/resources/icones/plot.png * R gui/resources/icones/previous.png * R gui/resources/icones/sciqlop2PNG_1024.png * R gui/resources/icones/unplot.png * R gui/resources/sqpguiresources.qrc * R gui/src/DataSource/DataSourceTreeWidgetItem.cpp * R gui/src/DataSource/DataSourceWidget.cpp * R gui/src/SidePane/SqpSidePane.cpp * R gui/src/TimeWidget/TimeWidget.cpp * R gui/src/Variable/VariableMenuHeaderWidget.cpp * R gui/src/Visualization/VisualizationTabWidget.cpp * R gui/src/Visualization/operations/GenerateVariableMenuOperation.cpp * R gui/src/Visualization/operations/MenuBuilder.cpp * R gui/src/Visualization/operations/RemoveVariableOperation.cpp * R gui/src/Visualization/qcustomplot.cpp * R gui/ui/DataSource/DataSourceWidget.ui * R gui/ui/SidePane/SqpSidePane.ui * R gui/ui/TimeWidget/TimeWidget.ui * R gui/ui/Variable/VariableInspectorWidget.ui * R gui/ui/Variable/VariableMenuHeaderWidget.ui * R gui/ui/Visualization/VisualizationGraphWidget.ui * R gui/ui/Visualization/VisualizationTabWidget.ui * R gui/ui/Visualization/VisualizationWidget.ui * R gui/ui/Visualization/VisualizationZoneWidget.ui * R gui/vera-exclusions/exclusions.txt * R plugin/CMakeLists.txt * R plugin/cmake/Findsciqlop-plugin.cmake * R plugin/include/Plugin/IPlugin.h * R plugins/amda/CMakeLists.txt * R plugins/amda/cmake/Findsciqlop-amda.cmake * R plugins/amda/include/AmdaDefs.h * R plugins/amda/include/AmdaGlobal.h * R plugins/amda/include/AmdaParser.h * R plugins/amda/include/AmdaPlugin.h * R plugins/amda/include/AmdaResultParser.h * R plugins/amda/resources/amda.json * R plugins/amda/resources/amdaresources.qrc * R plugins/amda/resources/samples/AmdaSample.json * R plugins/amda/src/AmdaDefs.cpp * R plugins/amda/src/AmdaParser.cpp * R plugins/amda/src/AmdaPlugin.cpp * R plugins/amda/tests-resources/TestAmdaParser/TwoRootsFile.json * R plugins/amda/tests-resources/TestAmdaParser/ValidFile1.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootKey.json * R plugins/amda/tests-resources/TestAmdaParser/WrongRootType.json * R plugins/amda/tests-resources/TestAmdaResultParser/NaNValue.txt * R plugins/amda/tests-resources/TestAmdaResultParser/NoUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/TooManyValues.txt * R plugins/amda/tests-resources/TestAmdaResultParser/ValidScalar1.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongDate.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongUnit.txt * R plugins/amda/tests-resources/TestAmdaResultParser/WrongValue.txt * R plugins/amda/tests/TestAmdaParser.cpp * R plugins/mockplugin/CMakeLists.txt * R plugins/mockplugin/cmake/Findsciqlop-mockplugin.cmake * R plugins/mockplugin/include/MockPlugin.h * R plugins/mockplugin/include/MockPluginGlobal.h * R plugins/mockplugin/resources/mockplugin.json * R plugins/mockplugin/src/MockPlugin.cpp * R README.md * R app/CMakeLists.txt * R app/include/MainWindow.h * R app/src/Main.cpp * R app/vera-exclusions/exclusions.txt * R cmake/sciqlop.cmake * R cmake/sciqlop_applications.cmake * R cmake/sciqlop_package.cmake * R cmake/sciqlop_params.cmake * R core/CMakeLists.txt * R core/include/Common/spimpl.h * R core/include/DataSource/DataSourceController.h * R core/include/DataSource/DataSourceItem.h * R core/src/DataSource/DataSourceController.cpp * R core/src/DataSource/DataSourceItem.cpp * R core/tests/DataSource/TestDataSourceController.cpp * R core/vera-exclusions/exclusions.txt * R formatting/cmake/use_clangformat.cmake * R formatting/vera-exclusions/exclusions.txt * R gui/CMakeLists.txt * R gui/include/SqpApplication.h * R LICENSE * R app/src/mainwindow.cpp * R app/src/mainwindow.ui
Status change > Approved
You need to be logged in to leave comments.
Login now