diff options
Diffstat (limited to 'clients/tde/src/widgets/tracewidget.cpp')
-rw-r--r-- | clients/tde/src/widgets/tracewidget.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp index 6ce3fa2..f875571 100644 --- a/clients/tde/src/widgets/tracewidget.cpp +++ b/clients/tde/src/widgets/tracewidget.cpp @@ -1374,7 +1374,12 @@ void GraticuleWidget::mouseMoveEvent(TQMouseEvent *e) { #if 0 m_base->m_traceArray[trace]->graphStatusLabel->setText(TQString("<qt><nobr>%1<br>@%2,%3</qt>").arg(m_base->m_traceArray[trace]->traceName).arg(TraceWidget::prettyFormat(realCursorXPosition, horizontal_range, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(realCursorYPosition, vertical_range, m_base->m_traceArray[trace]->verticalUnits))); #else - m_base->m_traceArray[trace]->graphStatusLabel->setText(TQString("<qt><nobr>@%2,%3</qt>").arg(TraceWidget::prettyFormat(realCursorXPosition, (m_base->m_useAbsoluteHorizontalRange)?m_base->m_traceArray[trace]->rightEdge:horizontal_range, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(realCursorYPosition, vertical_range, m_base->m_traceArray[trace]->verticalUnits))); + if (m_base->m_useAbsoluteHorizontalRange) { + m_base->m_traceArray[trace]->graphStatusLabel->setText(TQString("<qt><nobr>@%2,%3</qt>").arg(TraceWidget::prettyFormat(realCursorXPosition, m_base->m_traceArray[trace]->rightEdge, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(realCursorYPosition, vertical_range, m_base->m_traceArray[trace]->verticalUnits))); + } + else { + m_base->m_traceArray[trace]->graphStatusLabel->setText(TQString("<qt><nobr>@%2[%3+%4],%5</qt>").arg(TraceWidget::prettyFormat(realCursorXPosition, m_base->m_traceArray[trace]->rightEdge, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(m_base->m_traceArray[trace]->leftEdge, m_base->m_traceArray[trace]->rightEdge, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(realCursorXPosition - m_base->m_traceArray[trace]->leftEdge, horizontal_range, m_base->m_traceArray[trace]->horizontalUnits)).arg(TraceWidget::prettyFormat(realCursorYPosition, vertical_range, m_base->m_traceArray[trace]->verticalUnits))); + } #endif m_base->m_traceArray[trace]->graphStatusLabelInner->setText(m_base->m_traceArray[trace]->graphStatusLabel->text()); } @@ -2469,6 +2474,14 @@ void TraceWidget::setTraceTextOffset(uint traceNumber, double offset) { setTraceOffset(traceNumber, offset, false); } +bool TraceWidget::horizontalRangeModeAbsolute() { + return m_useAbsoluteHorizontalRange; +} + +void TraceWidget::setHorizontalRangeModeAbsolute(bool absolute) { + m_useAbsoluteHorizontalRange = absolute; +} + void TraceWidget::setTraceTextOffset(uint traceNumber, double offset, bool deferUpdate) { VERIFY_TRACE_ARRAY_SIZE |