From 6ae28a47f75bc1096b056ba398a558bd9fcacf73 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 29 Jan 2014 18:37:34 -0600 Subject: Add left trace sidebar option to trace viewer widget Add scrollbar option to trace viewer widget --- clients/tde/src/part/scope/layout.ui | 7 +- clients/tde/src/part/scope/part.cpp | 141 +++++++++++++++++++++++++++++------ clients/tde/src/part/scope/part.h | 2 +- 3 files changed, 125 insertions(+), 25 deletions(-) (limited to 'clients/tde/src/part') diff --git a/clients/tde/src/part/scope/layout.ui b/clients/tde/src/part/scope/layout.ui index dfde26b..ae22434 100644 --- a/clients/tde/src/part/scope/layout.ui +++ b/clients/tde/src/part/scope/layout.ui @@ -53,9 +53,9 @@ Vertical - + - traceWidget + traceScrollWidget @@ -63,6 +63,9 @@ 0 + + AutoOneFit + diff --git a/clients/tde/src/part/scope/part.cpp b/clients/tde/src/part/scope/part.cpp index be54ed4..94990b4 100644 --- a/clients/tde/src/part/scope/part.cpp +++ b/clients/tde/src/part/scope/part.cpp @@ -1,4 +1,4 @@ -//Author: Timothy Pearson , (C) 2012 +//Author: Timothy Pearson , (C) 2012-2014 //Copyright: See COPYING file that comes with this distribution #include "define.h" @@ -182,9 +182,11 @@ ScopePart::ScopePart( TQWidget *parentWidget, const char *widgetName, TQObject * // Create widgets m_base = new ScopeBase(widget()); m_traceControlWidgetGrid = new TQGridLayout(m_base->traceControlLayoutWidget); - m_traceWidget = m_base->traceWidget; + m_traceWidget = m_base->traceScrollWidget->traceWidget(); connect(m_traceWidget, SIGNAL(cursorDragged(uint, double)), this, SLOT(cursorLevelChanged(uint, double))); - m_traceWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + m_base->traceScrollWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + m_base->traceScrollWidget->setHScrollBarMode(TQScrollView::AlwaysOff); + m_base->traceScrollWidget->setVScrollBarMode(TQScrollView::AlwaysOff); m_traceWidget->setNumberOfCursors(5); m_traceWidget->setZoomCursorStartIndex(1); m_traceWidget->setCursorColor(0, TQColor(64, 255, 255)); @@ -458,7 +460,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -496,7 +503,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -537,7 +549,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -578,7 +595,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -624,7 +646,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -681,7 +708,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -730,7 +762,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -783,7 +820,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -832,7 +874,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -880,7 +927,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -922,7 +974,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -969,7 +1026,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1019,7 +1081,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1088,7 +1155,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1160,7 +1232,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1218,7 +1295,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1264,7 +1346,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1312,7 +1399,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } @@ -1366,7 +1458,12 @@ void ScopePart::mainEventLoop() { } else { if (!m_updateTimeoutTimer->isActive()) { - UPDATEDISPLAY_TIMEOUT + if (stopTraceUpdate == false) { + UPDATEDISPLAY_TIMEOUT + } + else { + setTickerMessage(i18n("Data acquisition stopped")); + } } } } diff --git a/clients/tde/src/part/scope/part.h b/clients/tde/src/part/scope/part.h index 202919d..351d75e 100644 --- a/clients/tde/src/part/scope/part.h +++ b/clients/tde/src/part/scope/part.h @@ -1,4 +1,4 @@ -//Author: Timothy Pearson , (C) 2012 +//Author: Timothy Pearson , (C) 2012-2014 //Copyright: See COPYING file that comes with this distribution #ifndef REMOTELAB_SCOPEPART_H -- cgit v1.2.1