Python text editor with syntax highlighting. More...
#include <PythonEditor.h>
Public Slots | |
void onComment () | |
Inserts a '#' at the beginning of each selected line or the current line if nothing is selected. More... | |
void onUncomment () | |
Removes the leading '#' from each selected line or the current line if nothing is selected. More... | |
void setFileName (const QString &) | |
void startDebug () | |
Public Member Functions | |
void hideDebugMarker () | |
PythonEditor (QWidget *parent=0) | |
Constructs a PythonEditor which is a child of 'parent' and does the syntax highlighting for the Python language. More... | |
void showDebugMarker (int line) | |
void toggleBreakpoint () | |
~PythonEditor () | |
Destroys the object and frees any allocated resources. More... | |
![]() | |
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. More... | |
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. More... | |
~TextEditor () | |
Destroys the object and frees any allocated resources. More... | |
![]() | |
TextEdit (QWidget *parent=0) | |
Constructs a TextEdit which is a child of 'parent'. More... | |
virtual ~TextEdit () | |
Destroys the object and frees any allocated resources. More... | |
![]() | |
ParameterGrp::handle getWindowParameter (void) | |
return the parameter group of this window More... | |
void OnChange (Base::Subject< const char * > &rCaller, const char *sReason) | |
bool setGroupName (const char *name) | |
Sets the group of the window to name. More... | |
WindowParameter (const char *name) | |
virtual ~WindowParameter () | |
Protected Member Functions | |
void contextMenuEvent (QContextMenuEvent *e) | |
Pops up the context menu with some extensions. More... | |
void drawMarker (int line, int x, int y, QPainter *) | |
![]() | |
QWidget * getMarker () const | |
void keyPressEvent (QKeyEvent *e) | |
void paintEvent (QPaintEvent *e) | |
Draw a beam in the line where the cursor is. More... | |
void resizeEvent (QResizeEvent *e) | |
![]() | |
void keyPressEvent (QKeyEvent *) | |
Set the approproriate item of the completion box or hide it, if needed. More... | |
Additional Inherited Members | |
![]() | |
static ParameterGrp::handle getDefaultParameter (void) | |
get the parameters More... | |
Detailed Description
Python text editor with syntax highlighting.
Constructor & Destructor Documentation
◆ PythonEditor()
PythonEditor::PythonEditor | ( | QWidget * | parent = 0 | ) |
Constructs a PythonEditor which is a child of 'parent' and does the syntax highlighting for the Python language.
References onComment(), onUncomment(), and Gui::TextEditor::setSyntaxHighlighter().
◆ ~PythonEditor()
PythonEditor::~PythonEditor | ( | ) |
Destroys the object and frees any allocated resources.
References Base::Subject< _MessageType >::Detach(), and Gui::WindowParameter::getWindowParameter().
Member Function Documentation
◆ contextMenuEvent()
|
protected |
Pops up the context menu with some extensions.
References onComment(), and onUncomment().
◆ drawMarker()
|
protectedvirtual |
Reimplemented from Gui::TextEditor.
References Gui::PythonEditorP::breakpoint, Gui::Breakpoint::checkLine(), Gui::PythonEditorP::debugger, Gui::PythonEditorP::debugLine, Gui::PythonEditorP::debugMarker, Gui::PythonEditorP::debugRect, Gui::PythonEditorP::filename, and Gui::PythonDebugger::getBreakpoint().
◆ hideDebugMarker()
void PythonEditor::hideDebugMarker | ( | ) |
References Gui::PythonEditorP::debugLine, and Gui::TextEditor::getMarker().
◆ onComment
|
slot |
Inserts a '#' at the beginning of each selected line or the current line if nothing is selected.
Referenced by contextMenuEvent(), and PythonEditor().
◆ onUncomment
|
slot |
Removes the leading '#' from each selected line or the current line if nothing is selected.
In case a line hasn't a leading '#' then this line is skipped.
Referenced by contextMenuEvent(), and PythonEditor().
◆ setFileName
|
slot |
References Gui::PythonEditorP::filename.
◆ showDebugMarker()
void PythonEditor::showDebugMarker | ( | int | line | ) |
References Gui::PythonEditorP::debugLine, and Gui::TextEditor::getMarker().
◆ startDebug
|
slot |
◆ toggleBreakpoint()
void PythonEditor::toggleBreakpoint | ( | ) |
The documentation for this class was generated from the following files:
- src/Gui/PythonEditor.h
- src/Gui/PythonEditor.cpp