@@ -36,35 +36,19 QSharedPointer<QCPAxisTicker> axisTicker(bool isTimeAxis) | |||
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | void updateScalarData(QCPAbstractPlottable *component, std::shared_ptr<ScalarSeries> scalarSeries, |
|
39 |
const SqpRange & |
|
|
39 | const SqpRange &range) | |
|
40 | 40 | { |
|
41 | 41 | qCDebug(LOG_VisualizationGraphHelper()) << "TORM: updateScalarData" |
|
42 | 42 | << QThread::currentThread()->objectName(); |
|
43 | 43 | if (auto qcpGraph = dynamic_cast<QCPGraph *>(component)) { |
|
44 | 44 | scalarSeries->lockRead(); |
|
45 | 45 | { |
|
46 | // auto bounds = scalarSeries->subData(rang | |
|
47 | // const auto &xData = scalarSeries->xAxisData()->cdata(); | |
|
48 |
|
|
|
49 | ||
|
50 | // auto xDataBegin = xData.cbegin(); | |
|
51 | // auto xDataEnd = xData.cend(); | |
|
52 | ||
|
53 | // qCInfo(LOG_VisualizationGraphHelper()) << "TODEBUG: Current points in cache" | |
|
54 | // << xData.count(); | |
|
55 | ||
|
56 | // auto sqpDataContainer = QSharedPointer<SqpDataContainer>::create(); | |
|
57 | // qcpGraph->setData(sqpDataContainer); | |
|
58 | ||
|
59 | // auto lowerIt = std::lower_bound(xDataBegin, xDataEnd, dateTime.m_TStart); | |
|
60 | // auto upperIt = std::upper_bound(xDataBegin, xDataEnd, dateTime.m_TEnd); | |
|
61 | // auto distance = std::distance(xDataBegin, lowerIt); | |
|
62 | ||
|
63 | // auto valuesDataIt = valuesData.cbegin() + distance; | |
|
64 | // for (auto xAxisDataIt = lowerIt; xAxisDataIt != upperIt; | |
|
65 | // ++xAxisDataIt, ++valuesDataIt) { | |
|
66 | // sqpDataContainer->appendGraphData(QCPGraphData(*xAxisDataIt, *valuesDataIt)); | |
|
67 | // } | |
|
46 | auto sqpDataContainer = QSharedPointer<SqpDataContainer>::create(); | |
|
47 | qcpGraph->setData(sqpDataContainer); | |
|
48 | auto bounds = scalarSeries->subData(range.m_TStart, range.m_TEnd); | |
|
49 | for (auto it = bounds.first; it != bounds.second; ++it) { | |
|
50 | sqpDataContainer->appendGraphData(QCPGraphData(it->x(), it->value())); | |
|
51 | } | |
|
68 | 52 | |
|
69 | 53 | qCInfo(LOG_VisualizationGraphHelper()) << "TODEBUG: Current points displayed" |
|
70 | 54 | << sqpDataContainer->size(); |
@@ -258,11 +258,11 void TestAmdaResultParser::testReadScalarTxt_data() | |||
|
258 | 258 | QVector<QDateTime>{}, QVector<double>{}}; |
|
259 | 259 | |
|
260 | 260 | // Invalid files |
|
261 | QTest::newRow("Invalid file (unexisting file)") | |
|
262 | << QStringLiteral("UnexistingFile.txt") << ExpectedResults<ScalarSeries>{}; | |
|
261 | QTest::newRow("Invalid file (unexisting file)") << QStringLiteral("UnexistingFile.txt") | |
|
262 | << ExpectedResults<ScalarSeries>{}; | |
|
263 | 263 | |
|
264 | QTest::newRow("Invalid file (file not found on server)") | |
|
265 | << QStringLiteral("FileNotFound.txt") << ExpectedResults<ScalarSeries>{}; | |
|
264 | QTest::newRow("Invalid file (file not found on server)") << QStringLiteral("FileNotFound.txt") | |
|
265 | << ExpectedResults<ScalarSeries>{}; | |
|
266 | 266 | } |
|
267 | 267 | |
|
268 | 268 | void TestAmdaResultParser::testReadScalarTxt() |
General Comments 0
You need to be logged in to leave comments.
Login now