objects.gui.threads.redrawThread.redrawThread Class Reference

The redrawThread class will periodically refresh the screen. More...

Inherits objects::logic::common::threads::appThreadBase::appThreadBase.

List of all members.

Public Member Functions

def setRefreshInterval
 Set the refresh interval.
def run
 performs redraw cycles in a loop.

Public Attributes

 refreshInterval
 killSwitch


Detailed Description

The redrawThread class will periodically refresh the screen.

Definition at line 31 of file redrawThread.py.


Member Function Documentation

def objects.gui.threads.redrawThread.redrawThread.run (   self  ) 

performs redraw cycles in a loop.

This method will end when the parent.killRedrawThread flag is set

Definition at line 45 of file redrawThread.py.

00045                     :
00046         if not hasattr(self,"refreshInterval"):
00047             logger.log(__name__ + ": No refreshInterval was specified.")
00048             self.refreshInterval = 10
00049             
00050             
00051         try:
00052             while(self.killSwitch == False):
00053                 self.threadEvent.clear()
00054  
00055                 # don't waste cycled redrwaing if the app is minimized
00056                 if self.parent.isWindowMinimined == False:                                   
00057                     self.parent.redrawCycle(True)                                                                                  
00058                 
00059                 #sleep for x secs, but wake up periodically to check to see if we're done
00060                 for i in range(1, self.refreshInterval):
00061                     time.sleep(1)
00062                     if self.killSwitch == True:
00063                         logger.log(__name__ + ": Setting Redraw Event")
00064                         self.threadEvent.set() 
00065                         break
00066                                         
00067         finally:
00068             self.threadEvent.set()
00069             self.threadEvent.clear()
00070             
00071         
00072         logger.log(__name__ + ": Redraw Thread Done")
        logger.log(__name__ + ": Redraw Thread Done")

def objects.gui.threads.redrawThread.redrawThread.setRefreshInterval (   self,
  refreshInterval 
)

Set the refresh interval.

Parameters:
refreshInterval String representing a refresh interval (Low = 60sec, Med = 10sec, High = 3sec)

Definition at line 35 of file redrawThread.py.

00035                                                  :
00036         if refreshInterval == "Low":
00037             self.refreshInterval = 60
00038         elif refreshInterval == "Med":
00039             self.refreshInterval = 10
00040         else:
00041             self.refreshInterval = 3
00042 
    ## performs redraw cycles in a loop. 


Member Data Documentation

Reimplemented from objects.logic.common.threads.appThreadBase.appThreadBase.

Definition at line 52 of file redrawThread.py.

Definition at line 37 of file redrawThread.py.


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:32 2009 for EyeSpy by  doxygen 1.5.8