summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-16 00:01:10 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-16 00:01:10 -0500
commit646a7accac7c2f0072770401312c2365865142ad (patch)
tree25587be92caaf4a08f8004f61ea3ffc3ef901599
parentbdc8bd48cfeb8fed62390e5e2f98feed55a2daff (diff)
downloadulab-646a7accac7c2f0072770401312c2365865142ad.tar.gz
ulab-646a7accac7c2f0072770401312c2365865142ad.zip
Add cursor delta feature
-rw-r--r--clients/tde/src/part/scope/part.cpp2
-rw-r--r--clients/tde/src/widgets/tracewidget.cpp24
2 files changed, 22 insertions, 4 deletions
diff --git a/clients/tde/src/part/scope/part.cpp b/clients/tde/src/part/scope/part.cpp
index b0e72de..50ce4a3 100644
--- a/clients/tde/src/part/scope/part.cpp
+++ b/clients/tde/src/part/scope/part.cpp
@@ -913,8 +913,6 @@ void ScopePart::updateGraticule() {
m_base->traceZoomWidget->setNumberOfSamples(traceno-1, m_samplesInTrace[traceno]);
m_traceWidget->setDisplayLimits(traceno-1, TQRectF(0.0, (m_voltsDiv[traceno]*m_vdivs)/2.0, (m_secsDiv[traceno]*m_hdivs), (m_voltsDiv[traceno]*m_vdivs)/-2.0));
-
-printf("[RAJA DEBUG 700.0] m_voltsDiv[%d]: %f m_vdivs: %d m_secsDiv[%d]: %f m_hdivs: %d\n\r", traceno, m_voltsDiv[traceno], m_vdivs, traceno, m_secsDiv[traceno], m_hdivs); fflush(stdout);
}
updateZoomWidgetLimits(m_traceWidget->zoomBox());
diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp
index 7ba4b6e..6754896 100644
--- a/clients/tde/src/widgets/tracewidget.cpp
+++ b/clients/tde/src/widgets/tracewidget.cpp
@@ -873,11 +873,31 @@ void TraceWidget::updateCursorText() {
if (m_cursorArray[cursor]->orientation == TQt::Horizontal) {
double realCursorPosition = (m_traceArray[trace]->topEdge+((m_cursorArray[cursor]->position/100.0)*vertical_range));
- cursorText.append(TQString("<br>%1: %2").arg(m_traceArray[trace]->traceName).arg(prettyFormat(realCursorPosition, vertical_range, m_traceArray[trace]->verticalUnits)));
+ TQString deltaText;
+ for (uint cursor2=0;cursor2<m_cursorArray.count();cursor2++) {
+ if (cursor2 != cursor) {
+ if (m_cursorArray[cursor2]->orientation == m_cursorArray[cursor]->orientation) {
+ double realSecondaryCursorPosition = (m_traceArray[trace]->topEdge+((m_cursorArray[cursor2]->position/100.0)*vertical_range));
+ deltaText = trUtf8("Δ") + prettyFormat(fabs(realCursorPosition-realSecondaryCursorPosition), vertical_range, m_traceArray[trace]->verticalUnits);
+ break;
+ }
+ }
+ }
+ cursorText.append(TQString("<br>%1: %2%3").arg(m_traceArray[trace]->traceName).arg(prettyFormat(realCursorPosition, vertical_range, m_traceArray[trace]->verticalUnits)).arg(deltaText));
}
else {
double realCursorPosition = (m_traceArray[trace]->leftEdge+((m_cursorArray[cursor]->position/100.0)*horizontal_range));
- cursorText.append(TQString("<br>%1: %2").arg(m_traceArray[trace]->traceName).arg(prettyFormat(realCursorPosition, horizontal_range, m_traceArray[trace]->horizontalUnits)));
+ TQString deltaText;
+ for (uint cursor2=0;cursor2<m_cursorArray.count();cursor2++) {
+ if (cursor2 != cursor) {
+ if (m_cursorArray[cursor2]->orientation == m_cursorArray[cursor]->orientation) {
+ double realSecondaryCursorPosition = (m_traceArray[trace]->leftEdge+((m_cursorArray[cursor2]->position/100.0)*horizontal_range));
+ deltaText = trUtf8("Δ") + prettyFormat(fabs(realCursorPosition-realSecondaryCursorPosition), horizontal_range, m_traceArray[trace]->horizontalUnits);
+ break;
+ }
+ }
+ }
+ cursorText.append(TQString("<br>%1: %2%3").arg(m_traceArray[trace]->traceName).arg(prettyFormat(realCursorPosition, horizontal_range, m_traceArray[trace]->horizontalUnits)).arg(deltaText));
}
}
}