Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Classes | Functions | Variables
Evolife.Graphics.Evolife_Window Namespace Reference

Evolife Window system
More...

Classes

class  Evolife_Frame
 Defines Evolife main window by modification of the generic Simulation Frame. More...
 
class  Simulation_Control
 Interface with the simulation thread #. More...
 
class  Simulation_Control_Frame
 Minimal control panel with [Run] [Step] [Help] and [quit] buttons. More...
 
class  Simulation_Display_Control_Frame
 This class combines a control panel and a slider for controlling display period. More...
 
class  Simulation_Frame
 This class combines a control panel and a space to display curves. More...
 

Functions

def Raise (self)
 if self.closeEvent(None): QtCore.QCoreApplication.instance().quit() More...
 
def closeEvent (self, event)
 close satelite windows and stops the simulation More...
 
def SWDestroyed (self, SW)
 A satellite window has been destroyed - removes it from the list. More...
 
def ReturnFromThread (self)
 Processes graphic orders if in visible state returns -1 if Observer says the simulation is over. More...
 
def Process_graph_orders (self)
 Just let Observer know that display has taken place. More...
 
def keyPressEvent (self, e)
 processes actions such as Run, Step, Help... More...
 
def EventInterpreter (self, Event)
 Sends event to observer (useful for mouse events) More...
 
def Start (SimulationStep, Obs, Capabilities='C', Options={})
 SimulationStep is a function that performs a simulation step Obs is the observer that stores statistics Capabilities (curves, genome display, trajectory display...) = any string of letters from: CFGNTP C = Curves F = Field (2D seasonal display) (excludes R) G = Genome display I = Image (same as Field, but no slider) L = Log Terminal N = social network display P = Photo (screenshot) R = Region (2D ongoing display) (excludes F) T = Trajectory display. More...
 

Variables

string DefaultIconName = 'Graphics/EvolifeIcon.png'
 
string HelpFileName = 'Help.txt'
 
 Screen_ = None
 
 Finish
 
 simulation_steady_mode
 
 PhotoMode
 

Detailed Description

Evolife Window system

Function Documentation

◆ closeEvent()

def Evolife.Graphics.Evolife_Window.closeEvent (   self,
  event 
)

close satelite windows and stops the simulation

Definition at line 285 of file Evolife_Window.py.

◆ EventInterpreter()

def Evolife.Graphics.Evolife_Window.EventInterpreter (   self,
  Event 
)

Sends event to observer (useful for mouse events)

Definition at line 340 of file Evolife_Window.py.

◆ keyPressEvent()

def Evolife.Graphics.Evolife_Window.keyPressEvent (   self,
  e 
)

processes actions such as Run, Step, Help...

Definition at line 323 of file Evolife_Window.py.

◆ Process_graph_orders()

def Evolife.Graphics.Evolife_Window.Process_graph_orders (   self)

Just let Observer know that display has taken place.

Definition at line 314 of file Evolife_Window.py.

◆ Raise()

def Evolife.Graphics.Evolife_Window.Raise (   self)

if self.closeEvent(None): QtCore.QCoreApplication.instance().quit()

puts the window in front of display

Definition at line 271 of file Evolife_Window.py.

◆ ReturnFromThread()

def Evolife.Graphics.Evolife_Window.ReturnFromThread (   self)

Processes graphic orders if in visible state returns -1 if Observer says the simulation is over.

Definition at line 305 of file Evolife_Window.py.

◆ Start()

def Evolife.Graphics.Evolife_Window.Start (   SimulationStep,
  Obs,
  Capabilities = 'C',
  Options = {} 
)

SimulationStep is a function that performs a simulation step Obs is the observer that stores statistics Capabilities (curves, genome display, trajectory display...) = any string of letters from: CFGNTP C = Curves F = Field (2D seasonal display) (excludes R) G = Genome display I = Image (same as Field, but no slider) L = Log Terminal N = social network display P = Photo (screenshot) R = Region (2D ongoing display) (excludes F) T = Trajectory display.

Options is a dict:

  • Run:True means that the simulation will run automatically
  • Background:<Colour or image>
  • ExitOnEnd:True doesn't pause when simulation stops

Definition at line 749 of file Evolife_Window.py.

◆ SWDestroyed()

def Evolife.Graphics.Evolife_Window.SWDestroyed (   self,
  SW 
)

A satellite window has been destroyed - removes it from the list.

Definition at line 296 of file Evolife_Window.py.

Variable Documentation

◆ DefaultIconName

string Evolife.Graphics.Evolife_Window.DefaultIconName = 'Graphics/EvolifeIcon.png'

Definition at line 34 of file Evolife_Window.py.

◆ Finish

Evolife.Graphics.Evolife_Window.Finish

Definition at line 288 of file Evolife_Window.py.

◆ HelpFileName

string Evolife.Graphics.Evolife_Window.HelpFileName = 'Help.txt'

Definition at line 35 of file Evolife_Window.py.

◆ PhotoMode

Evolife.Graphics.Evolife_Window.PhotoMode

Definition at line 319 of file Evolife_Window.py.

◆ Screen_

Evolife.Graphics.Evolife_Window.Screen_ = None

Definition at line 157 of file Evolife_Window.py.

◆ simulation_steady_mode

Evolife.Graphics.Evolife_Window.simulation_steady_mode

Definition at line 289 of file Evolife_Window.py.