This class contains common code for python editors.
More...
#include <PythonCodeContainer.hpp>
Inherits QPlainTextEdit.
Inherited by PythonCodeEditor, and PythonConsole.
|
| void | toggle_break_point (int fragment_block, int line_number, bool send=true) |
| | Send a toggle break command to the script engine. More...
|
| |
| void | keyPressEvent (QKeyEvent *e) |
| | manage some typing behaviour then call key_press_event to propagate the event to the inherited class More...
|
| |
| void | resizeEvent (QResizeEvent *e) |
| | repaint the border area More...
|
| |
| void | mouseMoveEvent (QMouseEvent *e) |
| | start a timer when the mouse is on a word, the timer will make a request_documentation for this word More...
|
| |
| void | leaveEvent (QEvent *) |
| | stop the documentation timer More...
|
| |
| QMimeData * | createMimeDataFromSelection () const |
| | create a mimeData with a preview of the selected text More...
|
| |
| bool | canInsertFromMimeData (const QMimeData *source) const |
| | allow to drop text mimeData and QListWidgetItem mimeData More...
|
| |
| void | insertFromMimeData (const QMimeData *source) |
| | call insert_text with the extracted mimeData More...
|
| |
| virtual void | key_press_event (QKeyEvent *e)=0 |
| | call after the the common text More...
|
| |
| virtual void | new_line (int indent_number) |
| | allow the console to known when execute a inputed code More...
|
| |
| virtual bool | editable_zone (const QTextCursor &cursor)=0 |
| | allow the python container to known if the position of the cursor is writable, used for the python console More...
|
| |
| virtual void | insert_text (const QString &text)=0 |
| | ask a text insertion to the inherited class More...
|
| |
This class contains common code for python editors.
Definition at line 45 of file PythonCodeContainer.hpp.
Use to manage userData in a QTextBlock.
| Enumerator |
|---|
| PROMPT_1 |
|
| PROMPT_2 |
|
| LINE_NUMBER |
|
Definition at line 50 of file PythonCodeContainer.hpp.
| virtual void border_click |
( |
const QPoint & |
pos | ) |
|
|
pure virtual |
| bool canInsertFromMimeData |
( |
const QMimeData * |
source | ) |
const |
|
protected |
| QMimeData * createMimeDataFromSelection |
( |
| ) |
const |
|
protected |
| virtual bool editable_zone |
( |
const QTextCursor & |
cursor | ) |
|
|
protectedpure virtual |
allow the python container to known if the position of the cursor is writable, used for the python console
Implemented in PythonConsole, and PythonCodeEditor.
| QString get_word_under_cursor |
( |
QTextCursor & |
c | ) |
|
|
private |
| void insert_completion |
( |
QString |
completion | ) |
|
|
protectedslot |
| virtual void insert_text |
( |
const QString & |
text | ) |
|
|
protectedpure virtual |
| void insertFromMimeData |
( |
const QMimeData * |
source | ) |
|
|
protected |
| virtual void key_press_event |
( |
QKeyEvent * |
e | ) |
|
|
protectedpure virtual |
| void keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
protected |
manage some typing behaviour then call key_press_event to propagate the event to the inherited class
Definition at line 192 of file PythonCodeContainer.cpp.
| void keywords_changed |
( |
const QStringList & |
add, |
|
|
const QStringList & |
sub |
|
) |
| |
|
protectedslot |
| void leaveEvent |
( |
QEvent * |
e | ) |
|
|
protected |
| void mouseMoveEvent |
( |
QMouseEvent * |
e | ) |
|
|
protected |
start a timer when the mouse is on a word, the timer will make a request_documentation for this word
Definition at line 276 of file PythonCodeContainer.cpp.
| virtual void new_line |
( |
int |
indent_number | ) |
|
|
inlineprotectedvirtual |
| void popup_documentation |
( |
const QString & |
documentation | ) |
|
|
protectedslot |
| void repaint_border_area |
( |
QPaintEvent * |
event | ) |
|
called by the border area on repaint event, display the line numbers from QTextBlock::userState
Definition at line 118 of file PythonCodeContainer.cpp.
| void request_documentation |
( |
| ) |
|
|
protectedslot |
| void resizeEvent |
( |
QResizeEvent * |
e | ) |
|
|
protected |
| void toggle_break_point |
( |
int |
fragment_block, |
|
|
int |
line_number, |
|
|
bool |
send = true |
|
) |
| |
|
protected |
| void update_border_area |
( |
const QRect & |
rect, |
|
|
int |
dy |
|
) |
| |
|
protectedslot |
connected to the scrollbar signal of the code zone, ask to the border area to do a repaint
Definition at line 108 of file PythonCodeContainer.cpp.
| QVector<int> break_points |
|
protected |
| QString last_documentation |
|
private |
| QString last_documented_word |
|
private |
| QStandardItemModel python_dictionary |
|
staticprotected |
| QTreeView * python_scope_values =NULL |
|
staticprotected |
The documentation for this class was generated from the following files: