editors Package — Camelot documentation

### Navigation

- index
- modules |
- Camelot documentation »

# editors Package

## `editors` Package

Camelot includes editors for various types of fields. Each editor at least supports these features :

> - a set_value method to set a python type as the editor’s value
> - a get_value method to retrieve a python type from the editor
> - the ValueLoading state : an editor has as its value ValueLoading upon construction and

the editor’s value can be set to ValueLoading if the value that should be displayed is not yet available in the GUI thread, but is still on it’s way from the model to the GUI. This means that once set_value( ValueLoading ) is called, get_value() will always return ValueLoading until set_value is called with another argument.

class `camelot.view.controls.editors.` `BoolEditor`(parent=None, minimum=-2147483648, maximum=2147483647, nullable=True, field_name='boolean', **kwargs)

  Bases: `PyQt4.QtGui.QCheckBox`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  Widget for editing a boolean field

  `editingFinished`
  `get_value`()
  `set_enabled`(editable=True)
  `set_value`(value)
  `sizeHint`()

class `camelot.view.controls.editors.` `ChartEditor`(parent=None, width=50, height=40, dpi=50, field_name='chart', **kwargs)

  Bases: `PyQt4.QtGui.QFrame`, `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  Editor to display and manipulate matplotlib charts. The editor itself is generic for all kinds of plots, it simply provides the data to be ploted with a set of axes. The data itself should know how exactly to plot itself.

  `copy_to_clipboard`()

    Copy the chart to the clipboard

  `editingFinished`
  `eventFilter`(object, event)

    intercept mouse clicks on a chart to show the chart fullscreen

  `on_draw`()

    draw the matplotlib figure on the canvas

  `on_paint_request`(printer)
  `print_preview`()

    Popup a print preview dialog for the Chart

  `set_field_attributes`(*args, **kwargs)

    Overwrite set_field attributes because a ChartEditor cannot be disabled or have its background color changed

  `set_value`(value)

    Accepts a camelot.container.chartcontainer.FigureContainer or a camelot.container.chartcontainer.AxesContainer

  `show_fullscreen`()

    Show the plot full screen, using the litebox

  static `show_fullscreen_chart`(chart, parent)

    Parameters: | chart – a chart container
    Returns: | the widget showing the chart, by default a LiteBoxView

  `show_fullscreen_signal`

class `camelot.view.controls.editors.` `ChoicesEditor`(parent=None, nullable=True, field_name='choices', **kwargs)

  Bases: `PyQt4.QtGui.QComboBox`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  A ComboBox aka Drop Down box that can be assigned a list of keys and values

  `editingFinished`
  `get_choices`()

    Return type: | a list of (value,name) tuples

  `get_value`()

    Get the current value of the combobox

  `set_choices`(choices)

    Parameters: | choices – a list of (value,name) tuples. name will be displayed in the combobox,

    while value will be used within get_value and set_value. This method changes the items in the combo box while preserving the current value, even if this value is not in the new list of choices.

  `set_field_attributes`(editable=True, choices=None, **kwargs)
  `set_value`(value)

    Set the current value of the combobox where value, the name displayed is the one that matches the value in the list set with set_choices

  `valueChanged`

class `camelot.view.controls.editors.` `CodeEditor`(parent=None, parts=['99', 'AA'], editable=True, field_name='code', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `emit_editing_finished`()
  `get_value`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.` `ColoredFloatEditor`(parent, precision=2, reverse=False, neutral=False, option=None, field_name='float', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing a float field, with a calculator

  `calculation_finished`(value)
  `calculator_icon` = Icon('tango/16x16/apps/accessories-calculator.png')
  `get_value`()
  `go_down_blue` = Icon('tango/16x16/actions/go-down-blue.png')
  `go_down_red` = Icon('tango/16x16/actions/go-down-red.png')
  `go_up` = Icon('tango/16x16/actions/go-up.png')
  `go_up_blue` = Icon('tango/16x16/actions/go-up-blue.png')
  `popupCalculator`(value)
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, prefix='', suffix='', minimum=-1000000000000000.0, maximum=1000000000000000.0, single_step=1.0, **kwargs)
  `set_value`(value)
  `spinbox_editing_finished`()
  `zero` = Icon('tango/16x16/actions/zero.png')

