@ -127,7 +127,12 @@ bool ScopePart::closeURL() {
void ScopePart : : processLockouts ( ) {
if ( m_connectionActiveAndValid ) {
m_base - > setEnabled ( true ) ;
if ( ( m_commHandlerMode < 2 ) & & ( m_commHandlerState < 50 ) ) {
m_base - > setEnabled ( false ) ;
}
else {
m_base - > setEnabled ( true ) ;
}
}
else {
m_base - > setEnabled ( false ) ;
@ -211,8 +216,10 @@ void ScopePart::setTickerMessage(TQString message) {
} \
else { \
m_commHandlerState = 255 ; \
} \
printf ( " [RAJA DEBUG 640.0] Entering state %d \n \r " , m_commHandlerState ) ; fflush ( stdout ) ;
} \
if ( m_commHandlerState < 50 ) { \
setTickerMessage ( i18n ( " Loading " ) ) ; \
}
# define EXEC_NEXT_STATE_IMMEDIATELY m_forcedUpdateTimer->start(0, TRUE);
@ -573,6 +580,9 @@ void ScopePart::mainEventLoop() {
if ( result = = " ACK " ) {
// Update display widget(s)
updateGraticule ( ) ;
// HACK
// Force resize of parent frame
emit ( usingFixedSizeChanged ( false ) ) ;
}
if ( result = = " ACK " ) {
@ -624,8 +634,8 @@ void ScopePart::mainEventLoop() {
if ( result = = " ACK " ) {
// Update display widget(s)
m_traceWidget - > setSamples ( m_currentOpChannel - 1 , trace ) ;
m_base - > traceZoomWidget - > setSamples ( m_currentOpChannel - 1 , trace ) ;
m_traceWidget - > setPositions ( m_currentOpChannel - 1 , positions ) ;
m_base - > traceZoomWidget - > setSamples ( m_currentOpChannel - 1 , trace ) ;
m_base - > traceZoomWidget - > setPositions ( m_currentOpChannel - 1 , positions ) ;
postProcessTrace ( ) ;
m_traceWidget - > repaint ( true ) ;
@ -718,13 +728,15 @@ void ScopePart::postProcessTrace() {
}
void ScopePart : : updateZoomWidgetLimits ( const TQRectF & zoomRect ) {
TQRectF fullZoomRect = m_traceWidget - > displayLimits ( 0 ) ;
double widthSpan = fullZoomRect . width ( ) - fullZoomRect . x ( ) ;
double heightSpan = fullZoomRect . height ( ) - fullZoomRect . y ( ) ;
for ( int traceno = 1 ; traceno < = m_maxNumberOfTraces ; traceno + + ) {
TQRectF fullZoomRect = m_traceWidget - > displayLimits ( traceno ) ;
double widthSpan = fullZoomRect . width ( ) - fullZoomRect . x ( ) ;
double heightSpan = fullZoomRect . height ( ) - fullZoomRect . y ( ) ;
TQRectF zoomLimitsRect ( ( fullZoomRect . x ( ) + ( widthSpan * ( zoomRect . x ( ) / 100.0 ) ) ) , ( fullZoomRect . y ( ) + ( heightSpan * ( zoomRect . y ( ) / 100.0 ) ) ) , ( fullZoomRect . x ( ) + ( widthSpan * ( ( zoomRect . x ( ) / 100.0 ) + ( zoomRect . width ( ) / 100.0 ) ) ) ) , ( fullZoomRect . y ( ) + ( heightSpan * ( ( zoomRect . y ( ) / 100.0 ) + ( zoomRect . height ( ) / 100.0 ) ) ) ) ) ;
TQRectF zoomLimitsRect ( ( fullZoomRect . x ( ) + ( widthSpan * ( zoomRect . x ( ) / 100.0 ) ) ) , ( fullZoomRect . y ( ) + ( heightSpan * ( zoomRect . y ( ) / 100.0 ) ) ) , ( fullZoomRect . x ( ) + ( widthSpan * ( ( zoomRect . x ( ) / 100.0 ) + ( zoomRect . width ( ) / 100.0 ) ) ) ) , ( fullZoomRect . y ( ) + ( heightSpan * ( ( zoomRect . y ( ) / 100.0 ) + ( zoomRect . height ( ) / 100.0 ) ) ) ) ) ;
m_base - > traceZoomWidget - > setDisplayLimits ( 0 , zoomLimitsRect ) ;
m_base - > traceZoomWidget - > setDisplayLimits ( traceno , zoomLimitsRect ) ;
}
}
void ScopePart : : updateGraticule ( ) {
@ -734,9 +746,14 @@ void ScopePart::updateGraticule() {
m_base - > traceZoomWidget - > setNumberOfVerticalDivisions ( m_vdivs ) ;
m_traceWidget - > setTraceColor ( 0 , TQColor ( 255 , 255 , 255 ) ) ;
m_traceWidget - > setTraceColor ( 1 , TQColor ( 0 , 255 , 0 ) ) ;
m_traceWidget - > setTraceColor ( 2 , TQColor ( 255 , 255 , 0 ) ) ;
m_traceWidget - > setTraceColor ( 3 , TQColor ( 64 , 64 , 255 ) ) ;
m_traceWidget - > setTraceColor ( 1 , TQColor ( 128 , 255 , 128 ) ) ;
m_traceWidget - > setTraceColor ( 2 , TQColor ( 255 , 255 , 128 ) ) ;
m_traceWidget - > setTraceColor ( 3 , TQColor ( 128 , 128 , 255 ) ) ;
m_base - > traceZoomWidget - > setTraceColor ( 0 , TQColor ( 255 , 255 , 255 ) ) ;
m_base - > traceZoomWidget - > setTraceColor ( 1 , TQColor ( 128 , 255 , 128 ) ) ;
m_base - > traceZoomWidget - > setTraceColor ( 2 , TQColor ( 255 , 255 , 128 ) ) ;
m_base - > traceZoomWidget - > setTraceColor ( 3 , TQColor ( 128 , 128 , 255 ) ) ;
for ( int traceno = 1 ; traceno < = m_maxNumberOfTraces ; traceno + + ) {
m_traceWidget - > setTraceEnabled ( traceno - 1 , m_channelActive [ traceno ] ) ;
@ -744,6 +761,11 @@ void ScopePart::updateGraticule() {
m_traceWidget - > setTraceHorizontalUnits ( traceno - 1 , " s " ) ;
m_traceWidget - > setTraceVerticalUnits ( traceno - 1 , " V " ) ;
m_base - > traceZoomWidget - > setTraceEnabled ( traceno - 1 , m_channelActive [ traceno ] , false ) ;
m_base - > traceZoomWidget - > setTraceName ( traceno - 1 , TQString ( " Channel %1 " ) . arg ( traceno ) ) ;
m_base - > traceZoomWidget - > setTraceHorizontalUnits ( traceno - 1 , " s " ) ;
m_base - > traceZoomWidget - > setTraceVerticalUnits ( traceno - 1 , " V " ) ;
m_traceWidget - > setNumberOfSamples ( traceno - 1 , m_samplesInTrace [ traceno ] ) ;
m_base - > traceZoomWidget - > setNumberOfSamples ( traceno - 1 , m_samplesInTrace [ traceno ] ) ;