ok + noexcept
@@ -16,6 +16,11 class QCPRange; | |||||
16 | class SqpDateTime; |
|
16 | class SqpDateTime; | |
17 | class Variable; |
|
17 | class Variable; | |
18 |
|
18 | |||
|
19 | /** | |||
|
20 | * Possible types of zoom operation | |||
|
21 | */ | |||
|
22 | enum class VisualizationGraphWidgetZoomType { ZoomOut, ZoomIn, PanRight, PanLeft, Unknown }; | |||
|
23 | ||||
19 | namespace Ui { |
|
24 | namespace Ui { | |
20 | class VisualizationGraphWidget; |
|
25 | class VisualizationGraphWidget; | |
21 | } // namespace Ui |
|
26 | } // namespace Ui | |
@@ -27,13 +32,16 public: | |||||
27 | explicit VisualizationGraphWidget(const QString &name = {}, QWidget *parent = 0); |
|
32 | explicit VisualizationGraphWidget(const QString &name = {}, QWidget *parent = 0); | |
28 | virtual ~VisualizationGraphWidget(); |
|
33 | virtual ~VisualizationGraphWidget(); | |
29 |
|
34 | |||
|
35 | void enableSynchronize(bool enable); | |||
|
36 | ||||
30 | void addVariable(std::shared_ptr<Variable> variable); |
|
37 | void addVariable(std::shared_ptr<Variable> variable); | |
31 | void addVariableUsingGraph(std::shared_ptr<Variable> variable); |
|
38 | void addVariableUsingGraph(std::shared_ptr<Variable> variable); | |
32 | /// Removes a variable from the graph |
|
39 | /// Removes a variable from the graph | |
33 | void removeVariable(std::shared_ptr<Variable> variable) noexcept; |
|
40 | void removeVariable(std::shared_ptr<Variable> variable) noexcept; | |
34 |
|
41 | |||
35 | /// Rescale the X axe to range parameter |
|
|||
36 | void setRange(std::shared_ptr<Variable> variable, const SqpDateTime &range); |
|
42 | void setRange(std::shared_ptr<Variable> variable, const SqpDateTime &range); | |
|
43 |
SqpDateTime graphRange();
|
|||
|
44 | void setGraphRange(const SqpDateTime &range); | |||
37 |
|
45 | |||
38 | // IVisualizationWidget interface |
|
46 | // IVisualizationWidget interface | |
39 | void accept(IVisualizationWidgetVisitor *visitor) override; |
|
47 | void accept(IVisualizationWidgetVisitor *visitor) override; | |
@@ -41,8 +49,11 public: | |||||
41 | bool contains(const Variable &variable) const override; |
|
49 | bool contains(const Variable &variable) const override; | |
42 | QString name() const override; |
|
50 | QString name() const override; | |
43 |
|
51 | |||
|
52 | ||||
44 | signals: |
|
53 | signals: | |
45 | void requestDataLoading(std::shared_ptr<Variable> variable, const SqpDateTime &dateTime); |
|
54 | void requestDataLoading(std::shared_ptr<Variable> variable, const SqpDateTime &dateTime); | |
|
55 | void synchronize(const SqpDateTime &dateTime, const SqpDateTime &oldDateTime, | |||
|
56 | VisualizationGraphWidgetZoomType zoomType); | |||
46 |
|
57 | |||
47 |
|
58 | |||
48 | private: |
|
59 | private: | |
@@ -55,7 +66,8 private slots: | |||||
55 | /// Slot called when right clicking on the graph (displays a menu) |
|
66 | /// Slot called when right clicking on the graph (displays a menu) | |
56 | void onGraphMenuRequested(const QPoint &pos) noexcept; |
|
67 | void onGraphMenuRequested(const QPoint &pos) noexcept; | |
57 |
|
68 | |||
58 | void onRangeChanged(const QCPRange &t1); |
|
69 | /// Rescale the X axe to range parameter | |
|
70 | void onRangeChanged(const QCPRange &t1, const QCPRange &t2); | |||
59 |
|
71 | |||
60 | /// Slot called when a mouse wheel was made, to perform some processing before the zoom is done |
|
72 | /// Slot called when a mouse wheel was made, to perform some processing before the zoom is done | |
61 | void onMouseWheel(QWheelEvent *event) noexcept; |
|
73 | void onMouseWheel(QWheelEvent *event) noexcept; |
@@ -25,8 +25,12 const auto VERTICAL_ZOOM_MODIFIER = Qt::ControlModifier; | |||||
25 |
|
25 | |||
26 | struct VisualizationGraphWidget::VisualizationGraphWidgetPrivate { |
|
26 | struct VisualizationGraphWidget::VisualizationGraphWidgetPrivate { | |
27 |
|
27 | |||
|
28 |
explicit VisualizationGraphWidgetPrivate() : m_DoSynchronize(true) {}
ok |
|||
|
29 | ||||
28 | // 1 variable -> n qcpplot |
|
30 | // 1 variable -> n qcpplot | |
29 | std::multimap<std::shared_ptr<Variable>, QCPAbstractPlottable *> m_VariableToPlotMultiMap; |
|
31 | std::multimap<std::shared_ptr<Variable>, QCPAbstractPlottable *> m_VariableToPlotMultiMap; | |
|
32 | ||||
|
33 | bool m_DoSynchronize; | |||
30 | }; |
|
34 | }; | |
31 |
|
35 | |||
32 | VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget *parent) |
|
36 | VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget *parent) | |
@@ -49,9 +53,9 VisualizationGraphWidget::VisualizationGraphWidget(const QString &name, QWidget | |||||
49 | ui->widget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom); |
|
53 | ui->widget->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom); | |
50 | ui->widget->axisRect()->setRangeDrag(Qt::Horizontal); |
|
54 | ui->widget->axisRect()->setRangeDrag(Qt::Horizontal); | |
51 | connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel); |
|
55 | connect(ui->widget, &QCustomPlot::mouseWheel, this, &VisualizationGraphWidget::onMouseWheel); | |
52 | connect(ui->widget->xAxis, |
|
56 | connect(ui->widget->xAxis, static_cast<void (QCPAxis::*)(const QCPRange &, const QCPRange &)>( | |
53 | static_cast<void (QCPAxis::*)(const QCPRange &)>(&QCPAxis::rangeChanged), this, |
|
57 | &QCPAxis::rangeChanged), | |
54 | &VisualizationGraphWidget::onRangeChanged); |
|
58 | this, &VisualizationGraphWidget::onRangeChanged); | |
55 |
|
59 | |||
56 | // Activates menu when right clicking on the graph |
|
60 | // Activates menu when right clicking on the graph | |
57 | ui->widget->setContextMenuPolicy(Qt::CustomContextMenu); |
|
61 | ui->widget->setContextMenuPolicy(Qt::CustomContextMenu); | |
@@ -68,6 +72,11 VisualizationGraphWidget::~VisualizationGraphWidget() | |||||
68 | delete ui; |
|
72 | delete ui; | |
69 | } |
|
73 | } | |
70 |
|
74 | |||
|
75 | void VisualizationGraphWidget::enableSynchronize(bool enable) | |||
|
76 | { | |||
|
77 | impl->m_DoSynchronize = enable; | |||
|
78 | } | |||
|
79 | ||||
71 | void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) |
|
80 | void VisualizationGraphWidget::addVariable(std::shared_ptr<Variable> variable) | |
72 | { |
|
81 | { | |
73 | // Uses delegate to create the qcpplot components according to the variable |
|
82 | // Uses delegate to create the qcpplot components according to the variable | |
@@ -129,6 +138,22 void VisualizationGraphWidget::setRange(std::shared_ptr<Variable> variable, | |||||
129 | // for (auto it = componentsIt.first; it != componentsIt.second;) { |
|
138 | // for (auto it = componentsIt.first; it != componentsIt.second;) { | |
130 | // } |
|
139 | // } | |
131 | ui->widget->xAxis->setRange(range.m_TStart, range.m_TEnd); |
|
140 | ui->widget->xAxis->setRange(range.m_TStart, range.m_TEnd); | |
|
141 | ui->widget->replot(); | |||
|
142 | } | |||
|
143 | ||||
|
144 | SqpDateTime VisualizationGraphWidget::graphRange() | |||
|
145 | { | |||
|
146 | auto grapheRange = ui->widget->xAxis->range(); | |||
|
147 | return SqpDateTime{grapheRange.lower, grapheRange.upper}; | |||
|
148 | } | |||
|
149 | ||||
|
150 | void VisualizationGraphWidget::setGraphRange(const SqpDateTime &range) | |||
|
151 | { | |||
|
152 | qCDebug(LOG_VisualizationGraphWidget()) | |||
|
153 | << tr("VisualizationGraphWidget::setGraphRange START"); | |||
|
154 | ui->widget->xAxis->setRange(range.m_TStart, range.m_TEnd); | |||
|
155 | ui->widget->replot(); | |||
|
156 | qCDebug(LOG_VisualizationGraphWidget()) << tr("VisualizationGraphWidget::setGraphRange END"); | |||
132 | } |
|
157 | } | |
133 |
|
158 | |||
134 | void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor) |
|
159 | void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor) | |
@@ -184,78 +209,108 void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept | |||||
184 | } |
|
209 | } | |
185 | } |
|
210 | } | |
186 |
|
211 | |||
187 | void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1) |
|
212 | void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange &t2) | |
188 | { |
|
213 | { | |
189 |
qC |
|
214 | qCInfo(LOG_VisualizationGraphWidget()) << tr("VisualizationGraphWidget::onRangeChanged") | |
190 |
|
|
215 | << QThread::currentThread()->objectName(); | |
|
216 | ||||
|
217 | auto dateTimeRange = SqpDateTime{t1.lower, t1.upper}; | |||
191 |
|
218 | |||
|
219 | auto zoomType = VisualizationGraphWidgetZoomType::ZoomOut; | |||
192 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); |
|
220 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); | |
193 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { |
|
221 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { | |
194 |
|
222 | |||
195 | auto variable = it->first; |
|
223 | auto variable = it->first; | |
196 |
auto |
|
224 | auto currentDateTime = dateTimeRange; | |
197 | auto dateTimeRange = dateTime; |
|
|||
198 |
|
225 | |||
199 | auto toleranceFactor = 0.2; |
|
226 | auto toleranceFactor = 0.2; | |
200 |
auto tolerance = toleranceFactor * ( |
|
227 | auto tolerance = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |
201 |
auto variableDateTimeWithTolerance = |
|
228 | auto variableDateTimeWithTolerance = currentDateTime; | |
202 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
229 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
203 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
230 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
204 |
|
231 | |||
205 |
qCDebug(LOG_VisualizationGraphWidget()) << " |
|
232 | qCDebug(LOG_VisualizationGraphWidget()) << "r" << currentDateTime; | |
206 |
qCDebug(LOG_VisualizationGraphWidget()) << " |
|
233 | qCDebug(LOG_VisualizationGraphWidget()) << "t" << variableDateTimeWithTolerance; | |
|
234 | qCDebug(LOG_VisualizationGraphWidget()) << "v" << variable->dateTime(); | |||
207 | // If new range with tol is upper than variable datetime parameters. we need to request new |
|
235 | // If new range with tol is upper than variable datetime parameters. we need to request new | |
208 | // data |
|
236 | // data | |
209 | if (!variable->contains(variableDateTimeWithTolerance)) { |
|
237 | if (!variable->contains(variableDateTimeWithTolerance)) { | |
210 |
|
238 | |||
211 |
auto variableDateTimeWithTolerance = |
|
239 | auto variableDateTimeWithTolerance = currentDateTime; | |
212 |
if (!variable->isInside( |
|
240 | if (!variable->isInside(currentDateTime)) { | |
213 | auto variableDateTime = variable->dateTime(); |
|
241 | auto variableDateTime = variable->dateTime(); | |
214 |
if (variable |
|
242 | if (variable->contains(variableDateTimeWithTolerance)) { | |
215 |
qC |
|
243 | qCInfo(LOG_VisualizationGraphWidget()) | |
|
244 | << tr("TORM: Detection zoom in that need request:"); | |||
|
245 | // add 10% tolerance for each side | |||
|
246 | tolerance | |||
|
247 | = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |||
|
248 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |||
|
249 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |||
|
250 | zoomType = VisualizationGraphWidgetZoomType::ZoomIn; | |||
|
251 | } | |||
|
252 | else if (variableDateTime.m_TStart < currentDateTime.m_TStart) { | |||
|
253 | qCInfo(LOG_VisualizationGraphWidget()) << tr("TORM: Detection pan to right:"); | |||
216 |
|
254 | |||
217 |
auto diffEndToKeepDelta = |
|
255 | auto diffEndToKeepDelta = currentDateTime.m_TEnd - variableDateTime.m_TEnd; | |
218 |
|
|
256 | currentDateTime.m_TStart = variableDateTime.m_TStart + diffEndToKeepDelta; | |
219 | // Tolerance have to be added to the right |
|
257 | // Tolerance have to be added to the right | |
220 | // add tolerance for right (end) side |
|
258 | // add tolerance for right (end) side | |
221 | tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); |
|
259 | tolerance | |
|
260 | = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |||
222 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
261 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
|
262 | zoomType = VisualizationGraphWidgetZoomType::PanRight; | |||
223 | } |
|
263 | } | |
224 |
else if (variableDateTime.m_TEnd > |
|
264 | else if (variableDateTime.m_TEnd > currentDateTime.m_TEnd) { | |
225 |
qC |
|
265 | qCInfo(LOG_VisualizationGraphWidget()) << tr("TORM: Detection pan to left: "); | |
226 |
auto diffStartToKeepDelta |
|
266 | auto diffStartToKeepDelta | |
227 |
|
|
267 | = variableDateTime.m_TStart - currentDateTime.m_TStart; | |
|
268 | currentDateTime.m_TEnd = variableDateTime.m_TEnd - diffStartToKeepDelta; | |||
228 | // Tolerance have to be added to the left |
|
269 | // Tolerance have to be added to the left | |
229 | // add tolerance for left (start) side |
|
270 | // add tolerance for left (start) side | |
230 | tolerance = toleranceFactor * (dateTime.m_TEnd - dateTime.m_TStart); |
|
271 | tolerance | |
|
272 | = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |||
231 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
273 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
|
274 | zoomType = VisualizationGraphWidgetZoomType::PanLeft; | |||
232 | } |
|
275 | } | |
233 | else { |
|
276 | else { | |
234 |
qC |
|
277 | qCInfo(LOG_VisualizationGraphWidget()) | |
235 | << tr("Detection anormal zoom detection: "); |
|
278 | << tr("Detection anormal zoom detection: "); | |
|
279 | zoomType = VisualizationGraphWidgetZoomType::Unknown; | |||
236 | } |
|
280 | } | |
237 | } |
|
281 | } | |
238 | else { |
|
282 | else { | |
239 |
qC |
|
283 | qCInfo(LOG_VisualizationGraphWidget()) << tr("TORM: Detection zoom out: "); | |
240 | // add 10% tolerance for each side |
|
284 | // add 10% tolerance for each side | |
241 |
tolerance = |
|
285 | tolerance = toleranceFactor * (currentDateTime.m_TEnd - currentDateTime.m_TStart); | |
242 | variableDateTimeWithTolerance.m_TStart -= tolerance; |
|
286 | variableDateTimeWithTolerance.m_TStart -= tolerance; | |
243 | variableDateTimeWithTolerance.m_TEnd += tolerance; |
|
287 | variableDateTimeWithTolerance.m_TEnd += tolerance; | |
|
288 | zoomType = VisualizationGraphWidgetZoomType::ZoomOut; | |||
244 | } |
|
289 | } | |
245 | if (!variable->contains(dateTimeRange)) { |
|
290 | if (!variable->contains(dateTimeRange)) { | |
246 |
qC |
|
291 | qCInfo(LOG_VisualizationGraphWidget()) | |
247 |
<< "TORM: Modif on variable datetime detected" << |
|
292 | << "TORM: Modif on variable datetime detected" << currentDateTime; | |
248 |
variable->setDateTime( |
|
293 | variable->setDateTime(currentDateTime); | |
249 | } |
|
294 | } | |
250 |
|
295 | |||
251 |
qC |
|
296 | qCInfo(LOG_VisualizationGraphWidget()) << tr("TORM: Request data detection: "); | |
252 | // CHangement detected, we need to ask controller to request data loading |
|
297 | // CHangement detected, we need to ask controller to request data loading | |
253 | emit requestDataLoading(variable, variableDateTimeWithTolerance); |
|
298 | emit requestDataLoading(variable, variableDateTimeWithTolerance); | |
254 | } |
|
299 | } | |
255 | else { |
|
300 | else { | |
256 |
qC |
|
301 | qCInfo(LOG_VisualizationGraphWidget()) | |
|
302 | << tr("TORM: Detection zoom in that doesn't need request: "); | |||
|
303 | zoomType = VisualizationGraphWidgetZoomType::ZoomIn; | |||
257 | } |
|
304 | } | |
258 | } |
|
305 | } | |
|
306 | ||||
|
307 | if (impl->m_DoSynchronize) { | |||
|
308 | auto oldDateTime = SqpDateTime{t2.lower, t2.upper}; | |||
|
309 | qCDebug(LOG_VisualizationGraphWidget()) | |||
|
310 | << tr("TORM: VisualizationGraphWidget::Synchronize notify !!") | |||
|
311 | << QThread::currentThread()->objectName(); | |||
|
312 | emit synchronize(dateTimeRange, oldDateTime, zoomType); | |||
|
313 | } | |||
259 | } |
|
314 | } | |
260 |
|
315 | |||
261 | void VisualizationGraphWidget::onMouseWheel(QWheelEvent *event) noexcept |
|
316 | void VisualizationGraphWidget::onMouseWheel(QWheelEvent *event) noexcept |
@@ -1,8 +1,11 | |||||
1 | #include "Visualization/VisualizationZoneWidget.h" |
|
1 | #include "Visualization/VisualizationZoneWidget.h" | |
|
2 | ||||
|
3 | #include "Data/SqpDateTime.h" | |||
|
4 | ||||
2 | #include "Visualization/IVisualizationWidgetVisitor.h" |
|
5 | #include "Visualization/IVisualizationWidgetVisitor.h" | |
|
6 | #include "Visualization/VisualizationGraphWidget.h" | |||
3 | #include "ui_VisualizationZoneWidget.h" |
|
7 | #include "ui_VisualizationZoneWidget.h" | |
4 |
|
8 | |||
5 | #include "Visualization/VisualizationGraphWidget.h" |
|
|||
6 |
|
9 | |||
7 | #include <SqpApplication.h> |
|
10 | #include <SqpApplication.h> | |
8 |
|
11 | |||
@@ -57,6 +60,7 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||||
57 | auto graphWidget = new VisualizationGraphWidget{ |
|
60 | auto graphWidget = new VisualizationGraphWidget{ | |
58 | defaultGraphName(*ui->visualizationZoneFrame->layout()), this}; |
|
61 | defaultGraphName(*ui->visualizationZoneFrame->layout()), this}; | |
59 |
|
62 | |||
|
63 | ||||
60 | // Set graph properties |
|
64 | // Set graph properties | |
61 | graphWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); |
|
65 | graphWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); | |
62 | graphWidget->setMinimumHeight(GRAPH_MINIMUM_HEIGHT); |
|
66 | graphWidget->setMinimumHeight(GRAPH_MINIMUM_HEIGHT); | |
@@ -65,6 +69,71 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||||
65 |
|
69 | |||
66 | graphWidget->addVariable(variable); |
|
70 | graphWidget->addVariable(variable); | |
67 |
|
71 | |||
|
72 | // Lambda to synchronize zone widget | |||
|
73 | auto synchronizeZoneWidget = [this, graphWidget](const SqpDateTime &dateTime, | |||
|
74 | const SqpDateTime &oldDateTime, | |||
|
75 | VisualizationGraphWidgetZoomType zoomType) { | |||
|
76 | auto frameLayout = ui->visualizationZoneFrame->layout(); | |||
|
77 | for (auto i = 0; i < frameLayout->count(); ++i) { | |||
|
78 | auto graphChild | |||
|
79 | = dynamic_cast<VisualizationGraphWidget *>(frameLayout->itemAt(i)->widget()); | |||
|
80 | if (graphChild && (graphChild != graphWidget)) { | |||
|
81 | ||||
|
82 | auto dateTimeThatKeepDelta = dateTime; | |||
|
83 | auto graphChildRange = graphChild->graphRange(); | |||
|
84 | switch (zoomType) { | |||
|
85 | case VisualizationGraphWidgetZoomType::ZoomIn: { | |||
|
86 | auto deltaLeft = dateTime.m_TStart - oldDateTime.m_TStart; | |||
|
87 | auto deltaRight = oldDateTime.m_TEnd - dateTime.m_TEnd; | |||
|
88 | graphChildRange.m_TStart += deltaLeft; | |||
|
89 | graphChildRange.m_TEnd -= deltaRight; | |||
|
90 | dateTimeThatKeepDelta = graphChildRange; | |||
|
91 | break; | |||
|
92 | } | |||
|
93 | ||||
|
94 | case VisualizationGraphWidgetZoomType::ZoomOut: { | |||
|
95 | auto deltaLeft = oldDateTime.m_TStart - dateTime.m_TStart; | |||
|
96 | auto deltaRight = dateTime.m_TEnd - oldDateTime.m_TEnd; | |||
|
97 | graphChildRange.m_TStart -= deltaLeft; | |||
|
98 | graphChildRange.m_TEnd += deltaRight; | |||
|
99 | dateTimeThatKeepDelta = graphChildRange; | |||
|
100 | break; | |||
|
101 | } | |||
|
102 | case VisualizationGraphWidgetZoomType::PanRight: { | |||
|
103 | auto deltaRight = dateTime.m_TEnd - oldDateTime.m_TEnd; | |||
|
104 | graphChildRange.m_TStart += deltaRight; | |||
|
105 | graphChildRange.m_TEnd += deltaRight; | |||
|
106 | dateTimeThatKeepDelta = graphChildRange; | |||
|
107 | break; | |||
|
108 | } | |||
|
109 | case VisualizationGraphWidgetZoomType::PanLeft: { | |||
|
110 | auto deltaLeft = oldDateTime.m_TStart - dateTime.m_TStart; | |||
|
111 | graphChildRange.m_TStart -= deltaLeft; | |||
|
112 | graphChildRange.m_TEnd -= deltaLeft; | |||
|
113 | dateTimeThatKeepDelta = graphChildRange; | |||
|
114 | break; | |||
|
115 | } | |||
|
116 | case VisualizationGraphWidgetZoomType::Unknown: { | |||
|
117 | qCCritical(LOG_VisualizationZoneWidget()) | |||
|
118 | << tr("Impossible to synchronize: zoom type unknown"); | |||
|
119 | break; | |||
|
120 | } | |||
|
121 | default: | |||
|
122 | qCCritical(LOG_VisualizationZoneWidget()) | |||
|
123 | << tr("Impossible to synchronize: zoom type not take into account"); | |||
|
124 | // No action | |||
|
125 | break; | |||
|
126 | } | |||
|
127 | graphChild->enableSynchronize(false); | |||
|
128 | graphChild->setGraphRange(dateTimeThatKeepDelta); | |||
|
129 | graphChild->enableSynchronize(true); | |||
|
130 | } | |||
|
131 | } | |||
|
132 | }; | |||
|
133 | ||||
|
134 | // connection for synchronization | |||
|
135 | connect(graphWidget, &VisualizationGraphWidget::synchronize, synchronizeZoneWidget); | |||
|
136 | ||||
68 | return graphWidget; |
|
137 | return graphWidget; | |
69 | } |
|
138 | } | |
70 |
|
139 |
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