Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Public Member Functions | Public Attributes | List of all members
Evolife.Graphics.Evolife_Window.Evolife_Frame Class Reference

Defines Evolife main window by modification of the generic Simulation Frame. More...

Inheritance diagram for Evolife.Graphics.Evolife_Window.Evolife_Frame:
Inheritance graph
[legend]
Collaboration diagram for Evolife.Graphics.Evolife_Window.Evolife_Frame:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, SimulationStep, Obs, Capabilities='C', Options=[])
 Creation of the main window and active satelite windows. More...
 
def keyPressEvent (self, e)
 recognizes shortcuts to show satelite windows (Genomes, Trajectories, Field, Legend, Film...) More...
 
def GenomeButtonClick (self, event)
 
def PhotoButtonClick (self, event)
 saves a snapshot of the simulation and goes to stepwise mode More...
 
def FilmButtonClick (self, event)
 Film mode is activated by pressing the 'V' key (video) It results in images (snapshots) being saved each time Observer is 'visible'. More...
 
def TrajectoryButtonClick (self, event)
 displays the 'Trajectories' window More...
 
def NetworkButtonClick (self, event)
 displays the 'Network' window More...
 
def FieldButtonClick (self, event)
 displays the 'Field' window More...
 
def LogButtonClick (self, event)
 [not implemented] More...
 
def WindowActivation (self, WindowName)
 Sets Satellite window's geometry, icon and title. More...
 
def checkButtonState (self)
 sets the availability of the 'Network', 'Field', 'Image', 'Trajectories' tick button on display More...
 
def Process_graph_orders (self)
 Processes graph orders received from observer. More...
 
def DecisionToEnd (self)
 Exits if 'ExitOnEnd' is True. More...
 
def SWDestroyed (self, SW)
 
def closeEvent (self, event)
 close parent closeEvent More...
 
- Public Member Functions inherited from Evolife.Graphics.Evolife_Window.Simulation_Frame
def __init__ (self, SimulationStep, Obs, Background=None)
 Creates a plot area and displays it to the right of the control frame. More...
 
def LegendButtonClick (self, event=None)
 Displays a text file named:
More...
 
def Process_graph_orders (self)
 Processes graph orders received from observer. More...
 
def dump (self, verbose=False)
 store and print simulation results
More...
 
def closeEvent (self, event)
 close parent closeEvent More...
 
- Public Member Functions inherited from Evolife.Graphics.Evolife_Window.Simulation_Display_Control_Frame
def __init__ (self, SimulationStep, Obs, Background=None)
 Create Control frame + displayperiod slider. More...
 
def DisplayPeriodChanged (self, event)
 The displayed value varies exponentially with the slider's position. More...
 
def DisplayPeriodSet (self, Period, FlagForce=True)
 
- Public Member Functions inherited from Evolife.Graphics.Evolife_Window.Simulation_Control_Frame
def __init__ (self, SimulationStep, Obs)
 Creates a window with buttons that is also a Simulation_Control. More...
 
def LocalButton (self, ParentFrame, ButtonType, Text, Tip, ClickFunction, ShortCutKey=None)
 Creates a button. More...
 
def EvolifeWebSite (self, e)
 opens Web browser with provided address More...
 
def HelpButtonClick (self, event=None)
 Displays a text file named: Help.txt. More...
 
def QuitButtonClick (self, event)
 closes the window More...
 
- Public Member Functions inherited from Evolife.Graphics.Evolife_Window.Simulation_Control
def __init__ (self, SimulationStep, Obs, method='timer')
 Stores Obs as observer and SimulationStep as the function that processes one step of the simulation. More...
 
def RunButtonClick (self, event=None)
 Entering in 'Run' mode. More...
 
def StepButtonClick (self, event=None)
 Entering in 'Step' mode. More...
 
def Simulation_stop (self)
 Stops the simulation thread or timer. More...
 
def Simulation_launch (self, continuous_mode)
 (re)starts the simulation thread or timer More...
 
