Auto status change to "Under Review"
@@ -142,7 +142,7 void VariableAcquisitionWorker::onVariableDataAcquired(QUuid acqIdentifier, | |||
|
142 | 142 | |
|
143 | 143 | if (it != impl->m_VIdentifierToCurrrentAcqIdNextIdPairMap.cend()) { |
|
144 | 144 | if (it->second.second.isNull()) { |
|
145 |
// There is no next request, we can remove the vari |
|
|
145 | // There is no next request, we can remove the variable request | |
|
146 | 146 | impl->removeVariableRequest(acqRequest.m_vIdentifier); |
|
147 | 147 | } |
|
148 | 148 | else { |
@@ -23,36 +23,36 Q_LOGGING_CATEGORY(LOG_VariableController, "VariableController") | |||
|
23 | 23 | |
|
24 | 24 | namespace { |
|
25 | 25 | |
|
26 |
SqpRange computeSynchroRangeRequested(const SqpRange &varRange, const SqpRange &graph |
|
|
26 | SqpRange computeSynchroRangeRequested(const SqpRange &varRange, const SqpRange &graphRange, | |
|
27 | 27 | const SqpRange &oldGraphRange) |
|
28 | 28 | { |
|
29 |
auto zoomType = VariableController::getZoomType(graph |
|
|
29 | auto zoomType = VariableController::getZoomType(graphRange, oldGraphRange); | |
|
30 | 30 | |
|
31 | 31 | auto varRangeRequested = varRange; |
|
32 | 32 | switch (zoomType) { |
|
33 | 33 | case AcquisitionZoomType::ZoomIn: { |
|
34 |
auto deltaLeft = graph |
|
|
35 |
auto deltaRight = oldGraphRange.m_TEnd - graph |
|
|
34 | auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; | |
|
35 | auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; | |
|
36 | 36 | varRangeRequested.m_TStart += deltaLeft; |
|
37 | 37 | varRangeRequested.m_TEnd -= deltaRight; |
|
38 | 38 | break; |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | case AcquisitionZoomType::ZoomOut: { |
|
42 |
auto deltaLeft = oldGraphRange.m_TStart - graph |
|
|
43 |
auto deltaRight = graph |
|
|
42 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
|
43 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
|
44 | 44 | varRangeRequested.m_TStart -= deltaLeft; |
|
45 | 45 | varRangeRequested.m_TEnd += deltaRight; |
|
46 | 46 | break; |
|
47 | 47 | } |
|
48 | 48 | case AcquisitionZoomType::PanRight: { |
|
49 |
auto deltaRight = graph |
|
|
49 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
|
50 | 50 | varRangeRequested.m_TStart += deltaRight; |
|
51 | 51 | varRangeRequested.m_TEnd += deltaRight; |
|
52 | 52 | break; |
|
53 | 53 | } |
|
54 | 54 | case AcquisitionZoomType::PanLeft: { |
|
55 |
auto deltaLeft = oldGraphRange.m_TStart - graph |
|
|
55 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
|
56 | 56 | varRangeRequested.m_TStart -= deltaLeft; |
|
57 | 57 | varRangeRequested.m_TEnd -= deltaLeft; |
|
58 | 58 | break; |
@@ -149,8 +149,8 void VisualizationGraphWidget::setRange(std::shared_ptr<Variable> variable, cons | |||
|
149 | 149 | |
|
150 | 150 | SqpRange VisualizationGraphWidget::graphRange() const noexcept |
|
151 | 151 | { |
|
152 |
auto graph |
|
|
153 |
return SqpRange{graph |
|
|
152 | auto graphRange = ui->widget->xAxis->range(); | |
|
153 | return SqpRange{graphRange.lower, graphRange.upper}; | |
|
154 | 154 | } |
|
155 | 155 | |
|
156 | 156 | void VisualizationGraphWidget::setGraphRange(const SqpRange &range) |
@@ -288,8 +288,8 void VisualizationGraphWidget::onDataCacheVariableUpdated() | |||
|
288 | 288 | // - use an ordered_multimap and the algos of std to group the values by key |
|
289 | 289 | // - use a map (unique keys) and store as values directly the list of components |
|
290 | 290 | |
|
291 |
auto graph |
|
|
292 |
auto dateTime = SqpRange{graph |
|
|
291 | auto graphRange = ui->widget->xAxis->range(); | |
|
292 | auto dateTime = SqpRange{graphRange.lower, graphRange.upper}; | |
|
293 | 293 | |
|
294 | 294 | for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); |
|
295 | 295 | it != impl->m_VariableToPlotMultiMap.cend(); ++it) { |
@@ -81,10 +81,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||
|
81 | 81 | |
|
82 | 82 | |
|
83 | 83 | // Lambda to synchronize zone widget |
|
84 |
auto synchronizeZoneWidget = [this, graphWidget](const SqpRange &graph |
|
|
84 | auto synchronizeZoneWidget = [this, graphWidget](const SqpRange &graphRange, | |
|
85 | 85 | const SqpRange &oldGraphRange) { |
|
86 | 86 | |
|
87 |
auto zoomType = VariableController::getZoomType(graph |
|
|
87 | auto zoomType = VariableController::getZoomType(graphRange, oldGraphRange); | |
|
88 | 88 | auto frameLayout = ui->visualizationZoneFrame->layout(); |
|
89 | 89 | for (auto i = 0; i < frameLayout->count(); ++i) { |
|
90 | 90 | auto graphChild |
@@ -94,8 +94,8 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||
|
94 | 94 | auto graphChildRange = graphChild->graphRange(); |
|
95 | 95 | switch (zoomType) { |
|
96 | 96 | case AcquisitionZoomType::ZoomIn: { |
|
97 |
auto deltaLeft = graph |
|
|
98 |
auto deltaRight = oldGraphRange.m_TEnd - graph |
|
|
97 | auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; | |
|
98 | auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; | |
|
99 | 99 | graphChildRange.m_TStart += deltaLeft; |
|
100 | 100 | graphChildRange.m_TEnd -= deltaRight; |
|
101 | 101 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn"); |
@@ -104,37 +104,37 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V | |||
|
104 | 104 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight") |
|
105 | 105 | << deltaRight; |
|
106 | 106 | qCCritical(LOG_VisualizationZoneWidget()) |
|
107 |
<< tr("TORM: dt") << graph |
|
|
107 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
|
108 | 108 | |
|
109 | 109 | break; |
|
110 | 110 | } |
|
111 | 111 | |
|
112 | 112 | case AcquisitionZoomType::ZoomOut: { |
|
113 | 113 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomOut"); |
|
114 |
auto deltaLeft = oldGraphRange.m_TStart - graph |
|
|
115 |
auto deltaRight = graph |
|
|
114 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
|
115 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
|
116 | 116 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaLeft") |
|
117 | 117 | << deltaLeft; |
|
118 | 118 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: deltaRight") |
|
119 | 119 | << deltaRight; |
|
120 | 120 | qCCritical(LOG_VisualizationZoneWidget()) |
|
121 |
<< tr("TORM: dt") << graph |
|
|
121 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
|
122 | 122 | graphChildRange.m_TStart -= deltaLeft; |
|
123 | 123 | graphChildRange.m_TEnd += deltaRight; |
|
124 | 124 | break; |
|
125 | 125 | } |
|
126 | 126 | case AcquisitionZoomType::PanRight: { |
|
127 | 127 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: PanRight"); |
|
128 |
auto deltaRight = graph |
|
|
128 | auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; | |
|
129 | 129 | graphChildRange.m_TStart += deltaRight; |
|
130 | 130 | graphChildRange.m_TEnd += deltaRight; |
|
131 | 131 | qCCritical(LOG_VisualizationZoneWidget()) |
|
132 |
<< tr("TORM: dt") << graph |
|
|
132 | << tr("TORM: dt") << graphRange.m_TEnd - graphRange.m_TStart; | |
|
133 | 133 | break; |
|
134 | 134 | } |
|
135 | 135 | case AcquisitionZoomType::PanLeft: { |
|
136 | 136 | qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: PanLeft"); |
|
137 |
auto deltaLeft = oldGraphRange.m_TStart - graph |
|
|
137 | auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; | |
|
138 | 138 | graphChildRange.m_TStart -= deltaLeft; |
|
139 | 139 | graphChildRange.m_TEnd -= deltaLeft; |
|
140 | 140 | break; |
General Comments 1
You need to be logged in to leave comments.
Login now