#include <TextEdit.h>
Public Member Functions | |
void | lineNumberAreaPaintEvent (QPaintEvent *) |
int | lineNumberAreaWidth () |
void | OnChange (Base::Subject< const char * > &rCaller, const char *rcReason) |
Sets the font, font size and tab size of the editor. | |
void | setSyntaxHighlighter (SyntaxHighlighter *) |
TextEditor (QWidget *parent=0) | |
Constructs a TextEditor which is a child of 'parent' and does the syntax highlighting for the Python language. | |
~TextEditor () | |
Destroys the object and frees any allocated resources. | |
Protected Member Functions | |
virtual void | drawMarker (int line, int x, int y, QPainter *) |
void | keyPressEvent (QKeyEvent *e) |
Set the approproriate item of the completion box or hide it, if needed. | |
void | paintEvent (QPaintEvent *e) |
Draw a beam in the line where the cursor is. | |
void | resizeEvent (QResizeEvent *e) |
Friends | |
class | SyntaxHighlighter |
Definition at line 78 of file TextEdit.h.
TextEditor::TextEditor | ( | QWidget * | parent = 0 |
) |
Constructs a TextEditor which is a child of 'parent' and does the syntax highlighting for the Python language.
Definition at line 204 of file TextEdit.cpp.
References draftlibs::fcgeo::connect(), and Gui::WindowParameter::getWindowParameter().
TextEditor::~TextEditor | ( | ) |
Destroys the object and frees any allocated resources.
Definition at line 233 of file TextEdit.cpp.
References Gui::WindowParameter::getWindowParameter().
void TextEditor::drawMarker | ( | int | line, | |
int | x, | |||
int | y, | |||
QPainter * | p | |||
) | [protected, virtual] |
Reimplemented in Gui::PythonEditor.
Definition at line 287 of file TextEdit.cpp.
Referenced by lineNumberAreaPaintEvent().
void TextEditor::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Set the approproriate item of the completion box or hide it, if needed.
Reimplemented from Gui::TextEdit.
Definition at line 323 of file TextEdit.cpp.
References Gui::WindowParameter::getWindowParameter(), indent, and RobotExample::pos.
void TextEditor::lineNumberAreaPaintEvent | ( | QPaintEvent * | event | ) |
Definition at line 291 of file TextEdit.cpp.
References drawMarker(), and Py::int.
Referenced by Gui::LineMarker::paintEvent().
int TextEditor::lineNumberAreaWidth | ( | ) |
Definition at line 240 of file TextEdit.cpp.
Referenced by resizeEvent(), and Gui::LineMarker::sizeHint().
void TextEditor::OnChange | ( | Base::Subject< const char * > & | rCaller, | |
const char * | sReason | |||
) |
Sets the font, font size and tab size of the editor.
Reimplemented from Gui::WindowParameter.
Definition at line 410 of file TextEdit.cpp.
References Gui::TextEditorP::colormap, Gui::WindowParameter::getWindowParameter(), and Gui::SyntaxHighlighter::setColor().
void TextEditor::paintEvent | ( | QPaintEvent * | e | ) | [protected] |
Draw a beam in the line where the cursor is.
Definition at line 443 of file TextEdit.cpp.
void TextEditor::resizeEvent | ( | QResizeEvent * | e | ) | [protected] |
Definition at line 261 of file TextEdit.cpp.
References cr, and lineNumberAreaWidth().
void TextEditor::setSyntaxHighlighter | ( | SyntaxHighlighter * | sh | ) |
Definition at line 317 of file TextEdit.cpp.
Referenced by open(), and Gui::PythonEditor::PythonEditor().
friend class SyntaxHighlighter [friend] |
Definition at line 109 of file TextEdit.h.