def Simulation_resume (self)
 calls Simulation_launch More...
 
def OneStep (self)
 calls SimulationStep More...
 
def ReturnFromThread (self)
 to be overloaded More...
 
def DecisionToEnd (self)
 to be overloaded More...
 
- Public Member Functions inherited from Evolife.Graphics.Evolife_Graphic.Active_Frame
def __init__ (self, AreaType=None, parent=None, control=None, image=None, width=400, height=300, zoom=1)
 Creates a window (AreaView) with the appropriate AreaType (Draw_Area, Ground...) More...
 
def keyPressEvent (self, e)
 Definition of keyboard shortcuts. More...
 
def Raise (self)
 puts the window on top of display More...
 
def EventInterpreter (self, Event)
 Does nothing here. More...
 
- Public Member Functions inherited from Evolife.Graphics.Evolife_Graphic.AreaView
def __init__ (self, AreaType=Image_Area, parent=None, image=None, width=400, height=300, zoom=1)
 Defining View: a window (QGraphicsView) that contains a plot area (QGraphicsScene) More...
 
def paintEvent (self, e)
 calls Qt's paintEvent More...
 
def resizeEvent (self, e)
 calls Qt's resizeEvent More...
 
def updateScene (self, L)
 unused More...
 
def photo (self, Name, FrameNumber=-1, outputDir='.', extension='png')
 takes a snapshot and saves it to a new file More...
 
def EventInterpreter (self, Event)
 Does nothing here. More...
 

Public Attributes

 Capabilities
 Creation of the main window #. More...
 
 Background
 
 WindowTitles
 
 DOptions
 
 ParentClass
 
 FieldOngoingDisplay
 Control panel #. More...
 
 PhotoMode
 
- Public Attributes inherited from Evolife.Graphics.Evolife_Window.Simulation_Frame
 plot_area
 plot panel # More...
 
 PhotoMode
 
 alive
 
- Public Attributes inherited from Evolife.Graphics.Evolife_Window.Simulation_Display_Control_Frame
 lcd
 
 DisplayPeriodSlider
 
 sliderPrecision
 
 previous_Disp_period
 
 Disp_period
 
- Public Attributes inherited from Evolife.Graphics.Evolife_Window.Simulation_Control_Frame
 Name
 
 IconName
 
 SWindows
 List and status of Satellite windows. More...
 
 SWindowsPreferredGeometry
 
 SWindowsMargins
 
 Finish
 
 alive
 
 PhotoMode
 
 CurrentFrame
 
 control_frame
 
 Buttons
 
 button_frame
 
 SmallButtonFrame
 
 HelpButtonFrame
 
 plot_frame
 
- Public Attributes inherited from Evolife.Graphics.Evolife_Window.Simulation_Control
 Obs
 
 SimulationStep
 
 method
 
 timer
 
 simulation
 Status of the simulation programme. More...
 
 simulation_steady_mode
 
 simulation_under_way
 
 previous_Disp_period
 
 Disp_period
 
- Public Attributes inherited from Evolife.Graphics.Evolife_Graphic.Active_Frame
 Area
 
 Parent
 
 Control
 
 control
 
- Public Attributes inherited from Evolife.Graphics.Evolife_Graphic.AreaView
 Area
 
 FrameNumber
 

Detailed Description

Defines Evolife main window by modification of the generic Simulation Frame.

Definition at line 487 of file Evolife_Window.py.

Constructor & Destructor Documentation

◆ __init__()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.__init__ (   self,
  SimulationStep,
  Obs,
  Capabilities = 'C',
  Options = [] 
)

Creation of the main window and active satelite windows.

Reimplemented from Evolife.Graphics.Evolife_Window.Simulation_Frame.

Definition at line 491 of file Evolife_Window.py.

Member Function Documentation

◆ checkButtonState()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.checkButtonState (   self)

