From 4905fe79fee7632eca93b715ec39b196fbcd9e47 2017-08-16 12:27:44 From: mperrinel Date: 2017-08-16 12:27:44 Subject: [PATCH] change grapheRange to graphRange --- diff --git a/core/src/Variable/VariableAcquisitionWorker.cpp b/core/src/Variable/VariableAcquisitionWorker.cpp index e84ab16..3d10846 100644 --- a/core/src/Variable/VariableAcquisitionWorker.cpp +++ b/core/src/Variable/VariableAcquisitionWorker.cpp @@ -142,7 +142,7 @@ void VariableAcquisitionWorker::onVariableDataAcquired(QUuid acqIdentifier, if (it != impl->m_VIdentifierToCurrrentAcqIdNextIdPairMap.cend()) { if (it->second.second.isNull()) { - // There is no next request, we can remove the varibale request + // There is no next request, we can remove the variable request impl->removeVariableRequest(acqRequest.m_vIdentifier); } else { diff --git a/core/src/Variable/VariableController.cpp b/core/src/Variable/VariableController.cpp index b2703f8..103a895 100644 --- a/core/src/Variable/VariableController.cpp +++ b/core/src/Variable/VariableController.cpp @@ -23,36 +23,36 @@ Q_LOGGING_CATEGORY(LOG_VariableController, "VariableController") namespace { -SqpRange computeSynchroRangeRequested(const SqpRange &varRange, const SqpRange &grapheRange, +SqpRange computeSynchroRangeRequested(const SqpRange &varRange, const SqpRange &graphRange, const SqpRange &oldGraphRange) { - auto zoomType = VariableController::getZoomType(grapheRange, oldGraphRange); + auto zoomType = VariableController::getZoomType(graphRange, oldGraphRange); auto varRangeRequested = varRange; switch (zoomType) { case AcquisitionZoomType::ZoomIn: { - auto deltaLeft = grapheRange.m_TStart - oldGraphRange.m_TStart; - auto deltaRight = oldGraphRange.m_TEnd - grapheRange.m_TEnd; + auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; + auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; varRangeRequested.m_TStart += deltaLeft; varRangeRequested.m_TEnd -= deltaRight; break; } case AcquisitionZoomType::ZoomOut: { - auto deltaLeft = oldGraphRange.m_TStart - grapheRange.m_TStart; - auto deltaRight = grapheRange.m_TEnd - oldGraphRange.m_TEnd; + auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; + auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; varRangeRequested.m_TStart -= deltaLeft; varRangeRequested.m_TEnd += deltaRight; break; } case AcquisitionZoomType::PanRight: { - auto deltaRight = grapheRange.m_TEnd - oldGraphRange.m_TEnd; + auto deltaRight = graphRange.m_TEnd - oldGraphRange.m_TEnd; varRangeRequested.m_TStart += deltaRight; varRangeRequested.m_TEnd += deltaRight; break; } case AcquisitionZoomType::PanLeft: { - auto deltaLeft = oldGraphRange.m_TStart - grapheRange.m_TStart; + auto deltaLeft = oldGraphRange.m_TStart - graphRange.m_TStart; varRangeRequested.m_TStart -= deltaLeft; varRangeRequested.m_TEnd -= deltaLeft; break; diff --git a/gui/src/Visualization/VisualizationGraphWidget.cpp b/gui/src/Visualization/VisualizationGraphWidget.cpp index 1ed0384..0756c86 100644 --- a/gui/src/Visualization/VisualizationGraphWidget.cpp +++ b/gui/src/Visualization/VisualizationGraphWidget.cpp @@ -149,8 +149,8 @@ void VisualizationGraphWidget::setRange(std::shared_ptr variable, cons SqpRange VisualizationGraphWidget::graphRange() const noexcept { - auto grapheRange = ui->widget->xAxis->range(); - return SqpRange{grapheRange.lower, grapheRange.upper}; + auto graphRange = ui->widget->xAxis->range(); + return SqpRange{graphRange.lower, graphRange.upper}; } void VisualizationGraphWidget::setGraphRange(const SqpRange &range) @@ -288,8 +288,8 @@ void VisualizationGraphWidget::onDataCacheVariableUpdated() // - use an ordered_multimap and the algos of std to group the values by key // - use a map (unique keys) and store as values directly the list of components - auto grapheRange = ui->widget->xAxis->range(); - auto dateTime = SqpRange{grapheRange.lower, grapheRange.upper}; + auto graphRange = ui->widget->xAxis->range(); + auto dateTime = SqpRange{graphRange.lower, graphRange.upper}; for (auto it = impl->m_VariableToPlotMultiMap.cbegin(); it != impl->m_VariableToPlotMultiMap.cend(); ++it) { diff --git a/gui/src/Visualization/VisualizationZoneWidget.cpp b/gui/src/Visualization/VisualizationZoneWidget.cpp index 592c9c1..8e5d60e 100644 --- a/gui/src/Visualization/VisualizationZoneWidget.cpp +++ b/gui/src/Visualization/VisualizationZoneWidget.cpp @@ -81,10 +81,10 @@ VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptrvisualizationZoneFrame->layout(); for (auto i = 0; i < frameLayout->count(); ++i) { auto graphChild @@ -94,8 +94,8 @@ VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptrgraphRange(); switch (zoomType) { case AcquisitionZoomType::ZoomIn: { - auto deltaLeft = grapheRange.m_TStart - oldGraphRange.m_TStart; - auto deltaRight = oldGraphRange.m_TEnd - grapheRange.m_TEnd; + auto deltaLeft = graphRange.m_TStart - oldGraphRange.m_TStart; + auto deltaRight = oldGraphRange.m_TEnd - graphRange.m_TEnd; graphChildRange.m_TStart += deltaLeft; graphChildRange.m_TEnd -= deltaRight; qCCritical(LOG_VisualizationZoneWidget()) << tr("TORM: ZoomIn"); @@ -104,37 +104,37 @@ VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr