# 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
		self.connect( self.core, SIGNAL('janus_chng_dyn'),
		                                            self.resp_chng_dyn )

		# Give this widget a grid layout, "self.grd".

		self.grd = QGridLayout( )

		self.setLayout( self.grd )

		# Create the sub-grids and add them to the widget's main grid.

		self.sg = QGridLayout( )

		self.sg.setContentsMargins( 0, 0, 0, 0 )

		self.grd.addLayout( self.sg, 0, 0, 5, 4 )

		# Initialize the check boxes that comprise this widget.

		self.lab_dsp = { 'dsp':QLabel( 'Display:'   ),
		                 'mom':QLabel( 'Moments'    ),
		                 'gsl':QLabel( 'Guess/Sel.' ),
		                 'nln':QLabel( 'Non-Linear' )  }

		self.lab_dyn = { 'dyn': QLabel( 'Dynamic:'    ),
		                 'mom': QLabel( 'Moments'     ),
		                 'gss': QLabel( 'Init. Guess' ),
		                 'sel': QLabel( 'Data Sel.'   ),
		                 'nln': QLabel( 'Non-Linear'  )  }


# 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

		self.connect( self.core, SIGNAL('janus_chng_dyn'),
		                                            self.resp_chng_dyn )

		# Give this widget a grid layout, "self.grd".

		self.grd = QGridLayout( )

		self.setLayout( self.grd )

		# Create the sub-grids and add them to the widget's main grid.

		self.sg = QGridLayout( )

		self.sg.setContentsMargins( 0, 0, 0, 0 )

		self.grd.addLayout( self.sg, 0, 0, 5, 4 )

		# Initialize the check boxes that comprise this widget.

		self.lab_dsp = { 'dsp':QLabel( 'Display:'   ),
		                 'mom':QLabel( 'Moments'    ),
		                 'gsl':QLabel( 'Guess/Sel.' ),
		                 'nln':QLabel( 'Non-Linear' )  }

		self.lab_dyn = { 'dyn': QLabel( 'Dynamic:'    ),
		                 'mom': QLabel( 'Moments'     ),
		                 'gss': QLabel( 'Init. Guess' ),
		                 'sel': QLabel( 'Data Sel.'   ),
		                 'nln': QLabel( 'Non-Linear'  )  }


		self.box_dsp = { 'mom':event_CheckBox( self, 'mom' ),