diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-17 02:41:34 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-17 02:41:34 -0500 |
commit | 3ce46cc90fa5c488f1c41cd4cace0b2a98f3d143 (patch) | |
tree | b40c1dc766ee07573974c442d630a6b3121b2754 /clients/tde/src/part | |
parent | 192a06da8df1bf95e96d77d2fa0736bb7d2fe58b (diff) | |
download | ulab-3ce46cc90fa5c488f1c41cd4cace0b2a98f3d143.tar.gz ulab-3ce46cc90fa5c488f1c41cd4cace0b2a98f3d143.zip |
More trace viewer updates
Diffstat (limited to 'clients/tde/src/part')
-rw-r--r-- | clients/tde/src/part/commanalyzer/layout.ui | 48 | ||||
-rw-r--r-- | clients/tde/src/part/scope/layout.ui | 48 | ||||
-rw-r--r-- | clients/tde/src/part/scope/part.cpp | 20 |
3 files changed, 70 insertions, 46 deletions
diff --git a/clients/tde/src/part/commanalyzer/layout.ui b/clients/tde/src/part/commanalyzer/layout.ui index 172fc93..fca0baa 100644 --- a/clients/tde/src/part/commanalyzer/layout.ui +++ b/clients/tde/src/part/commanalyzer/layout.ui @@ -64,27 +64,35 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TraceWidget" row="0" column="0" colspan="1"> + <widget class="TQSplitter" row="0" column="0" colspan="1"> <property name="name"> - <cstring>traceWidget</cstring> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>80</height> - </size> - </property> - </widget> - <widget class="TraceWidget" row="1" column="0" colspan="1"> - <property name="name"> - <cstring>traceZoomWidget</cstring> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>80</height> - </size> - </property> + <cstring>splitter1</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <widget class="TraceWidget" row="0" column="0" colspan="1"> + <property name="name"> + <cstring>traceWidget</cstring> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </widget> + <widget class="TraceWidget" row="1" column="0" colspan="1"> + <property name="name"> + <cstring>traceZoomWidget</cstring> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </widget> </widget> </grid> </widget> diff --git a/clients/tde/src/part/scope/layout.ui b/clients/tde/src/part/scope/layout.ui index 038bf7f..9390e82 100644 --- a/clients/tde/src/part/scope/layout.ui +++ b/clients/tde/src/part/scope/layout.ui @@ -64,27 +64,35 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TraceWidget" row="0" column="0" colspan="1"> + <widget class="TQSplitter" row="0" column="0" colspan="1"> <property name="name"> - <cstring>traceWidget</cstring> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>80</height> - </size> - </property> - </widget> - <widget class="TraceWidget" row="1" column="0" colspan="1"> - <property name="name"> - <cstring>traceZoomWidget</cstring> - </property> - <property name="minimumSize"> - <size> - <width>80</width> - <height>80</height> - </size> - </property> + <cstring>splitter1</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <widget class="TraceWidget" row="0" column="0" colspan="1"> + <property name="name"> + <cstring>traceWidget</cstring> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </widget> + <widget class="TraceWidget" row="1" column="0" colspan="1"> + <property name="name"> + <cstring>traceZoomWidget</cstring> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </widget> </widget> </grid> </widget> diff --git a/clients/tde/src/part/scope/part.cpp b/clients/tde/src/part/scope/part.cpp index d6dda20..9909e65 100644 --- a/clients/tde/src/part/scope/part.cpp +++ b/clients/tde/src/part/scope/part.cpp @@ -62,7 +62,7 @@ K_EXPORT_COMPONENT_FACTORY( libremotelab_scope, RemoteLab::Factory ) ScopePart::ScopePart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList& ) : RemoteInstrumentPart( parent, name ), m_traceWidget(0), m_commHandlerState(-1), m_commHandlerMode(0), m_commHandlerCommandState(0), m_connectionActiveAndValid(false), - m_base(0), stopTraceUpdate(false) + m_triggerChannel(-1), m_base(0), stopTraceUpdate(false) { // Initialize important base class variables m_clientLibraryName = CLIENT_LIBRARY; @@ -103,7 +103,7 @@ ScopePart::ScopePart( TQWidget *parentWidget, const char *widgetName, TQObject * m_traceWidget->setCursorOrientation(2, TQt::Horizontal); m_traceWidget->setCursorOrientation(3, TQt::Vertical); m_traceWidget->setCursorOrientation(4, TQt::Vertical); - m_traceWidget->setCursorEnabled(0, true); + m_traceWidget->setCursorEnabled(0, false); m_traceWidget->setCursorEnabled(1, true); m_traceWidget->setCursorEnabled(2, true); m_traceWidget->setCursorEnabled(3, true); @@ -972,6 +972,8 @@ void ScopePart::recallWaveforms() { ds >> cursorPos; m_traceWidget->setCursorPosition(cursorno, cursorPos); } + m_triggerChannel = -1; + m_triggerLevel = 0; updateGraticule(); postProcessTrace(); // HACK @@ -1008,10 +1010,16 @@ void ScopePart::updateGraticule() { m_base->traceZoomWidget->setNumberOfHorizontalDivisions(m_hdivs); m_base->traceZoomWidget->setNumberOfVerticalDivisions(m_vdivs); - TraceNumberList activeTraces; - activeTraces.append(m_triggerChannel-1); - m_traceWidget->setCursorActiveTraceList(0, activeTraces); - m_traceWidget->setCursorPosition(0, (50.0-((m_triggerLevel*100.0)/(m_voltsDiv[m_triggerChannel]*m_vdivs)))); + if ((m_triggerChannel > 0) && (m_triggerChannel <= m_maxNumberOfTraces)) { + TraceNumberList activeTraces; + activeTraces.append(m_triggerChannel-1); + m_traceWidget->setCursorActiveTraceList(0, activeTraces); + m_traceWidget->setCursorPosition(0, (50.0-((m_triggerLevel*100.0)/(m_voltsDiv[m_triggerChannel]*m_vdivs)))); + m_traceWidget->setCursorEnabled(0, true); + } + else { + m_traceWidget->setCursorEnabled(0, false); + } m_traceWidget->setTraceColor(0, TQColor(255, 255, 255)); m_traceWidget->setTraceColor(1, TQColor(128, 255, 128)); |