sets the availability of the 'Network', 'Field', 'Image', 'Trajectories' tick button on display

Definition at line 686 of file Evolife_Window.py.

◆ closeEvent()

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

close parent closeEvent

Reimplemented from Evolife.Graphics.Evolife_Window.Simulation_Frame.

Definition at line 740 of file Evolife_Window.py.

◆ DecisionToEnd()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.DecisionToEnd (   self)

Exits if 'ExitOnEnd' is True.

Reimplemented from Evolife.Graphics.Evolife_Window.Simulation_Control.

Definition at line 728 of file Evolife_Window.py.

◆ FieldButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.FieldButtonClick (   self,
  event 
)

displays the 'Field' window

Definition at line 654 of file Evolife_Window.py.

◆ FilmButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.FilmButtonClick (   self,
  event 
)

Film mode is activated by pressing the 'V' key (video) It results in images (snapshots) being saved each time Observer is 'visible'.

Definition at line 617 of file Evolife_Window.py.

◆ GenomeButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.GenomeButtonClick (   self,
  event 
)

Definition at line 593 of file Evolife_Window.py.

◆ keyPressEvent()

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

recognizes shortcuts to show satelite windows (Genomes, Trajectories, Field, Legend, Film...)

Reimplemented from Evolife.Graphics.Evolife_Graphic.Active_Frame.

Definition at line 575 of file Evolife_Window.py.

◆ LogButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.LogButtonClick (   self,
  event 
)

[not implemented]

Definition at line 668 of file Evolife_Window.py.

◆ NetworkButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.NetworkButtonClick (   self,
  event 
)

displays the 'Network' window

Definition at line 642 of file Evolife_Window.py.

◆ PhotoButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.PhotoButtonClick (   self,
  event 
)

saves a snapshot of the simulation and goes to stepwise mode

Definition at line 604 of file Evolife_Window.py.

◆ Process_graph_orders()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.Process_graph_orders (   self)

Processes graph orders received from observer.

Parent class displays PlotData by adding points to curves and by displaying them. In addition, gets orders for satelite windows from Oberver and processes them.

Reimplemented from Evolife.Graphics.Evolife_Window.Simulation_Frame.

Definition at line 696 of file Evolife_Window.py.

◆ SWDestroyed()

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

Definition at line 736 of file Evolife_Window.py.

◆ TrajectoryButtonClick()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.TrajectoryButtonClick (   self,
  event 
)

displays the 'Trajectories' window

Definition at line 628 of file Evolife_Window.py.

◆ WindowActivation()

def Evolife.Graphics.Evolife_Window.Evolife_Frame.WindowActivation (   self,
  WindowName 
)

Sets Satellite window's geometry, icon and title.

Definition at line 675 of file Evolife_Window.py.

Member Data Documentation

◆ Background

Evolife.Graphics.Evolife_Window.Evolife_Frame.Background

Definition at line 499 of file Evolife_Window.py.

◆ Capabilities

Evolife.Graphics.Evolife_Window.Evolife_Frame.Capabilities

Creation of the main window #.

Definition at line 497 of file Evolife_Window.py.

◆ DOptions

Evolife.Graphics.Evolife_Window.Evolife_Frame.DOptions

Definition at line 501 of file Evolife_Window.py.

◆ FieldOngoingDisplay

Evolife.Graphics.Evolife_Window.Evolife_Frame.FieldOngoingDisplay

Control panel #.

Definition at line 539 of file Evolife_Window.py.

◆ ParentClass

Evolife.Graphics.Evolife_Window.Evolife_Frame.ParentClass

Definition at line 515 of file Evolife_Window.py.

◆ PhotoMode

Evolife.Graphics.Evolife_Window.Evolife_Frame.PhotoMode

Definition at line 610 of file Evolife_Window.py.

◆ WindowTitles

Evolife.Graphics.Evolife_Window.Evolife_Frame.WindowTitles

Definition at line 500 of file Evolife_Window.py.


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