# Path: janus_event_CheckBox.py
# class event_CheckBox( QCheckBox ) :
# 
# 	#-----------------------------------------------------------------------
# 	# DEFINE THE INITIALIZATION FUNCTION.
# 	#-----------------------------------------------------------------------
# 
# 	def __init__( self, owner, fnc ) :
# 
# 		# Inherit all attributes of an instance of "QLineEdit".
# 
# 		super( event_CheckBox, self ).__init__( )
# 
# 		# Store the user-provided instance of the initializing object.
# 
# 		self.owner = owner
# 
# 		# Store the string indicating the function of this text area.
# 
# 		self.fnc = fnc
# 
# 		# If the 'stateChanged()' signal is emitted (i.e., if the user
# 		# clicks on this check box), notify "self.owner".
# 
# 		self.connect( self, SIGNAL('clicked(bool)'),
# 		              self.signal_clicked            )
# 
# 	#-----------------------------------------------------------------------
# 	# DEFINE THE FUNCTION FOR RESPONDING TO THE "clicked" SIGNAL.
# 	#-----------------------------------------------------------------------
# 
# 	def signal_clicked( self ) :
# 
# 		# Alert the object that initialized this widget (i.e., its
# 		# "owner") that the check box has been clicked.
# 
# 		self.owner.user_event( None, self.fnc )
# 
# Path: janus_thread.py
# def n_thread( ) :
# 
# 	n = 0
# 
# 	for thr in ThreadList( ) :
# 		if ( ( thr._Thread__target is thread_load_spec        ) or
# 		     ( thr._Thread__target is thread_anls_mom         ) or
# 		     ( thr._Thread__target is thread_anls_nln         ) or
# 		     ( thr._Thread__target is thread_chng_dsp         ) or
# 		     ( thr._Thread__target is thread_chng_dyn         ) or
# 		     ( thr._Thread__target is thread_chng_opt         ) or
# 		     ( thr._Thread__target is thread_rstr_opt         ) or
# 		     ( thr._Thread__target is thread_auto_run         ) or
# 		     ( thr._Thread__target is thread_save_res         ) or
# 		     ( thr._Thread__target is thread_xprt_res         ) or
# 		     ( thr._Thread__target is thread_chng_mom_sel     ) or
#                      ( thr._Thread__target is thread_auto_mom_sel     ) or
# 		     ( thr._Thread__target is thread_chng_nln_spc     ) or
# 		     ( thr._Thread__target is thread_chng_nln_pop     ) or
# 		     ( thr._Thread__target is thread_chng_nln_set     ) or
# 		     ( thr._Thread__target is thread_chng_nln_gss     ) or
# 		     ( thr._Thread__target is thread_chng_nln_sel     ) or
# 		     ( thr._Thread__target is thread_chng_mom_win_dir ) or
# 		     ( thr._Thread__target is thread_chng_mom_win_bin )   ) :
# 			n += 1
# 
# 	return n
# 
# def thread_chng_dsp( core, value ) :
# 
# 	core.emit( SIGNAL('janus_busy_end') )
# 	core.emit( SIGNAL('janus_busy_beg') )
# 
# 	core.chng_dsp( value )
# 
# 	core.emit( SIGNAL('janus_busy_end') )
# 
# def thread_chng_dyn( core, anal, value ) :
# 
# 	core.emit( SIGNAL('janus_busy_end') )
# 	core.emit( SIGNAL('janus_busy_beg') )
# 
# 	core.chng_dyn( anal, value )
# 
# 	core.emit( SIGNAL('janus_busy_end') )


from PyQt4.QtCore import SIGNAL, Qt
from PyQt4.QtGui import QWidget, QGridLayout, QLabel, QFont
from janus_event_CheckBox import event_CheckBox
from threading import Thread
from janus_thread import n_thread, thread_chng_dsp, thread_chng_dyn
				Thread( target=thread_chng_dsp,
				        args=( self.core, 'mom' ) ).start()
			else :
				Thread( target=thread_chng_dsp,
				        args=( self.core, None ) ).start()

		if ( fnc == 'gsl' ) :
			if ( self.box_dsp['gsl'].isChecked( ) ) :
				self.box_dsp['mom'].setChecked( False )
				self.box_dsp['nln'].setChecked( False )
				Thread( target=thread_chng_dsp,
				        args=( self.core, 'gsl' ) ).start()
			else :
				Thread( target=thread_chng_dsp,
				        args=( self.core, None ) ).start()

		if ( fnc == 'nln' ) :
			if ( self.box_dsp['nln'].isChecked( ) ) :
				self.box_dsp['mom'].setChecked( False )
				self.box_dsp['gsl'].setChecked( False )
				Thread( target=thread_chng_dsp,
				        args=( self.core, 'nln' ) ).start()
			else :
				Thread( target=thread_chng_dsp,
				        args=( self.core, None ) ).start()

		# If one of the "Dynamic" boxes has been (un)checked, update the
		# value of the corresponding "self.core.dyn_???".

		if ( fnc == 'mom' ) :

