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. | |
void | onUncomment () |
Removes the leading '#' from each selected line or the current line if nothing is selected. | |
Public Member Functions | |
PythonEditor (QWidget *parent=0) | |
Constructs a PythonEditor which is a child of 'parent' and does the syntax highlighting for the Python language. | |
~PythonEditor () | |
Destroys the object and frees any allocated resources. | |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *e) |
Pops up the context menu with some extensions. | |
void | drawMarker (int line, int x, int y, QPainter *) |
Python text editor with syntax highlighting.
Definition at line 40 of file PythonEditor.h.
PythonEditor::PythonEditor | ( | QWidget * | parent = 0 |
) |
Constructs a PythonEditor which is a child of 'parent' and does the syntax highlighting for the Python language.
Definition at line 75 of file PythonEditor.cpp.
References draftlibs::fcgeo::connect(), onComment(), onUncomment(), and Gui::TextEditor::setSyntaxHighlighter().
PythonEditor::~PythonEditor | ( | ) |
Destroys the object and frees any allocated resources.
Definition at line 95 of file PythonEditor.cpp.
References Gui::WindowParameter::getWindowParameter().
void PythonEditor::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected] |
Pops up the context menu with some extensions.
Definition at line 115 of file PythonEditor.cpp.
References onComment(), and onUncomment().
void PythonEditor::drawMarker | ( | int | line, | |
int | x, | |||
int | y, | |||
QPainter * | p | |||
) | [protected, virtual] |
Reimplemented from Gui::TextEditor.
Definition at line 101 of file PythonEditor.cpp.
References Gui::Breakpoint::checkLine().
void PythonEditor::onComment | ( | ) | [slot] |
Inserts a '#' at the beginning of each selected line or the current line if nothing is selected.
Definition at line 126 of file PythonEditor.cpp.
References RobotExample::pos.
Referenced by contextMenuEvent(), and PythonEditor().
void 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.
Definition at line 149 of file PythonEditor.cpp.
References RobotExample::pos.
Referenced by contextMenuEvent(), and PythonEditor().