class `camelot.view.controls.editors.` `ColorEditor`(parent=None, editable=True, field_name='color', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `buttonClicked`(raised)
  `getColor`()
  `get_value`()
  `setColor`(color)
  `set_enabled`(editable=True)
  `set_value`(value)

class `camelot.view.controls.editors.` `CustomEditor`(parent)

  Bases: `PyQt4.QtGui.QWidget`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  Base class for implementing custom editor widgets. This class provides dual state functionality. Each editor should have the posibility to have ValueLoading as its value, specifying that no value has been set yet.

  `editingFinished`
  `paintEvent`(event)
  `valueChanged`

class `camelot.view.controls.editors.` `DateEditor`(parent=None, editable=True, nullable=True, field_name='date', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing date values

  `calendar_action_trigger`
  `calendar_widget_activated`(date)
  `focusOutEvent`(event)
  `get_value`()
  `line_edit_finished`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_special_date`(action)
  `set_value`(value)
  `special_date_icon` = Icon('tango/16x16/apps/office-calendar.png')
  `text_edited`(text)

class `camelot.view.controls.editors.` `DateTimeEditor`(parent, editable=True, nullable=True, field_name='datetime', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing date and time separated and with popups

  `date`()
  `editing_finished`(_arg=None)
  `get_value`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)
  `time`()

class `camelot.view.controls.editors.` `EmbeddedMany2OneEditor`(admin=None, parent=None, field_name='embedded', size_policy=<PyQt4.QtGui.QSizePolicy object at 0x9f71bfc>, **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  Widget for editing a many 2 one relation a a form embedded in another form.

  @todo: properly take care of making the form editable or not, simply enabling or disabling the widget as a whole is not functional, since tabs don’t work in that case

  `setEntity`(entity_instance_getter, propagate=True)
  `set_field_attributes`(editable=True, **kwargs)
  `set_value`(value)
  `update_form`(update_form_and_propagate)

class `camelot.view.controls.editors.` `FileEditor`(parent=None, storage=None, field_name='file', remove_original=False, **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing File fields

  `clear_button_clicked`()
  `clear_icon` = Icon('tango/16x16/actions/edit-delete.png')
  `document_pixmap` = Icon('tango/16x16/mimetypes/x-office-document.png')
  `dragEnterEvent`(event)
  `dragMoveEvent`(event)
  `dropEvent`(event)
  `file_completion_activated`(index)
  `filter` = 'All files (*)'
  `get_value`()
  `new_icon` = Icon('tango/16x16/actions/list-add.png')
  `open_button_clicked`()
  `open_icon` = Icon('tango/16x16/actions/document-open.png')
  `save_as_button_clicked`()
  `save_as_icon` = Icon('tango/16x16/actions/document-save-as.png')
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, remove_original=False, **kwargs)
  `set_tab_order`()
  `set_value`(value)
  `setup_widget`()

    Called inside init, overwrite this method for custom file edit widgets

  `stored_file_ready`(stored_file)

    Slot to be called when a new stored_file has been created by the storage

class `camelot.view.controls.editors.` `FloatEditor`(parent, minimum=-1000000000000000.0, maximum=1000000000000000.0, calculator=True, decimal=False, option=None, field_name='float', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing a float field, with a calculator button. The calculator button can be turned of with the calculator field attribute.

  `calculation_finished`(value)
  `calculator_icon` = Icon('tango/16x16/apps/accessories-calculator.png')
  `get_value`()
  `popupCalculator`(value)
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, prefix='', suffix='', precision=2, single_step=1.0, **kwargs)
  `set_value`(value)
  `spinbox_editing_finished`()

class `camelot.view.controls.editors.` `ImageEditor`(parent=None, storage=None, preview_width=100, preview_height=100, field_name='image', **kwargs)

  Bases: `camelot.view.controls.editors.fileeditor.FileEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  Editor to view and edit image files, this is a customized implementation of a FileEditor

  `checkin_byte_array`(byte_array, suffix)

    Check a byte_array into the storage

  `clear_image`()
  `clipboard_data_changed`()
  `copy_to_clipboard`()

    Copy the image to the clipboard

  `draw_border`()
  `eventFilter`(object, event)
  `filter` = 'Image files (*.bmp *.jpg *.jpeg *.mng *.png *.pbm *.pgm *.ppm\n*.tiff *.xbm *.xpm) All files (*)'
  `paste_from_clipboard`()

    Paste an image from the clipboard into the editor

  `set_enabled`(editable=True)
  `set_image`(image)
  `set_image_to_clipboard`(image)
  `set_pixmap`(pixmap)
  `set_value`(value)
  `setup_widget`()
  `show_fullscreen`(image)

class `camelot.view.controls.editors.` `IntegerEditor`(parent=None, minimum=-2147483648, maximum=2147483647, calculator=True, option=None, field_name='integer', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing an integer field, with a calculator

  Special use cases of the IntegerEditor :

  we have a required integer field without a default.

  so the model will do set_value( None )

  since this is a required field, the user should be able to enter a value, 0 is a legitimate value.

  when get_value is called, 0 should be returned if the user has set the editor to 0, and None if the user didn’t touch the editor.

  so the editor should make a visual difference between None and 0, so the user can see he didn’t enter something yet

  we have a non required integer field without a default

  the model will do set_value( None )

  the get_value() should return None and not 0. because in case it returns 0, 0 will be written to the db, causing an unneeded update of the db.

  `calculation_finished`(value)
  `calculator_icon` = Icon('tango/16x16/apps/accessories-calculator.png')
  `get_value`()
  `popupCalculator`(value)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, prefix='', suffix='', nullable=True, single_step=1, **kwargs)
  `set_value`(value)
  `spinbox_editing_finished`()

class `camelot.view.controls.editors.` `LabelEditor`(parent=None, text='<loading>', field_name='label', **kwargs)

  Bases: `PyQt4.QtGui.QLabel`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  `editingFinished`
  `paintEvent`(event)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.` `LanguageEditor`(parent=None, languages=[], field_name='language', **kwargs)

  Bases: `PyQt4.QtGui.QComboBox`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  A ComboBox that shows a list of languages, the editor takes as its value the ISO code of the language

  `editingFinished`
  `get_value`()
  `language_choices` = []
  `set_value`(value)

class `camelot.view.controls.editors.` `LocalFileEditor`(parent=None, field_name='local_file', directory=False, save_as=False, file_filter='All files (*)', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for browsing local files and directories

  `browse_button_clicked`()
  `browse_icon` = Icon('tango/16x16/places/folder-saved-search.png')
  `filename_editing_finished`()
  `get_value`()
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)
  `setup_widget`()

    Called inside init, overwrite this method for custom file edit widgets

class `camelot.view.controls.editors.` `ManyToManyEditor`(admin=None, parent=None, create_inline=False, vertical_header_clickable=True, field_name='onetomany', **kw)

  Bases: `camelot.view.controls.editors.one2manyeditor.One2ManyEditor`, `camelot.view.controls.editors.abstractmanytooneeditor.AbstractManyToOneEditor`

  `add_icon` = Icon('tango/16x16/actions/list-add.png')
  `emit_editing_finished`(*args)
  `removeSelectedRows`()

    Remove the selected rows in this tableview, but don’t delete them

  `remove_icon` = Icon('tango/16x16/actions/list-remove.png')
  `selectEntity`(entity_instance_getter)
  `set_field_attributes`(editable=True, **kwargs)
  `setupButtons`(layout, _table)

class `camelot.view.controls.editors.` `Many2OneEditor`(admin=None, parent=None, editable=True, field_name='manytoone', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.abstractmanytooneeditor.AbstractManyToOneEditor`

  Widget for editing many 2 one relations

  class `CompletionsModel`(parent=None)

    Bases: `PyQt4.QtCore.QAbstractListModel`

    `columnCount`(index=None)
    `data`(index, role)
    `rowCount`(index=None)
    `setCompletions`(completions)
  `Many2OneEditor.` `arrow_down_key_pressed`
  `Many2OneEditor.` `completionActivated`(index)
  `Many2OneEditor.` `completion_highlighted`(index)
  `Many2OneEditor.` `createFormView`()
  `Many2OneEditor.` `createNew`(*args, **kwargs)
  `Many2OneEditor.` `dataChanged`(index1, index2)
  `Many2OneEditor.` `display_search_completions`(*args, **kwargs)
  `Many2OneEditor.` `get_value`()

    Returns: | a function that returns the selected entity or ValueLoading

    or None

  `Many2OneEditor.` `new_icon` = Icon('tango/16x16/actions/document-new.png')
  `Many2OneEditor.` `on_arrow_down_key_pressed`()
  `Many2OneEditor.` `openButtonClicked`()
  `Many2OneEditor.` `returnPressed`()
  `Many2OneEditor.` `searchButtonClicked`()
  `Many2OneEditor.` `search_completions`(*args, **kwargs)

    Search for object that match text, to fill the list of completions

    Returns: | a list of tuples of (object_representation, object_getter)

  `Many2OneEditor.` `search_icon` = Icon('tango/16x16/actions/system-search.png')
  `Many2OneEditor.` `search_input_editing_finished`()
  `Many2OneEditor.` `selectEntity`(entity_instance_getter)
  `Many2OneEditor.` `setEntity`(entity_instance_getter, propagate=True)
  `Many2OneEditor.` `set_editable`(editable)
  `Many2OneEditor.` `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `Many2OneEditor.` `set_instance_representation`(representation_and_propagate)

    Update the gui

  `Many2OneEditor.` `set_value`(value)

    Parameters: | value – either ValueLoading, or a function that returns None

    or the entity to be shown in the editor

  `Many2OneEditor.` `show_form_view`(admin_and_title)
  `Many2OneEditor.` `show_new_view`(*args, **kwargs)
  `Many2OneEditor.` `textEdited`(text)
  `Many2OneEditor.` `trashButtonClicked`()

class `camelot.view.controls.editors.` `MonthsEditor`(parent=None, editable=True, field_name='months', **kw)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  MonthsEditor

  composite months and years editor

  `get_value`()
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.` `NoteEditor`(parent=None, field_name='note', **kwargs)

  Bases: `PyQt4.QtGui.QLabel`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  An editor that behaves like a note, the editor hides itself when there is no text to display

  `editingFinished`
  `set_value`(value)

class `camelot.view.controls.editors.` `One2ManyEditor`(admin=None, parent=None, create_inline=False, vertical_header_clickable=True, field_name='onetomany', **kw)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  `activate_editor`(*args, **kwargs)
  `copy_icon` = Icon('tango/16x16/actions/edit-copy.png')
  `createFormForIndex`(index)
  `delete_icon` = Icon('tango/16x16/places/user-trash.png')
  `exportToExcel`()
  `getModel`()
  `newRow`()
  `new_icon` = Icon('tango/16x16/actions/document-new.png')
  `set_field_attributes`(editable=True, new_message=None, **kwargs)
  `set_value`(model)
  `setupButtons`(layout, table)
  `spreadsheet_icon` = Icon('tango/16x16/mimetypes/x-office-spreadsheet.png')
  `update_delegates`(*args)

class `camelot.view.controls.editors.` `OneToManyChoicesEditor`(parent, target=None, nullable=True, field_name='onetomanychoices', **kwargs)

  Bases: `camelot.view.controls.editors.choiceseditor.ChoicesEditor`

  `get_choices`()
  `set_field_attributes`(editable=True, **kwargs)

    Makes sure choices are not reset when changing the field attributes

class `camelot.view.controls.editors.` `RichTextEditor`(parent=None, field_name='richtext', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  `emit_editing_finished`()
  `get_value`()
  `initToolbar`()
  `set_aligncenter`(bool)
  `set_alignleft`(bool)
  `set_alignright`(bool)
  `set_bold`()
  `set_color`()
  `set_editable`(editable)
  `set_field_attributes`(editable=True, background_color=None, **kwargs)
  `set_italic`(bool)
  `set_underline`(bool)
  `set_value`(value)
  `update_alignment`(al=None)
  `update_color`()
  `update_format`(format)
  `update_text`()

class `camelot.view.controls.editors.` `StarEditor`(parent, maximum=5, editable=True, field_name='star', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `get_value`()
  `no_star_icon` = Icon('tango/16x16/status/weather-clear-noStar.png')
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_value`(value)
  `starClick`(value)
  `star_icon` = Icon('tango/16x16/status/weather-clear.png')

class `camelot.view.controls.editors.` `TextLineEditor`(parent, length=20, field_name='text_line', **kwargs)

  Bases: `PyQt4.QtGui.QLineEdit`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  `get_value`()
  `paintEvent`(event)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.` `TimeEditor`(parent, editable=True, field_name='time', format='hh:mm', **kwargs)

  Bases: `PyQt4.QtGui.QTimeEdit`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  `get_value`()
  `paintEvent`(event)
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.` `VirtualAddressEditor`(parent=None, editable=True, address_type=None, address_validator=<function default_address_validator at 0x9e688b4>, field_name='virtual_address', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `checkValue`(text)
  `comboIndexChanged`()
  `editorValueChanged`(text)
  `emit_editing_finished`()
  `get_value`()
  `mail_click`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.` `SmileyEditor`(parent, editable=True, icons=[('face-angel', Icon('tango/16x16/emotes/face-angel.png')), ('face-crying', Icon('tango/16x16/emotes/face-crying.png')), ('face-devilish', Icon('tango/16x16/emotes/face-devilish.png')), ('face-glasses', Icon('tango/16x16/emotes/face-glasses.png')), ('face-grin', Icon('tango/16x16/emotes/face-grin.png')), ('face-kiss', Icon('tango/16x16/emotes/face-kiss.png')), ('face-monkey', Icon('tango/16x16/emotes/face-monkey.png')), ('face-plain', Icon('tango/16x16/emotes/face-plain.png')), ('face-sad', Icon('tango/16x16/emotes/face-sad.png')), ('face-smile', Icon('tango/16x16/emotes/face-smile.png')), ('face-smile-big', Icon('tango/16x16/emotes/face-smile-big.png')), ('face-surprise', Icon('tango/16x16/emotes/face-surprise.png')), ('face-wink', Icon('tango/16x16/emotes/face-wink.png'))], field_name='icons', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `get_value`()
  `set_enabled`(editable=True)
  `set_value`(value)
  `smiley_changed`()

class `camelot.view.controls.editors.` `TextBoolEditor`(parent=None, yes='Yes', no='No', color_yes=None, color_no=None, **kwargs)

  Bases: `PyQt4.QtGui.QLabel`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  Parameter : | color_yes: string text-color of the True representation color_no: string text-color of the False representation

  `editingFinished`
  `set_value`(value)

class `camelot.view.controls.editors.` `TextEditEditor`(parent, length=20, editable=True, field_name='text', **kwargs)

  Bases: `PyQt4.QtGui.QTextEdit`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  `editingFinished`
  `get_value`()
  `set_enabled`(editable=True)
  `set_value`(value)

class `camelot.view.controls.editors.` `WideEditor`

  Bases: `object`

  Class signaling that an editor, is a wide editor, so it’s label should be displayed on top of the editor and the editor itself should take two columns:

      class WideTextLineEditor(TextLineEditor, WideEditor):
        pass

  will generate a test line editor where the text line takes the whole with of the form

## `abstractmanytooneeditor` Module

class `camelot.view.controls.editors.abstractmanytooneeditor.` `AbstractManyToOneEditor`

  Bases: `object`

  Helper functions for implementing a ManyToOneEditor, to be used in the ManyToOneEditor and in the ManyToManyEditor

  `createSelectView`()
  `selectEntity`(entity_instance_getter)

## `booleditor` Module

class `camelot.view.controls.editors.booleditor.` `BoolEditor`(parent=None, minimum=-2147483648, maximum=2147483647, nullable=True, field_name='boolean', **kwargs)

  Bases: `PyQt4.QtGui.QCheckBox`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  Widget for editing a boolean field

  `editingFinished`
  `get_value`()
  `set_enabled`(editable=True)
  `set_value`(value)
  `sizeHint`()

class `camelot.view.controls.editors.booleditor.` `TextBoolEditor`(parent=None, yes='Yes', no='No', color_yes=None, color_no=None, **kwargs)

  Bases: `PyQt4.QtGui.QLabel`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  Parameter : | color_yes: string text-color of the True representation color_no: string text-color of the False representation

  `editingFinished`
  `set_value`(value)

## `charteditor` Module

class `camelot.view.controls.editors.charteditor.` `ChartEditor`(parent=None, width=50, height=40, dpi=50, field_name='chart', **kwargs)

  Bases: `PyQt4.QtGui.QFrame`, `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  Editor to display and manipulate matplotlib charts. The editor itself is generic for all kinds of plots, it simply provides the data to be ploted with a set of axes. The data itself should know how exactly to plot itself.

  `copy_to_clipboard`()

    Copy the chart to the clipboard

  `editingFinished`
  `eventFilter`(object, event)

    intercept mouse clicks on a chart to show the chart fullscreen

  `on_draw`()

    draw the matplotlib figure on the canvas

  `on_paint_request`(printer)
  `print_preview`()

    Popup a print preview dialog for the Chart

  `set_field_attributes`(*args, **kwargs)

    Overwrite set_field attributes because a ChartEditor cannot be disabled or have its background color changed

  `set_value`(value)

    Accepts a camelot.container.chartcontainer.FigureContainer or a camelot.container.chartcontainer.AxesContainer

  `show_fullscreen`()

    Show the plot full screen, using the litebox

  static `show_fullscreen_chart`(chart, parent)

    Parameters: | chart – a chart container
    Returns: | the widget showing the chart, by default a LiteBoxView

  `show_fullscreen_signal`

## `choiceseditor` Module

class `camelot.view.controls.editors.choiceseditor.` `ChoicesEditor`(parent=None, nullable=True, field_name='choices', **kwargs)

  Bases: `PyQt4.QtGui.QComboBox`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  A ComboBox aka Drop Down box that can be assigned a list of keys and values

  `editingFinished`
  `get_choices`()

    Return type: | a list of (value,name) tuples

  `get_value`()

    Get the current value of the combobox

  `set_choices`(choices)

    Parameters: | choices – a list of (value,name) tuples. name will be displayed in the combobox,

    while value will be used within get_value and set_value. This method changes the items in the combo box while preserving the current value, even if this value is not in the new list of choices.

  `set_field_attributes`(editable=True, choices=None, **kwargs)
  `set_value`(value)

    Set the current value of the combobox where value, the name displayed is the one that matches the value in the list set with set_choices

  `valueChanged`

## `codeeditor` Module

class `camelot.view.controls.editors.codeeditor.` `CodeEditor`(parent=None, parts=['99', 'AA'], editable=True, field_name='code', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `emit_editing_finished`()
  `get_value`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.codeeditor.` `PartEditor`(mask, max_length, first=False, last=False)

  Bases: `PyQt4.QtGui.QLineEdit`

  `focusInEvent`(event)
  `focusOutEvent`(event)
  `paintEvent`(event)
  `text_edited`(text)

## `coloredfloateditor` Module

class `camelot.view.controls.editors.coloredfloateditor.` `ColoredFloatEditor`(parent, precision=2, reverse=False, neutral=False, option=None, field_name='float', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing a float field, with a calculator

  `calculation_finished`(value)
  `calculator_icon` = Icon('tango/16x16/apps/accessories-calculator.png')
  `get_value`()
  `go_down_blue` = Icon('tango/16x16/actions/go-down-blue.png')
  `go_down_red` = Icon('tango/16x16/actions/go-down-red.png')
  `go_up` = Icon('tango/16x16/actions/go-up.png')
  `go_up_blue` = Icon('tango/16x16/actions/go-up-blue.png')
  `popupCalculator`(value)
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, prefix='', suffix='', minimum=-1000000000000000.0, maximum=1000000000000000.0, single_step=1.0, **kwargs)
  `set_value`(value)
  `spinbox_editing_finished`()
  `zero` = Icon('tango/16x16/actions/zero.png')

## `coloreditor` Module

class `camelot.view.controls.editors.coloreditor.` `ColorEditor`(parent=None, editable=True, field_name='color', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `buttonClicked`(raised)
  `getColor`()
  `get_value`()
  `setColor`(color)
  `set_enabled`(editable=True)
  `set_value`(value)

## `customeditor` Module

class `camelot.view.controls.editors.customeditor.` `AbstractCustomEditor`

  Bases: `object`

  Helper class to be used to build custom editors. This class provides functionality to store and retrieve ValueLoading as an editor’s value.

  Guidelines for implementing CustomEditors :

  - When an editor consists of multiple widgets, one widget must be the focusProxy of the editor, to have that widget immediately activated when the user single clicks in the table view.
  - When an editor has widgets that should not get selected when the user tabs through the editor, setFocusPolicy(Qt.ClickFocus) should be called on those widgets.
  `get_height`()
  `get_value`()
  `set_background_color`(background_color)
  `set_field_attributes`(editable=True, background_color=None, tooltip='', **kwargs)
  `set_value`(value)

class `camelot.view.controls.editors.customeditor.` `CustomEditor`(parent)

  Bases: `PyQt4.QtGui.QWidget`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  Base class for implementing custom editor widgets. This class provides dual state functionality. Each editor should have the posibility to have ValueLoading as its value, specifying that no value has been set yet.

  `editingFinished`
  `paintEvent`(event)
  `valueChanged`

`camelot.view.controls.editors.customeditor.` `draw_tooltip_visualization`(widget)

  Draws a small visual indication in the top-left corner of a widget. :param widget: a QWidget

`camelot.view.controls.editors.customeditor.` `set_background_color_palette`(widget, background_color)

  Set the palette of a widget to have a cerain background color. :param widget: a QWidget :param background_color: a QColor

## `dateeditor` Module

class `camelot.view.controls.editors.dateeditor.` `DateEditor`(parent=None, editable=True, nullable=True, field_name='date', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing date values

  `calendar_action_trigger`
  `calendar_widget_activated`(date)
  `focusOutEvent`(event)
  `get_value`()
  `line_edit_finished`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_special_date`(action)
  `set_value`(value)
  `special_date_icon` = Icon('tango/16x16/apps/office-calendar.png')
  `text_edited`(text)

## `datetimeeditor` Module

class `camelot.view.controls.editors.datetimeeditor.` `DateTimeEditor`(parent, editable=True, nullable=True, field_name='datetime', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing date and time separated and with popups

  `date`()
  `editing_finished`(_arg=None)
  `get_value`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)
  `time`()

class `camelot.view.controls.editors.datetimeeditor.` `TimeValidator`(parent, nullable)

  Bases: `PyQt4.QtGui.QValidator`

  `validate`(input, pos)

## `embeddedmany2oneeditor` Module

class `camelot.view.controls.editors.embeddedmany2oneeditor.` `EmbeddedMany2OneEditor`(admin=None, parent=None, field_name='embedded', size_policy=<PyQt4.QtGui.QSizePolicy object at 0x9f71bfc>, **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  Widget for editing a many 2 one relation a a form embedded in another form.

  @todo: properly take care of making the form editable or not, simply enabling or disabling the widget as a whole is not functional, since tabs don’t work in that case

  `setEntity`(entity_instance_getter, propagate=True)
  `set_field_attributes`(editable=True, **kwargs)
  `set_value`(value)
  `update_form`(update_form_and_propagate)

## `fileeditor` Module

class `camelot.view.controls.editors.fileeditor.` `FileEditor`(parent=None, storage=None, field_name='file', remove_original=False, **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing File fields

  `clear_button_clicked`()
  `clear_icon` = Icon('tango/16x16/actions/edit-delete.png')
  `document_pixmap` = Icon('tango/16x16/mimetypes/x-office-document.png')
  `dragEnterEvent`(event)
  `dragMoveEvent`(event)
  `dropEvent`(event)
  `file_completion_activated`(index)
  `filter` = 'All files (*)'
  `get_value`()
  `new_icon` = Icon('tango/16x16/actions/list-add.png')
  `open_button_clicked`()
  `open_icon` = Icon('tango/16x16/actions/document-open.png')
  `save_as_button_clicked`()
  `save_as_icon` = Icon('tango/16x16/actions/document-save-as.png')
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, remove_original=False, **kwargs)
  `set_tab_order`()
  `set_value`(value)
  `setup_widget`()

    Called inside init, overwrite this method for custom file edit widgets

  `stored_file_ready`(stored_file)

    Slot to be called when a new stored_file has been created by the storage

## `floateditor` Module

class `camelot.view.controls.editors.floateditor.` `CustomDoubleSpinBox`(option=None, parent=None)

  Bases: `PyQt4.QtGui.QDoubleSpinBox`

  Spinbox that doesn’t accept mouse scrolling as input

  `keyPressEvent`(key_event)
  `paintEvent`(event)
  `textFromValue`(value)
  `wheelEvent`(wheel_event)

class `camelot.view.controls.editors.floateditor.` `FloatEditor`(parent, minimum=-1000000000000000.0, maximum=1000000000000000.0, calculator=True, decimal=False, option=None, field_name='float', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing a float field, with a calculator button. The calculator button can be turned of with the calculator field attribute.

  `calculation_finished`(value)
  `calculator_icon` = Icon('tango/16x16/apps/accessories-calculator.png')
  `get_value`()
  `popupCalculator`(value)
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, prefix='', suffix='', precision=2, single_step=1.0, **kwargs)
  `set_value`(value)
  `spinbox_editing_finished`()

## `imageeditor` Module

class `camelot.view.controls.editors.imageeditor.` `ImageEditor`(parent=None, storage=None, preview_width=100, preview_height=100, field_name='image', **kwargs)

  Bases: `camelot.view.controls.editors.fileeditor.FileEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  Editor to view and edit image files, this is a customized implementation of a FileEditor

  `checkin_byte_array`(byte_array, suffix)

    Check a byte_array into the storage

  `clear_image`()
  `clipboard_data_changed`()
  `copy_to_clipboard`()

    Copy the image to the clipboard

  `draw_border`()
  `eventFilter`(object, event)
  `filter` = 'Image files (*.bmp *.jpg *.jpeg *.mng *.png *.pbm *.pgm *.ppm\n*.tiff *.xbm *.xpm) All files (*)'
  `paste_from_clipboard`()

    Paste an image from the clipboard into the editor

  `set_enabled`(editable=True)
  `set_image`(image)
  `set_image_to_clipboard`(image)
  `set_pixmap`(pixmap)
  `set_value`(value)
  `setup_widget`()
  `show_fullscreen`(image)

## `integereditor` Module

class `camelot.view.controls.editors.integereditor.` `IntegerEditor`(parent=None, minimum=-2147483648, maximum=2147483647, calculator=True, option=None, field_name='integer', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for editing an integer field, with a calculator

  Special use cases of the IntegerEditor :

  we have a required integer field without a default.

  so the model will do set_value( None )

  since this is a required field, the user should be able to enter a value, 0 is a legitimate value.

  when get_value is called, 0 should be returned if the user has set the editor to 0, and None if the user didn’t touch the editor.

  so the editor should make a visual difference between None and 0, so the user can see he didn’t enter something yet

  we have a non required integer field without a default

  the model will do set_value( None )

  the get_value() should return None and not 0. because in case it returns 0, 0 will be written to the db, causing an unneeded update of the db.

  `calculation_finished`(value)
  `calculator_icon` = Icon('tango/16x16/apps/accessories-calculator.png')
  `get_value`()
  `popupCalculator`(value)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, prefix='', suffix='', nullable=True, single_step=1, **kwargs)
  `set_value`(value)
  `spinbox_editing_finished`()

## `labeleditor` Module

class `camelot.view.controls.editors.labeleditor.` `LabelEditor`(parent=None, text='<loading>', field_name='label', **kwargs)

  Bases: `PyQt4.QtGui.QLabel`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  `editingFinished`
  `paintEvent`(event)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

## `languageeditor` Module

class `camelot.view.controls.editors.languageeditor.` `LanguageEditor`(parent=None, languages=[], field_name='language', **kwargs)

  Bases: `PyQt4.QtGui.QComboBox`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  A ComboBox that shows a list of languages, the editor takes as its value the ISO code of the language

  `editingFinished`
  `get_value`()
  `language_choices` = []
  `set_value`(value)

## `localfileeditor` Module

class `camelot.view.controls.editors.localfileeditor.` `LocalFileEditor`(parent=None, field_name='local_file', directory=False, save_as=False, file_filter='All files (*)', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  Widget for browsing local files and directories

  `browse_button_clicked`()
  `browse_icon` = Icon('tango/16x16/places/folder-saved-search.png')
  `filename_editing_finished`()
  `get_value`()
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)
  `setup_widget`()

    Called inside init, overwrite this method for custom file edit widgets

## `many2oneeditor` Module

class `camelot.view.controls.editors.many2oneeditor.` `Many2OneEditor`(admin=None, parent=None, editable=True, field_name='manytoone', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.abstractmanytooneeditor.AbstractManyToOneEditor`

  Widget for editing many 2 one relations

  class `CompletionsModel`(parent=None)

    Bases: `PyQt4.QtCore.QAbstractListModel`

    `columnCount`(index=None)
    `data`(index, role)
    `rowCount`(index=None)
    `setCompletions`(completions)
  `Many2OneEditor.` `arrow_down_key_pressed`
  `Many2OneEditor.` `completionActivated`(index)
  `Many2OneEditor.` `completion_highlighted`(index)
  `Many2OneEditor.` `createFormView`()
  `Many2OneEditor.` `createNew`(*args, **kwargs)
  `Many2OneEditor.` `dataChanged`(index1, index2)
  `Many2OneEditor.` `display_search_completions`(*args, **kwargs)
  `Many2OneEditor.` `get_value`()

    Returns: | a function that returns the selected entity or ValueLoading

    or None

  `Many2OneEditor.` `new_icon` = Icon('tango/16x16/actions/document-new.png')
  `Many2OneEditor.` `on_arrow_down_key_pressed`()
  `Many2OneEditor.` `openButtonClicked`()
  `Many2OneEditor.` `returnPressed`()
  `Many2OneEditor.` `searchButtonClicked`()
  `Many2OneEditor.` `search_completions`(*args, **kwargs)

    Search for object that match text, to fill the list of completions

    Returns: | a list of tuples of (object_representation, object_getter)

  `Many2OneEditor.` `search_icon` = Icon('tango/16x16/actions/system-search.png')
  `Many2OneEditor.` `search_input_editing_finished`()
  `Many2OneEditor.` `selectEntity`(entity_instance_getter)
  `Many2OneEditor.` `setEntity`(entity_instance_getter, propagate=True)
  `Many2OneEditor.` `set_editable`(editable)
  `Many2OneEditor.` `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `Many2OneEditor.` `set_instance_representation`(representation_and_propagate)

    Update the gui

  `Many2OneEditor.` `set_value`(value)

    Parameters: | value – either ValueLoading, or a function that returns None

    or the entity to be shown in the editor

  `Many2OneEditor.` `show_form_view`(admin_and_title)
  `Many2OneEditor.` `show_new_view`(*args, **kwargs)
  `Many2OneEditor.` `textEdited`(text)
  `Many2OneEditor.` `trashButtonClicked`()

## `manytomanyeditor` Module

class `camelot.view.controls.editors.manytomanyeditor.` `ManyToManyEditor`(admin=None, parent=None, create_inline=False, vertical_header_clickable=True, field_name='onetomany', **kw)

  Bases: `camelot.view.controls.editors.one2manyeditor.One2ManyEditor`, `camelot.view.controls.editors.abstractmanytooneeditor.AbstractManyToOneEditor`

  `add_icon` = Icon('tango/16x16/actions/list-add.png')
  `emit_editing_finished`(*args)
  `removeSelectedRows`()

    Remove the selected rows in this tableview, but don’t delete them

  `remove_icon` = Icon('tango/16x16/actions/list-remove.png')
  `selectEntity`(entity_instance_getter)
  `set_field_attributes`(editable=True, **kwargs)
  `setupButtons`(layout, _table)

## `monthseditor` Module

class `camelot.view.controls.editors.monthseditor.` `MonthsEditor`(parent=None, editable=True, field_name='months', **kw)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  MonthsEditor

  composite months and years editor

  `get_value`()
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

## `noteeditor` Module

class `camelot.view.controls.editors.noteeditor.` `NoteEditor`(parent=None, field_name='note', **kwargs)

  Bases: `PyQt4.QtGui.QLabel`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  An editor that behaves like a note, the editor hides itself when there is no text to display

  `editingFinished`
  `set_value`(value)

## `one2manyeditor` Module

class `camelot.view.controls.editors.one2manyeditor.` `One2ManyEditor`(admin=None, parent=None, create_inline=False, vertical_header_clickable=True, field_name='onetomany', **kw)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  `activate_editor`(*args, **kwargs)
  `copy_icon` = Icon('tango/16x16/actions/edit-copy.png')
  `createFormForIndex`(index)
  `delete_icon` = Icon('tango/16x16/places/user-trash.png')
  `exportToExcel`()
  `getModel`()
  `newRow`()
  `new_icon` = Icon('tango/16x16/actions/document-new.png')
  `set_field_attributes`(editable=True, new_message=None, **kwargs)
  `set_value`(model)
  `setupButtons`(layout, table)
  `spreadsheet_icon` = Icon('tango/16x16/mimetypes/x-office-spreadsheet.png')
  `update_delegates`(*args)

## `onetomanychoiceseditor` Module

class `camelot.view.controls.editors.onetomanychoiceseditor.` `OneToManyChoicesEditor`(parent, target=None, nullable=True, field_name='onetomanychoices', **kwargs)

  Bases: `camelot.view.controls.editors.choiceseditor.ChoicesEditor`

  `get_choices`()
  `set_field_attributes`(editable=True, **kwargs)

    Makes sure choices are not reset when changing the field attributes

## `richtexteditor` Module

class `camelot.view.controls.editors.richtexteditor.` `CustomTextEdit`(parent)

  Bases: `PyQt4.QtGui.QTextEdit`

  A TextEdit editor that sends editingFinished events when the text was changed and focus is lost.

  `editingFinished`
  `focusInEvent`(event)
  `focusOutEvent`(event)
  `receivedFocus`
  `setHtml`(html)
  `setTextChanged`(state=True)

class `camelot.view.controls.editors.richtexteditor.` `RichTextEditor`(parent=None, field_name='richtext', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  `emit_editing_finished`()
  `get_value`()
  `initToolbar`()
  `set_aligncenter`(bool)
  `set_alignleft`(bool)
  `set_alignright`(bool)
  `set_bold`()
  `set_color`()
  `set_editable`(editable)
  `set_field_attributes`(editable=True, background_color=None, **kwargs)
  `set_italic`(bool)
  `set_underline`(bool)
  `set_value`(value)
  `update_alignment`(al=None)
  `update_color`()
  `update_format`(format)
  `update_text`()

## `smileyeditor` Module

class `camelot.view.controls.editors.smileyeditor.` `SmileyEditor`(parent, editable=True, icons=[('face-angel', Icon('tango/16x16/emotes/face-angel.png')), ('face-crying', Icon('tango/16x16/emotes/face-crying.png')), ('face-devilish', Icon('tango/16x16/emotes/face-devilish.png')), ('face-glasses', Icon('tango/16x16/emotes/face-glasses.png')), ('face-grin', Icon('tango/16x16/emotes/face-grin.png')), ('face-kiss', Icon('tango/16x16/emotes/face-kiss.png')), ('face-monkey', Icon('tango/16x16/emotes/face-monkey.png')), ('face-plain', Icon('tango/16x16/emotes/face-plain.png')), ('face-sad', Icon('tango/16x16/emotes/face-sad.png')), ('face-smile', Icon('tango/16x16/emotes/face-smile.png')), ('face-smile-big', Icon('tango/16x16/emotes/face-smile-big.png')), ('face-surprise', Icon('tango/16x16/emotes/face-surprise.png')), ('face-wink', Icon('tango/16x16/emotes/face-wink.png'))], field_name='icons', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `get_value`()
  `set_enabled`(editable=True)
  `set_value`(value)
  `smiley_changed`()

## `stareditor` Module

class `camelot.view.controls.editors.stareditor.` `StarEditor`(parent, maximum=5, editable=True, field_name='star', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `get_value`()
  `no_star_icon` = Icon('tango/16x16/status/weather-clear-noStar.png')
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_value`(value)
  `starClick`(value)
  `star_icon` = Icon('tango/16x16/status/weather-clear.png')

## `textediteditor` Module

class `camelot.view.controls.editors.textediteditor.` `TextEditEditor`(parent, length=20, editable=True, field_name='text', **kwargs)

  Bases: `PyQt4.QtGui.QTextEdit`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`, `camelot.view.controls.editors.wideeditor.WideEditor`

  `editingFinished`
  `get_value`()
  `set_enabled`(editable=True)
  `set_value`(value)

## `textlineeditor` Module

class `camelot.view.controls.editors.textlineeditor.` `TextLineEditor`(parent, length=20, field_name='text_line', **kwargs)

  Bases: `PyQt4.QtGui.QLineEdit`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  `get_value`()
  `paintEvent`(event)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

## `timeeditor` Module

class `camelot.view.controls.editors.timeeditor.` `TimeEditor`(parent, editable=True, field_name='time', format='hh:mm', **kwargs)

  Bases: `PyQt4.QtGui.QTimeEdit`, `camelot.view.controls.editors.customeditor.AbstractCustomEditor`

  `get_value`()
  `paintEvent`(event)
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

## `virtualaddresseditor` Module

class `camelot.view.controls.editors.virtualaddresseditor.` `VirtualAddressEditor`(parent=None, editable=True, address_type=None, address_validator=<function default_address_validator at 0x9e688b4>, field_name='virtual_address', **kwargs)

  Bases: `camelot.view.controls.editors.customeditor.CustomEditor`

  `checkValue`(text)
  `comboIndexChanged`()
  `editorValueChanged`(text)
  `emit_editing_finished`()
  `get_value`()
  `mail_click`()
  `set_background_color`(background_color)
  `set_enabled`(editable=True)
  `set_field_attributes`(editable=True, background_color=None, tooltip=None, **kwargs)
  `set_value`(value)

`camelot.view.controls.editors.virtualaddresseditor.` `default_address_validator`(address_type, address)

  Validates wether a virtual address is valid and correct it if possible. :param address_type: the type of address to validate, eg ‘phone’ :param address: the address itself :return: (valid, corrected_address) a tuple with a :type:`boolean`

  > indicating if the address is valid and a string with the corrected address.

## `wideeditor` Module

class `camelot.view.controls.editors.wideeditor.` `WideEditor`

  Bases: `object`

  Class signaling that an editor, is a wide editor, so it’s label should be displayed on top of the editor and the editor itself should take two columns:

      class WideTextLineEditor(TextLineEditor, WideEditor):
        pass

  will generate a test line editor where the text line takes the whole with of the form

### Navigation

- index
- modules |
- Camelot documentation »

Comments
blog comments powered by Disqus