|
|
|
@ -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));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|