class openalea.oalab.editor.text_editor.RichTextEditor(parent=None)[source]

Bases: PySide.QtGui.QWidget

actions()[source]
Returns:list of actions to set in the menu.
comment()[source]
get_code(start='sof', end='eof')[source]
get_selected_text()[source]
get_text(start='sof', end='eof')[source]

Return a part of the text.

Parameters:
  • start -- is the begining of what you want to get
  • end -- is the end of what you want to get
Returns:

text which is contained in the editor between 'start' and 'end'

goto()[source]
mainMenu()[source]
redo()[source]
replace_tab()[source]
search()[source]
set_script(txt)

Set text in the editor

Parameters:text -- text you want to set
set_text(txt)[source]

Set text in the editor

Parameters:text -- text you want to set
uncomment()[source]
undo()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2adeeabeeab8>
textChanged = <PySide.QtCore.Signal object at 0x2adee9ef46c0>
class openalea.oalab.editor.text_editor.TextEditor(parent=None)[source]

Bases: PySide.QtGui.QTextEdit

actions()[source]
Returns:list of actions to set in the menu.
check_code()[source]

Check if code follow PEP-8 guide-lines thanks to module flake8.

comment()[source]
display_line_number()[source]
focusInEvent(event)[source]
get_selected_text()[source]
get_text(start='sof', end='eof')[source]

Return a part of the text.

Parameters:
  • start -- is the begining of what you want to get
  • end -- is the end of what you want to get
Returns:

text which is contained in the editor between 'start' and 'end'

go_to_line(lineno)[source]
insertCompletion(completion)[source]
keyPressEvent(event)[source]
mainMenu()[source]
read_settings()[source]
replace_tab()[source]

replace tab by spaces

TODO: test it

resizeEvent(event)[source]
returnEvent()[source]
scrollContentsBy(dx, dy)[source]
setCompleter(completer)[source]
setText(txt)[source]
set_font(font_name)[source]

Change the current font by name.

Use:self.set_font("Courier")
set_font_size(size)[source]

Change the current font size.

Not used for the moment!

set_script(txt)

Set text in the editor

Parameters:text -- text you want to set
set_tab_size()[source]
set_text(txt)[source]

Set text in the editor

Parameters:text -- text you want to set
show_tab_and_spaces(show=True)[source]

Display spaces and tabs.

Parameters:show -- if true display tabs and spaces, else hide them
textUnderCursor()[source]
uncomment()[source]
write_settings()[source]
staticMetaObject = <PySide.QtCore.QMetaObject object at 0x2adeeabee878>
openalea.oalab.editor.text_editor.fix_indentation(text, n=4)[source]

Replace tabs by n spaces

openalea.oalab.editor.text_editor.main()[source]

Previous topic

<no title>

Next topic

openalea.oalab.fspm package

This Page