form_view

Various ActionStep subclasses to create and manipulate a form view in the context of the Qt model-view-delegate framework.

class camelot.view.action_steps.form_view.OpenFormView(objects, admin)[source]

Open the form view for a list of objects, in a non blocking way.

Parameters:
  • objects – the list of objects to display in the form view, if objects is set to None, the model of the item view of the gui context is reused
  • admin – the admin class to use to display the form
row

Which object to display when opening the form, defaults to the first object, so row is 0 by default

actions

A list of camelot.admin.action.base.Action objects to be displayed at the side of the form, this defaults to the ones returned by the admin

top_toolbar_actions

A list of camelot.admin.action.base.Action objects to be displayed at the top toolbar of the form, this defaults to the ones returned by the admin

get_objects()[source]

Use this method to get access to the objects to change in unit tests

Returns:the list of objects to display in the form view
class camelot.view.action_steps.form_view.ToFirstForm[source]

Show the first object in the collection in the current form

class camelot.view.action_steps.form_view.ToLastForm[source]

Show the last object in the collection in the current form

class camelot.view.action_steps.form_view.ToNextForm[source]

Show the next object in the collection in the current form

class camelot.view.action_steps.form_view.ToPreviousForm[source]

Show the previous object in the collection in the current form