Ceed App
The main module that runs the Ceed GUI.
- class ceed.main.CeedApp(open_player_thread=True, **kwargs)
Bases:
base_kivy_app.app.BaseKivyApp
The app which runs the main Ceed GUI.
- last_directory
The last directory opened in the GUI.
- external_function_plugin_package: str = ''
The name of an external function plugin package that contains additional functions to be displayed in the GUI to the user.
See
plugin
for details.
- external_stage_plugin_package: str = ''
The name of an external stage plugin package that contains additional stages to be displayed in the GUI to the user.
See
plugin
for details.
- kv_loaded = False
For tests, we don’t want to load kv multiple times so we only load kv if it wasn’t loaded before.
- yesno_prompt
Stores a instance of
YesNoPrompt
that is automatically created by this app class. That class is described inbase_kivy_app/graphics.kv
and shows a prompt with yes/no options and callback.
- shape_factory: ceed.shape.shape_widgets.CeedPainter
The
CeedPainter
used to draw shapes and contains all the shapes shown in the GUI.
- stages_container: ceed.stage.stage_widgets.StageList
The
StageList
widget that contains all the root stages’ widgets in the GUI.
- funcs_container: ceed.function.func_widgets.FuncList
The
FuncList
widget that contains all the root functions’ widgets in the GUI.
- shapes_container: ceed.shape.shape_widgets.ShapeList
The
ShapeList
widget that contains all the shapes’ widgets in the GUI.
- shape_groups_container
The
ShapeGroupList
widget that contains all the shape groups’ widgets in the GUI.
- pinned_graph = None
PinnedGraph widget into which the experiment preview graph may be pinned.
When pinned, it’s displayed not as a popup, but as a flat widget.
- mea_align_widget: ceed.view.view_widgets.MEAArrayAlign
The
MEAArrayAlign
widget used to align the MEA grid to the camera.
- central_display: base_kivy_app.graphics.BufferImage
The
BufferImage
widget into which the camera widget is drawn.
- drag_controller: ceed.graphics.CeedDragNDrop
The
CeedDragNDrop
used for dragging and dropping widgets on in the GUI.
- function_factory: ceed.function.FunctionFactoryBase = None
The
FunctionFactoryBase
that contains all the functions shown in the GUI.
- stage_factory: ceed.stage.StageFactoryBase = None
The
StageFactoryBase
that contains all the stages shown in the GUI.
- player: ceed.player.CeedPlayer = None
The
ceed.player.CeedPlayer
used to play the video camera and record the images to disk.
- view_controller: ceed.view.controller.ControllerSideViewControllerBase = None
The
ControllerSideViewControllerBase
used to run the experiment and display the stages.
- ceed_data: ceed.storage.controller.CeedDataWriterBase = None
The
CeedDataWriterBase
used to load and save the data to disk.
- data_serializer: ceed.storage.controller.DataSerializerBase = None
The
DataSerializerBase
used to generate the corner pixel values for Ceed-MCS temporal synchronization.
- load_app_kv()
Loads the app’s kv files, if not yet loaded.
- build()
Similar to App’s build, but it takes the root widget if provided and if
inspect
is True, it activates kivy’s inspector.- Parameters
root – The root widget instance.
- Returns
The root widget
- on_start()
Event handler for the on_start event which is fired after initialization (after build() has been called) but before the application has started running.
- set_tittle(*largs)
Periodically called by the Kivy Clock to update the title.
- changed_callback(*largs, **kwargs)
Callback bound to anything that can change the Ceed data to indicate whether it needs to be re-saved.
- check_close()
Returns whether the app can close now. Otherwise, a message telling the user it cannot close now with message
_close_message
will be shown.
- handle_exception(*largs, **kwargs)
Should be called whenever an exception is caught in the app.
If the app is started with
run_app()
orrun_app_async()
, this is called if kivy encounters an error. Similarly,app_error()
,app_error_async()
, andreport_exception_in_app()
call this on the app upon an exception.It logs the message to the logger using
get_logger()
.- Parameters
- exception: string or exception object
The caught exception (i.e. the
e
inexcept Exception as e
)- exc_info: stack trace
If not None, the return value of
sys.exc_info()
or a stringified version of it. It is used to log the stack trace.- level: string
The log level to use on the message. Can be
'error'
,'exception'
(with the same meaning), or any other python log level.
- ceed.main.run_app()
The function that starts the main Ceed GUI and the entry point for the main script.