# Path: janus_event_CheckBox.py
# class event_CheckBox( QCheckBox ) :
# 
# 	#-----------------------------------------------------------------------
# 	# DEFINE THE INITIALIZATION FUNCTION.
# 	#-----------------------------------------------------------------------
# 
# 	def __init__( self, owner, fnc ) :
# 
# 		# Inherit all attributes of an instance of "QLineEdit".
# 
# 		super( event_CheckBox, self ).__init__( )
# 
# 		# Store the user-provided instance of the initializing object.
# 
# 		self.owner = owner
# 
# 		# Store the string indicating the function of this text area.
# 
# 		self.fnc = fnc
# 
# 		# If the 'stateChanged()' signal is emitted (i.e., if the user
# 		# clicks on this check box), notify "self.owner".
# 
# 		self.connect( self, SIGNAL('clicked(bool)'),
# 		              self.signal_clicked            )
# 
# 	#-----------------------------------------------------------------------
# 	# DEFINE THE FUNCTION FOR RESPONDING TO THE "clicked" SIGNAL.
# 	#-----------------------------------------------------------------------
# 
# 	def signal_clicked( self ) :
# 
# 		# Alert the object that initialized this widget (i.e., its
# 		# "owner") that the check box has been clicked.
# 
# 		self.owner.user_event( None, self.fnc )
# 
# Path: janus_thread.py
# def n_thread( ) :
# 
# 	n = 0
# 
# 	for thr in ThreadList( ) :
# 		if ( ( thr._Thread__target is thread_load_spec        ) or
# 		     ( thr._Thread__target is thread_anls_mom         ) or
# 		     ( thr._Thread__target is thread_anls_nln         ) or
# 		     ( thr._Thread__target is thread_chng_dsp         ) or
# 		     ( thr._Thread__target is thread_chng_dyn         ) or
# 		     ( thr._Thread__target is thread_chng_opt         ) or
# 		     ( thr._Thread__target is thread_rstr_opt         ) or
# 		     ( thr._Thread__target is thread_auto_run         ) or
# 		     ( thr._Thread__target is thread_save_res         ) or
# 		     ( thr._Thread__target is thread_xprt_res         ) or
# 		     ( thr._Thread__target is thread_chng_mom_sel     ) or
#                      ( thr._Thread__target is thread_auto_mom_sel     ) or
# 		     ( thr._Thread__target is thread_chng_nln_spc     ) or
# 		     ( thr._Thread__target is thread_chng_nln_pop     ) or
# 		     ( thr._Thread__target is thread_chng_nln_set     ) or
# 		     ( thr._Thread__target is thread_chng_nln_gss     ) or
# 		     ( thr._Thread__target is thread_chng_nln_sel     ) or
# 		     ( thr._Thread__target is thread_chng_mom_win_dir ) or
# 		     ( thr._Thread__target is thread_chng_mom_win_bin )   ) :
# 			n += 1
# 
# 	return n
# 
# def thread_chng_dsp( core, value ) :
# 
# 	core.emit( SIGNAL('janus_busy_end') )
# 	core.emit( SIGNAL('janus_busy_beg') )
# 
# 	core.chng_dsp( value )
# 
# 	core.emit( SIGNAL('janus_busy_end') )
# 
# def thread_chng_dyn( core, anal, value ) :
# 
# 	core.emit( SIGNAL('janus_busy_end') )
# 	core.emit( SIGNAL('janus_busy_beg') )
# 
# 	core.chng_dyn( anal, value )
# 
# 	core.emit( SIGNAL('janus_busy_end') )


# Path: janus_widget_ctrl_dspdyn.py
from PyQt4.QtCore import SIGNAL, Qt
from PyQt4.QtGui import QWidget, QGridLayout, QLabel, QFont
from janus_event_CheckBox import event_CheckBox
from threading import Thread
from janus_thread import n_thread, thread_chng_dsp, thread_chng_dyn

				Thread( target=thread_chng_dsp,
				        args=( self.core, 'mom' ) ).start()
			else :
				Thread( target=thread_chng_dsp,
				        args=( self.core, None ) ).start()

		if ( fnc == 'gsl' ) :
			if ( self.box_dsp['gsl'].isChecked( ) ) :
				self.box_dsp['mom'].setChecked( False )
				self.box_dsp['nln'].setChecked( False )
				Thread( target=thread_chng_dsp,
				        args=( self.core, 'gsl' ) ).start()
			else :
				Thread( target=thread_chng_dsp,
				        args=( self.core, None ) ).start()

		if ( fnc == 'nln' ) :
			if ( self.box_dsp['nln'].isChecked( ) ) :
				self.box_dsp['mom'].setChecked( False )
				self.box_dsp['gsl'].setChecked( False )
				Thread( target=thread_chng_dsp,
				        args=( self.core, 'nln' ) ).start()
			else :
				Thread( target=thread_chng_dsp,
				        args=( self.core, None ) ).start()

		# If one of the "Dynamic" boxes has been (un)checked, update the
		# value of the corresponding "self.core.dyn_???".

		if ( fnc == 'mom' ) :

			Thread( target=thread_chng_dyn,